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
Setear validacion [ 'rule' => 'required|max:12', 'messages' => [ 'required' => 'This :attribute field is a must.', 'max' => 'This :attribute field maximum :max.' ] ]
public function setValidation(array $param): self { return $this->setExtra('validation', $param); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $producto = Producto::find($this->input('producto_id'));\n $cantMaxima = $producto->stock;\n return [\n 'producto_id' => 'required|numeric',\n 'cantidad' => 'required|numeric|max:'.$cantMaxima,\n 'descripcion' => 'string|max:255',\n ];\n }", "public function rules()\n {\n return ['nome' => 'required|min:5|max:100' ];\n }", "public function rules()\n {\n return [\n 'pergunta' => 'required|max:200',\n 'norma' => 'required',\n 'paragrafo' => 'required|max:15',\n ];\n\n }", "public function rules()\n {\n return [\n 'unit' => 'required|min:2|max:20'\n ];\n }", "public static function getMessageRule(){\n return [\n 'title.required' => 'Please input the title',\n 'cat_id.required' => 'Please chose a category',\n 'country_id.required' => 'Please chose a country',\n ];\n }", "public function rules()\n {\n return [\n //\n 'descricao' =>'required|max:200',\n ],\n ];\n }", "public function rules()\n {\n return [\n 'ma_ten' => 'required|unique:monan|max:50',\n 'ma_mota' => 'required',\n 'ma_dongia' => 'required',\n 'ma_hinhanh' => 'required|unique:monan',\n ];\n\n }", "public function rules()\n {\n return [\n\n 'comment' => 'required',\n 'nick' => 'required|max:16',\n\n\n\n ];\n }", "public function rules()\n {\n return [\n 'hihi' => 'required|min:6',\n ];\n }", "public function rules() {\n\t\treturn [\n\t\t\t'title' => 'required|max:50',\n\t\t\t'receiver' => 'required',\n\t\t\t'msg' => 'required|min:3|max:1000',\n\t\t];\n\t}", "public function rules()\n {\n return [\n 'titulo' => 'required|min:5|max:20|',\n 'descripcion' => 'required|min:5|max:50|',\n 'limite' => 'numeric|min:1|max:10',\n ];\n }", "public function rules()\n {\n return [\n 'reason'=>'required|max:80'\n ];\n }", "public function rules()\n {\n $const = config('const');\n return [\n 'thread_id' => 'required|integer',\n 'text' => 'required|string|max:' . $const['TEXT_MAX_LENGTH'],\n ];\n }", "public function validationRules() {\n\t\treturn [\t \n\t\t\t'nom'=>'required',\n\t\t\t'enonce'=>'required',\n\t\t\t'sur'=>'required'\n\t];\t\n\t}", "public function rules() {\n\t\treturn [\n\t\t\t'message' => 'required'\n\t\t];\n\t}", "public function rules()\n {\n return [\n //\n 'nombre'=> 'required|min:1|max:100', \n 'descripcion'=> 'required',\n ];\n }", "function form_validation_rules()\n\t{\n\t\t$this->form_validation->set_message('required', '%s tidak boleh kosong');\n\t}", "public function rules()\n {\n $validate = ['nombre' => 'required|min:7|max:50',\n \n 'representante_legal'=>'min:7|regex:/^[\\pL\\s\\-]+$/u|max:50',\n\n 'cargo' =>'min:5|regex:/^[\\pL\\s\\-]+$/u|max:50',\n \n 'comentario'=> 'min:15|max:280',\n\n 'logo'=> 'required',\n\n 'tipoevaluacion'=> 'required']; \n\n return $validate;\n }", "public function rules() : array\n {\n return [\n 'nombre' => 'required|string',\n 'telefono' => 'regex:/[0-9]{10}/',\n 'email' => 'unique:email',\n \n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'required',\n 'cedula' => 'required|numeric',\n 'descripcion' => 'required|min:3|max:1000',\n 'telefono' => 'required|numeric',\n ]; \n }", "public function validation()\n\t{\n\t\t$tim=$this->form_validation;\n\t \t$data_option = array(\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"name\",\n\t \t\t\t\"label\"=>\"Name\",\n\t \t\t\t\"rules\"=>\"required\"\n\t \t\t),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"firstname\",\n\t \t\t\t\"label\"=>\"Firstname\",\n\t \t\t\t\"rules\"=>\"required\"\n\t \t\t),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"lastname\",\n\t \t\t\t\"label\"=>\"Lastname\",\n\t \t\t\t\"rules\"=>\"required\"\n\t \t\t),\n\t \t\tarray(\n \"field\" => \"email\", \n \"label\" => \"Email\", \n \"rules\" => \"required|valid_email\"\n ),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"sex\",\n\t \t\t\t\"label\"=>\"Sex\",\n\t \t\t\t\"rules\"=>\"required\"\n\t \t\t),\n\t \t\t\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"id_card\",\n\t \t\t\t\"label\"=>\"ID_Card\",\n\t \t\t\t\"rules\"=>\"exact_length[13]\"\n\t \t\t),\n\t \t\t\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"fb_id\",\n\t \t\t\t\"label\"=>\"facebookid\",\n\t \t\t\t\"rules\"=>\"\"\n\t \t\t),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"name_fb\",\n\t \t\t\t\"label\"=>\"facebookname\",\n\t \t\t\t\"rules\"=>\"\"\n\t \t\t),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"usernameIG\",\n\t \t\t\t\"label\"=>\"intagramname\",\n\t \t\t\t\"rules\"=>\"\"\n\t \t\t),\n\t \t\tarray(\n\t \t\t\t\"field\"=>\"token\",\n\t \t\t\t\"label\"=>\"access_token\",\n\t \t\t\t\"rules\"=>\"\"\n\t \t\t),\n\t \t);\n\t \t$tim->set_rules($data_option);\n\t \t$tim->set_message(\"required\",\"กรุณากรอกข้อมูล %s\");\n\t \t$tim->set_message(\"alpha_numeric\",\"กรุณากรอกข้อมูล %s ให้ถูกต้อง \");\n\t \t$tim->set_message(\"exact_length\",\"กรุณากรอกตัวเลข 13 หลัก\");\n\t \t$tim->set_message(\"valid_email\",\"กรุณากรอก %s ให้ถูกต้อง\");\n\t}", "public function rules()\n {\n return [\n 'key' => 'required|max:15'\n ];\n }", "public function rules()\n {\n $counter_id = $this->counter_id;\n return [\n 'act' => 'required|min:3|max:35', Rule::unique('contador')->ignore($counter_id),'act',\n 'cont' => 'numeric'\n ];\n }", "protected static function _maxLength() {\n if (self::$_ruleValue) {\n if (strlen(trim(self::$_elementValue)) > self::$_ruleValue) {\n self::setErrorMessage(\"Enter at most \" . self::$_ruleValue . \" charachters only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }", "public function rules()\n {\n return [\n 'descricao' => 'required|min:4|max:200',\n 'data_publicacao' => 'required|after:now',\n ];\n }", "public function rules()\n {\n return [\n 'comment' => 'required|string|max:300|min:2',\n \n ];\n }", "public function rules()\n {\n return [\n 'jenis' => 'required',\n 'harga' => 'required|numeric',\n 'tahun' => 'required|numeric|between:1442,1447',\n 'lama' => 'required|numeric|min:1',\n 'besar_angsuran' => 'required|min:1',\n 'interval_angsuran' => 'required|min:1',\n 'tgl_angsuran_pertama' => 'required',\n 'max_pequrban' => 'required',\n ];\n }", "public function rules()\n {\n return [\n 'descripcion' => 'required|max:50',\n /* 'estadia' => 'required|max:50', */\n 'valor_pago' => 'required|numeric|min:0.00|max:999999.99'\n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'sometimes',\n 'correo' => 'sometimes|email',\n 'mensaje' => 'required|min:5',\n 'telefono' => 'required|numeric|digits_between:10,15'\n ];\n }", "public function rules()\n {\n return [\n 'nombre_asignatura'=>'required|max:45',\n 'tipo'=>'required|max:45'\n ];\n }", "public function rules()\n {\n return [\n 'dt_encerramento' => 'required',\n 'ds_justificativa' => 'required|max:255'\n ];\n }", "public function rules()\n {\n return [\n 'countdown_text'=>'required|max:10',\n 'countdown_time'=>'required'\n ];\n }", "public function rules()\n {\n //$data(Input::request->all());\n /*\n return [\n 'enarszam' =>['bail','required','regex:/^[0-9]/','between:10,10',new Enarszam_check],\n 'neve' =>'required',\n 'neme' =>'required',\n 'szuletes_datuma' =>'required',\n 'bekerult' =>'required',\n 'fajta' =>'required',\n 'szine' =>'required',\n 'anya_enarszam' =>'required',\n 'anya_neve' =>'required',\n 'jarlat_sorszam' =>'required',\n 'jarlat_kiadasa' =>'required',\n 'szarmazas_tenyeszet' =>'required',\n ];\n //print_r($data);exit;\n */\n return [\n 'enarszam' =>['required','regex:/^[0-9]/','between:10,10',new Enarszam_check], \n 'neve' => ['bail','nullable','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n \n 'neme' => ['required',Rule::in(['noivaru', 'himivaru']),],\n 'szuletes_datuma' => 'required|date',\n 'bekerult' => ['required','date',new MarhaDatumBekerultcheck,],\n 'fajta' => ['required',Rule::in(['magyartarka', 'limousin', 'lapaly', 'feher_kek', 'hereford', 'hersey', 'magyarszurke', 'egyebbhushasznu','nullable',]),],\n\n 'szine' => ['required',Rule::in(['vorostarka', 'feketetarka', 'zsemletarka', 'fekete', 'voros', 'feketevoros', 'egyebbtarka', 'egyebb','nullable',]),\n ],\n 'anya_enarszam' => ['required','regex:/^[0-9]/','between:10,10','different:enarszam',], \n\n 'anya_neve' =>['nullable','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n\n 'jarlat_sorszam' =>['nullable','max:100','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/'],\n\n 'jarlat_kiadasa' => ['required','date',new MarhaDatumJarlatcheck,],\n\n 'szarmazas_tenyeszet' => ['required','max:255','regex:/^[A-ZaáeéiíoóöőuúüűAÁEÉIÍOÓÖŐUÚÜŰa-z0-9_ ]+$/',],\n\n \n ]; \n \n \n \n\n\n }", "public function rules()\n {\n return [\n 'titulo' => 'required|alpha|max:255',\n ];\n }", "public function rules()\n {\n return [\n //'periodo_id1' => 'required',\n //'mes_id1' => 'required',\n //'dia_id1' => 'required',\n 'programa_desc' => 'required|min:1|max:500',\n 'actividad_desc' => 'required|min:1|max:500',\n 'objetivo_desc' => 'required|min:1|max:500',\n 'umedida_id' => 'required',\n 'mesp_01' => 'required', \n 'mesp_02' => 'required',\n 'mesp_03' => 'required',\n 'mesp_04' => 'required',\n 'mesp_05' => 'required', \n 'mesp_06' => 'required',\n 'mesp_07' => 'required', \n 'mesp_08' => 'required',\n 'mesp_09' => 'required',\n 'mesp_10' => 'required',\n 'mesp_11' => 'required',\n 'mesp_12' => 'required'\n //'accion' => 'required|regex:/(^([a-zA-z%()=.\\s\\d]+)?$)/i',\n //'medios' => 'required|regex:/(^([a-zA-z\\s\\d]+)?$)/i'\n //'rubro_desc' => 'min:1|max:80|required|regex:/(^([a-zA-zñÑ%()=.\\s\\d]+)?$)/iñÑ'\n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|string|max:20',\n 'composer' => 'required|string|max:20',\n 'limit' => 'required|integer',\n ];\n }", "private function form_validation_rules() {\n $this->form_validation->set_rules('nama', 'Nama Lengkap', 'required');\n $this->form_validation->set_rules('telepon', 'Telepon', 'required');\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('alamat', 'Alamat Lengkap', 'required');\n\n //set custom error message\n $this->form_validation->set_message('required', '%s tidak boleh kosong');\n }", "public function rules()\n {\n return [\n 'testimoni' => 'required'\n ];\n }", "public function rules()\n {\n return [\n 'isim' =>'required|string|max:75',\n 'email' => 'required|email',\n 'konu' => 'required|string|max:180',\n 'mesaj' => 'required|string',\n ];\n }", "public function rules()\n {\n return [\n 'patente'=>'required|max:10',\n\t\t\t'marca'=>'required|max:30',\n\t\t\t'modelo'=>'required|max:30',\n\t\t\t'anio'=>'required|max:10',\n\t\t\t'color'=>'required|max:15',\n\t\t\t'motor'=>'required|max:30',\n\t\t\t'kilometraje'=>'required|max:10',\n\t\t\t'combustible'=>'required|max:10',\n\t\t\t//'descrip_ciente'=>'required|max:200',\n ];\n }", "public function rules()\n {\n return [\n 'nombre'=>'required|unique:postgrados|min:10|max:200',\n 'director'=>'required|min:10|max:150',\n 'descripcion'=>'required|min:10|max:1500',\n 'duracion'=>'required|integer|min:2|max:16',\n ];\n }", "public function rules()\n {\n return [\n 'no_idt' => 'required|min:4|max:30',\n 'nama' => 'required|min:3|max:100',\n 'jk' => 'required',\n 'no_hp' => 'required|numeric|digits_between:11,13',\n 'alamat' => 'required|min:5|max:150',\n 'password' => 'required|min:8|max:50'\n ];\n }", "public function rules()\n {\n return [\n 'diary_comment' => ['required', 'max:1000'],\n ];\n }", "public function rules()\n {\n return [\n// 'value_vi' => 'max:191',\n// 'value_en' => 'max:255',\n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'required|max:255|regex:/^[a-zA-ZáéíóúÁÉÍÓÚ_. ]/',\n 'ciiu' => 'required|max:255|regex:/^[1-9]/',\n 'organizacion_id' => 'required'\n ];\n }", "public function rules()\n {\n return [\n 'He_So_Luong' => ['required', 'numeric', 'min:1', 'max:5', \"unique:he_so_luong,He_So_Luong,$this->id,id\"]\n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'required:max:150',\n 'idtramite' => 'required', \n 'idrol' => 'required', \n 'componente' => 'required|max:250',\n 'orden' => 'required',\n 'descripcion' => 'required|max:250',\n ];\n }", "public function rules()\n {\n \n return [\n 'id'=>'bail|required|integer|exists:tipo_movimiento,id',\n 'descripcion' => 'bail|max:50|min:1|unique:tipo_movimiento,descripcion,'.$this->get('id'),\n 'tipo' => 'bail|max:50|min:1|in:credito,debito'\n ];\n\n\n }", "public function rules()\n {\n return [\n 'title' => 'required|max:191',\n ];\n }", "public function rules()\n {\n return [\n 'apoderado' => ['required','max:100'],\n 'apPatApo' => ['required','max:100'],\n 'apMatApo' => ['required','max:100'],\n 'fonoApo' => ['required','max:100'],\n 'rutApo' => ['required','max:100'],\n 'dvApo' => ['required','max:100'],\n 'correoApo'=> ['required','max:100']\n ];\n }", "public function rules()\n {\n return [\n 'value' => 'required|string|max:255'\n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'required|min:3',\n \n 'color' => 'required|min:3',\n \n 'tamaño' => 'required|min:3',\n 'detalle' => 'required|min:3',\n 'fecha_lugar' => 'required|min:3',\n\n ];\n }", "public function rules()\n {\n return [\n 'name' => ['required', 'min:10', 'max:500'],\n 'year' => ['required', 'size:4', 'regex:/(20[0-9]{2}$)/']\n ];\n }", "public function rules()\n {\n return [\n 'title'=>'required|max:191',\n 'category_id'=>'required',\n 'description'=>'required|max:191',\n 'achievement_time'=>'required|integer| between:1,10000'\n ];\n }", "public function rules()\n {\n return [\n 'book_title'=>'required|min:3|regex:/^[a-zA-Z0-9 #.]+$/',\n 'url'=>'required|regex:/^[www.][a-zA-z0-9 \\/&@+#%?=~_\\!:,.-]*[-a-z0-9+&@#\\/%=~_-]+$/',\n 'image'=>'required|image',\n 'price'=>'required|numeric|min:0.1', // numeric|min:0.1\n 'description'=>'required|min:45', // |regex:/^[a-zA-Z0-9?$@#()\\'!,+\\-=_:.&€£*%\\s \"]+$/',\n 'categories'=>'required|array',\n 'authors'=>'required|array',\n\n\n ];\n /** $messages = [\n 'unique' => 'The :attribute already been registered.',\n 'phone.regex' => 'The :attribute number is invalid , accepted format: xxx-xxx-xxxx',\n 'address.regex' => 'The :attribute format is invalid.',\n ];\n */\n }", "public function rules()\n {\n return [\n 'nombre'=> 'required|string|max:50',\n 'categoria'=> 'required',\n 'fecha' => 'required|string',\n 'precio'=> 'required|string|max:5|min:2',\n 'hora' => 'nullable|string|max:5|min:2',\n 'semana'=> 'nullable|string|max:5|min:2',\n 'mes' => 'nullable|string|max:5|min:2',\n ];\n }", "public function rules()\n {\n return [\n 'titulo' => 'required|max:140',\n 'descricao' => 'required|max:300',\n 'conteudo' => 'required',\n 'data' => 'required|date'\n ];\n }", "public function rules()\n {\n \n return [\n 'convocatoria'=>'required',\n 'name'=>'required|max:50|min:3|regex:/^[\\pL\\s\\-]+$/u',\n //'score'=>'required|numeric|digits_between:1,3|max:' . $this->meritosa . '|min:1',\n \n \n ];\n \n }", "public function rules()\n {\n return [\n 'parameter' => 'required',\n ];\n }", "public function rules()\n {\n Validator::extend('existeInfoFecha', function($attribute, $value, $parameters){ \n $validatefecha=Fecha::where('etapaSerie_id',$this->input('etapa'))\n ->where('fechaInicio',$this->input('fecha')) \n ->count();\n if($validatefecha==0){\n return true;\n }else{\n return false;\n }\n\n },\"La fecha seleccionada ya pertece a esta etapa\");\n return [\n 'fecha'=>'required|existeInfoFecha',\n 'etapa'=>'required',\n ];\n }", "public function rules()\n {\n return [\n 'seller_reply' => 'required|max:500|min:10',\n ];\n }", "public function rules()\n {\n return [\n 'descricao' => 'required|min:10|max:255|',\n 'id_autonomo' => 'required|numeric|',\n ];\n\n }", "public function validator(){\n\t\t$this->runValidation(new ReqValidator($this, ['field'=>'material_name', 'msg' => 'Material name is required.']));\n\t\t$this->runValidation(new MaxValidator($this, ['field'=>'material_name', 'rule'=>60, 'msg' => 'Material name must be less than 60 characters']));\n\t\t$this->runValidation(new AlphaNumValidator($this, ['field'=>'material_name', 'msg' => 'Material name can only contain letters, numbers and spaces']));\n\t}", "public function rules()\n {\n return [\n 'title' => 'required|max:70',\n 'category_id' => 'required',\n 'description' => 'required'\n ];\n }", "public function rules()\n {\n $rules = [\n 'merk' => 'bail', 'required',\n 'tipe_barang' => 'bail', 'required',\n 'jumlah'=>'required|max:5',\n 'kerusakan'=>'required|max:255',\n ];\n return $rules;\n\n }", "public function rules()\n {\n return [\n 'nama_rak' => 'required|min:6',\n 'lokasi_rak' => 'required|min:6',\n ];\n }", "public function rules()\n {\n return [\n 'nombre' => ['required', 'string', 'max:255','min:2'],\n 'ubicacion' => ['required', 'string', 'min:2', 'max:255'],\n 'image' => ['required'],\n 'telefono'=>['required','integer','regex:/[0-9]{9}/'],\n ];\n }", "public function rules()\n {\n return [\n 'data' => 'required|date_format:'.config('app.date_format'),\n 'nome_lider' => 'required',\n 'forno' => 'required',\n 'operacao' => 'max:2147483647|required|numeric',\n 'saida' => 'required',\n 'umidade' => 'required',\n 'quantidade_real' => 'required',\n 'saida_acumulada' => 'required',\n 'observacoes' => 'required',\n 'quantidade_bags' => 'required',\n 'fornecedor_id' => 'required',\n ];\n }", "public function rules(){\n\n return [\n 'title' => 'required|min:10|regex:/^[A-Za-z0-9]+$/|unique:movies',\n 'description' => 'required|min:10|max:250',\n 'language' => 'required|in:fr,en,es',\n 'annee' => 'required|date_format:Y|after:now',\n 'budget' => 'required|integer',\n 'BO' => 'required|in:Vo,vost,vostfr'\n\n /*\n * date_format: d/m/y\n * digits:4 on peut utilise pour les dates\n * pour after on peut choisir date exemple after:10/01/2015 n'accept pas date avant\n * before avant\n */\n ];\n }", "public function rules()\n {\n return [\n 'roll_no'=>['required', 'regex:/[B,M][0-9]{6}ME/'],\n 'name'=>'required|min:3',\n 'stream'=>'required|in:B-Tech,M-Tech',\n 'admission_year'=>['required', 'regex:/20[0-1][0-9]/']\n ];\n }", "protected function mainValidation()\n {\n $this->validator->add(\n 'title',\n new StringLength([\n 'max' => 50\n ])\n );\n\n $this->validator->add(\n 'description',\n new StringLength([\n 'max' => 200,\n 'allowEmpty' => true\n ])\n );\n }", "public function rules()\n {\n return [\n 'nom_campagne'=>'required|string|between:5,254',\n 'description_campagne'=>'required|string|min:10',\n 'date_debut'=>'required|date|after:today',\n 'date_fin'=>'required|date|after:tommorow|after:date_debut',\n 'choix_binaire'=>'boolean',\n 'choix_validation'=>'boolean',\n 'choix_popularite'=>'required|integer|between:0,50'\n ];\n }", "public function rules()\n {\n return [\n 'name'=>'required|max:255',\n 'value'=>'max:1000'\n ];\n }", "public function rules()\n {\n return [\n 'name' =>'required|min:3|max:255',\n \n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|max:32',\n 'desc' => 'max:200'\n ];\n }", "public function rules()\n {\n return [\n 'escuela' => 'required',\n 'nombre' => 'required',\n 'periodo_id' => 'required|integer'\n\n ];\n }", "public function rules()\n {\n return [\n 'organizacion_id' => 'required',\n 'etiqueta' => 'required|max:255|regex:/^[a-zA-ZáéíóúÁÉÍÓÚ0-9_. ]*$/',\n 'tipo_dato' => 'required|max:255'\n ];\n }", "public function rules()\n {\n return [\n 'tennhanvien'=>'required',\n 'diachi'=>'required',\n 'sodienthoai'=>'required|regex:/^([0-9\\s\\-\\+\\(\\)]*)$/|min:10|unique:nhanvien,sodienthoai,'.$this->id,\n 'email'=>'required:rfc,dns|regex:/(.+)@(.+)\\.(.+)/i|unique:nhanvien,email,'.$this->id,\n ];\n }", "public function rules()\n {\n $data = [\n 'entrada_lamina_almacen'=>'required|exists:entrada_lamina_almacen,id',//editar mensaje\n 'retal'=>'required|exists:kardex_retal_lamina,id',\n 'fecha'=>'required|date',\n 'maquina'=>'required|in:Fasti,Müller,Durma,Forming Roll',\n 'ensamble'=>'required|in:Fondo,Tanque,Tk Exp.,Tapa,Prensa,Gabinete,Radiador,Mecanizado,Adicional',\n 'corte'=>'required|exists:cortes,id',//editar mensaje\n 'consumo'=>'required|numeric',\n 'desperdicio'=>'required|numeric',\n 'consecutivo_retal'=>'numeric|unique:consumo_diario_lamina,consecutivo_retal,'.$this->id.',id',\n 'operario'=>'required|exists:users,id',//editar mensaje\n ];\n\n return $data;\n }", "public function rules()\n {\n return [\n 'year_id' => 'required|string',\n 'stage_id' => 'required|string',\n 'sala_id' => 'required|string',\n 'title' => 'required|string|min:3|max:50',\n 'time_initial' => \"required|,{$this->id},id\",\n 'time_final' => \"required|after:tomorrow,{$this->id},id\",\n\n ];\n }", "public static function validationRules()\n {\n return [\n 'consumer_key' => 'max:255',\n 'consumer_key_secret' => 'max:255',\n 'access_token' => 'max:255',\n 'access_token_secret' => 'max:255',\n 'user_id' => 'required|integer'\n ];\n }", "public function validation()\n {\n //get all input\n $input=Input::ALl();\n\n //validation rule\n $rule=array(\n 'title'=>'required|min:5',\n 'description'=>'required'\n );\n\n //show Validation message\n $message=array(\n 'required'=>'This field cannot be empty',\n 'min:5'=>'minimum five character is required'\n );\n\n $v=Validator::make($input,$rule,$message);\n return $v;\n }", "public function rules()\n {\n $documento = count($this->get('documentoDestinoTrasladoDocumentoDetalle')); \n $concepto = count($this->get('documentoConceptoDestinoTrasladoDocumentoDetalle')); \n $tercero = count($this->get('terceroDestinoTrasladoDocumentoDetalle')); \n \n\n $validacion = array(\n \"numeroTrasladoDocumento\" => \"required|string|max:10|unique:trasladodocumento,numeroTrasladoDocumento,\".$this->get('idTrasladoDocumento') .\",idTrasladoDocumento\",\n \"descripcionTrasladoDocumento\" => \"required|string|max:80\",\n \"fechaElaboracionTrasladoDocumento\" => \"required|date\",\n \"estadoTrasladoDocumento\" => \"required|string|max:10\",\n \"SistemaInformacion_idOrigen\" => \"required|int\",\n \"SistemaInformacion_idDestino\" => \"required|int\");\n\n if($this->get('bodegaEmbarque') == 'on')\n {\n $validacion[\"fechaRealEmbarque\"] = \"required\"; \n }\n\n if($this->get('otmEmbarque') == 'on')\n {\n $validacion[\"fechaRealEmbarque\"] = \"required\"; \n }\n\n for($i = 0; $i < $documento; $i++)\n {\n if(trim($this->get('documentoDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['documentoDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n for($i = 0; $i < $concepto; $i++)\n {\n if(trim($this->get('documentoConceptoDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['documentoConceptoDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n for($i = 0; $i < $tercero; $i++)\n {\n if(trim($this->get('terceroDestinoTrasladoDocumentoDetalle')[$i]) == '')\n { \n $validacion['terceroDestinoTrasladoDocumentoDetalle'.$i] = 'required';\n }\n } \n\n \n return $validacion; \n }", "public function rules()\n {\n return [\n 'id_almacen'=>'max:15',\n 'id_sitio'=>'max:15',\n 'descripcion_almacen'=>'required|max:200',\n 'cantidad_equipo_almacen'=>'numeric',\n 'estado_almacen'=>'required|max:50',\n ];\n }", "public function rules()\n {\n return [\n 'ar_name' => ['required', 'max:50'],\n 'en_name' => ['required', 'max:50'],\n 'sort' => ['required', 'numeric'],\n 'description' => ['max:190'],\n ];\n }", "public function rules()\n {\n return [\n 'num_facture'=>'required',\n 'objet'=>'required',\n 'date_facture'=>'required',\n 'date_reception'=>'required'\n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|max:255'\n ];\n }", "public function rules()\n {\n return [\n 'asylee_id'=>'required',\n 'medicine_id'=>'required',\n 'hora_medicamento'=>'required',\n 'complemento'=>'required'\n ];\n }", "public function rules()\n {\n return [\n 'title' => 'required|',\n 'tweet' => 'required|max:140',\n ];\n }", "public function rules()\n {\n return [\n 'name' => 'required',\n 'message' => 'required',\n 'locale' => 'required|in:en,mt',\n ];\n }", "public function rules()\n {\n return [\n 'fech_inic' => 'required|date_format:\"Y-m-d h:i a\"',\n 'fech_fina' => 'required|date_format:\"Y-m-d h:i a\"|after_or_equal:fech_inic',\n 'peri_nota' => 'required|in:'. implode(',', Periodo::indexados()),\n 'tipo_nota' => 'required|in:'. implode(',', TipoNota::indexados()),\n 'moti_nota' => 'required|min:3|max:250|regex:/^[0-9a-zA-ZáéíóúàèìòùäëïöüñÁÉÍÓÚÄËÏÖÜÑ_#\\-\\'\".,;\\s]+$/i',\n ];\n }", "public function rules()\n {\n return [\n \n \n //'id_detalle'=>'max:10|required|unique:detalles,id_reserva',\n 'id_origen_destino'=>'max:10|required',\n 'id_reserva'=>'max:10|required',\n \n 'cantidad'=>'max:50|required|integer',\n \n ];\n }", "public function rules()\n {\n return [\n 'sam_nom' => 'required|string|unique:sample',\n 'sample' => 'required|max:8000000', // Fichier pas plus lourd que 7Mo\n 'prix' => 'required',\n 'sam_poche' =>'required|image',\n \n ];\n }", "public function rules()\n {\n return [\n 'nombre' => 'required|max:25|min:3|alpha',\n 'apellidop' => 'required|max:20|min:3|alpha',\n 'apellidom' => 'required|max:20|min:3|alpha',\n 'ci' => 'required|max:99999999|min:6|numeric',\n 'expedido' => 'required',\n 'telefono' => 'required|max:99999999|min:8|numeric',\n \n ];\n }", "public function rules()\n {\n return [\n 'nombre' =>'required|alpha_spaces|max:100',\n 'fecha_nacimiento' =>'required|string'\n ];\n }", "public function _set_rules()\n {\n $this->form_validation->set_rules('kode_buku','Kode Buku','required|max_length[5]');\n $this->form_validation->set_rules('judul','Judul Buku','required|max_length[100]');\n $this->form_validation->set_rules('pengarang','Pengarang','required|max_length[50]');\n $this->form_validation->set_rules('klasifikasi','Klasifikasi','required|max_length[200]'); \n $this->form_validation->set_message('required', '{field} kosong, silahkan diisi');\n $this->form_validation->set_error_delimiters(\"<div class='alert alert-danger'><a href='#' class='close' data-dismiss='alert'>&times;</a>\",\"</div>\");\n }", "public function rules()\n {\n return [\n 'title'=>'required|max:120',\n 'entreprise_id' => 'required|exists:entreprises,id',\n 'duree' => 'max:60',\n 'description' => 'max:255',\n 'nom_contact' => 'max:60',\n 'email' => 'max:60',\n 'tel' => 'max:60',\n 'horaire' => 'max:60',\n 'gratification' => 'max:60',\n 'telephone' => 'max:60',\n 'adresse_stage' => 'max:60',\n ];\n\n }", "public function rules()\n {\n return [\n 'name' => 'max:50',\n 'lastname' => 'max:12',\n 'age' => 'max:2',\n 'dni' => 'required|max:9',\n 'email' => 'required|max:24',\n 'id_car' => 'required',\n ];\n }", "public function rules()\n {\n return [\n //\n 'subject'=>'required|max:255',\n 'para'=>'required|between:1,255',\n 'commentText'=>'required|max:65535'\n ];\n }", "public function rules()\n {\n return [\n 'bancoNumero' => ['required', 'integer', 'digits_between:16,16'],\n 'bancoNombre' => ['required'],\n ];\n }", "public function rules()\n {\n\n return [\n 'nombre'=>['string',\n Rule::unique('tbl_proyectos_realizados','rt_titulo_proyecto')\n ->where(function($query){\n return $query->where('fk_id_usuario',$this->user()->pk_id_usuario);\n }),\n ],\n\n 'fechaI'=>'date|required',\n 'fechaF'=>'date|required',\n 'area'=>'numeric|required',\n 'area-c'=>'string|required_if:area,\"Otra Área de conocimiento\"',\n 'descripcion'=>'required|string|min:6|max:150'\n\n\n ];\n }" ]
[ "0.7283509", "0.71827763", "0.70133954", "0.69930005", "0.6991932", "0.6979023", "0.6923422", "0.68843275", "0.6874212", "0.68617904", "0.68615276", "0.6858788", "0.6851456", "0.6835415", "0.6820481", "0.6818368", "0.68061644", "0.6785753", "0.67790896", "0.67665", "0.6736721", "0.672799", "0.67274386", "0.6724091", "0.67197883", "0.67194706", "0.6713476", "0.67084736", "0.6708345", "0.6700269", "0.66512036", "0.6649509", "0.664828", "0.6641007", "0.6627133", "0.6623784", "0.6621888", "0.6619024", "0.6614226", "0.66113657", "0.66108644", "0.66012955", "0.6598509", "0.65859544", "0.6585888", "0.65852565", "0.65852237", "0.65765136", "0.6574187", "0.65741587", "0.65708905", "0.65658283", "0.65637594", "0.6562794", "0.6559519", "0.6557883", "0.6556009", "0.6553512", "0.65456825", "0.65421915", "0.6540653", "0.6539952", "0.6536585", "0.6535225", "0.65337896", "0.6532989", "0.65323657", "0.65316737", "0.65256274", "0.6524382", "0.6524208", "0.6522921", "0.65222627", "0.6514671", "0.65117115", "0.65083003", "0.65067", "0.6504182", "0.6501208", "0.64961743", "0.6493991", "0.6493959", "0.64917684", "0.6490124", "0.6489355", "0.64892685", "0.64862007", "0.6480499", "0.64762014", "0.6472707", "0.64722", "0.64712733", "0.64684457", "0.64650434", "0.6463772", "0.6463734", "0.6462811", "0.6461241", "0.64591736", "0.6458825", "0.64579904" ]
0.0
-1
This will then load my_view from resources/views instead of the formfield. $action can be browse, read, edit, add or order $content the content for this field $dataType the DataType $dataTypeContent the whole modelinstance $row the DataRow
public function setView($view): self { $this->extras['view'] = $view; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load() {\n\t\t$this->init();\n\t\t$action = $this->action;\n\t\t$view = $this->$action();\n\n\t\tif ($view instanceof View && !$this->app->isErrorPage()):\n\t\t\t$this->app->view = $view;\n\t\tendif;\n\n\t\t$this->app->view->mergeData($this->data);\n\t\t$this->app->view->validate();\n\t}", "private function getFieldView($name,$config,$LSI,$curAction) {\n\t\tif($name==\"id_categoria\"):\n $r=1;\n endif;\n\t\t$field_type = $config->mode;\n\t\t$this->mydata[\"name\"] = $name; \n\t\t$this->mydata[\"required\"] = (@$config->null==\"NO\")? \"required\": \"\"; \n\t\t$this->mydata[\"extra\"] = (@$config->extra!=\"\")? $config->extra: \"\"; \n\t\t\n\t\t$this->mydata[\"size\"] = (@$config->size!=\"\")? @$config->size: \"3,9\"; \n\t\t\n\t\t$this->mydata[\"field_name\"] = \"x_\".$name;\n\t\t$this->mydata[\"ffile\"] = $this->data[\"ffile\"];\n\t\t$data_lang[$name] = $LSI;\n\t\n\t\t$this->mydata[\"LSI\"] = $data_lang;\n\t\t$view = '';\t\n\t\t\n\t\t\n\t\t// SETUP DEFAULT\n\t\tif (@$this->data[\"load\"]->$name != \"\") :\n\t\t\t$this->mydata[\"default\"] = @$this->data[\"load\"]->$name;\n\t\telse:\n\t\t// echo \"load\"; print_r($this->data[\"ffile\"]);\n\t\t\tif ($this->nativesession->get($this->data[\"ffile\"].\"_s_\".$name) != \"\"):\n\t\t\t\t\n\t\t\t\t$this->mydata[\"default\"] = $this->nativesession->get($this->data[\"ffile\"].\"_s_\".$name); \n\t\t\telse:\n\t\t\t\tswitch (@$config->default):\n\t\t\t\t\tcase \"CURDATE\":$this->mydata[\"default\"] = @date(\"Y-m-d\"); break;\n\t\t\t\t\tcase \"CURDATETIME\":$this->mydata[\"default\"] = @date(\"Y-m-d H:i:s\"); break;\n\t\t\t\t\tcase \"MULTIJOIN\": \n\t\t\t\t\t\t$explodemultijoin = explode(\",\",$config->multijoin);\n\t\t\t\t\t\tif ($this->keydata):\n\t\t\t\t\t\t\t$this->mydata[\"default\"] = $this->Global_model->get_rows_select_unique($explodemultijoin[2],$explodemultijoin[0],$this->keydata);\n\t\t\t\t\t\tendif;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"FUNCTION\":\n\t\t\t\t\t\tif (@$config->default_function !=\"\"):\n\t\t\t\t\t\t\t$namefunction = $config->default_function;\n\t\t\t\t\t\t\t$this->mydata[\"default\"] = $this->common->$namefunction($this->data);\n\t\t\t\t\t\tendif;\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: $this->mydata[\"default\"] = @$config->default; break;\n\t\t\t\tendswitch;\n\t\t\t\n\t\t\tendif;\n\t\tendif;\n\t\t\n\t\t\n\t\n\t\tif (@$config->ftype != \"\") : //Tipo definido en la configuración\n\t\t\t//print_r($config);\n\t\t\t// ---------------------------\n\t\t\t// biblioteca multiple extend\n\t\t\t// ---------------------------\n\t\t\tif ($config->ftype == \"biblioteca_multiple\"):\n\t\t\t\t$biblioteca = $this->Systemedit_model-> get_rows($name,array($config->keylinkbib=>$this->input->get($config->keylinkbib)));\n\t\t\t\t\n\t\t\t//\tprint_r($biblioteca);\n\t\t\t\tif (count($biblioteca) > 0) :\n\t\t\t\t\tforeach ($biblioteca as $bib):\n\t\t\t\t\t\t$this->mydata[\"default\"].= $bib->id_biblioteca.\",\";\n\t\t\t\t\tendforeach;\n\t\t\t\tendif;\n\t\t\tendif;\n\t\t\t// ---------------------------\n\t\t\t// END biblioteca multiple extend\n\t\t\t// ---------------------------\n\t\t\t\n\t\t\tif ($config->ftype == \"select\" || $config->ftype == \"input_radio\" || $config->ftype == \"input_radio_rol\" || $config->ftype == \"select_multiple\" || substr($config->ftype,0,14)==\"special_select\" ):\t\t\t\n\t\t\t\tif ($config->fvalue==\"table\") : // cargar desde tabla \n\t\t\t\t\t$explodejoin = explode(\",\",$config->fjoin);\n\t\t\t\t\t$wheretemp = (@$explodejoin[3]!='')?$explodejoin[3]:NULL;\n\t\t\t\t\tif($name==\"id_categoria\"):\n $wheretemp.= \" and CT.localizacion = '\".localizacion().\"'\";\n endif;\n\t\t\t\t\t\n\t\t\t\t\t// V2\n\t\t\t\t\tif ($config->ftype == \"special_select_categorias\"):\n\t\t\t\t\t\t$seleccionadas = array();\n\t\t\t\t\t\tforeach ($this->mydata[\"default\"] as $key=>$val):\n\t\t\t\t\t\t\t$seleccionadas[$val] = $val;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\t$this->mydata[\"arbol\"] =$this->Global_model->get_arbol_lineal_categorias();\n\t\t\t\t\t\t$this->mydata[\"esquema_arboledit_html\"]= $this->Global_model->esquema_arboledit_html($this->mydata[\"arbol\"],$this->data[\"catnivel_nombre\"],$this->data[\"max_nivel_categorias\"],'',1,$seleccionadas );\n\t\t\t\t\t\t// print_r($seleccionadas);\n\t\t\t\t\tendif;\n\n\t\t\t\t\t// END v2\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (@$config->custom_sqlfunction != \"\"): \n\t\t\t\t\t\t$namefunc = $config->custom_sqlfunction;\n\t\t\t\t\t\t$datalist = $this->Global_model->get_custom_query($this->common->$namefunc());\n\t\t\t\t\t\t\n\t\t\t\t\telse:\n\t\t\t\t\t\t$datalist = $this->Global_model->get_rows_select($explodejoin[1].\",\".$explodejoin[2],$explodejoin[0],$wheretemp);\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\telse : //string de carga definida por comas en fvalue\n\t\t\t\t\n\t\t\t\t\t$datalist = new stdClass();\n\t\t\t\t\t$explodetype = explode(\",\",$config->fvalue);\n\t\t\t\t\tforeach ($explodetype as $row): \n\t\t\t\t\t\t$datalist->$row = $row;\n\t\t\t\t\tendforeach;\t\t\t\t\t\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\t$this->mydata[\"datalist\"] = $datalist;\t\t\t\n\t\t\tendif;\n\t\t\tif (@$config->keylink != \"\") :\n\t\t\t\n\t\t\t\t$explodekjoin = explode(\",\",$config->keylink);\n\t\t\t\t$datakeylink = $this->Global_model->get_row_select($explodekjoin[1].\",\".$explodekjoin[2],$explodekjoin[0], array($explodekjoin[1] => @$this->data[\"load\"]->$name));\n\t\t\t\t\n\t\t\t\t$this->mydata[\"default_display\"] = @$datakeylink[$this->data[\"load\"]->$name];\n\t\t\tendif;\n\t\t\t$view = $this->load_form_row($config->ftype,$this->mydata);\n\t\telse:\t\n\t\t\t\n\t\t\tif ($config->key==\"PRI\"): // PRIMARY KEY \t\t\t\n\t\t\t\t\n\t\t\t\tif (@$config->keylink != \"\") :\n\t\t\t\t\t$explodekjoin = explode(\",\",$config->keylink);\n\t\t\t\t\t$datakeylink = $this->Global_model->get_row_select($explodekjoin[1].\",\".$explodekjoin[2],$explodekjoin[0], array($explodekjoin[1] => $this->data[\"load\"]->$name));\n\t\t\t\t\t\n\t\t\t\t\t$this->mydata[\"default_display\"] = $datakeylink[$this->data[\"load\"]->$name];\n\t\t\t\telse:\n\t\t\t\t\t$this->mydata[\"default_display\"] = $this->mydata[\"default\"];\n\t\t\t\tendif;\n\t\t\t\tif ($curAction==\"U\") :\n\t\t\t\t\t$view = $this->load_form_row(\"input_primary\",$this->mydata);\n\t\t\t\telse:\n\t\t\t\t\t$view = $this->load_form_row(\"input_text\",$this->mydata);\n\t\t\t\tendif;\t\t\n\t\t\telse:\n\t\t\n\t\t\t\tif (@$config->keylink != \"\") :\n\t\t\t\t\n\t\t\t\t\t$explodekjoin = explode(\",\",$config->keylink);\n\t\t\t\t\t$datakeylink = $this->Global_model->get_row_select($explodekjoin[1].\",\".$explodekjoin[2],$explodekjoin[0], array($explodekjoin[1] => $this->data[\"load\"]->$name));\n\t\t\t\t\t\n\t\t\t\t\t$this->mydata[\"default_display\"] = $datakeylink[$this->data[\"load\"]->$name];\n\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tif (strpos($field_type,\"varchar\") !== FALSE) :\n\t\t\t\t\t$view = $this->load_form_row(\"input_text\",$this->mydata);\n\t\t\t\telseif ($field_type==\"text\") :\n\t\t\t\t\t$view = $this->load_form_row(\"textarea\",$this->mydata);\n\t\t\t\telse: // generico\n\t\t\t\t\t$view = $this->load_form_row(\"input_text\",$this->mydata);\n\t\t\t\tendif;\n\t\t\tendif; \n\t\t\t\n\t\tendif;\n\t\t\n\t\t\n\t\treturn $view;\n\t}", "protected function populateForm()\n { // Log the action\n $this->log('Populating');\n\n // Process the data\n if(\n isset($this->_config->views->{$this->_action}->data) and\n $this->_config->views->{$this->_action}->data\n ) {\n // Grab a reference to the data element obj from the configuration\n $dataCfg = $this->_config->views->{$this->_action}->data;\n\n // Create a SimpleXML element out of the HTML\n libxml_use_internal_errors(true);\n \n // Strip out the doctype\n $doctypes = array();\n if( preg_match_all('/\\<!doctype[^>]*>/i',$this->_output,$doctypes) === false ) {\n throw new CHttpException(500,'Internal Error');\n }\n $doctypes = count($doctypes)?$doctypes[0]:array();\n \n $this->_output = trim(str_replace($doctypes,'',$this->_output));\n\n // Load the template into an XML object\n $xml = simplexml_load_string($this->_output);\n\n // Process any errors found loading the XML\n // Need better error handling here, but XML parsing errors are show stoppers and should be caught in testing\n if($xml === false) {\n // Loop through the errors and log an error event for each\n $errors = [];\n foreach(libxml_get_errors() as $error) {\n $errors[] = $error->message;\n }\n\n // Handle appropriately\n if( APPLICATION_ENVIRONMENT == 'production' ) {\n // In production environment, log the errors and throw an exception\n $this->log('Error loading output: '.print_r($errors,1));\n throw new CHttpException(500,'Internal Error');\n } else {\n // In development/testing environments, show errors on screen and exit\n foreach($errors as $error) {\n echo $error.\"\\n<br />\";\n }\n die();\n }\n // Should never make it here, but return anyway\n return;\n }\n\n // Loop through the config elements and replace the values\n foreach( $dataCfg as $dataId => $dataEl ) {\n switch(true) {\n // Handle date form elements\n case ((string)$dataEl->type == 'date'):\n // Process the value into it's month, day and year components\n $value = ( isset( $this->_data[$dataId] ) ) ? $this->_data[$dataId] : null;\n $value = ( $value ) ? strtotime($value) : false;\n // If no timestamp, invalid time, move on\n if( $value === false ) break;\n // Parse the date components\n $month = date('m',$value);\n $day = date('d',$value);\n $year = date('Y',$value);\n // Process component elements\n if( isset($dataEl->components) and is_array($dataEl->components ) ) {\n // Loop through the components\n foreach($dataEl->components as $id => $component) {\n // Check for input element - Note the naming convention that must be used for form input elements in the config and HTML\n $result = $xml->xpath(\"//input[@id='rbm_{$this->_domain->type}_{$component}']\");\n // If the element is a single input element, process the contents\n if( count( $result ) ) {\n // Grab the element\n $el = $result[0];\n // Fill in the right part of the date\n $dataVal = '';\n switch(true) {\n case (preg_match('/_month$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $month;\n break;\n case (preg_match('/_day$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $day;\n break;\n case (preg_match('/_year$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $year;\n break;\n } \n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->value ) {\n // Add the value attribute with the stored value\n $el->addAttribute('value',$dataVal);\n } else {\n $el->attributes()->value = $dataVal;\n }\n // Done processing this component\n continue;\n }\n // Check for select element\n $result = $xml->xpath(\"//select[@id='rbm_{$this->_domain->type}_{$component}']/option\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) continue;\n // // Loop through the options\n foreach($result as $option) {\n // Fill in the right part of the date\n $dataVal = '';\n switch(true) {\n case (preg_match('/_month$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $month;\n break;\n case (preg_match('/_day$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $day;\n break;\n case (preg_match('/_year$/',\"rbm_{$this->_domain->type}_{$component}\")):\n $dataVal = $year;\n break;\n }\n // If the option's value is the same as the current value, set the selected attribute\n if( $option->attributes()->value == $dataVal ) {\n // Add the value attribute if it doesn't exist, set it if it does\n if( !$option->attributes()->selected ) {\n // Add the value attribute\n $option->addAttribute('selected','selected');\n } else {\n // Set the value attribute\n $option->attributes()->selected = 'selected';\n }\n } else {\n unset($option->attributes()->selected);\n }\n }\n }\n } else {\n // Handle single input date elements (date pickers)\n \n // Convert the timestamp back into a date string\n $value = date('m/d/Y',$value);\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//input[@id='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) break;\n // Grab the element\n $el = $result[0];\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->value ) {\n // Add the value attribute\n $el->addAttribute('value',$value);\n } else {\n $el->attributes()->value = $value;\n }\n }\n break;\n // Handle List drop down elements\n case ((string)$dataEl->type == 'list'):\n // Get the data value\n $value = (isset($this->_data[$dataId]))?$this->_data[$dataId]:null;\n // Change the value to a string for boolean\n if( $value === true ) {\n $value = \"true\";\n }\n if( $value === false ) {\n $value = \"false\";\n }\n // If there is a value to set, update the element\n if( $value !== null ) {\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//select[@id='rbm_{$this->_domain->type}_{$dataId}']/option\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) break;\n // // Loop through the options\n foreach($result as $option) {\n // If the option's value is the same as the current value, set the selected attribute\n if( $option->attributes()->value == $value ) {\n // Add the value attribute if it doesn't exist, set it if it does\n if( !$option->attributes()->selected ) {\n // Add the value attribute\n $option->addAttribute('selected','selected');\n } else {\n // Set the value attribute\n $option->attributes()->selected = 'selected';\n }\n } else {\n unset($option->attributes()->selected);\n }\n }\n }\n break;\n // Handle Checkbox elements\n case ((string)$dataEl->type == 'checkbox'):\n // Get the data value\n $value = (isset($this->_data[$dataId]))?$this->_data[$dataId]:null;\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//input[@id='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) break;\n // Grab the element\n $el = $result[0];\n // If the checkbox is checked, then add the checked attribute\n if( $value ) {\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->checked ) {\n // Add the value attribute\n $el->addAttribute('checked','checked');\n } else {\n $el->attributes()->checked = 'checked';\n }\n } else {\n unset($el->attributes()->checked);\n }\n break;\n // Handle radio elements\n case ((string)$dataEl->type == 'radio'):\n // Get the data value\n $value = (isset($this->_data[$dataId]))?$this->_data[$dataId]:null;\n if( $value === true ) {\n $value = \"true\";\n }\n if( $value === false ) {\n $value = \"false\";\n }\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//input[@name='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) break;\n // Loop through the elements\n foreach($result as $el) {\n // If there is a value to set, update the element whose value matches the submitted data\n if( \n $value !== null and\n (\n $el->attributes()->value and\n $el->attributes()->value == $value\n )\n ) {\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->checked ) {\n // Add the value attribute\n $el->addAttribute('checked','checked');\n } else {\n $el->attributes()->checked = 'checked';\n }\n } else {\n unset($el->attributes()->checked);\n }\n }\n break;\n // Handle everything else\n case ((string)$dataEl->type == 'ssn'):\n case ((string)$dataEl->type == 'phone'):\n default:\n // If there is a value, add it\n $value = (isset($this->_data[$dataId]))?$this->_data[$dataId]:null;\n if( $value ) {\n if( isset($dataEl->components) and is_array($dataEl->components ) ) {\n // Initialize the counters\n $pos = 0;\n // Loop through the components\n foreach($dataEl->components as $id => $component) {\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//input[@id='rbm_{$this->_domain->type}_{$component}']\");\n // If the element was not found, move on to the next element\n if( !count( $result ) ) break;\n // Grab the element\n $el = $result[0];\n // Get the max length value\n $max = $el->attributes()->maxlength;\n // Grab the set of characters\n $subval = substr($value,$pos,(int)$max);\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->value ) {\n // Add the value attribute\n $el->addAttribute('value',$subval);\n } else {\n $el->attributes()->value = $subval;\n }\n // Update the tracker\n $pos += $max;\n }\n } else {\n // Get the element from markup using XPath\n $result = $xml->xpath(\"//input[@id='rbm_{$this->_domain->type}_{$dataId}']\");\n // If the element was not found, move on to the next element\n // Grab the element\n $el = $result[0];\n // Add the value attribute if it doesn't exist\n if( !$el->attributes()->value ) {\n // Add the value attribute\n $el->addAttribute('value',$value);\n } else {\n $el->attributes()->value = $value;\n }\n }\n }\n break;\n }\n }\n\n // Fetch and process output\n $this->_output = str_replace('<?xml version=\"1.0\"?>','',$xml->asXML());\n foreach($doctypes as $doctype) {\n $this->_output = $doctype.\"\\n\".$this->_output;\n }\n }\n }", "public function contenttypeAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$story_type = $this->_getParam('story_type', null);\n\t$calling_from = $this->_getParam('calling_from', null);\n\t$resource_id = $this->_getParam('resource_id', null);\n\n\t$resource_array = array();\n\tif (!empty($resource_type)) {\n\t $resource_array = Engine_Api::_()->communityad()->resource_content($resource_type, $story_type, $calling_from, $resource_id);\n\t $getModType = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\t}\n\n\t$this->view->resource_string = $resource_array;\n\t$this->view->resource_type = $resource_type;\n\tif( !empty( $getModType ) && !empty($getModType['module_title']) ) {\n\t $this->view->modTitle = $getModType['module_title'];\n\t}\n }", "protected function loadView()\n {\n }", "protected function loadView()\n {\n }", "public function editView($content, $conf)\n\t{\n\t\t// TODO: Make Form part of the Template....\n\t\t// get the latest ID to check for newer versions...\n\t\t$latestUID = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\n\t\t// get NameSpacefor variables\n\t\t$getNS = preg_match_all( '/(.*)(:)(.*)/e', $this->piVars[\"keyword\"] , $NSmatches );\n\t\t$this->currentNameSpace = $NSmatches[1][0];\n\n\t\tif ($this->piVars[\"submitEdit\"] && !$this->read_only)\n\t\t{\t\t\n\t\t\t// the user has filled out the form before and submitted it, so we insert the\n\t\t\t// given data in the database and display the given keyword (this displays the freshly\n\t\t\t// created version)\n\t\t\t\t\t\n\t\t\t// check if a newer version is available or not:\n\t\t\t// No newer version:\n\t\t\tif ($latestUID <= $this->piVars[\"latest\"]) {\t\t\t\n\t\t\t\t\n\t\t\t\t//reassemble sections\n\t\t\t\tif ($this->piVars['section']) {\n\t\t\t\t\t//Get Data and Versions...\n\t\t\t\t\t$latestUid = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\t\t\t$latestVersion = $this->pi_getRecord(\"tx_drwiki_pages\", $latestUid, 1);\n\t\t\t\t\t$this->piVars['body'] = $this->replaceSection($this->piVars['section'],$this->piVars['body'],$latestVersion['body']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->piVars[\"body\"] = $this->replaceSignature($this->piVars[\"body\"]);\n\t\t\t\t\n\t\t\t\t// remove summary text if it has not been changed\n\t\t\t\tif ($this->piVars['summary'] == $this->initSummary) { \n\t\t\t\t\t$this->piVars['summary'] = '';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//check if previous record is locked (only when admin user is present)\n\t\t\t\t$isLocked = 0;\n\t\t\t\tif ($this->isUserWikiAdmin()) {\n\t\t\t\t\t$isLocked = $this->isRecordLocked($this->piVars['keyword']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check hiding status --> only set it when email notification is\n\t\t\t\t// active - otherwise set to false\n\t\t\t\tif ($this->mailNotify) {\n\t\t\t\t\t$hidden = $this->mailHideItem;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$hidden = false;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$pageContent = array(\n\t\t\t\t\t\t'pid' => $this->storagePid,\n\t\t\t\t\t\t'crdate' => time(),\n\t\t\t\t\t\t'tstamp' => time(),\n\t\t\t\t\t\t'summary' => $this->piVars['summary'],\n\t\t\t\t\t\t'keyword' => trim($this->piVars['keyword']),\n\t\t\t\t\t\t'body' => $this->piVars['body'],\n\t\t\t\t\t\t'date' => $this->piVars['date'],\n\t\t\t\t\t\t'author' => $this->piVars['author'],\n\t\t\t\t\t\t'locked' => $isLocked,\n\t\t\t\t\t\t'hidden' => $hidden,\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t//TODO: Check if unset aray could be done more efficint\n\t\t\t\t$this->clearEditPiVars();\n\t\t\t\t$this->piVars[\"section\"] = \"\";\n\t\t\t\t$this->piVars[\"submitEdit\"] = \"\";\n\t\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\t\t\t\n\t\t\t\t// HOOK: insert only if hook returns OK or is not set\n\t\t\t\tif($this->hook_submit_beforeInsert($pageContent)){\n\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t\t\t'tx_drwiki_pages',\n\t\t\t\t\t$pageContent\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$note = '';\n\t\t\t\t\tif ($this->mailNotify) {\n\t\t\t\t\t\t$this->mailAdmin($GLOBALS['TYPO3_DB']->sql_insert_id(), $pageContent['keyword'], $pageContent['body']);\n\t\t\t\t\t\t\t$note = '<div class=\"wiki-box-yellow\">'.\n\t\t\t\t\t\t\t \t$this->cObj->cObjGetSingle($this->conf[\"sys_Info\"], $this->conf[\"sys_Info.\"]).\n\t\t\t\t\t\t\t \t$this->pi_getLL(\"pi_mail_notify_warning\", \"Your changes were mailed to the editor and will be added later on.\").\n\t\t\t\t\t\t\t\t\t'<br/><br/></div>';\t\t \t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// HOOK: to do something after insert\n\t\t\t\t$this->hook_submit_afterInsert($pageContent);\n\t\n\t\t\t\treturn $note . $this->singleView($content, $conf);\n\t\t\t} else { // changes are detected....\n\t\t\t\t$this->clearEditPiVars();\n\t\t\t\t$this->piVars[\"section\"] = \"\";\n\t\t\t\t$this->piVars[\"submitEdit\"] = \"\";\n\t\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\n\t\t\t\t//get latest version of wiki-page from DB\t\t\t\n\t\t\t\t$this->internal[\"currentRow\"] = $this->pi_getRecord(\"tx_drwiki_pages\", $latestUID, 1);\n\t\t\t\treturn '<div class=\"wiki-box-red\">'.$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).$this->pi_getLL(\"pi_edit_ver_warning\", \"Attention: newer version detected!\").'</div>' . $this->singleView($this->internal[\"currentRow\"][\"content\"], $conf);\n\t\t\t}\t\t\n\t\t}\n\t\telseif ($this->piVars[\"previewEdit\"] && !$this->read_only)\n\t\t{\n\t\t\t$tmp_summary = $this->piVars[\"summary\"];\n\t\t\t$this->piVars[\"summary\"] = \"\";\n\t\t\t$tmp_body = $this->piVars[\"body\"];\n\t\t\t\n\t\t\t//get Preview\n\t\t\t$previewContent = $this->parse($tmp_body,1);\n\t\t\t$tmp_author = $this->piVars[\"author\"];\n\t\t\t$this->clearEditPiVars();\n\t\t\t\n\t\t\t$markerArray = $this->getEditMarkerArray($tmp_body, $tmp_author, $tmp_summary);\n\t\t\t\n\t\t\t$previewMarker = array(\n\t\t\t\t'###LABEL_PREVIEW###' => $this->pi_getLL(\"pi_edit_preview\", \"Preview\"),\n\t\t\t\t'###PREVIEW_CONTENT###' => $previewContent,\n\t\t\t);\n\t\t\t$content = $this->cObj->getSubpart($this->templateCode, \"###EDIT_FROM###\");\n\t\t\t\n\t\t\t$preview = $this->cObj->getSubpart($content, \"###EDIT_FROM_PREVIEW###\");\n\t\t\t$preview = $this->cObj->substituteMarkerArrayCached($preview, $previewMarker);\n\t\t\t\n\t\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###EDIT_FROM_PREVIEW###', $preview);\n\t\t\treturn $content;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( ($this->activateAccessControl) )\t\t\t // Access control active?\n\t\t\t{ \n\t\t\t\tif ( !$GLOBALS[\"TSFE\"]->fe_user->user[\"uid\"] > 0 )\t// User is NOT logged in?\n\t\t\t\t{\n\t\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\n\t\t\t\t\t$link = ($this->pageRedirect) ? $this->pi_linkToPage('Log-In',$this->pageRedirect,'',$parameters) : '';\n\t\t\t\t\t\n\t\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_login_warning\", \"Attention: You need to be logged-in \").\n\t\t\t\t\t\t\t\t\t\t$link.'<br/><br/></div>';\n\t\t\t\t\treturn $content;\n\t\t\t\t} \n\t\t\t\tif ( ($this->allowedGroups == true) && (!$this->inGroup ($this->allowedGroups))\t// User is NOT in \"Allowed Groups\"?\n\t\t\t\t\t OR \n\t\t\t\t\t($this->disallowedGroups == true) && ($this->inGroup ($this->disallowedGroups)) ) // User IS in \"Disallowed Groups\"?\n\t\t\t\t{\n\t\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\t\n\t\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_disallowed\", \"Sorry, you are not allowed to edit or create this article. Please talk to the administrator if you think this is an error.\").\n\t\t\t\t\t\t\t\t\t\t'<br/><br/></div>';\n\t\t\t\t\treturn $content;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// display the edit form\n\t\t\t// TODO: take layout from template\n\t\n\t\t\t$author = $this->getUser();\n\t\t\t\n\t\t\t// if we don't know the uid, we search it by the keyword\n\t\t\tif (!$this->piVars[\"showUid\"])\n\t\t\t{\n\t\t\t$this->piVars[\"showUid\"] = $this->getUid($this->piVars[\"keyword\"]);\n\t\t\t}\n\t\n\t\t\t// get the record\n\t\t\t$this->internal[\"currentTable\"] = \"tx_drwiki_pages\";\n\t\t\t$this->internal[\"currentRow\"] = $this->pi_getRecord(\"tx_drwiki_pages\", $this->piVars[\"showUid\"], 1);\n\t\t\t\n\t\t\t\n\t\t\t//get the section to be edited\n\t\t\tif($this->piVars[\"section\"]) {\n\t\t\t\t$this->internal[\"currentRow\"]['body'] = $this->getSection($this->getFieldContent(\"body\"), $this->piVars[\"section\"]);\n\t\t\t}\n\t\n\t\t\t// if we have no keyword we take it from the current data\n\t\t\tif (!$this->piVars[\"keyword\"])\n\t\t\t{\n\t\t\t$this->piVars[\"keyword\"] = trim($this->getFieldContent(\"keyword\"));\n\t\t\t}\n\t\t\t\n\t\t\t$markerArray = $this->getEditMarkerArray($this->getFieldContent(\"body\"), $author);\n\t\t\t$content = $this->cObj->getSubpart($this->templateCode, \"###EDIT_FROM###\");\n\t\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###EDIT_FROM_PREVIEW###', '');\n\n\t\t\treturn $content;\n\t\t}\n\t}", "public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }", "public function load_field(){\r\n $this->layout=\"ajax\";\r\n $module=$_POST['module'];\r\n $this->loadModel($module);\r\n $field_names= Set::extract('/COLUMNS/Field',$this->$module->query(\"DESCRIBE {$this->$module->useTable}\"));\r\n $field= array_combine($field_names, $field_names);\r\n $this->set(compact('field'));\r\n }", "protected function set_view($data) {\n $data = $this->postpare_editors($data);\n\n $this->name = !empty($data->name) ? trim($data->name) : $this->type;\n $this->description = !empty($data->description) ? $data->description : '';\n $this->visible = !empty($data->visible) ? $data->visible : 0;\n $this->entrytype = !empty($data->entrytype) ? $data->entrytype : '';\n $this->perpage = !empty($data->perpage) ? $data->perpage : 0;\n $this->groupby = !empty($data->groupby) ? $data->groupby : '';\n $this->filterid = !empty($data->filterid) ? $data->filterid : 0;\n $this->section = !empty($data->section) ? $data->section : null;\n\n for ($i = 1; $i <= 10; $i++) {\n $this->{\"param$i\"} = (!empty($data->{\"param$i\"}) ? $data->{\"param$i\"} : null);\n }\n\n // Compile view and field patterns.\n $this->patterns = null;\n if ($patterns = $this->get_patterns_from_templates()) {\n $this->patterns = serialize($patterns);\n }\n\n // Compile submission settings.\n if (empty($data->submission)) {\n $this->submission = null;\n } else if (is_array($data->submission)) {\n $this->submission = base64_encode(serialize($data->submission));\n }\n\n return true;\n }", "function field_views_field_default_views_data($field) {\n $field_types = field_info_field_types();\n\n // Check the field module is available.\n if (!isset($field_types[$field['type']])) {\n return;\n }\n\n $data = array();\n\n $current_table = _field_sql_storage_tablename($field);\n $revision_table = _field_sql_storage_revision_tablename($field);\n\n // The list of entity:bundle that this field is used in.\n $bundles_names = array();\n $supports_revisions = FALSE;\n $entity_tables = array();\n $current_tables = array();\n $revision_tables = array();\n $groups = array();\n\n $group_name = count($field['bundles']) > 1 ? t('Field') : NULL;\n\n // Build the relationships between the field table and the entity tables.\n foreach ($field['bundles'] as $entity => $bundles) {\n $entity_info = entity_get_info($entity);\n $groups[$entity] = $entity_info['label'];\n\n // Override Node to Content.\n if ($groups[$entity] == t('Node')) {\n $groups[$entity] = t('Content');\n }\n\n // If only one bundle use this as the default name.\n if (empty($group_name)) {\n $group_name = $groups[$entity];\n }\n\n $entity_tables[$entity_info['base table']] = $entity;\n $current_tables[$entity] = $entity_info['base table'];\n if (isset($entity_info['revision table'])) {\n $entity_tables[$entity_info['revision table']] = $entity;\n $revision_tables[$entity] = $entity_info['revision table'];\n }\n\n $data[$current_table]['table']['join'][$entity_info['base table']] = array(\n 'left_field' => $entity_info['entity keys']['id'],\n 'field' => 'entity_id',\n 'extra' => array(\n array('field' => 'entity_type', 'value' => $entity),\n array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),\n ),\n );\n\n if (!empty($entity_info['entity keys']['revision']) && !empty($entity_info['revision table'])) {\n $data[$revision_table]['table']['join'][$entity_info['revision table']] = array(\n 'left_field' => $entity_info['entity keys']['revision'],\n 'field' => 'revision_id',\n 'extra' => array(\n array('field' => 'entity_type', 'value' => $entity),\n array('field' => 'deleted', 'value' => 0, 'numeric' => TRUE),\n ),\n );\n\n $supports_revisions = TRUE;\n }\n\n foreach ($bundles as $bundle) {\n $bundles_names[] = t('@entity:@bundle', array('@entity' => $entity, '@bundle' => $bundle));\n }\n }\n\n $tables = array();\n $tables[FIELD_LOAD_CURRENT] = $current_table;\n if ($supports_revisions) {\n $tables[FIELD_LOAD_REVISION] = $revision_table;\n }\n\n $add_fields = array('delta', 'language', 'bundle');\n foreach ($field['columns'] as $column_name => $attributes) {\n $add_fields[] = _field_sql_storage_columnname($field['field_name'], $column_name);\n }\n\n // Note: we don't have a label available here, because we are at the field\n // level, not at the instance level. So we just go through all instances\n // and take the one which is used the most frequently.\n $field_name = $field['field_name'];\n list($label, $all_labels) = field_views_field_label($field_name);\n foreach ($tables as $type => $table) {\n if ($type == FIELD_LOAD_CURRENT) {\n $group = $group_name;\n $old_column = 'entity_id';\n $column = $field['field_name'];\n }\n else {\n $group = t('@group (historical data)', array('@group' => $group_name));\n $old_column = 'revision_id';\n $column = $field['field_name'] . '-' . $old_column;\n }\n\n $data[$table][$old_column]['field']['moved to'] = array($table, $column);\n $data[$table][$column] = array(\n 'group' => $group,\n 'title' => $label,\n 'title short' => $label,\n 'help' => t('Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n\n // Go through and create a list of aliases for all possible combinations of\n // entity type + name.\n $aliases = array();\n $also_known = array();\n foreach ($all_labels as $entity_name => $labels) {\n foreach ($labels as $label_name => $true) {\n if ($type == FIELD_LOAD_CURRENT) {\n if ($group_name != $groups[$entity_name] || $label != $label_name) {\n $aliases[] = array(\n 'base' => $current_tables[$entity_name],\n 'group' => $groups[$entity_name],\n 'title' => $label_name,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $label)),\n );\n }\n $also_known[] = t('@group: @field', array('@group' => $groups[$entity_name], '@field' => $label_name));\n }\n else {\n if ($group_name != $groups[$entity_name] && $label != $label_name && isset($revision_tables[$entity_name])) {\n $aliases[] = array(\n 'base' => $revision_tables[$entity_name],\n 'group' => t('@group (historical data)', array('@group' => $groups[$entity_name])),\n 'title' => $label_name,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $label)),\n );\n }\n $also_known[] = t('@group (historical data): @field', array('@group' => $groups[$entity_name], '@field' => $label_name));\n }\n }\n }\n if ($aliases) {\n $data[$table][$column]['aliases'] = $aliases;\n $data[$table][$column]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known)));\n }\n\n $keys = array_keys($field['columns']);\n $real_field = reset($keys);\n $data[$table][$column]['field'] = array(\n 'table' => $table,\n 'handler' => 'views_handler_field_field',\n 'click sortable' => TRUE,\n 'field_name' => $field['field_name'],\n // Provide a real field for group by.\n 'real field' => $column . '_' . $real_field,\n 'additional fields' => $add_fields,\n 'entity_tables' => $entity_tables,\n // Default the element type to div, let the UI change it if necessary.\n 'element type' => 'div',\n 'is revision' => $type == FIELD_LOAD_REVISION,\n );\n }\n\n foreach ($field['columns'] as $column => $attributes) {\n $allow_sort = TRUE;\n\n // Identify likely filters and arguments for each column based on field type.\n switch ($attributes['type']) {\n case 'int':\n case 'mediumint':\n case 'tinyint':\n case 'bigint':\n case 'serial':\n case 'numeric':\n case 'float':\n $filter = 'views_handler_filter_numeric';\n $argument = 'views_handler_argument_numeric';\n $sort = 'views_handler_sort';\n break;\n case 'text':\n case 'blob':\n // It does not make sense to sort by blob or text.\n $allow_sort = FALSE;\n default:\n $filter = 'views_handler_filter_string';\n $argument = 'views_handler_argument_string';\n $sort = 'views_handler_sort';\n break;\n }\n\n\n if (count($field['columns']) == 1 || $column == 'value') {\n $title = t('@label (!name)', array('@label' => $label, '!name' => $field['field_name']));\n // CCK used the first 10 characters of $label. Probably doesn't matter.\n $title_short = $label;\n }\n else {\n $title = t('@label (!name:!column)', array('@label' => $label, '!name' => $field['field_name'], '!column' => $column));\n $title_short = t('@label:!column', array('@label' => $label, '!column' => $column));\n }\n\n foreach ($tables as $type => $table) {\n if ($type == FIELD_LOAD_CURRENT) {\n $group = $group_name;\n }\n else {\n $group = t('@group (historical data)', array('@group' => $group_name));\n }\n $column_real_name = $field['storage']['details']['sql'][$type][$table][$column];\n\n // Load all the fields from the table by default.\n $additional_fields = array_values($field['storage']['details']['sql'][$type][$table]);\n\n $data[$table][$column_real_name] = array(\n 'group' => $group,\n 'title' => $title,\n 'title short' => $title_short,\n 'help' => t('Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n\n // Go through and create a list of aliases for all possible combinations of\n // entity type + name.\n $aliases = array();\n $also_known = array();\n foreach ($all_labels as $entity_name => $labels) {\n foreach ($labels as $label_name => $true) {\n if ($group_name != $groups[$entity_name] || $label != $label_name) {\n if (count($field['columns']) == 1 || $column == 'value') {\n $alias_title = t('@label (!name)', array('@label' => $label_name, '!name' => $field['field_name']));\n // CCK used the first 10 characters of $label. Probably doesn't matter.\n }\n else {\n $alias_title = t('@label (!name:!column)', array('@label' => $label_name, '!name' => $field['field_name'], '!column' => $column));\n }\n $aliases[] = array(\n 'group' => $groups[$entity_name],\n 'title' => $alias_title,\n 'help' => t('This is an alias of @group: @field.', array('@group' => $group_name, '@field' => $title)),\n );\n }\n $also_known[] = t('@group: @field', array('@group' => $groups[$entity_name], '@field' => $title));\n }\n }\n if ($aliases) {\n $data[$table][$column_real_name]['aliases'] = $aliases;\n $data[$table][$column_real_name]['help'] .= ' ' . t('Also known as: !also.', array('!also' => implode(', ', $also_known)));\n }\n\n $data[$table][$column_real_name]['argument'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $argument,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'empty field name' => t('- No value -'),\n );\n $data[$table][$column_real_name]['filter'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $filter,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n if (!empty($allow_sort)) {\n $data[$table][$column_real_name]['sort'] = array(\n 'field' => $column_real_name,\n 'table' => $table,\n 'handler' => $sort,\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional delta column for multiple value fields.\n if ($field['cardinality'] > 1 || $field['cardinality'] == FIELD_CARDINALITY_UNLIMITED) {\n $title_delta = t('@label (!name:delta)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_delta = t('@label:delta', array('@label' => $label));\n\n $data[$table]['delta'] = array(\n 'group' => $group,\n 'title' => $title_delta,\n 'title short' => $title_short_delta,\n 'help' => t('Delta - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['delta']['field'] = array(\n 'handler' => 'views_handler_field_numeric',\n );\n $data[$table]['delta']['argument'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_argument_numeric',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('- No value -'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['delta']['filter'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_filter_numeric',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['delta']['sort'] = array(\n 'field' => 'delta',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional language column for translatable fields.\n if (!empty($field['translatable'])) {\n $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_language = t('@label:language', array('@label' => $label));\n\n $data[$table]['language'] = array(\n 'group' => $group,\n 'title' => $title_language,\n 'title short' => $title_short_language,\n 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['language']['field'] = array(\n 'handler' => 'views_handler_field_locale_language',\n );\n $data[$table]['language']['argument'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_argument_locale_language',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('<No value>'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['language']['filter'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_filter_locale_language',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['language']['sort'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n\n // Expose additional language column for translatable fields.\n if (!empty($field['translatable'])) {\n $title_language = t('@label (!name:language)', array('@label' => $label, '!name' => $field['field_name']));\n $title_short_language = t('@label:language', array('@label' => $label));\n\n $data[$table]['language'] = array(\n 'group' => $group,\n 'title' => $title_language,\n 'title short' => $title_short_language,\n 'help' => t('Language - Appears in: @bundles.', array('@bundles' => implode(', ', $bundles_names))),\n );\n $data[$table]['language']['field'] = array(\n 'handler' => 'views_handler_field_locale_language',\n );\n $data[$table]['language']['argument'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_argument_locale_language',\n 'additional fields' => $additional_fields,\n 'empty field name' => t('<No value>'),\n 'field_name' => $field['field_name'],\n );\n $data[$table]['language']['filter'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_filter_locale_language',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n 'allow empty' => TRUE,\n );\n $data[$table]['language']['sort'] = array(\n 'field' => 'language',\n 'table' => $table,\n 'handler' => 'views_handler_sort',\n 'additional fields' => $additional_fields,\n 'field_name' => $field['field_name'],\n );\n }\n }\n }\n\n return $data;\n}", "public function View($view,$data=Null){\r\n $fullpath=cf(\"BASE/MVCPATH\").\"views\".DS.ucwords($view).EXT;\r\n $this->Load($fullpath,$data);\r\n }", "public function _editAction() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$action_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$action_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->getAllWhere ( 'form_id = \"' . ( int ) $this->_getFormId () . '\"' );\n\t\t\n\t\t$action = $this->getModel ( 'action' );\n\t\t$action->get ( ( int ) $action_id );\n\t\t\n\t\t$this->loadPluginModel ( 'actions' );\n\t\t\n\t\t$this->setView ( 'edit_action' );\n\t\n\t}", "function execute($action) {\r\n // Use system set of templates\r\n $this->addHelper('form', 'format', 'html', 'page', 'pagination', 'url');\r\n \r\n // Use controller template if exists\r\n if($this->engine->helperExists($this->getControllerName())) {\r\n $this->addHelper($this->getControllerName());\r\n } // if\r\n \r\n try {\r\n $execution = parent::execute($action);\r\n if($this->getAutoRender()) {\r\n if(is_array($execution)) {\r\n $this->assignToView($execution);\r\n } // if\r\n $this->render(); // Auto render?\r\n } // if\r\n } catch(Angie_Controller_Error_ActionDnx $e) {\r\n $view_name = $action;\r\n $layout_name = $this->getControllerName();\r\n \r\n if($this->getAutoRender() && $this->engine->viewExists($view_name, $layout_name)) {\r\n $this->setView($view_name);\r\n $this->setLayout($layout_name);\r\n \r\n $this->render();\r\n } else {\r\n throw $e; // rethrow\r\n } // if\r\n } catch(Exception $e) {\r\n throw $e;\r\n } // try\r\n }", "public function loadForView();", "function field_data_type_view(){\r\n\t\tglobal $current_user;\r\n\t\t$current_user = wp_get_current_user();\r\n\t\tif( !current_user_can( 'manage_options', $current_user->ID ) ){\r\n\t\t\twp_die( __( 'You do not have permissions to activate this plugin, sorry, check with site administrator to resolve this issue please!', 'user-registration-aide' ) );\r\n\t\t}else{\r\n\t\t\t$field = new FIELDS_DATABASE();\r\n\t\t\t?>\r\n\t\t\t<table class=\"style\">\t\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th colspan=\"3\"><?php _e( 'Change Field Type: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th colspan=\"2\"><?php _e( 'Field Title: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t\t<th><?php _e( 'Field Type: ', 'user-registration-aide' );?></th>\r\n\t\t\t\t</tr>\r\n\t\t\t\t<?php\r\n\t\t\t\t$nfc = new INPUT_NEW_FIELDS_MODEL();\r\n\t\t\t\t$input = $nfc->input_options_array();\r\n\t\t\t\t$ura_fields = $field->get_all_fields();\r\n\t\t\t\tif( !empty( $ura_fields ) ){\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach( $ura_fields as $objects ){\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td class=\"fieldName\" colspan=\"2\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\techo '<label for=\"'.$objects->meta_key.'\">'. _e( $objects->field_name, 'user-registration-aide').'</label>';\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<select class=\"fieldOrder\" name=\"<?php echo $objects->meta_key.'_data_type'; ?>\" title=\"<?php _e( 'Select the field type to change to', 'user-registration-aide' );?>\">\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\tforeach( $input as $key => $title ){\r\n\t\t\t\t\t\t\t\t\tif( $objects->data_type == $key ){\r\n\t\t\t\t\t\t\t\t\t\t$selected = \"selected=\\\"selected\\\"\";\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t$selected = null;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\techo \"<option value=\\\"$key\\\" $selected >$title</option>\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td class=\"fieldName\" colspan=\"3\">\r\n\t\t\t\t\t\t<p class=\"deleteFields\">\r\n\t\t\t\t\t\t<?php _e( 'No new fields currently exist, you have to add new fields on the main page before you can change the order!', 'user-registration-aide' ); ?>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t}?>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td colspan=\"3\">\r\n\t\t\t\t\t<div class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"change_field_type\" value=\"<?php _e( 'Change Field Type', 'user-registration-aide' );?>\" /></div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t\t\r\n\t\t\t<?php\r\n\t\t}\r\n\t}", "public function displayActionCreateMode($post)\r\n {\r\n $r = Recipe::load($post['recipe']);\r\n $s = $r->getStepById($post['step']); \r\n $this->context->smarty->assign(\r\n array(\r\n 'recipe' => $r,\r\n 'step' => $s, \r\n 'row' => $post['row']\r\n )\r\n ); \r\n if (array_key_exists('aid',$post)) \r\n $this->context->smarty->assign('aid',$post['aid']); \r\n if (array_key_exists('type',$post)) \r\n $this->context->smarty->assign('type',$post['type']); \r\n //Some actions will have their own controls, as text editors, and they should handle display functions by its own\r\n if (array_key_exists('action',$post))\r\n { \r\n $a = $post['action']; \r\n $this->context->smarty->assign('action',$post['action']); \r\n } \r\n \r\n \r\n switch ($post['time'])\r\n {\r\n case 'start': \r\n $this->context->smarty->assign('time','start');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/displayActionCreateMode.tpl'); \r\n break;\r\n case 'actionDescription':\r\n $this->context->smarty->assign('time','actionDescription');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/displayActionCreateMode.tpl'); \r\n break;\r\n //Both verb and param are triggered via jquery.load function\r\n case 'param': \r\n $this->context->smarty->assign('time','param');\r\n $tpl = $this->context->smarty->fetch(_PS_MODULE_DIR_ . 'massivo/views/templates/admin/helpers/params/displayActionParam.tpl'); \r\n break;\r\n \r\n } \r\n return $tpl;\r\n }", "public function resourcecontentAction() {\n\t$resource_type = $this->_getParam('resource_type');\n\t$resource_id = $this->_getParam('resource_id');\n\t$is_spocerdStory = $this->_getParam('is_spocerdStory', null);\n\n\t$is_document = 0;\n\tif ($resource_type == 'document') {\n\t $is_document = 1;\n\t}\n \n if( strstr($resource_type, \"sitereview\") ) {\n // $resource_type = \"sitereview\";\n\n $sitereviewExplode = explode(\"_\", $resource_type);\n $tempAdModId = $sitereviewExplode[1];\n $module_info = Engine_Api::_()->getItem(\"communityad_module\", $tempAdModId);\n $tempModName = strtolower($module_info->module_title);\n $tempModName = ucfirst($module_info->module_title);\n \n $content_table = \"sitereview_listing\";\n $sub_title = \"View\" . \" \" . $tempModName;\n $content_data = Engine_Api::_()->getItem($content_table, $resource_id);\n }else {\n $field_info = Engine_Api::_()->getDbTable('modules', 'communityad')->getModuleInfo($resource_type);\n\n if (!empty($field_info)) {\n $content_data = Engine_Api::_()->getItem($field_info['table_name'], $resource_id);\n }\n }\n\n $base_url = Zend_Controller_Front::getInstance()->getBaseUrl();\n if( empty($sub_title) ) {\n $sub_title = Engine_Api::_()->communityad()->viewType($resource_type);\n }\n\t$photo_id_filepath = 0;\n\n\tif (empty($is_document)) {\n\t $photo_id_filepath = $content_data->getPhotoUrl('thumb.normal');\n\t} else {\n\t $photo_id_filepath = $content_data->thumbnail;\n\t}\n\n\tif (strstr($photo_id_filepath, '?')) {\n\t $explode_array = explode(\"?\", $photo_id_filepath);\n\t $photo_id_filepath = $explode_array[0];\n\t}\n\n\t$isCDN = Engine_Api::_()->seaocore()->isCdn();\n\n\tif (empty($isCDN)) {\n\t if (!empty($base_url)) {\n\t\t$photo_id_filepath = str_replace($base_url . '/', '', $photo_id_filepath);\n\t } else {\n\t\t$arrqay = explode('/', $photo_id_filepath);\n\t\tunset($arrqay[0]);\n\t\t$photo_id_filepath = implode('/', $arrqay);\n\t }\n\t}\n\n\tif (!empty($photo_id_filepath)) {\n\t if (strstr($photo_id_filepath, 'application/')) {\n\t\t$photo_id_filepath = 0;\n\t } else {\n\t\t$content_photo = $this->upload($photo_id_filepath, $is_document, $isCDN);\n\t }\n\t}\n\t// Set \"Title width\" acording to the module.\n\t$getStoryContentTitle = $title = $content_data->getTitle();\n\t$title_lenght = strlen($title);\n\t$tmpTitle = strip_tags($content_data->getTitle());\n\t$titleTruncationLimit = $title_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.title', 25);\n\tif ($title_lenght > $title_truncation_limit) {\n\t $title_truncation_limit = $title_truncation_limit - 2;\n\t $title = Engine_String::strlen($tmpTitle) > $title_truncation_limit ? Engine_String::substr($tmpTitle, 0, $title_truncation_limit) : $tmpTitle;\n\t $title = $title . '..';\n\t}\n\n\t// Set \"Body width\" acording to the module.\n\t$body = $content_data->getDescription();\n\t$body_lenght = strlen($body);\n\t$tmpBody = strip_tags($content_data->getDescription());\n\t$body_truncation_limit = Engine_Api::_()->getApi('settings', 'core')->getSetting('ad.char.body', 135);\n\tif ($body_lenght > $body_truncation_limit) {\n\t $body_truncation_limit = $body_truncation_limit - 2;\n\t $body = Engine_String::strlen($tmpBody) > $body_truncation_limit ? Engine_String::substr($tmpBody, 0, $body_truncation_limit) : $tmpBody;\n\t $body = $body . '..';\n\t}\n\n\n\n\n\t$preview_title = $title . '<div class=\"cmaddis_adinfo\"><a href=\"javascript:void(0);\">' . $sub_title . '</a></div>';\n \t//$preview_title = $title . '<div class=\"cmaddis_adinfo cmad_show_tooltip_wrapper\" style=\"clear:none;\"><a href=\"javascript:void(0);\">' . $sub_title . '</a><div class=\"cmad_show_tooltip\"> <img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />Viewers will be able to like this ad and its content. They will also be able to see how many people like this ad, and which friends like this ad.</div></div>';\n\n\t$remaning_body_limit = $body_truncation_limit - strlen($body);\n\tif ($remaning_body_limit < 0) {\n\t $remaning_body_limit = 0;\n\t}\n\t$remaning_title_limit = $title_truncation_limit - strlen($title);\n\tif ($remaning_title_limit < 0) {\n\t $remaning_title_limit = 0;\n\t}\n\n\t// Set the default image if no image selected.\n\tif (empty($content_photo)) {\n\t if (empty($is_spocerdStory)) {\n\t\t$path = $this->view->layout()->staticBaseUrl . '/application/modules/Communityad/externals/images/blankImage.png';\n\t\t$content_photo = '<img src=\"' . $path . '\" alt=\" \" />';\n\t } else {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.profile');\n\t if( in_array('music', array('music')) && in_array('blog', array('blog')) ) {\n\t $content_photo = $this->view->itemPhoto($content_data, 'thumb.icon');\n\t }\n\t }\n\t}\n\t$viewerTruncatedTitle = Engine_Api::_()->communityad()->truncation($this->_viewer->getTitle(), $titleTruncationLimit);\n\t\n\tif ($is_spocerdStory == 1) {\n\t $storyTrunLimit = Engine_Api::_()->getApi('settings', 'core')->getSetting('story.char.title', 35);\n\t $getStoryContentTitle = Engine_Api::_()->communityad()->truncation($getStoryContentTitle, $storyTrunLimit);\n\t $getTooltipTitle = $this->view->translate(\"_sponsored_viewer_title_tooltip\");\n\t $getContentTooltipTitle = $this->view->translate(\"_sponsored_content_title_tooltip\");\n\t $viewerTruncatedTitle = '<span class=\"cmad_show_tooltip_wrapper\"><b><a href=\"javascript:void(0);\">' . $viewerTruncatedTitle . '</a></b><div class=\"cmad_show_tooltip\"><img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" style=\"width:13px;height:9px;\" />'.$getTooltipTitle.'</div></span>';\n\t $main_div_title = $this->view->translate('%s likes <a href=\"javascript:void(0);\">%s.</a>', $viewerTruncatedTitle, $getStoryContentTitle);\n\t $footer_comment = '';\n\n$content_photo = '<a href=\"javascript:void(0);\">' . $content_photo . '</a><div class=\"cmad_show_tooltip\">\n\t\t\t\t\t\t\t<img src=\"./application/modules/Communityad/externals/images/tooltip_arrow.png\" />\n\t\t\t\t\t\t\t'. $this->view->translate(\"_sponsored_content_photo_tooltip\") .'\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\n\t}else {\n\t $title = Engine_Api::_()->communityad()->truncation($title, $titleTruncationLimit);\n\t}\n\n\tif (empty($is_spocerdStory)) {\n\t $this->view->id = $content_data->getIdentity();\n\t $this->view->title = $title;\n\t $this->view->resource_type = $resource_type;\n\t $this->view->des = $body;\n\t $this->view->page_url = $content_data->getHref();\n\t $this->view->photo = $content_photo;\n\t $this->view->preview_title = $preview_title;\n\t $this->view->remaning_body_text = $remaning_body_limit;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->photo_id_filepath = $photo_id_filepath;\n\t} else {\n\t $this->view->main_div_title = $main_div_title;\n\t $this->view->photo = $content_photo;\n\t $this->view->temp_pre_title = $getStoryContentTitle; \n\t $getStoryContentTitle = str_replace(' ', '&nbsp;', $getStoryContentTitle);\n\t $this->view->preview_title = $getStoryContentTitle; \n\t $this->view->footer_comment = $footer_comment;\n\t $this->view->remaning_title_text = $remaning_title_limit;\n\t $this->view->modTitle = $field_info['module_title'];\n\t}\n }", "private function load_form_row($type,$mydata) {\n\t\t// print_r($mydata);\n\t\t$this->mydata[\"LS\"] = ($this->lang->language);\n\t\n\t\treturn $this->load->view('templates/form/'.$type,$mydata,TRUE);\t\t\n\t}", "protected function loadView($content_view, $data = [])\n\t{\n\t\t$data['content_view'] = &$content_view;\n\t\t$this->load->view('template/v_template_frontend', array_merge($this->_getSettings(), $this->_getMenu(), $data));\n\t}", "abstract protected function renderEdit();", "public function _editField() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\tif (array_key_exists ( 'cid', $args )) {\n\t\t\t$field_id = $args ['cid'] [0];\n\t\t} else {\n\t\t\t$field_id = @$args [3] ? @$args [3] : $args [1];\n\t\t}\n\t\t\n\t\t$field = $this->getModel ( 'field' );\n\t\t$field->get ( ( int ) $field_id );\n\t\t\n\t\t$this->loadPluginModel ( 'fields' );\n\t\t\n\t\t$this->setView ( 'edit_field' );\n\t\n\t}", "function go_search_view($mode=\"EDIT\") {\n\n\tif(!has_user_permission(__FUNCTION__)) return; \n\n\tglobal $ROW, $TEMPLATE;\n\tLOG_MSG('INFO',\"go_search_view(): START ROW=\".print_r($ROW,true));\n\n\t// Don't load for add mode or when reloading the form\n\tif ( $mode != \"ADD\" && (!isset($ROW[0]) || get_arg($ROW[0],'STATUS') !== 'RELOAD') ) {\n\n\t\t// Get the Search ID\n\t\t$search_id=get_arg($_GET,\"search_id\");\n\n\t\t// Validate the ID\n\t\tif (\n\t\t\t!validate(\"Search Id\",$search_id,1,11,\"int\")\n\t\t) { \n\t\t\tLOG_MSG('ERROR',\"go_search_view(): Invalid Search ID [$search_id]!\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Get from DB\n\t\t$ROW=db_search_select($search_id);\n\t\tif ( $ROW[0]['STATUS'] != \"OK\" ) {\n\t\t\tadd_msg(\"ERROR\",\"There was an error loading the Search. Please try again later. <br/>\");\n\t\t\treturn;\n\t\t}\n\n\t\t// No rows found\n\t\tif ( $ROW[0]['NROWS'] == 0 ) {\n\t\t\tadd_msg(\"ERROR\",\"No Searchs found! <br />Click on <strong>Add Search</strong> to create a one.<br /><br />\"); \n\t\t\treturn;\n\t\t}\n\t}\n\n\t$disabled=\"\";\n\t// Setup display parameters\n\tswitch($mode) {\n\t\tcase \"ADD\":\n\t\t\t\t$_do=\"add\";\n\t\t\t\tbreak;\n\t\tcase \"EDIT\":\n\t\t\t\t$_do=\"save\";\n\t\t\t\tbreak;\n\t\tcase \"DELETE\":\n\t\t\t\t$_do=\"remove\";\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t\tcase \"VIEW\":\n\t\tdefault:\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t}\n\n\t// To get driver details\n if ( ($row_driver=db_get_list('ARRAY','name,driver_id','tDriver','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get supervisor details\n if ( ($row_supervisor=db_get_list('ARRAY','name,supervisor_id','tSupervisor','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get client details\n if ( ($row_client=db_get_list('ARRAY','name,client_id','tClient','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get cleaner details\n if ( ($row_cleaner=db_get_list('ARRAY','name,cleaner_id','tCleaner','travel_id='.TRAVEL_ID)) === false ) return;\n\n\tif ( isset( $TEMPLATE ) ) { $template=$TEMPLATE; } else { $template=TEMPLATE_DIR.\"record.html\"; } \n\tinclude($template); \n\n\tLOG_MSG('INFO',\"go_search_view(): END\");\n}", "function edit($actionValue) \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['editrecord']=UserModel::Create()->SelectUser($actionValue);\n // Render the action with template\n $this->renderWithTemplate('users/edit', 'AdminPageBaseTemplate');\n }", "public function displayDataForm($module = '', $id = '', $viewMode = 'bpm', $readonly = false)\n {\n if (!empty($module) && !empty($id)) {\n // No need for locked fields on the AWF case\n Registry\\Registry::getInstance()->set('skip_locked_field_checks', true);\n\n $this->bean = BeanFactory::getBean($module, $id);\n $altViewMode = array();\n if (is_array($viewMode)) {\n $isBpm = true;\n $altViewMode = $viewMode;\n $viewMode = $viewMode['displayMode'];\n } else {\n $this->type = 'detail';\n $viewMode = 'detail';\n }\n\n $this->module = $module;\n\n if ($readonly) {\n $metaDataFileName = 'detail';\n $metaDataArrayName = 'DetailView';\n } else {\n $metaDataFileName = 'edit';\n $metaDataArrayName = 'EditView';\n }\n $metadataFile = $this->getMetaDataFile($metaDataFileName);\n\n\n $viewdefs = [];\n\n if (isset($GLOBALS['sugar_config']['disable_vcr'])) {\n $this->showVCRControl = !$GLOBALS['sugar_config']['disable_vcr'];\n }\n\n $mfile = get_custom_file_if_exists($metadataFile);\n if (isset($mfile)) {\n require $metadataFile;\n }\n\n if (!empty($altViewMode)) {\n $viewdefs = array('BpmView' => $viewdefs[$module][$metaDataArrayName]);\n $this->dyn_uid = $altViewMode['dyn_uid'];\n\n if ($readonly) {\n $this->setHeaderFootersReadOnly($viewdefs);\n }\n if($isBpm){\n $viewdefs['EditView'] = $viewdefs['BpmView'];\n }\n $tmpArray = array();\n $tmpArray[$this->bean->module_name] = $viewdefs;\n $viewdefs = $tmpArray;\n }\n $this->view = ucfirst($viewMode) . 'View';\n if($isBpm){\n $this->view = \"EditView\";\n }\n if (isset($viewdefs[$this->bean->module_name][$this->view])) {\n $this->defs = $viewdefs[$this->bean->module_name][$this->view];\n } else {\n $this->defs = $viewdefs[$this->bean->module_name]['EditView'];\n }\n\n $this->focus = $this->bean;\n $tpl = get_custom_file_if_exists('modules/pmse_Inbox/tpls/' . $this->view . '.tpl');\n if($isBpm){\n $tpl = get_custom_file_if_exists('modules/pmse_Inbox/tpls/BpmView.tpl');\n }\n $this->th = new TemplateHandler();\n $this->th->ss = &$this->ss;\n $this->tpl = $tpl;\n\n if ($this->th->checkTemplate($this->bean->module_name, $this->view)) {\n $this->th->deleteTemplate($this->bean->module_name, $this->view);\n }\n\n $this->ev = new EditView();\n $this->ev->ss =& $this->ss;\n $this->ev->module = $module;\n $this->ev->th = $this->th;\n $this->ev->focus = $this->bean;\n $this->ev->defs = $this->defs;\n $this->ev->view = $this->view;\n $this->ev->process();\n $this->fieldDefs = $this->ev->fieldDefs;\n $this->sectionPanels = $this->ev->sectionPanels;\n $this->offset = $this->ev->offset;\n $this->returnModule = $this->ev->returnModule;\n $this->returnAction = $this->ev->returnAction;\n $this->returnId = $this->ev->returnId;\n //$this->returnRelationship = $this->ev->returnRelationship;\n //$this->returnName = $this->ev->returnName;\n\n return $this->setupAll(false, false, $this->bean->module_name, $readonly);\n }\n }", "public function renderView($action){\n //Przekaż do obiektu View akcje która została wykonana\n $this->view->setView($action);\n //Zwróć na ekran wyrenderowaną treść\n $this->view->render();\n }", "function load_view($template){$this->hold_template = APPPATH . '/views/' . $template . EXT;}", "function generate($content_view, $template_view, $data = null)\n {\n include 'mvcphp/views/'.$template_view;\n }", "public function dataAction() {\n parent::dataAction();\n }", "public function editView() {\n Template_Module::setFullWidth(true);\n $this->edit = true;\n $this->addView();\n // cestak obrázků\n $this->imagePath = $this->category()->getModule()->getDataDir(true);\n }", "public function editAction(): object\n {\n // Sets webpage title\n $title = \"Edit content\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Connects to db\n $this->app->db->connect();\n\n // Retrieve content id\n $contentId = getGet(\"id\");\n\n // SQL statement\n $sql = \"SELECT * FROM content WHERE id = ?;\";\n\n // Fetches data from db and stores in $resultset\n $content = $this->app->db->executeFetch($sql, [$contentId]);\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended,\n \"contentId\" => $contentId,\n \"content\" => $content,\n // \"filters\" => $filters\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/edit\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }", "public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s &ndash; %2$s &ndash; %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }", "public function getViewLocation($action);", "public function content() { require 'TestView.php'; }", "public function view($view, $data) {\r\n require_once __DIR__ . '/../views/' . $view . '.php';\r\n }", "public function getDataTypeContent()\n {\n // Next Get or Paginate the actual content from the MODEL that corresponds to the slug DataType\n if (strlen($this->dataType->model_name) != 0) {\n $this->model = app($this->dataType->model_name);\n\n if ($this->dataType->scope && $this->dataType->scope != '' && method_exists($this->model, 'scope'.ucfirst($this->dataType->scope))) {\n $query = $this->model->{$this->dataType->scope}();\n } else {\n $query = $this->model::select('*');\n }\n\n // Use withTrashed() if model uses SoftDeletes and if toggle is selected\n // @todo retirar comentario e so funcionar com usuario ativado \n // if ($this->model && in_array(SoftDeletes::class, class_uses($this->model)) && Auth::user()->can('delete', app($this->dataType->model_name))) {\n $usesSoftDeletes = true;\n\n if ($this->request->get('showSoftDeleted')) {\n $showSoftDeleted = true;\n $query = $query->withTrashed();\n }\n // }\n\n // If a column has a relationship associated with it, we do not want to show that field\n $this->removeRelationshipField($this->dataType, 'browse');\n\n if ($this->search->value != '' && $this->search->key && $this->search->filter) {\n $this->search_filter = ($this->search->filter == 'equals') ? '=' : 'LIKE';\n $this->search_value = ($this->search->filter == 'equals') ? $this->search->value : '%'.$this->search->value.'%';\n $query->where($this->search->key, $this->search_filter, $this->search_value);\n }\n\n if ($this->orderBy && in_array($this->orderBy, $this->dataType->fields())) {\n $querySortOrder = (!empty($sortOrder)) ? $sortOrder : 'desc';\n $this->dataTypeContent = call_user_func(\n [\n $query->orderBy($this->orderBy, $querySortOrder),\n $this->getter,\n ]\n );\n } elseif ($this->model->timestamps) {\n $this->dataTypeContent = call_user_func([$query->latest($this->model::CREATED_AT), $this->getter]);\n } else {\n $this->dataTypeContent = call_user_func([$query->orderBy($this->model->getKeyName(), 'DESC'), $this->getter]);\n }\n\n // Replace relationships' keys for labels and create READ links if a slug is provided.\n return $this->resolveRelations($this->dataTypeContent, $this->dataType);\n }\n\n $this->setModel(false);\n // If Model doesn't exist, get data from table name\n return call_user_func([DB::table($this->dataType->name), $this->getter]);\n }", "function singleView($content,$conf) {\n\t\t$this->conf=$conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t//$this->pi_USER_INT_obj=1;\t// Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!\n\n\t\t\t// This sets the title of the page for use in indexed search results:\n\t\tif ($this->internal[\"currentRow\"][\"title\"])\t$GLOBALS[\"TSFE\"]->indexedDocTitle=$this->internal[\"currentRow\"][\"title\"];\n\t\t/**\n\t\t<p>'.$this->pi_list_linkSingle($this->pi_getLL(\"back\",\"Back\"),0).'</p></div>'.\n\t\t$this->pi_getEditPanel();\n\t\t*/\n\n\t\t$out = '';\n\t\tif ( $this->internal['res_count'] > 0 ) {\n\t\t\t$head = $this->cObj->stdWrap ( sprintf ( '%s %s', $this->getFieldContent ( 'brand' ), $this->getFieldContent ( 'model' ) ), $this->conf['singleView.']['titleWrap.'] );\n\t\t\t$this->templateCode = $this->cObj->fileResource ( $this->conf['templateFile'] );\n\t\t\t$template = $this->cObj->getSubpart ( $this->templateCode, '###SINGLE_VIEW###' );\n\t\t\t$markerArray = array();\n\t\t\t$markerArray['###image###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'image' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_type###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'type' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###type###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'type' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_body###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'body' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###body###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'body' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_price###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'price' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###price###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'price' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_initial_registration###']\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'initial_registration' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###initial_registration###']\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'initial_registration' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_mileage###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'mileage' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###mileage###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'mileage' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_cubic_capacity###']\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'cubic_capacity' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###cubic_capacity###']\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'cubic_capacity' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_power###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'power' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###power###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'power' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_gears###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'gears' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###gears###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'gears' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_seats###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'seats' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###seats###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'seats' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_doors###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'doors' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###doors###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'doors' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_gear_shift###']\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'gear_shift' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###gear_shift###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'gear_shift' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_colour###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'colour' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###colour###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'colour' ).$metallic, $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_fuel###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'fuel' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###fuel###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'fuel' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_notes###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'notes' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###notes###']\t\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'notes' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_contact###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'contact' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###contact###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'contact' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_equipment###']\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'equipment' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###equipment###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'equipment' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_tstamp###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'tstamp' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###tstamp###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'date_updated' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$markerArray['###label_crdate###']\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldHeader ( 'crdate' ), $this->conf['singleView.']['cellHeadWrap.'] );\n\t\t\t$markerArray['###crdate###']\t\t\t\t\t\t= $this->cObj->stdWrap ($this->getFieldContent ( 'date_added' ), $this->conf['singleView.']['cellDataWrap.'] );\n\t\t\t$out = $this->cObj->stdWrap ($this->cObj->substituteMarkerArrayCached ( $template, $markerArray ), $this->conf['singleView.']['resultWrap.'] );\n\t\t}else{\n\t\t\t$out = $this->cObj->stdWrap ( $this->pi_getLL ( 'noResult' ), $this->conf['common.']['noResultWrap.'] );\n\t\t}\n\t\t$out .= $this->cObj->stdWrap ( $this->pi_list_linkSingle ( $this->pi_getLL ( 'back' ),0 ), $this->conf['singleView.']['backLinkWrap.'] );\n\t\t$out = $head . $out;\n\t\t$out .= $this->pi_getEditPanel();\n\t\treturn $out;\n\t}", "function tripal_views_views_data() {\n $data = array();\n\n // Manually integrate the drupal.tripal_views* tables\n $data = tripal_views_views_data_tripal_views_tables($data);\n\n // Determine the name of the chado schema\n $chado_schema = tripal_get_schema_name('chado');\n\n // MAKE SURE ALL CHADO TABLES ARE INTEGRATED\n tripal_views_integrate_all_chado_tables();\n\n // DEFINE GLOBAL FIELDS\n // Filter handler that lets the admin say:\n // \"Show no results until they enter search parameters\"\n $data['views']['search_results'] = array(\n 'title' => t('Delay Results'),\n 'help' => t('Delay results until Apply/Search is clicked by the user.'),\n 'filter' => array(\n 'handler' => 'tripal_views_handler_filter_no_results',\n ),\n );\n\n $data['views']['action_links_area'] = array(\n 'title' => t('Action Links'),\n 'help' => t('Add action links to the view.'),\n 'area' => array(\n 'handler' => 'tripal_views_handler_area_action_links',\n ),\n );\n\n $tvi_query = db_query('SELECT * FROM {tripal_views}');\n\n // INTEGRATE THE LIGHTEST SETUP FOR EACH TABLE\n foreach ($tvi_query as $tvi_row) {\n\n // check to see if this is the lightest (drupal-style) priority setup for this table\n // if not then don't use this definition\n $lightest_priority_setup = tripal_is_lightest_priority_setup($tvi_row->setup_id, $tvi_row->table_name);\n if (!$lightest_priority_setup) {\n continue;\n }\n\n // ids we'll use for queries\n $setup_id = $tvi_row->setup_id;\n $mview_id = $tvi_row->mview_id;\n\n // holds the base table name and fields\n $base_table = '';\n $base_fields = array();\n\n // indicated whether the current table is a base table or not\n $is_base_table = $tvi_row->base_table;\n\n // POPULATE THE BASE TABLE NAME AND FIELDS\n // If an $mview_id is given then get the materialized view info,\n // otherwise get the Chado table info\n $legacy_mview = FALSE;\n if ($mview_id) {\n\n // get the base table name from the materialized view\n // D7 TODO: Check DBTNG changes work\n $sql = \"SELECT name, mv_specs FROM {tripal_mviews} WHERE mview_id = :id\";\n $mview_table = db_query($sql, array(':id' => $mview_id));\n $mview_table = $mview_table->fetchObject();\n $base_table = $mview_table->name;\n\n if (!empty($mview_table->mv_specs)) {\n $legacy_mview = TRUE;\n }\n }\n\n if ($legacy_mview) {\n // get the columns in this materialized view. They are separated by commas\n // where the first word is the column name and the rest is the type\n $columns = explode(\",\", $mview_table->mv_specs);\n foreach ($columns as $column) {\n $column = trim($column); // trim trailing and leading spaces\n preg_match(\"/^(.*?)\\ (.*?)$/\", $column, $matches);\n $column_name = $matches[1];\n $column_type = $matches[2];\n $base_fields[$column_name] = array(\n 'column_name' => $column_name,\n 'type' => $column_type,\n );\n }\n\n // get the field name and descriptions\n // D7 TODO: Check DBTNG changes work\n $sql = \"SELECT * FROM {tripal_views_field} WHERE setup_id=:setup\";\n $query = db_query($sql, array(':setup' => $setup_id));\n foreach($query as $field) {\n $base_fields[$field->column_name]['name'] = $field->name;\n $base_fields[$field->column_name]['help'] = $field->description;\n }\n }\n // if this is not a legacy materialized view\n else {\n $base_table = $tvi_row->table_name;\n\n // get the table description\n $table_desc = chado_get_schema($base_table);\n\n $fields = $table_desc['fields'];\n if (!is_array($fields)) {\n $fields = array();\n }\n foreach ($fields as $column => $attrs) {\n $base_fields[$column] = array(\n 'column_name' => $column,\n 'type' => $attrs['type'],\n );\n }\n\n // get the field name and descriptions\n $sql = \"SELECT * FROM {tripal_views_field} WHERE setup_id=:setup\";\n $query = db_query($sql, array(':setup' => $setup_id));\n foreach ($query as $field) {\n $base_fields[$field->column_name]['name'] = $field->name;\n $base_fields[$field->column_name]['help'] = $field->description;\n }\n }\n\n // SETUP THE BASE TABLE INFO IN THE DATA ARRAY\n $data[$base_table]['table']['group'] = t(\"$tvi_row->name\");\n\n if ($is_base_table) {\n $data[$base_table]['table']['base'] = array(\n 'group' => \"$tvi_row->name\",\n 'title' => \"$tvi_row->name\",\n 'help' => $tvi_row->comment,\n 'search_path' => $chado_schema\n );\n }\n else {\n $data[$base_table]['table'] = array(\n 'group' => \"$tvi_row->name\",\n 'title' => \"$tvi_row->name\",\n 'help' => $tvi_row->comment,\n 'search_path' => $chado_schema\n );\n }\n\n // ADD THE FIELDS TO THE DATA ARRAY\n foreach ($base_fields as $column_name => $base_field) {\n if (!isset($base_field['name'])) {\n $data[$base_table][$column_name] = array(\n 'title' => t($column_name),\n 'help' => t($column_name),\n 'field' => array(\n 'click sortable' => TRUE,\n ),\n );\n\n tripal_report_error(\n 'tripal_views',\n TRIPAL_WARNING,\n \"The name and help were not set for %table.%column. As a consequence the column\n name has been used... You should ensure that the 'name' and 'help' keys for\n this field are set in the integration array (priority = %priority)\",\n array(\n '%table'=> $base_table,\n '%column' => $column_name,\n '%priority' => $tvi_row->priority\n )\n );\n }\n else {\n $data[$base_table][$column_name] = array(\n 'title' => t($base_field['name']),\n 'help' => t($base_field['help']),\n 'field' => array(\n 'click sortable' => TRUE,\n ),\n );\n }\n\n // now add the handlers\n $sql = \"SELECT * FROM {tripal_views_handlers} WHERE setup_id = :setup AND column_name = :column\";\n $handlers = db_query($sql, array(':setup' => $setup_id, ':column' => $column_name));\n $num_handlers = 0;\n foreach ($handlers as $handler) {\n $num_handlers++;\n\n $data[$base_table][$column_name][$handler->handler_type]['handler'] = $handler->handler_name;\n\n // Add in any additional arguments\n // This should be a serialized array including (at a minimum) name => <handler name>\n if ($handler->arguments) {\n $data[$base_table][$column_name][$handler->handler_type] = array_merge($data[$base_table][$column_name][$handler->handler_type], unserialize($handler->arguments));\n }\n };\n\n // If there were no handlers applied to the current field then warn the administrator!\n if ($num_handlers == 0) {\n tripal_report_error(\n 'tripal_views',\n TRIPAL_WARNING,\n \"No handlers were registered for %table.%column. This means there is no views\n functionality for this column. To register handlers, make sure the 'handlers'\n key for this field is set in the integration array (priority = %priority).\n The supported keys include 'field', 'filter', 'sort', 'relationship'. Look\n at the tripal_add_views_integration() for additional details.\",\n array(\n '%table'=> $base_table,\n '%column' => $column_name,\n '%priority' => $tvi_row->priority\n )\n );\n }\n }\n\n // ADD JOINS & RELATIONSHIPS TO DATA ARRAY\n // only add joins if this is a base table\n // this keeps the list of available fields manageable\n // all other tables should be added via relationships\n $sql = \"SELECT * FROM {tripal_views_join} WHERE setup_id = :setup\";\n $joins = db_query($sql, array(':setup' => $setup_id));\n if (!isset($joins)) {\n $joins = array();\n }\n foreach ($joins as $join) {\n $left_table = $join->left_table;\n $left_field = $join->left_field;\n $base_table = $join->base_table;\n $base_field = $join->base_field;\n $handler = $join->handler;\n $base_title = ucwords(str_replace('_', ' ', $base_table));\n $left_title = ucwords(str_replace('_', ' ', $left_table));\n\n // if the 'node' table is in our integrated list then\n // we want to skip it. It shouldn't be there.\n if ($left_table == 'node') {\n continue;\n }\n\n // add join entry\n if (!$join->relationship_only) {\n $data[$left_table]['table']['join'][$base_table] = array(\n 'left_field' => $base_field,\n 'field' => $left_field,\n );\n if ($handler) {\n $data[$left_table]['table']['join'][$base_table]['handler'] = $handler;\n }\n if (!empty($join->arguments)) {\n array_merge($data[$left_table]['table']['join'][$base_table], unserialize($join->arguments));\n }\n }\n\n // warn if deprecated method of relationship addition was used (ie: through handlers)\n if (isset($data[$base_table][$base_field]['relationship'])) {\n tripal_report_error('tripal_views', TRIPAL_NOTICE,\n 'DEPRECATED: Currently using tripal_views_handlers to store relationship for %base => %left when you should be using tripal_views_joins.',\n array('%base' => $base_table, '%left' => $left_table));\n }\n\n // Add relationship entry.\n // NOTE: we use a fake field name to allow us to have multiple\n // relationships for the same field (ie: feature.feature_id has many\n // Many relationships but views only supports a single one).\n $fake_field = $base_field . '_to_' . $left_table;\n\n // Bug Fix: The old $fake_field used above doesn't take into account\n // multiple relationships to the same left table. To keep backwards\n // compatibility, this old fake_field needs to continue to be used for\n // the LAST recorded relationship. However, for all previously set\n // relationships we can use an improved fake name which takes into\n // account the left field and ensures all relationships for a single\n // left table are not condensed into a single relationship.\n if (array_key_exists($fake_field, $data[$base_table])) {\n\n // Again, note that we can't just change the fake_name after finding\n // there is more than one relationship because then the FIRST\n // relationship would keep the old fake_name rather than the LAST\n // which keeps backwards compatiblity since the old naming caused all\n // previous relationships be be overridden by the next one.\n // Thus we first need to determine the left field of the previous\n // join for this table combination and then use that to form our\n // improved fake field.\n $previous_left_field = $data[$base_table][$fake_field]['relationship']['base field'];\n $improved_fake_field = $base_field . '_to_' . $left_table . \".\" . $previous_left_field;\n $data[$base_table][$improved_fake_field] = $data[$base_table][$fake_field];\n }\n $data[$base_table][$fake_field] = array(\n 'title' => \"$base_title.$base_field => $left_title.$left_field\",\n 'help' => t(\"Joins @base to @left\", array('@base' => \"$base_title.$base_field\", '@left' => \"$left_title.$left_field\")),\n 'relationship' => array(\n 'handler' => $join->relationship_handler,\n 'title' => t(\"$base_field => $left_title ($left_field)\"),\n 'label' => t(\"$base_field => $left_title ($left_field)\"),\n 'real field' => $base_field,\n 'base' => $left_table,\n 'base field' => $left_field\n )\n );\n if (!empty($join->arguments)) {\n array_merge($data[$base_table][$fake_field]['relationship'], unserialize($join->arguments));\n }\n }\n }\n return $data;\n}", "function getOutputHtml($uitype, $fieldname, $fieldlabel, $maxlength, $col_fields, $generatedtype, $module_name, $mode = '', $typeofdata = null, $cbMapFI = array()) {\n\tglobal $log,$app_strings, $adb,$default_charset, $current_user;\n\t$log->debug('> getOutputHtml', [$uitype, $fieldname, $fieldlabel, $maxlength, $col_fields, $generatedtype, $module_name]);\n\n\t$userprivs = $current_user->getPrivileges();\n\n\t$fieldvalue = array();\n\t$final_arr = array();\n\t$value = $col_fields[$fieldname];\n\t$ui_type[]= $uitype;\n\t$editview_fldname[] = $fieldname;\n\n\t// vtlib customization: Related type field\n\tif ($uitype == '10') {\n\t\t$fldmod_result = $adb->pquery(\n\t\t\t'SELECT relmodule, status\n\t\t\tFROM vtiger_fieldmodulerel\n\t\t\tWHERE fieldid=\n\t\t\t\t(SELECT fieldid FROM vtiger_field, vtiger_tab\n\t\t\t\tWHERE vtiger_field.tabid=vtiger_tab.tabid AND fieldname=? AND name=? and vtiger_field.presence in (0,2) and vtiger_tab.presence=0)\n\t\t\t\tAND vtiger_fieldmodulerel.relmodule IN\n\t\t\t\t(select vtiger_tab.name FROM vtiger_tab WHERE vtiger_tab.presence=0 UNION select \"com_vtiger_workflow\")\n\t\t\torder by sequence',\n\t\t\tarray($fieldname, $module_name)\n\t\t);\n\t\t$entityTypes = array();\n\t\t$parent_id = $value;\n\t\tfor ($index = 0; $index < $adb->num_rows($fldmod_result); ++$index) {\n\t\t\t$entityTypes[] = $adb->query_result($fldmod_result, $index, 'relmodule');\n\t\t}\n\n\t\tif (!empty($value)) {\n\t\t\tif (strpos($value, 'x')) {\n\t\t\t\tlist($wsid, $value) = explode('x', $value);\n\t\t\t}\n\t\t\tif ($adb->num_rows($fldmod_result)==1) {\n\t\t\t\t$valueType = $adb->query_result($fldmod_result, 0, 0);\n\t\t\t} else {\n\t\t\t\t$valueType = getSalesEntityType($value);\n\t\t\t}\n\t\t\t$displayValueArray = getEntityName($valueType, $value);\n\t\t\tif (!empty($displayValueArray)) {\n\t\t\t\tforeach ($displayValueArray as $value) {\n\t\t\t\t\t$displayValue = $value;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$displayValue='';\n\t\t\t\t$valueType='';\n\t\t\t\t$value='';\n\t\t\t\t$parent_id = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$displayValue='';\n\t\t\t$valueType='';\n\t\t\t$value='';\n\t\t\t$parent_id = '';\n\t\t}\n\n\t\t$editview_label[] = array('options'=>$entityTypes, 'selected'=>$valueType, 'displaylabel'=>getTranslatedString($fieldlabel, $module_name));\n\t\t$fieldvalue[] = array('displayvalue'=>$displayValue,'entityid'=>$parent_id);\n\t} elseif ($uitype == 5 || $uitype == 6 || $uitype ==23) {\n\t\t$curr_time = '';\n\t\tif ($value == '') {\n\t\t\tif ($fieldname != 'birthday' && $generatedtype != 2 && getTabid($module_name) != 14) {\n\t\t\t\t$disp_value = getNewDisplayDate();\n\t\t\t}\n\n\t\t\t//Added to display the Contact - Support End Date as one year future instead of today's date\n\t\t\tif ($fieldname == 'support_end_date' && $_REQUEST['module'] == 'Contacts') {\n\t\t\t\t$addyear = strtotime('+1 year');\n\t\t\t\t$disp_value = DateTimeField::convertToUserFormat(date('Y-m-d', $addyear));\n\t\t\t} elseif ($fieldname == 'validtill' && $_REQUEST['module'] == 'Quotes') {\n\t\t\t\t$disp_value = '';\n\t\t\t}\n\t\t} else {\n\t\t\tif ($uitype == 6) {\n\t\t\t\t$curr_time = date('H:i', strtotime('+5 minutes'));\n\t\t\t}\n\t\t\t$date = new DateTimeField($value);\n\t\t\t$isodate = $date->convertToDBFormat($value);\n\t\t\t$date = new DateTimeField($isodate);\n\t\t\t$disp_value = $date->getDisplayDate();\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);\n\n\t\tif (empty($disp_value)) {\n\t\t\t$disp_value = '';\n\t\t}\n\t\t$fieldvalue[] = array($disp_value => $curr_time);\n\t\tif ($uitype == 5 || $uitype == 23) {\n\t\t\t$fieldvalue[] = array($date_format=>$current_user->date_format);\n\t\t} else {\n\t\t\t$fieldvalue[] = array($date_format=>$current_user->date_format.' '.$app_strings['YEAR_MONTH_DATE']);\n\t\t}\n\t} elseif ($uitype == 50) {\n\t\t$user_format = ($current_user->hour_format=='24' ? '24' : '12');\n\t\tif (empty($value)) {\n\t\t\tif ($generatedtype != 2) {\n\t\t\t\t$date = new DateTimeField();\n\t\t\t\t$disp_value = substr($date->getDisplayDateTimeValue(), 0, 16);\n\t\t\t\t$curr_time = DateTimeField::formatUserTimeString($disp_value, $user_format);\n\t\t\t\tif (strlen($curr_time)>5) {\n\t\t\t\t\t$time_format = substr($curr_time, -2);\n\t\t\t\t\t$curr_time = substr($curr_time, 0, 5);\n\t\t\t\t} else {\n\t\t\t\t\t$time_format = '24';\n\t\t\t\t}\n\t\t\t\tlist($dt,$tm) = explode(' ', $disp_value);\n\t\t\t\t$disp_value12 = $dt . ' ' . $curr_time;\n\t\t\t} else {\n\t\t\t\t$disp_value = $disp_value12 = $curr_time = $time_format = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$date = new DateTimeField($value);\n\t\t\t$disp_value = substr($date->getDisplayDateTimeValue(), 0, 16);\n\t\t\t$curr_time = DateTimeField::formatUserTimeString($disp_value, $user_format);\n\t\t\tif (strlen($curr_time)>5) {\n\t\t\t\t$time_format = substr($curr_time, -2);\n\t\t\t\t$curr_time = substr($curr_time, 0, 5);\n\t\t\t} else {\n\t\t\t\t$time_format = '24';\n\t\t\t}\n\t\t\tlist($dt,$tm) = explode(' ', $disp_value);\n\t\t\t$disp_value12 = $dt . ' ' . $curr_time;\n\t\t}\n\t\t$value = $disp_value;\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']).' '.($current_user->hour_format=='24' ? '%H' : '%I').':%M';\n\t\t$fieldvalue[] = array($disp_value => $disp_value12);\n\t\t$fieldvalue[] = array($date_format=>$current_user->date_format.' '.($current_user->hour_format=='24' ? '24' : 'am/pm'));\n\t\t$fieldvalue[] = array($user_format => $time_format);\n\t} elseif ($uitype == 16) {\n\t\trequire_once 'modules/PickList/PickListUtils.php';\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\n\t\t$fieldname = $adb->sql_escape_string($fieldname);\n\t\t$pick_query=\"select $fieldname from vtiger_$fieldname order by sortorderid\";\n\t\t$params = array();\n\t\t$pickListResult = $adb->pquery($pick_query, $params);\n\t\t$noofpickrows = $adb->num_rows($pickListResult);\n\n\t\t$options = array();\n\t\t$pickcount=0;\n\t\tfor ($j = 0; $j < $noofpickrows; $j++) {\n\t\t\t$value = decode_html($value);\n\t\t\t$pickListValue=decode_html($adb->query_result($pickListResult, $j, strtolower($fieldname)));\n\t\t\tif ($value == trim($pickListValue)) {\n\t\t\t\t$chk_val = 'selected';\n\t\t\t\t$pickcount++;\n\t\t\t} else {\n\t\t\t\t$chk_val = '';\n\t\t\t}\n\t\t\t$pickListValue = to_html($pickListValue);\n\t\t\tif (isset($_REQUEST['file']) && $_REQUEST['file'] == 'QuickCreate') {\n\t\t\t\t$options[] = array(htmlentities(getTranslatedString($pickListValue), ENT_QUOTES, $default_charset),$pickListValue,$chk_val );\n\t\t\t} else {\n\t\t\t\t$options[] = array(getTranslatedString($pickListValue),$pickListValue,$chk_val );\n\t\t\t}\n\t\t}\n\t\t$fieldvalue [] = $options;\n\t} elseif ($uitype == 1613 || $uitype == 1614 || $uitype == 1615 || $uitype == 1616 || $uitype == 3313 || $uitype == 3314 || $uitype == 1024) {\n\t\trequire_once 'modules/PickList/PickListUtils.php';\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = getPicklistValuesSpecialUitypes($uitype, $fieldname, $value);\n\t} elseif ($uitype == 15 || $uitype == 33) {\n\t\trequire_once 'modules/PickList/PickListUtils.php';\n\t\t$roleid=$current_user->roleid;\n\t\t$picklistValues = getAssignedPicklistValues($fieldname, $roleid, $adb);\n\t\tif (!empty($value)) {\n\t\t\t$valueArr = explode('|##|', $value);\n\t\t} else {\n\t\t\t$valueArr = array();\n\t\t}\n\t\tforeach ($valueArr as $key => $value) {\n\t\t\t$valueArr[$key] = trim(vt_suppressHTMLTags(vtlib_purify(html_entity_decode($value, ENT_QUOTES, $default_charset))));\n\t\t}\n\t\tif ($uitype == 15) {\n\t\t\tif (!empty($valueArr)) {\n\t\t\t\t$valueArr = array_combine($valueArr, $valueArr);\n\t\t\t}\n\t\t\t$picklistValues = array_merge($picklistValues, $valueArr);\n\t\t}\n\t\t$options = array();\n\t\tif (!empty($picklistValues)) {\n\t\t\tforeach ($picklistValues as $pickListValue) {\n\t\t\t\t$plvalenc = vt_suppressHTMLTags(trim($pickListValue));\n\t\t\t\tif (in_array($plvalenc, $valueArr)) {\n\t\t\t\t\t$chk_val = 'selected';\n\t\t\t\t} else {\n\t\t\t\t\t$chk_val = '';\n\t\t\t\t}\n\t\t\t\tif (isset($_REQUEST['file']) && $_REQUEST['file'] == 'QuickCreate') {\n\t\t\t\t\t$options[] = array(htmlentities(getTranslatedString($pickListValue), ENT_QUOTES, $default_charset), $plvalenc, $chk_val);\n\t\t\t\t} else {\n\t\t\t\t\t$options[] = array(getTranslatedString($pickListValue), $plvalenc, $chk_val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = $options;\n\t} elseif ($uitype == 1025) {\n\t\t$entityTypes = array();\n\t\t$parent_id = $value;\n\t\t$values = explode(Field_Metadata::MULTIPICKLIST_SEPARATOR, $value);\n\t\tforeach ($cbMapFI['searchfields'] as $k => $value) {\n\t\t\t$entityTypes[] = $k;\n\t\t}\n\n\t\tif (!empty($value) && !empty($values[0])) {\n\t\t\t$valueType= getSalesEntityType($values[0]);\n\n\t\t\t$response=array();\n\t\t\t$shown_val='';\n\t\t\tforeach ($values as $val) {\n\t\t\t\t$displayValueArray = getEntityName($valueType, $val);\n\t\t\t\tif (!empty($displayValueArray)) {\n\t\t\t\t\tforeach ($displayValueArray as $value2) {\n\t\t\t\t\t\t$shown_val = $value2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$response[]=html_entity_decode($shown_val, ENT_QUOTES, $default_charset);\n\t\t\t}\n\t\t\t$displayValue=implode(',', $response).',';\n\t\t} else {\n\t\t\t$displayValue='';\n\t\t\t$valueType='';\n\t\t\t$value='';\n\t\t}\n\t\t$editview_label[] = array('options'=>$entityTypes, 'selected'=>$valueType, 'displaylabel'=>getTranslatedString($fieldlabel, $module_name));\n\t\t$fieldvalue[] = array('displayvalue'=>$displayValue,'entityid'=>$parent_id);\n\t} elseif ($uitype == 17 || $uitype == 85 || $uitype == 14 || $uitype == 21 || $uitype == 56) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue [] = $value;\n\t} elseif ($uitype == 19) {\n\t\tif (isset($_REQUEST['body'])) {\n\t\t\t$value = ($_REQUEST['body']);\n\t\t}\n\n\t\tif ($fieldname == 'terms_conditions') {//for default Terms & Conditions\n\t\t//Assign the value from focus->column_fields (if we create Invoice from SO the SO's terms and conditions will be loaded to Invoice's terms and conditions, etc.,)\n\t\t\t$value = $col_fields['terms_conditions'];\n\n\t\t\t//if the value is empty then we should get the default Terms and Conditions\n\t\t\tif ($value == '' && $mode != 'edit') {\n\t\t\t\t$value=getTermsandConditions($module_name);\n\t\t\t}\n\t\t}\n\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue [] = $value;\n\t} elseif ($uitype == 52 || $uitype == 77) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\tglobal $current_user;\n\t\tif ($value != '') {\n\t\t\t$assigned_user_id = $value;\n\t\t} else {\n\t\t\t$assigned_user_id = $current_user->id;\n\t\t}\n\t\tif (!$userprivs->hasGlobalWritePermission() && !$userprivs->hasModuleWriteSharing(getTabid($module_name))) {\n\t\t\t$ua = get_user_array(false, 'Active', $assigned_user_id, 'private');\n\t\t} else {\n\t\t\t$ua = get_user_array(false, 'Active', $assigned_user_id);\n\t\t}\n\t\t$users_combo = get_select_options_array($ua, $assigned_user_id);\n\t\t$fieldvalue [] = $users_combo;\n\t} elseif ($uitype == 53) {\n\t\tglobal $noof_group_rows;\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$assigned_user_id = empty($value) ? $current_user->id : $value;\n\t\t$groups_combo = '';\n\t\tif ($fieldname == 'assigned_user_id' && !$userprivs->hasGlobalWritePermission() && !$userprivs->hasModuleWriteSharing(getTabid($module_name))) {\n\t\t\tget_current_user_access_groups($module_name); // calculate global variable $noof_group_rows\n\t\t\tif ($noof_group_rows!=0) {\n\t\t\t\t$ga = get_group_array(false, 'Active', $assigned_user_id, 'private');\n\t\t\t}\n\t\t\t$ua = get_user_array(false, 'Active', $assigned_user_id, 'private');\n\t\t} else {\n\t\t\tget_group_options();// calculate global variable $noof_group_rows\n\t\t\tif ($noof_group_rows!=0) {\n\t\t\t\t$ga = get_group_array(false, 'Active', $assigned_user_id);\n\t\t\t}\n\t\t\t$ua = get_user_array(false, 'Active', $assigned_user_id);\n\t\t}\n\t\t$users_combo = get_select_options_array($ua, $assigned_user_id);\n\t\tif ($noof_group_rows!=0) {\n\t\t\t$groups_combo = get_select_options_array($ga, $assigned_user_id);\n\t\t}\n\t\tif (GlobalVariable::getVariable('Application_Group_Selection_Permitted', 1)!=1) {\n\t\t\t$groups_combo = '';\n\t\t}\n\t\t$fieldvalue[]=$users_combo;\n\t\t$fieldvalue[] = $groups_combo;\n\t} elseif ($uitype == 54) {\n\t\t$options = array();\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$pickListResult = $adb->pquery('select name from vtiger_groups', array());\n\t\t$noofpickrows = $adb->num_rows($pickListResult);\n\t\tfor ($j = 0; $j < $noofpickrows; $j++) {\n\t\t\t$pickListValue=$adb->query_result($pickListResult, $j, 'name');\n\n\t\t\tif ($value == $pickListValue) {\n\t\t\t\t$chk_val = 'selected';\n\t\t\t} else {\n\t\t\t\t$chk_val = '';\n\t\t\t}\n\t\t\t$options[] = array($pickListValue => $chk_val );\n\t\t}\n\t\t$fieldvalue[] = $options;\n\t} elseif ($uitype == 63) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\tif ($value=='') {\n\t\t\t$value=1;\n\t\t}\n\t\t$options = array();\n\t\t$pickListResult = $adb->pquery('select duration_minutes from vtiger_duration_minutes order by sortorderid', array());\n\t\t$noofpickrows = $adb->num_rows($pickListResult);\n\t\t$salt_value = $col_fields['duration_minutes'];\n\t\tfor ($j = 0; $j < $noofpickrows; $j++) {\n\t\t\t$pickListValue=$adb->query_result($pickListResult, $j, 'duration_minutes');\n\n\t\t\tif ($salt_value == $pickListValue) {\n\t\t\t\t$chk_val = 'selected';\n\t\t\t} else {\n\t\t\t\t$chk_val = '';\n\t\t\t}\n\t\t\t$options[$pickListValue] = $chk_val;\n\t\t}\n\t\t$fieldvalue[]=$value;\n\t\t$fieldvalue[]=$options;\n\t} elseif ($uitype == 64) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']);\n\t\t$fieldvalue[] = $value;\n\t} elseif ($uitype == 156) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = $value;\n\t\t$fieldvalue[] = is_admin($current_user);\n\t} elseif ($uitype == 61) {\n\t\tif ($value != '') {\n\t\t\t$assigned_user_id = $value;\n\t\t} else {\n\t\t\t$assigned_user_id = $current_user->id;\n\t\t}\n\t\tif ($module_name == 'Emails' && !empty($col_fields['record_id'])) {\n\t\t\t$attach_result = $adb->pquery('select * from vtiger_seattachmentsrel where crmid = ?', array($col_fields['record_id']));\n\t\t\t//to fix the issue in mail attachment on forwarding mails\n\t\t\tif (isset($_REQUEST['forward']) && $_REQUEST['forward'] != '') {\n\t\t\t\tglobal $att_id_list;\n\t\t\t}\n\t\t\t$attachquery = 'select * from vtiger_attachments where attachmentsid=?';\n\t\t\tfor ($ii=0; $ii < $adb->num_rows($attach_result); $ii++) {\n\t\t\t\t$attachmentid = $adb->query_result($attach_result, $ii, 'attachmentsid');\n\t\t\t\tif ($attachmentid != '') {\n\t\t\t\t\t$rsatt = $adb->pquery($attachquery, array($attachmentid));\n\t\t\t\t\t$attachmentsname = $adb->query_result($rsatt, 0, 'name');\n\t\t\t\t\tif ($attachmentsname != '') {\n\t\t\t\t\t\t$fieldvalue[$attachmentid] = '[ '.$attachmentsname.' ]';\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($_REQUEST['forward']) && $_REQUEST['forward'] != '') {\n\t\t\t\t\t\t$att_id_list .= $attachmentid.';';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (!empty($col_fields['record_id'])) {\n\t\t\t\t$rsatt = $adb->pquery('select * from vtiger_seattachmentsrel where crmid = ?', array($col_fields['record_id']));\n\t\t\t\t$attachmentid=$adb->query_result($rsatt, 0, 'attachmentsid');\n\t\t\t\tif ($col_fields[$fieldname] == '' && $attachmentid != '') {\n\t\t\t\t\t$attachquery = 'select name from vtiger_attachments where attachmentsid=?';\n\t\t\t\t\t$rsattn = $adb->pquery($attachquery, array($attachmentid));\n\t\t\t\t\t$value = $adb->query_result($rsattn, 0, 'name');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($value!='') {\n\t\t\t\t$filename=' [ '.$value. ' ]';\n\t\t\t}\n\t\t\tif (!empty($filename)) {\n\t\t\t\t$fieldvalue[] = $filename;\n\t\t\t}\n\t\t\tif ($value != '') {\n\t\t\t\t$fieldvalue[] = $value;\n\t\t\t}\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t} elseif ($uitype == 28) {\n\t\tif (!(empty($col_fields['record_id']))) {\n\t\t\t$attrs = $adb->pquery('select attachmentsid from vtiger_seattachmentsrel where crmid = ?', array($col_fields['record_id']));\n\t\t\t$attachmentid=$adb->query_result($attrs, 0, 'attachmentsid');\n\t\t\tif ($col_fields[$fieldname] == '' && $attachmentid != '') {\n\t\t\t\t$attachquery = \"select name from vtiger_attachments where attachmentsid=?\";\n\t\t\t\t$attqrs = $adb->pquery($attachquery, array($attachmentid));\n\t\t\t\t$value = $adb->query_result($attqrs, 0, 'name');\n\t\t\t}\n\t\t}\n\t\tif ($value!='' && $module_name != 'Documents') {\n\t\t\t$filename=' [ '.$value. ' ]';\n\t\t} elseif ($value != '' && $module_name == 'Documents') {\n\t\t\t$filename= $value;\n\t\t}\n\t\tif (!empty($filename)) {\n\t\t\t$fieldvalue[] = $filename;\n\t\t}\n\t\tif ($value != '') {\n\t\t\t$fieldvalue[] = $value;\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t} elseif ($uitype == 69 || $uitype == '69m') {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\tif (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {\n\t\t\tif ($uitype == '69') {\n\t\t\t\t$fieldvalue[] = array('name'=>$col_fields[$fieldname],'path'=>'','orgname'=>$col_fields[$fieldname]);\n\t\t\t} else {\n\t\t\t\t$fieldvalue[] = '';\n\t\t\t}\n\t\t} elseif (!empty($col_fields['record_id'])) {\n\t\t\tif ($uitype == '69m') { // module_name == 'Products'\n\t\t\t\t$query = 'select vtiger_attachments.path, vtiger_attachments.attachmentsid, vtiger_attachments.name ,vtiger_crmentity.setype\n\t\t\t\t\tfrom vtiger_products\n\t\t\t\t\tleft join vtiger_seattachmentsrel on vtiger_seattachmentsrel.crmid=vtiger_products.productid\n\t\t\t\t\tinner join vtiger_attachments on vtiger_attachments.attachmentsid=vtiger_seattachmentsrel.attachmentsid\n\t\t\t\t\tinner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_attachments.attachmentsid\n\t\t\t\t\twhere vtiger_crmentity.setype=\"Products Image\" and productid=?';\n\t\t\t\t$params = array($col_fields['record_id']);\n\t\t\t} else {\n\t\t\t\tif ($module_name == 'Contacts' && $fieldname=='imagename') {\n\t\t\t\t\t$imageattachment = 'Image';\n\t\t\t\t} else {\n\t\t\t\t\t$imageattachment = 'Attachment';\n\t\t\t\t}\n\t\t\t\t$query=\"select vtiger_attachments.*,vtiger_crmentity.setype\n\t\t\t\t\tfrom vtiger_attachments\n\t\t\t\t\tinner join vtiger_seattachmentsrel on vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid\n\t\t\t\t\tinner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_attachments.attachmentsid\n\t\t\t\t\twhere (vtiger_crmentity.setype='$module_name $imageattachment' OR vtiger_crmentity.setype LIKE '% $imageattachment')\n\t\t\t\t\t\tand vtiger_attachments.name = ?\n\t\t\t\t\t\tand vtiger_seattachmentsrel.crmid=?\";\n\t\t\t\tglobal $upload_badext;\n\t\t\t\t$params = array(sanitizeUploadFileName(decode_html($col_fields[$fieldname]), $upload_badext), $col_fields['record_id']);\n\t\t\t}\n\t\t\t$result_image = $adb->pquery($query, $params);\n\t\t\t$image_array = array();\n\t\t\tfor ($image_iter=0, $img_itrMax = $adb->num_rows($result_image); $image_iter < $img_itrMax; $image_iter++) {\n\t\t\t\t$image_id_array[] = $adb->query_result($result_image, $image_iter, 'attachmentsid');\n\n\t\t\t\t//decode_html - added to handle UTF-8 characters in file names\n\t\t\t\t//urlencode - added to handle special characters like #, %, etc.,\n\t\t\t\t$image_array[] = urlencode(decode_html($adb->query_result($result_image, $image_iter, 'name')));\n\t\t\t\t$image_orgname_array[] = decode_html($adb->query_result($result_image, $image_iter, 'name'));\n\n\t\t\t\t$image_path_array[] = $adb->query_result($result_image, $image_iter, 'path');\n\t\t\t}\n\t\t\tif (!empty($image_array)) {\n\t\t\t\tfor ($img_itr=0, $img_itrMax = count($image_array); $img_itr< $img_itrMax; $img_itr++) {\n\t\t\t\t\t$fieldvalue[] = array(\n\t\t\t\t\t\t'name' => $image_array[$img_itr],\n\t\t\t\t\t\t'path' => $image_path_array[$img_itr].$image_id_array[$img_itr].'_',\n\t\t\t\t\t\t'orgname' => $image_orgname_array[$img_itr]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$fieldvalue[] = '';\n\t\t\t}\n\t\t} else {\n\t\t\t$fieldvalue[] = '';\n\t\t}\n\t} elseif ($uitype == 357) { // added for better email support\n\t\t$pmodule = isset($_REQUEST['pmodule']) ? $_REQUEST['pmodule'] : (isset($_REQUEST['par_module']) ? $_REQUEST['par_module'] : null);\n\t\tif (isset($_REQUEST['emailids']) && $_REQUEST['emailids'] != '') {\n\t\t\t$parent_id = $_REQUEST['emailids'];\n\t\t\t$parent_name='';\n\n\t\t\t$myids=explode('|', $parent_id);\n\t\t\tfor ($i=0; $i<(count($myids)-1); $i++) {\n\t\t\t\t$realid=explode('@', $myids[$i]);\n\t\t\t\t$entityid=$realid[0];\n\t\t\t\t$nemail=count($realid);\n\n\t\t\t\tif ($pmodule=='Accounts') {\n\t\t\t\t\trequire_once 'modules/Accounts/Accounts.php';\n\t\t\t\t\t$myfocus = new Accounts();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'Accounts');\n\t\t\t\t\t$fullname=br2nl($myfocus->column_fields['accountname']);\n\t\t\t\t} elseif ($pmodule=='Contacts') {\n\t\t\t\t\trequire_once 'modules/Contacts/Contacts.php';\n\t\t\t\t\t$myfocus = new Contacts();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'Contacts');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['firstname']);\n\t\t\t\t\t$lname=br2nl($myfocus->column_fields['lastname']);\n\t\t\t\t\t$fullname=$lname.' '.$fname;\n\t\t\t\t} elseif ($pmodule=='Leads') {\n\t\t\t\t\trequire_once 'modules/Leads/Leads.php';\n\t\t\t\t\t$myfocus = new Leads();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'Leads');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['firstname']);\n\t\t\t\t\t$lname=br2nl($myfocus->column_fields['lastname']);\n\t\t\t\t\t$fullname=$lname.' '.$fname;\n\t\t\t\t} elseif ($pmodule=='Project') {\n\t\t\t\t\trequire_once 'modules/Project/Project.php';\n\t\t\t\t\t$myfocus = new Project();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'Project');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['projectname']);\n\t\t\t\t\t$fullname=$fname;\n\t\t\t\t} elseif ($pmodule=='ProjectTask') {\n\t\t\t\t\trequire_once 'modules/ProjectTask/ProjectTask.php';\n\t\t\t\t\t$myfocus = new ProjectTask();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'ProjectTask');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['projecttaskname']);\n\t\t\t\t\t$fullname=$fname;\n\t\t\t\t} elseif ($pmodule=='Potentials') {\n\t\t\t\t\trequire_once 'modules/Potentials/Potentials.php';\n\t\t\t\t\t$myfocus = new Potentials();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'Potentials');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['potentialname']);\n\t\t\t\t\t$fullname=$fname;\n\t\t\t\t} elseif ($pmodule=='HelpDesk') {\n\t\t\t\t\trequire_once 'modules/HelpDesk/HelpDesk.php';\n\t\t\t\t\t$myfocus = new HelpDesk();\n\t\t\t\t\t$myfocus->retrieve_entity_info($entityid, 'HelpDesk');\n\t\t\t\t\t$fname=br2nl($myfocus->column_fields['title']);\n\t\t\t\t\t$fullname=$fname;\n\t\t\t\t} else {\n\t\t\t\t\t$ename = getEntityName($pmodule, array($entityid));\n\t\t\t\t\t$fullname = br2nl($ename[$entityid]);\n\t\t\t\t}\n\t\t\t\tfor ($j=1; $j<$nemail; $j++) {\n\t\t\t\t\t$querystr='select columnname from vtiger_field where fieldid=? and vtiger_field.presence in (0,2)';\n\t\t\t\t\t$result=$adb->pquery($querystr, array($realid[$j]));\n\t\t\t\t\t$temp=$adb->query_result($result, 0, 'columnname');\n\t\t\t\t\t$temp1=br2nl($myfocus->column_fields[$temp]);\n\n\t\t\t\t\t//Modified to display the entities in red which don't have email id\n\t\t\t\t\tif (!empty($temp_parent_name) && strlen($temp_parent_name) > 150) {\n\t\t\t\t\t\t$parent_name .= '<br>';\n\t\t\t\t\t\t$temp_parent_name = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($temp1 != '') {\n\t\t\t\t\t\t$parent_name .= $fullname.'&lt;'.$temp1.'&gt;; ';\n\t\t\t\t\t\t$temp_parent_name .= $fullname.'&lt;'.$temp1.'&gt;; ';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$parent_name .= \"<strong style='color:red'>\".$fullname.'&lt;'.$temp1.'&gt;; </strong>';\n\t\t\t\t\t\t$temp_parent_name .= \"<strong style='color:red'>\".$fullname.'&lt;'.$temp1.'&gt;; </strong>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_name='';\n\t\t\t$parent_id='';\n\t\t\tif (!empty($_REQUEST['record'])) {\n\t\t\t\t$myemailid= vtlib_purify($_REQUEST['record']);\n\t\t\t\t$mysql = 'select crmid from vtiger_seactivityrel where activityid=?';\n\t\t\t\t$myresult = $adb->pquery($mysql, array($myemailid));\n\t\t\t\t$mycount=$adb->num_rows($myresult);\n\t\t\t\tif ($mycount >0) {\n\t\t\t\t\tfor ($i=0; $i<$mycount; $i++) {\n\t\t\t\t\t\t$mycrmid=$adb->query_result($myresult, $i, 'crmid');\n\t\t\t\t\t\t$parent_module = getSalesEntityType($mycrmid);\n\t\t\t\t\t\tif ($parent_module == 'Leads') {\n\t\t\t\t\t\t\t$sql = 'select firstname,lastname,email from vtiger_leaddetails where leadid=?';\n\t\t\t\t\t\t\t$result = $adb->pquery($sql, array($mycrmid));\n\t\t\t\t\t\t\t$full_name = getFullNameFromQResult($result, 0, 'Leads');\n\t\t\t\t\t\t\t$myemail=$adb->query_result($result, 0, 'email');\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$parent_name .= $full_name.'<'.$myemail.'>; ';\n\t\t\t\t\t\t} elseif ($parent_module == 'Contacts') {\n\t\t\t\t\t\t\t$sql = 'select * from vtiger_contactdetails where contactid=?';\n\t\t\t\t\t\t\t$result = $adb->pquery($sql, array($mycrmid));\n\t\t\t\t\t\t\t$full_name = getFullNameFromQResult($result, 0, 'Contacts');\n\t\t\t\t\t\t\t$myemail=$adb->query_result($result, 0, 'email');\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$parent_name .= $full_name.'<'.$myemail.'>; ';\n\t\t\t\t\t\t} elseif ($parent_module == 'Accounts') {\n\t\t\t\t\t\t\t$sql = 'select accountname, email1 from vtiger_account where accountid=?';\n\t\t\t\t\t\t\t$result = $adb->pquery($sql, array($mycrmid));\n\t\t\t\t\t\t\t$account_name = $adb->query_result($result, 0, 'accountname');\n\t\t\t\t\t\t\t$myemail=$adb->query_result($result, 0, 'email1');\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$parent_name .= $account_name.'<'.$myemail.'>; ';\n\t\t\t\t\t\t} elseif ($parent_module == 'Users') {\n\t\t\t\t\t\t\t$sql = 'select user_name,email1 from vtiger_users where id=?';\n\t\t\t\t\t\t\t$result = $adb->pquery($sql, array($mycrmid));\n\t\t\t\t\t\t\t$account_name = $adb->query_result($result, 0, 'user_name');\n\t\t\t\t\t\t\t$myemail=$adb->query_result($result, 0, 'email1');\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$parent_name .= $account_name.'<'.$myemail.'>; ';\n\t\t\t\t\t\t} elseif ($parent_module == 'Vendors') {\n\t\t\t\t\t\t\t$sql = 'select vendorname, email from vtiger_vendor where vendorid=?';\n\t\t\t\t\t\t\t$result = $adb->pquery($sql, array($mycrmid));\n\t\t\t\t\t\t\t$vendor_name = $adb->query_result($result, 0, 'vendorname');\n\t\t\t\t\t\t\t$myemail=$adb->query_result($result, 0, 'email');\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$parent_name .= $vendor_name.'<'.$myemail.'>; ';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$emailfield = getFirstEmailField($parent_module);\n\t\t\t\t\t\t\tif ($emailfield != '') {\n\t\t\t\t\t\t\t\t$qg = new QueryGenerator($parent_module, $current_user);\n\t\t\t\t\t\t\t\t$qg->setFields(array($emailfield));\n\t\t\t\t\t\t\t\t$qg->addCondition('id', $mycrmid, 'e');\n\t\t\t\t\t\t\t\t$query = $qg->getQuery();\n\t\t\t\t\t\t\t\t$result = $adb->query($query);\n\t\t\t\t\t\t\t\t$myemail = $adb->query_result($result, 0, $emailfield);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$myemail = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$parent_id .=$mycrmid.'@0|';\n\t\t\t\t\t\t\t$minfo = getEntityName($parent_module, array($mycrmid));\n\t\t\t\t\t\t\t$parent_name .= $minfo[$mycrmid] . '<'.$myemail.'>; ';\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$emailmodules = modulesWithEmailField();\n\t\t\t$evlbl = array();\n\t\t\tforeach ($emailmodules as $mod) {\n\t\t\t\t$evlbl[$mod] = ($pmodule == $mod ? 'selected' : '');\n\t\t\t}\n\t\t\t$editview_label[] = $evlbl;\n\t\t\t$fieldvalue[] = $parent_name;\n\t\t\t$fieldvalue[] = $parent_id;\n\t\t}\n\t} elseif ($uitype == 9 || $uitype == 7) {\n\t\t$editview_label[] = getTranslatedString($fieldlabel, $module_name);\n\t\t$fldrs = $adb->pquery('select typeofdata from vtiger_field where vtiger_field.fieldname=? and vtiger_field.tabid=?', array($fieldname, getTabid($module_name)));\n\t\t$typeofdata = $adb->query_result($fldrs, 0, 0);\n\t\t$typeinfo = explode('~', $typeofdata);\n\t\tif ($typeinfo[0]=='I') {\n\t\t\t$fieldvalue[] = $value;\n\t\t} else {\n\t\t\t$currencyField = new CurrencyField($value);\n\t\t\t$decimals = CurrencyField::getDecimalsFromTypeOfData($typeofdata);\n\t\t\t$currencyField->initialize($current_user);\n\t\t\t$currencyField->setNumberofDecimals(min($decimals, $currencyField->getCurrencyDecimalPlaces()));\n\t\t\t$fieldvalue[] = $currencyField->getDisplayValue(null, true, true);\n\t\t}\n\t} elseif ($uitype == 71 || $uitype == 72) {\n\t\t$currencyField = new CurrencyField($value);\n\t\t// Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion\n\t\tif (!empty($col_fields['record_id']) && $uitype == 72) {\n\t\t\tif ($fieldname == 'unit_price') {\n\t\t\t\t$rate_symbol = getCurrencySymbolandCRate(getProductBaseCurrency($col_fields['record_id'], $module_name));\n\t\t\t\t$currencySymbol = $rate_symbol['symbol'];\n\t\t\t} else {\n\t\t\t\t$currency_info = getInventoryCurrencyInfo($module_name, $col_fields['record_id']);\n\t\t\t\t$currencySymbol = $currency_info['currency_symbol'];\n\t\t\t}\n\t\t\t$fieldvalue[] = $currencyField->getDisplayValue(null, true);\n\t\t} else {\n\t\t\t$decimals = CurrencyField::getDecimalsFromTypeOfData($typeofdata);\n\t\t\t$currencyField->initialize($current_user);\n\t\t\t$currencyField->setNumberofDecimals(min($decimals, $currencyField->getCurrencyDecimalPlaces()));\n\t\t\t$fieldvalue[] = $currencyField->getDisplayValue(null, false, true);\n\t\t\t$currencySymbol = $currencyField->getCurrencySymbol();\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name).': ('.$currencySymbol.')';\n\t} elseif ($uitype == 79) {\n\t\tif ($value != '') {\n\t\t\t$purchaseorder_name = getPoName($value);\n\t\t} elseif (isset($_REQUEST['purchaseorder_id']) && $_REQUEST['purchaseorder_id'] != '') {\n\t\t\t$value = $_REQUEST['purchaseorder_id'];\n\t\t\t$purchaseorder_name = getPoName($value);\n\t\t} else {\n\t\t\t$purchaseorder_name = '';\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = $purchaseorder_name;\n\t\t$fieldvalue[] = $value;\n\t} elseif ($uitype == 30) {\n\t\tif (empty($value)) {\n\t\t\t$SET_REM = '';\n\t\t} else {\n\t\t\t$SET_REM = 'CHECKED';\n\t\t}\n\t\tif (empty($col_fields[$fieldname])) {\n\t\t\t$col_fields[$fieldname] = 0;\n\t\t}\n\t\t$rem_days = floor($col_fields[$fieldname]/(24*60));\n\t\t$rem_hrs = floor(($col_fields[$fieldname]-$rem_days*24*60)/60);\n\t\t$rem_min = ($col_fields[$fieldname]-$rem_days*24*60)%60;\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$day_options = getReminderSelectOption(0, 31, 'remdays', $rem_days);\n\t\t$hr_options = getReminderSelectOption(0, 23, 'remhrs', $rem_hrs);\n\t\t$min_options = getReminderSelectOption(10, 59, 'remmin', $rem_min);\n\t\t$fieldvalue[] = array(\n\t\t\tarray(0, 32, 'remdays', getTranslatedString('LBL_DAYS', 'cbCalendar'), $rem_days),\n\t\t\tarray(0, 24, 'remhrs', getTranslatedString('LBL_HOURS', 'cbCalendar'), $rem_hrs),\n\t\t\tarray(10, 60, 'remmin', getTranslatedString('LBL_MINUTES', 'cbCalendar').'&nbsp;&nbsp;'.getTranslatedString('LBL_BEFORE_EVENT', 'cbCalendar'), $rem_min)\n\t\t);\n\t\t$fieldvalue[] = array($SET_REM,getTranslatedString('LBL_YES'),getTranslatedString('LBL_NO'));\n\t\t$SET_REM = '';\n\t} elseif ($uitype == 115) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$options = array();\n\t\tforeach (['Active', 'Inactive'] as $pickListValue) {\n\t\t\tif ($value == $pickListValue) {\n\t\t\t\t$chk_val = 'selected';\n\t\t\t} else {\n\t\t\t\t$chk_val = '';\n\t\t\t}\n\t\t\t$options[] = array(getTranslatedString($pickListValue), $pickListValue, $chk_val );\n\t\t}\n\t\t$fieldvalue [] = $options;\n\t\t$fieldvalue [] = is_admin($current_user);\n\t} elseif ($uitype == 117) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$pick_query=\"select * from vtiger_currency_info where currency_status = 'Active' and deleted=0\";\n\t\t$pickListResult = $adb->pquery($pick_query, array());\n\t\t$noofpickrows = $adb->num_rows($pickListResult);\n\n\t\t$options = array();\n\t\tfor ($j = 0; $j < $noofpickrows; $j++) {\n\t\t\t$pickListValue=$adb->query_result($pickListResult, $j, 'currency_name');\n\t\t\t$currency_id=$adb->query_result($pickListResult, $j, 'id');\n\t\t\tif ($value == $currency_id) {\n\t\t\t\t$chk_val = 'selected';\n\t\t\t} else {\n\t\t\t\t$chk_val = '';\n\t\t\t}\n\t\t\t$options[$currency_id] = array($pickListValue=>$chk_val );\n\t\t}\n\t\t$fieldvalue [] = $options;\n\t\t$fieldvalue [] = is_admin($current_user);\n\t} elseif ($uitype ==98) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[]=$value;\n\t\t$fieldvalue[]=getRoleName($value);\n\t\t$fieldvalue[]=is_admin($current_user);\n\t} elseif ($uitype == 101) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = getOwnerName($value);\n\t\t$fieldvalue[] = $value;\n\t} elseif ($uitype == 26) {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$folderid=$col_fields['folderid'];\n\t\t$res = $adb->pquery('select foldername from vtiger_attachmentsfolder where folderid=?', array($folderid));\n\t\t$foldername = $adb->query_result($res, 0, 'foldername');\n\t\tif ($foldername != '' && $folderid != '') {\n\t\t\t$fldr_name[$folderid]=$foldername;\n\t\t}\n\t\t$res=$adb->pquery('select foldername,folderid from vtiger_attachmentsfolder order by foldername', array());\n\t\tfor ($i=0; $i<$adb->num_rows($res); $i++) {\n\t\t\t$fid=$adb->query_result($res, $i, 'folderid');\n\t\t\t$fldr_name[$fid]=$adb->query_result($res, $i, 'foldername');\n\t\t}\n\t\t$fieldvalue[] = $fldr_name;\n\t} elseif ($uitype == 27) {\n\t\tif ($value == 'E') {\n\t\t\t$external_selected = 'selected';\n\t\t\t$internal_selected = '';\n\t\t\t$filename = $col_fields['filename'];\n\t\t} else {\n\t\t\t$external_selected = '';\n\t\t\t$internal_selected = 'selected';\n\t\t\t$filename = $col_fields['filename'];\n\t\t}\n\t\t$editview_label[] = array(getTranslatedString('Internal'), getTranslatedString('External'));\n\t\t$editview_label[] = array($internal_selected, $external_selected);\n\t\t$editview_label[] = array('I','E');\n\t\t$editview_label[] = getTranslatedString($fieldlabel, $module_name);\n\t\t$fieldvalue[] = $value;\n\t\t$fieldvalue[] = $filename;\n\t} elseif ($uitype == '31') {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$options = array();\n\t\t$themeList = get_themes();\n\t\tforeach ($themeList as $theme) {\n\t\t\tif ($value == $theme) {\n\t\t\t\t$selected = 'selected';\n\t\t\t} else {\n\t\t\t\t$selected = '';\n\t\t\t}\n\t\t\t$options[] = array(getTranslatedString($theme), $theme, $selected);\n\t\t}\n\t\t$fieldvalue [] = $options;\n\t} elseif ($uitype == '32') {\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\t$options = array();\n\t\t$languageList = Vtiger_Language::getAll();\n\t\tforeach ($languageList as $prefix => $label) {\n\t\t\tif ($value == $prefix) {\n\t\t\t\t$selected = 'selected';\n\t\t\t} else {\n\t\t\t\t$selected = '';\n\t\t\t}\n\t\t\t$options[] = array(getTranslatedString($label), $prefix, $selected);\n\t\t}\n\t\t$fieldvalue [] = $options;\n\t} else {\n\t\t//Added condition to set the subject if click Reply All from web mail\n\t\tif ($_REQUEST['module'] == 'Emails' && !empty($_REQUEST['mg_subject'])) {\n\t\t\t$value = $_REQUEST['mg_subject'];\n\t\t}\n\t\t$editview_label[]=getTranslatedString($fieldlabel, $module_name);\n\t\tif ($fieldname == 'fileversion') {\n\t\t\tif (empty($value)) {\n\t\t\t\t$value = '';\n\t\t\t} else {\n\t\t\t\t$fieldvalue[] = $value;\n\t\t\t}\n\t\t} else {\n\t\t\t$fieldvalue[] = $value;\n\t\t}\n\t}\n\t$final_arr[]=$ui_type;\n\t$final_arr[]=$editview_label;\n\t$final_arr[]=$editview_fldname;\n\t$final_arr[]=$fieldvalue;\n\tif (!empty($typeofdata)) {\n\t\t$type_of_data = explode('~', $typeofdata);\n\t\t$final_arr[] = $type_of_data[1];\n\t} else {\n\t\t$final_arr[] = 'O';\n\t}\n\t$log->debug('< getOutputHtml');\n\treturn $final_arr;\n}", "private function loadView($view, $data){\n $resolver = new TemplateMapResolver();\n $resolver->setMap(array(\n 'stepTemplate' => ROOT_PATH . '/module/BackOffice/view/back-office/wager/partials/wagerTypes/' . $view . '.phtml'\n ));\n \n //Create a view object and resolve the path base on the template map resolver above.\n $view = new PhpRenderer();\n $view->setResolver($resolver);\n \n //Create a view to use with the established template and add any variables that view will use.\n $viewModel = new ViewModel();\n $viewModel->setTemplate('stepTemplate')->setVariables(array(\n 'data' => $data\n ));\n \n return $view->render($viewModel);\n }", "function onView () {\r\n\r\n switch (parent::getAction()) {\r\n \tcase \"edit\":\r\n \t\tbreak;\r\n \tcase \"search\":\r\n \t\tbreak;\r\n default:\r\n $this->printSearchBoxView();\r\n }\r\n }", "public function content()\n {\n $module = $this->moduleView != null ? $this->moduleView : $GLOBALS['registry']->router->getModule(); \n $logic = $this->controllerView != null ? $this->controllerView : $GLOBALS['registry']->router->getController();\n $action = $this->actionView != null ? $this->actionView : $GLOBALS['registry']->router->getAction();\n \n // $action will have Action at the end. We need to remove this to find it in the view location\n $action = substr($action, 0, -6);\n\n $viewLocation = ROOT_PATH.$this->themeLocation.\"Controllers/\".$module.\"/\".$logic.\"/\".$action.\".php\";\n\n if(!file_exists($viewLocation))\n throw new Display\\Exception(\"The view for module: '\".$module.\"', Controller: '\".$logic.\"', Action: '\".$action.\"' does not exist at \".$viewLocation);\n\n require_once($viewLocation);\n }", "protected function content_template() {}", "protected function content_template() {}", "function beneficiariesView_views_data()\n{\n $data = array();\n\n $data['aj_registration']['table']['group'] = t('Registration');\n\n $data['aj_registration']['table']['base'] = array(\n 'title' => t('Registration'),\n 'help' => t('This is data from the aj_registration table.'),\n );\n\n $data['aj_registration']['table']['join'] = array(\n 'eck_provider' => array(\n 'left_field' => 'id',\n 'field' => 'provider_id',\n ),\n );\n\n\n// The ID field\n$data['aj_registration']['uuid'] = array(\n\t'group' => t('Registration'),\n 'title' => t('UUID'),\n 'help' => t('The beneficiary UUID.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n// The nombre field\n$data['aj_registration']['nombre'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Nombre'),\n 'help' => t('The beneficiary name.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t 'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n// The apellido field\n$data['aj_registration']['apellido'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Apellido'),\n 'help' => t('The beneficiary surname.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n\n// The apodo field\n$data['aj_registration']['apodo'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Apodo'),\n 'help' => t('The beneficiary nickname.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n// The Estecolateralparticipante field\n$data['aj_registration']['Estecolateralparticipante'] = array(\n\t'group' => t('Registration'),\n 'title' => t('¿Indirecto?'),\n 'help' => t('The beneficiary type.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n\n// The DOB field\n$data['aj_registration']['DOB'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Fecha de Nacimiento'),\n 'help' => t('The beneficiary date of birth.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_date',\n ),\n);\n\n\n// The Fecha field\n$data['aj_registration']['Fecha'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Fecha de Registro'),\n 'help' => t('The Beneficiary date of registration.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_date',\n ),\n);\n\n\n\n// The provider_name field\n$data['aj_registration']['provider_name'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Organización name'),\n 'help' => t('The organización name.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_string',\n ),\n);\n\n\n// The provider_id field\n$data['aj_registration']['provider_id'] = array(\n\t'group' => t('Registration'),\n 'title' => t('Esto es provider_id'),\n 'help' => t('The organización ID.'),\n 'field' => array(\n 'handler' => 'views_handler_field',\n \t'click sortable' => TRUE,\n ),\n 'sort' => array(\n 'handler' => 'views_handler_sort',\n ),\n 'filter' => array(\n 'handler' => 'views_handler_filter_numeric',\n ),\n 'relationship' => array(\n 'base' => 'eck_provider',\n 'base field' => 'id',\n \t 'field' => 'provider_id',\n 'handler' => 'views_handler_relationship',\n 'label' => t('aj_registration retlation'),\n \t 'help' => t('This is the relationship with aj_registration and eck_provider'),\n \t 'title' => t('aj_registration relationship'),\n ),\n 'argument' => array(\n 'handler' => 'views_handler_argument',\n 'numeric' => TRUE,\n ),\n);\n return $data;\n}", "public function load($view) {\n\n\n\t}", "function field_views_data_alter(&$data) {\n foreach (field_info_fields() as $field) {\n if ($field['storage']['type'] != 'field_sql_storage') {\n continue;\n }\n\n $function = $field['module'] . '_field_views_data_views_data_alter';\n if (function_exists($function)) {\n $function($data, $field);\n }\n }\n}", "protected function _content_template() {\n \n }", "public function actionEditField(){\n $model = CylFields::model()->findByAttributes(['field_id' => $_POST['id']]);\n $this->renderPartial('edit-field',array('model' => $model));\n }", "function singleView($content,$conf)\t{\r\n\t\t$this->conf=$conf;\r\n\t\t$this->pi_setPiVarDefaults();\r\n\t\t$this->pi_loadLL();\r\n\r\n\t\t// This sets the title of the page for use in indexed search results:\r\n\t\tif ($this->internal['currentRow']['title']) $GLOBALS['TSFE']->indexedDocTitle=$this->internal['currentRow']['title'];\r\n\r\n\t\t$markerArray = array();\r\n\t\t$markerArray[\"###TITLE###\"] = $this->getFieldContent('title_wo_link');\r\n\t\t$markerArray[\"###LOCATION###\"] = $this->getFieldContent('location');\r\n\t\t$markerArray[\"###DATE_BEGIN###\"] = $this->getFieldContent('datefrom');\r\n\t\t$markerArray[\"###DATE_END###\"] = $this->getFieldContent('dateto');\r\n\t\t$markerArray[\"###DESCRIPTION###\"] = $this->getFieldContent('description');\r\n\t\t$markerArray[\"###CREATED###\"] = date('d.m.Y H:i',$this->internal['currentRow']['tstamp']);\r\n\t\t$markerArray[\"###EDIT_PANEL###\"] = $this->pi_getEditPanel();\r\n\t\t$carslist = $this->getFieldContent('cars');\r\n\t\t$geo_coords = $this->getFieldContent('geo_coords');\r\n\t\t$markerArray[\"###GEO###\"] = $geo_coords;\r\n\r\n\t\t$this->internal['currentTable'] = 'tx_firefighter_type';\r\n\t\t$this->internal['currentRow'] = $this->pi_getRecord('tx_firefighter_type',$this->getFieldContent('type'));\r\n\t\t$markerArray[\"###TYPE###\"] = $this->internal['currentRow']['name'];\r\n\t\t$icon = \"\";\r\n\t\tif($this->internal['currentRow']['icon'] != \"\") $icon = \"uploads/tx_firefighter/\" . $this->internal['currentRow']['icon'];\r\n\t\t$markerArray[\"###TYPE_ICON###\"] = $icon;\r\n\r\n\t\t$car_content = \"\";\r\n\t\t$this->internal['orderBy'] = \"sorting\";\r\n\t\t$this->internal['descFlag'] = \"ASC\";\r\n\t\t$this->internal['currentTable'] = 'tx_firefighter_cars';\r\n\t\t$res = $this->pi_exec_query('tx_firefighter_cars', 0, \" AND `uid` IN ($carslist)\");\r\n\t\twhile($this->internal['currentRow'] = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\r\n\t\t\t$markerArray2 = array();\r\n\t\t\t$markerArray2[\"###NAME###\"] = $this->getFieldContent('name');\r\n\t\t\t$markerArray2[\"###IMAGE###\"] = \"uploads/tx_firefighter/\" . $this->getFieldContent('image');\r\n\t\t\t$link = $this->getFieldContent('link');\r\n\t\t\tif(is_numeric($link)) $link = $this->pi_getPageLink($link);\r\n\t\t\t$markerArray2[\"###LINK###\"] = $link;\r\n\t\t\t\r\n\t\t\t$car_content .= $this->cObj->substituteMarkerArrayCached($this->templates[\"single_view_caritem\"], $markerArray2, array(), array());\r\n\t\t}\r\n\r\n\t\t$geo_content = \"\";\r\n\t\tif($geo_coords != \"\") {\r\n\t\t\t$geo_content = $this->cObj->substituteMarkerArrayCached($this->templates[\"geo_single\"], $markerArray, array(), array());\r\n\t\t}\r\n\r\n\t\t$subpartArray = array();\r\n\t\t$subpartArray[\"###CAR_ITEM###\"] = $car_content;\r\n\t\t$subpartArray[\"###GEO_SCRIPT###\"] = $geo_content;\r\n\r\n\t\t$content = $this->cObj->substituteMarkerArrayCached($this->templates[\"single_view\"], $markerArray, $subpartArray, array());\r\n\t\treturn utf8_encode($content);\r\n\t}", "public function setup_wizard_content() {\n\t\t\tisset( $this->steps[ $this->step ] ) ? call_user_func( $this->steps[ $this->step ]['view'] ) : false;\n\t\t}", "protected function _content_template()\n {\n\n }", "protected function _content_template() {\n\t}", "public function modifyView() {\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n return $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modify', true),\n 'class'=>'formAdmin formAdminModify'),\n array('submit'=>array('save'=>__('save'),\n 'saveCheck'=>__('saveCheck')))));\n }", "public function buildContent($entity, $view_mode = 'full', $langcode = NULL) {\n if (!isset($langcode)) {\n $langcode = $GLOBALS['language_content']->language;\n }\n\n // Remove previously built content, if exists.\n $entity->content = array();\n\n // Allow modules to change the view mode.\n $context = array(\n 'entity_type' => 'fieldable_panels_pane',\n 'entity' => $entity,\n 'langcode' => $langcode,\n );\n drupal_alter('entity_view_mode', $view_mode, $context);\n\n // Build fields content.\n field_attach_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $view_mode, $langcode);\n entity_prepare_view('fieldable_panels_pane', array($entity->fpid => $entity), $langcode);\n $entity->content += field_attach_view('fieldable_panels_pane', $entity, $view_mode, $langcode);\n\n // Allow modules to make their own additions to the entity.\n module_invoke_all('fieldable_panels_pane_view', $entity, $view_mode, $langcode);\n module_invoke_all('entity_view', $entity, 'fieldable_panels_pane', $view_mode, $langcode);\n\n // Make sure the current view mode is stored if no module has already\n // populated the related key.\n $entity->content += array('#view_mode' => $view_mode);\n }", "protected function getViewData() {\n\n }", "function edit() {\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->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\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}", "function start_edit_field($field) {\n //fetch all stored items and pass them to the view\n $items = $this->get_all_items($field);\n $view = $this->view(\"edit\");\n $view->set(\"field\", $field);\n $view->set(\"items\", $items);\n //return JSON\n //with which this component is also initiated for editing\n echo str_replace(\"\\\\n\", \"\", json_encode(Array(\n \"dom\" => Array(\n \"fill\" => Array(\"#wi3_editdiv_content\" => $view->render())\n ),\n \"scriptsafter\" => Array(\"wi3_editdiv_show();\", \"wi3.pagefiller.components.\" . $field->type . \".initedit();\")\n )));\n }", "abstract protected function getDefaultViewForm();", "public function actionGetMetaView($type)\n {\n\n switch($type){\n case 'essential-oil':\n $model = new ProductMetaOil();\n return $this->renderAjax('_form_essential_oil', [\n 'model' => $model\n ]);\n break;\n case 'mask':\n $model = new ProductMetaOil();\n return $this->renderAjax('_form_mask', [\n 'model' => $model\n ]);\n break;\n case 'soap':\n $model = new ProductMetaOil();\n return $this->renderAjax('_form_soap', [\n 'model' => $model\n ]);\n break;\n }\n\n\n\n }", "public function ShowContentEditForm(Params $params) {\n $template=$params->getOrFail('id_template','is_not0_integer','Invalid template identifier!');\n $templateProps=DataProvider::Get('Plugins\\DForms\\Templates','GetItemProperties',['template_id'=>$template]);\n $templatePages=DataProvider::Get('Plugins\\DForms\\Templates','GetItemPages',['template_id'=>$template],['sort'=>['pindex'=>'asc']]);\n if(!$templateProps instanceof IEntity || !$templatePages instanceof DataSet) {\n throw new AppException('Invalid DynamicForms template properties/pages!');\n }\n $fieldsTypes=DataProvider::Get('Plugins\\DForms\\Controls','GetItems',['for_state'=>1]);\n $target=$params->safeGet('target','','is_string');\n $view=new AppView(get_defined_vars(),$this,NULL);\n $view->AddFileContent($this->GetViewFile('ContentEditForm'));\n $view->Render();\n }", "public function view(string $view, object|array $data)\n\t{\n \n $path = \"../resources/views/\".$view.\".php\";\n\n if(isset($data))\n $_GET['data'] = $data;\n\n require $path;\n\t}", "public function beforeAction($action)\n {\n\n $modelClass = Yii::app()->request->getParam('contentModel');\n $pk = (int) Yii::app()->request->getParam('contentId');\n\n if ($modelClass == \"\" || $pk == \"\") {\n throw new CHttpException(500, 'Model & ID parameter required!');\n }\n\n Helpers::CheckClassType($modelClass, array('HActiveRecordContentAddon', 'HActiveRecordContent'));\n\n $model = call_user_func(array($modelClass, 'model'));\n $target = $model->findByPk($pk);\n\n if ($target === null) {\n throw new CHttpException(500, 'Could not find underlying content or content addon record!');\n }\n\n if ($target instanceof HActiveRecordContentAddon) {\n $this->parentContentAddon = $target;\n $this->parentContent = $target->getSource();\n } else {\n $this->parentContent = $target;\n }\n\n if (!$this->parentContent->content->canRead()) {\n throw new CHttpException(403, 'Access denied!');\n }\n\n $this->contentModel = get_class($target);\n $this->contentId = $target->getPrimaryKey();\n\n return parent::beforeAction($action);\n }", "function template_preprocess_views_view_row_file(&$vars) {\n $options = $vars['options'];\n\n // Make sure the variables are defined.\n $vars['file'] = '';\n $vars['comments'] = '';\n\n if (!empty($vars['row']->{$vars['field_alias']})) {\n $fid = $vars['row']->{$vars['field_alias']};\n }\n if (!is_numeric($fid)) {\n return;\n }\n\n $row_plugin = $vars['view']->style_plugin->row_plugin;\n $file = $row_plugin->files[$fid];\n\n if (empty($file)) {\n return;\n }\n\n $file->view = $vars['view'];\n // Detect which build module should be used.\n $file->view_mode = (!empty($options['view_mode'])) ? $options['view_mode'] : 'full';\n //@todo: need to work on view mode\n $content = file_view($file, $file->view_mode);\n if (!$options['links']) {\n unset($content['links']);\n }\n\n $vars['file'] = drupal_render($content);\n\n}", "abstract protected function getView();", "function go_supervisor_view($mode=\"EDIT\") {\n\n\tif(!has_user_permission(__FUNCTION__)) return; \n\n\tglobal $ROW, $TEMPLATE;\n\tLOG_MSG('INFO',\"go_supervisor_view(): START ROW=\".print_r($ROW,true));\n\n\t// Don't load for add mode or when reloading the form\n\tif ( $mode != \"ADD\" && (!isset($ROW[0]) || get_arg($ROW[0],'STATUS') !== 'RELOAD') ) {\n\n\t\t// Get the Supervisor ID\n\t\t$supervisor_id=get_arg($_GET,\"supervisor_id\");\n\n\t\t// Validate the ID\n\t\tif (\n\t\t\t!validate(\"Supervisor Id\",$supervisor_id,1,11,\"int\")\n\t\t) { \n\t\t\tLOG_MSG('ERROR',\"go_supervisor_view(): Invalid Supervisor ID [$supervisor_id]!\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Get from DB\n\t\t$ROW=db_supervisor_select($supervisor_id);\n\t\tif ( $ROW[0]['STATUS'] != \"OK\" ) {\n\t\t\tadd_msg(\"ERROR\",\"There was an error loading the Supervisor. Please try again later. <br/>\");\n\t\t\treturn;\n\t\t}\n\t\t// No rows found\n\t\tif ( $ROW[0]['NROWS'] == 0 ) {\n\t\t\tadd_msg(\"ERROR\",\"No Supervisors found! <br />Click on <strong>Add Supervisor</strong> to create a one.<br /><br />\"); \n\t\t\treturn;\n\t\t}\n\t}\n\n\t$disabled=\"\";\n\t// Setup display parameters\n\tswitch($mode) {\n\t\tcase \"ADD\":\n\t\t\t\t$_do=\"add\";\n\t\t\t\tbreak;\n\t\tcase \"EDIT\":\n\t\t\t\t$_do=\"save\";\n\t\t\t\tbreak;\n\t\tcase \"DELETE\":\n\t\t\t\t$_do=\"remove\";\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t\tcase \"VIEW\":\n\t\tdefault:\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t}\n\n\tif ( isset( $TEMPLATE ) ) { $template=$TEMPLATE; } else { $template=TEMPLATE_DIR.\"record.html\"; } \n\tinclude($template); \n\n\tLOG_MSG('INFO',\"go_supervisor_view(): END\");\n}", "public function editAction() {\n if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }", "function readSearchView(){\n\t\t// fe_user access management can read \n\t\t$rec = $this->model->get_fecruserid($this->rec_id); \n\t\t$access = $this->accessObj->checkAccess($rec,'pageSearch','read');\n\t\tif(!(bindec($access) & bindec('0100'))){\n\t\t\t$this->cmd = 'canNotRead';\n\t\t\t// Get the FORM\n\t\t\t$content = $this->get_include_contents('view_canNotAccess.php');\n\t\t\treturn $content; \n\t\t}\n\t\t$queryConf['startingPoint'] = $this->startingPoint;\t\n\t\t// template for the view\n\t\t$lot = $this->model->select($this->rec_id,$queryConf);\n\t\tif($lot){ \n\t\t\t// fe_user access management\n\t\t\t$access = $this->accessObj->checkAccess($lot[$this->rec_id],'pageSearch','read');\n\t\t\tif(!(bindec($access) & bindec('0100'))){\n\t\t\t\t$this->cmd = 'readForbidden';\n\t\t\t\t$this->data = '';\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->cmd = 'read';\n\t\t\t\t$this->data = $lot[$this->rec_id];\n\t\t\t}\n\t\t}\n\t\t$content = $this->get_include_contents('view_searchDetails.php');\n\t\t\n\t\treturn $content;\n\t}", "public function render($content)\n\t{\n\t\t$element = $this->getElement();\n\t\tif (!$element instanceof L8M_JQuery_Form_Element_M2N) {\n\t\t\t// wir wollen nur das Element\n\t\t\treturn $content;\n\t\t}\n\n\t\t$view = $element->getView();\n\t\tif (!$view instanceof Zend_View_Interface) {\n\t\t\t// verwenden von View Helfers, deshalb ist nichts zu tun\n\t\t\t// wenn keine View vorhanden ist\n\t\t\treturn $content;\n\t\t}\n\n\t\t$cssSortable = NULL;\n\t\tif ($element->isSortable()) {\n\t\t\t$cssSortable = ' m2n-sortable';\n\t\t}\n\n\t\t$loadAction = Doctrine_Query::create()\n\t\t\t->from('Default_Model_Action m')\n\t\t\t->addWhere('m.resource = ? ', array('system.auto-complete.load'))\n\t\t\t->limit(1)\n\t\t\t->execute()\n\t\t\t->getFirst()\n\t\t;\n\n\t\tif (($element->isMediaRealtion() || count($element->getOptionValuesForRender()) > 19) &&\n\t\t\t$loadAction) {\n\n\t\t\t$html = $this->_renderComplexHTML($element, $view);\n\t\t} else {\n\t\t\t$html = $this->_renderEasyHTML($element, $view);\n\t\t}\n\n\t\tob_start();\n\n?>\n<div class=\"m2n-form-element box<?php echo $cssSortable; ?>\">\n\t<?php echo $html; ?>\n\t<ul class=\"selected-values\">\n<?php\n\n\t\t$foreignAlias = $element->getForeignAlias();\n\t\tforeach ($element->getSelectedOptionValuesForRender() as $itemModel) {\n\t\t\tif ($element->isTranslateable()) {\n\t\t\t\t$transValues = $itemModel->Translation;\n\t\t\t} else {\n\t\t\t\t$transValues = array();\n\t\t\t}\n\t\t\tif ($element->hasExtraValue()) {\n\t\t\t\t$extraValueElement = $this->_renderExtraValue($itemModel->value, L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id));\n\t\t\t} else {\n\t\t\t\t$extraValueElement = NULL;\n\t\t\t}\n\t\t\tif ($element->hasRealtionValues()) {\n\t\t\t\t$extraValueElement .= $this->_renderRelationValues(L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id), $itemModel->id);\n\t\t\t}\n\n\t\t\techo '<li class=\"selecte_tab\" id=\"' . $element->getName() . '_' . L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id) . '_selected_id\">';\n\t\t\techo '<input type=\"text\" class=\"hidden item-value\" id=\"' . $element->getName() . '_selected_input_id_' . L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id) . '\" name=\"' . $element->getName() . '[]\" value=\"' . L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id) . '\" data-id=\"' . L8M_Library::getUsableUrlStringOnly($element->getName() . '_selector_link_' . $itemModel[$foreignAlias]->id . '_li') . '\" />';\n\t\t\techo '<span>' . $itemModel[$foreignAlias][$element->getUseForeignColumn()] . '</span>';\n\t\t\techo ' ' . $extraValueElement . $this->_renderTranslateable($transValues, L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id)) . ' ';\n\t\t\techo '<a class=\"remove ' . $element->getName() . '_remove\" href=\"\" id=\"' . $element->getName() . '_' . L8M_Library::getUsableUrlStringOnly($itemModel[$foreignAlias]->id) . '_selected\" onclick=\"' . $element->getName() . '_remove(this); return false;\">' . $view->translate('Remove') . '</a>';\n\t\t\techo '</li>';\n\t\t}\n?>\n\t</ul>\n</div>\n<script type=\"text/javascript\">\n\t//<![CDATA[\n\n\t\t$(\"a.<?php echo $element->getName(); ?>_add\").click(function() {\n\n\t\t\tvar m2nValue = '';\n\t\t\tvar m2nInfo = '';\n\t\t\tvar m2nID = $(\"#<?php echo $element->getName(); ?>_selector li.active\").attr('id');\n\n\t\t\tif ($(\"#<?php echo $element->getName(); ?>_selector li\").length == 0 &&\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>_selector\").attr('value') != '' &&\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>_\" + $(\"#<?php echo $element->getName(); ?>_selector\").attr('value') + '_selected_id').length == 0) {\n\n\t\t\t\tm2nValue = $(\"#<?php echo $element->getName(); ?>_selector\").attr('value');\n\t\t\t\tm2nInfo = $(\"#<?php echo $element->getName(); ?>_selector option:selected\").text();\n\t\t\t} else\n\t\t\tif ($(\"#<?php echo $element->getName(); ?>_selector li.active\").length != 0 &&\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>_selector li.active span.value\").html().length != 0 &&\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>_selector li.active span.info\").html().length != 0) {\n\n\t\t\t\tm2nValue = $(\"#<?php echo $element->getName(); ?>_selector li.active span.value\").html();\n\t\t\t\tm2nInfo = $(\"#<?php echo $element->getName(); ?>_selector li.active span.info\").html();\n\t\t\t\t$(\"ul#<?php echo $element->getName(); ?>_selector li\").removeClass('active');\n\t\t\t}\n\n\t\t\tif (m2nValue &&\n\t\t\t\tm2nInfo &&\n\t\t\t\tm2nID &&\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>_selected_input_id_\" + m2nValue).length == 0) {\n\n\t\t\t\tvar transFormElement = ' ';\n\n\t\t\t\tvar randNumber = Math.floor(Math.random() * 11);\n\t\t\t\tvar currentUnixTime = Math.round((new Date()).getTime() / 1000);\n\t\t\t\tvar referencedElementName = 'ref_' + currentUnixTime.toString() + '_' + randNumber.toString();\n\n<?php\n\n\t\tif ($element->isTranslateable()) {\n\n?>\n\t\t\t\ttransFormElement = ''\n\t\t\t\t+ '<div id=\"<?php echo $element->getName(); ?>_tabs-' + m2nValue + '\" class=\"multitabs\">'\n\t\t\t\t+ '<ul>'\n<?php\n\n\t\t\tforeach (L8M_Locale::getSupported() as $lang) {\n\n?>\n\t\t\t\t+ '<li><a href=\"#<?php echo $element->getName(); ?>_tabs-' + m2nValue.toString() + '-<?php echo $lang; ?>\"><?php echo $lang; ?></a></li>'\n<?php\n\n\t\t\t}\n\n?>\n\t\t\t\t+ '</ul>'\n<?php\n\n\t\t\tforeach (L8M_Locale::getSupported() as $lang) {\n\n?>\n\t\t\t\t+ '<div id=\"<?php echo $element->getName(); ?>_tabs-' + m2nValue + '-<?php echo $lang; ?>\">'\n\t\t\t\t+ '<div>'\n\t\t\t\t+ '<input type=\"text\" name=\"<?php echo $element->getName(); ?>_tabs_<?php echo $lang; ?>_' + m2nValue.toString() + '\" id=\"<?php echo $element->getName(); ?>_tabs_<?php echo $lang; ?>_' + m2nValue.toString() + '\" value=\"\" />'\n\t\t\t\t+ '</div>'\n\t\t\t\t+ '</div>'\n<?php\n\n\t\t\t}\n\n?>\n\t\t\t\t+ '</div>'\n\t\t\t\t+ ' ';\n<?php\n\n\t\t}\n\n\t\tif ($element->hasExtraValue()) {\n\n?>\n\t\t\t\ttransFormElement = ''\n\t\t\t\t+ '<div id=\"<?php echo $element->getName(); ?>_tabs_div-' + m2nValue + '\" class=\"extravalue-tab\">'\n\t\t\t\t+ '<input type=\"text\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + '\" id=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + '\" value=\"\" />'\n\t\t\t\t+ '</div>'\n\t\t\t\t+ ' ';\n<?php\n\n\t\t}\n\n\t\tif ($element->hasRealtionValues()) {\n\t\t\tif ($element->hasMultipleRelationM2nValuesRows()) {\n\t\t\t\techo 'var mrMVRClass = \" border\";';\n\t\t\t} else {\n\t\t\t\techo 'var mrMVRClass = \"\";';\n\t\t\t}\n?>\n\t\t\t\ttransFormElement = transFormElement\n\t\t\t\t+ '<div class=\"relation-values' + mrMVRClass + '\">'\n\t\t\t\t+ '<ul class=\"relation-values\">'\n\t\t\t\t+ '<li class=\"relation-value\">'\n\t\t\t\t+ '<table>';\n<?php\n\n\t\t\tif ($element->hasRelation2y()) {\n\n?>\n\t\t\t\ttransFormElement = transFormElement\n\t\t\t\t+ '<tr>'\n\t\t\t\t+ '<td>'\n\t\t\t\t+ '<?php echo $view->translate($element->getRelationValueColumnLablel('reverenced_id')); ?>'\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '<td>'\n\t\t\t\t+ '<select id=\"' + referencedElementName + '\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['referenced_id'][]\" + '\" class=\"unsortable\"></select>'\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '</tr>';\n<?php\n\n\t\t\t}\n\n\t\t\tforeach ($element->getRealtionValueColumns() as $relationColumnName => $relationColumnDefinition) {\n\t\t\t\t$inputClass = NULL;\n\t\t\t\tif (isset($relationColumnDefinition['type']) &&\n\t\t\t\t\t$relationColumnDefinition['type'] == 'date') {\n\n\t\t\t\t\t$inputClass = 'date';\n\t\t\t\t}\n?>\n\t\t\t\ttransFormElement = transFormElement\n\t\t\t\t+ '<tr>'\n\t\t\t\t+ '<td>'\n\t\t\t\t+ '<?php echo $view->translate($element->getRelationValueColumnLablel($relationColumnName)); ?>'\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '<td>'\n<?php\n\n\t\t\t\tif (isset($relationColumnDefinition['type']) &&\n\t\t\t\t\t$relationColumnDefinition['type'] == 'boolean') {\n\n?>\n\t\t\t\t+ '<input type=\"text\" class=\"hidden <?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"0\" />'\n\t\t\t\t+ '<input type=\"checkbox\" class=\"<?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"1\" />'\n<?php\n\n\t\t\t\t\t} else {\n\n?>\n\t\t\t\t+ '<input type=\"text\" class=\"<?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"\" />'\n<?php\n\n\t\t\t\t}\n\n?>\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '</tr>';\n<?php\n\n\t\t\t}\n\n?>\n\t\t\t\ttransFormElement = transFormElement\n\t\t\t\t+ '</table>'\n\t\t\t\t+ '<a href=\"\" class=\"remove\" onclick=\"<?php echo $element->getName(); ?>_relationValuesRemove(this); return false;\"><?php echo $view->translate('Remove'); ?></a>'\n\t\t\t\t+ '</li>'\n\t\t\t\t+ '</ul>'\n\t\t\t\t+ '<a href=\"\" class=\"add\" onclick=\"<?php echo $element->getName(); ?>_relationValuesAdd(this); return false;\"><?php echo $view->translate('Add'); ?></a>'\n\t\t\t\t+ '</div>';\n<?php\n\n\t\t}\n\n?>\n\t\t\t\tvar elementText = ''\n\t\t\t\t+ '<li class=\"selecte_tab\" id=\"<?php echo $element->getName(); ?>_' + m2nValue.toString() + '_selected_id\">'\n\t\t\t\t+ '<input type=\"text\" class=\"hidden item-value\" id=\"<?php echo $element->getName(); ?>_selected_input_id_' + m2nValue.toString() + '\" name=\"<?php echo $element->getName(); ?>[]\" value=\"' + m2nValue.toString() + '\" data-id=\"' + m2nID + '\" />'\n\t\t\t\t+ '<span>' + m2nInfo + '</span>'\n\t\t\t\t+ transFormElement\n\t\t\t\t+ '<a class=\"remove <?php echo $element->getName(); ?>_remove\" href=\"\" id=\"<?php echo $element->getName(); ?>_' + m2nValue.toString() + '_selected\" onclick=\"<?php echo $element->getName(); ?>_remove(this); return false;\"><?php echo $view->translate('Remove'); ?></a>'\n\t\t\t\t+ '</li>';\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values\").append(elementText);\n<?php\n\n\t\tif ($element->isTranslateable()) {\n\n?>\n\t\t\t\t$('#<?php echo $element->getName(); ?>_tabs-' + m2nValue.toString()).tabs();\n<?php\n\n\t\t}\n\n\t\tif ($element->hasRelation2y()) {\n\n?>\n\n\t\t\t\t$.get(\"/system/auto-complete/model-collection/?model=<?php echo $element->getRelation2yModelName(); ?>&id=\" + m2nValue.toString(), function(data){\n\t\t\t\t\t$(\"#\" + referencedElementName).append(data);\n\t\t\t\t});\n<?php\n\n\n\n\t\t}\n\n?>\n\t\t\t}\n\t\t\t$.datepicker.setDefaults( $.datepicker.regional[ \"<?php echo L8M_Locale::getLang(); ?>\" ] );\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input.date\").datepicker({\n\t\t\t\tdateFormat: 'yy-mm-dd'\n\t\t\t});\n\t\t\t<?php echo $element->getName(); ?>_updateUsed();\n\t\t\treturn false;\n\t\t});\n\n\t\tfunction <?php echo $element->getName(); ?>_relationValuesAdd(elem) {\n\t\t\tvar m2nValue = $(elem).parent().parent().find('input.item-value').attr('value');\n\n\t\t\tvar randNumber = Math.floor(Math.random() * 11);\n\t\t\tvar currentUnixTime = Math.round((new Date()).getTime() / 1000);\n\t\t\tvar referencedElementName = 'ref_' + currentUnixTime.toString() + '_' + randNumber.toString();\n\n\t\t\tvar transFormElement = '<li class=\"relation-value\">'\n\t\t\t+ '<table>';\n<?php\n\n\t\tif ($element->hasRelation2y()) {\n\n?>\n\t\t\t\ttransFormElement = transFormElement\n\t\t\t\t+ '<tr>'\n\t\t\t\t+ '<td>'\n\t\t\t\t+ '<?php echo $view->translate($element->getRelationValueColumnLablel('reverenced_id')); ?>'\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '<td>'\n\t\t\t\t+ '<select id=\"' + referencedElementName + '\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['referenced_id'][]\" + '\" class=\"unsortable\"></select>'\n\t\t\t\t+ '</td>'\n\t\t\t\t+ '</tr>';\n<?php\n\n\t\t}\n\n\t\tforeach ($element->getRealtionValueColumns() as $relationColumnName => $relationColumnDefinition) {\n\t\t\t$inputClass = NULL;\n\t\t\tif (isset($relationColumnDefinition['type']) &&\n\t\t\t\t$relationColumnDefinition['type'] == 'date') {\n\n\t\t\t\t$inputClass = 'date';\n\t\t\t}\n?>\n\t\t\ttransFormElement = transFormElement\n\t\t\t+ '<tr>'\n\t\t\t+ '<td>'\n\t\t\t+ '<?php echo $view->translate($element->getRelationValueColumnLablel($relationColumnName)); ?>'\n\t\t\t+ '</td>'\n\t\t\t+ '<td>'\n<?php\n\n\t\t\tif (isset($relationColumnDefinition['type']) &&\n\t\t\t\t$relationColumnDefinition['type'] == 'boolean') {\n\n?>\n\t\t\t+ '<input type=\"text\" class=\"hidden <?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"0\" />'\n\t\t\t+ '<input type=\"checkbox\" class=\"<?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"1\" />'\n<?php\n\n\t\t\t} else {\n\n?>\n\t\t\t+ '<input type=\"text\" class=\"<?php echo $inputClass; ?>\" name=\"<?php echo $element->getName(); ?>_tabs_' + m2nValue.toString() + \"_rv['<?php echo $relationColumnName; ?>'][]\" + '\" value=\"\" />'\n<?php\n\n\t\t\t}\n\n?>\n\t\t\t+ '</td>'\n\t\t\t+ '</tr>';\n<?php\n\n\t\t}\n\n?>\n\t\t\ttransFormElement = transFormElement\n\t\t\t+ '</table>'\n\t\t\t+ '<a href=\"\" class=\"remove\" onclick=\"<?php echo $element->getName(); ?>_relationValuesRemove(this); return false;\"><?php echo $view->translate('Remove'); ?></a>'\n\t\t\t+ '</li>';\n\n\t\t\t$(elem).parent().find('ul.relation-values').append(transFormElement);\n\n<?php\n\n\t\tif ($element->hasRelation2y()) {\n\n?>\n\n\t\t\t\t$.get(\"/system/auto-complete/model-collection/?model=<?php echo $element->getRelation2yModelName(); ?>&id=\" + m2nValue.toString(), function(data){\n\t\t\t\t\t$(\"#\" + referencedElementName).append(data);\n\t\t\t\t});\n<?php\n\n\t\t}\n\n?>\n\n\t\t\t$.datepicker.setDefaults( $.datepicker.regional[ \"<?php echo L8M_Locale::getLang(); ?>\" ] );\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input.date\").datepicker({\n\t\t\t\tdateFormat: 'yy-mm-dd'\n\t\t\t});\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input[type=checkbox]\").unbind('click');\n\t\t\t//$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input[type=checkbox]\").click(function(){\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values\").on('click', 'div.relation-values input[type=checkbox]', function(){\n\t\t\t\tif ($(this).attr('checked') == 'checked') {\n\t\t\t\t\t$(this).parent().children('input[type=text].hidden').remove();\n\t\t\t\t} else {\n\t\t\t\t\t$(this).before('<input type=\"text\" class=\"hidden\" name=\"' + $(this).attr('name') + '\" value=\"0\" />');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tfunction <?php echo $element->getName(); ?>_relationValuesRemove(elem) {\n\t\t\t$(elem).parent().remove();\n\t\t}\n\n\t\tfunction <?php echo $element->getName(); ?>_remove(item) {\n\t\t\t$(\"#\" + item.id + '_id').remove();\n\t\t\t<?php echo $element->getName(); ?>_updateUsed();\n\t\t\treturn false;\n\t\t};\n\n\t\tfunction <?php echo $element->getName(); ?>_updateUsed() {\n\t\t\t$(\"ul#<?php echo $element->getName(); ?>_selector li\").removeClass('active');\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element div.m2n-form-element-extra ul li\").removeClass('used');\n\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values li input[type=text]\").each(function (index, domEle) {\n\t\t\t\t$(\"#\" + $(domEle).attr('data-id')).addClass('used');\n\t\t\t})\n\t\t\treturn false;\n\t\t};\n\n\t\tfunction <?php echo $element->getName(); ?>_updateNavi() {\n\t\t\tvar actPos = parseInt($(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.prev\").attr('rel'));\n\t\t\tvar maxResults = parseInt($(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.next\").attr('rel'));\n\t\t\tvar maxPossibleResults = maxResults + (75 - (maxResults % 75));\n\n\t\t\tif (actPos == 1) {\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.prev\").hide();\n\t\t\t} else {\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.prev\").show();\n\t\t\t}\n\n\n\t\t\tif (maxPossibleResults / 75 <= actPos) {\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.next\").hide();\n\t\t\t} else {\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi a.next\").show();\n\t\t\t}\n\n\t\t\tif (<?php echo $element->getOptionValuesCountForRender(); ?> < 75) {\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi li:first-child\").html('<?php echo $element->getOptionValuesCountForRender() . ' ' .$view->translate('of') . ' ' . $element->getOptionValuesCountForRender(); ?>');\n\t\t\t} else {\n\t\t\t\tvar showItems = actPos * 75;\n\t\t\t\tif (showItems > <?php echo $element->getOptionValuesCountForRender(); ?>) {\n\t\t\t\t\tshowItems = <?php echo $element->getOptionValuesCountForRender(); ?>;\n\t\t\t\t}\n\t\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.m2n-form-element-extra-navi li:first-child\").html(showItems.toString() + ' <?php echo $view->translate('of') . ' ' . $element->getOptionValuesCountForRender(); ?>');\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$(document).ready(function(){\n\t\t\t$.datepicker.setDefaults( $.datepicker.regional[ \"<?php echo L8M_Locale::getLang(); ?>\" ] );\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input.date\").datepicker({\n\t\t\t\tdateFormat: 'yy-mm-dd'\n\t\t\t});\n\t\t\t<?php echo $element->getName(); ?>_updateUsed();\n\t\t\t<?php echo $element->getName(); ?>_updateNavi();\n\n\t\t\t//$(\"#<?php echo $element->getName(); ?>-element ul.selected-values div.relation-values input[type=checkbox]\").click(function(){\n\t\t\t$(\"#<?php echo $element->getName(); ?>-element ul.selected-values\").on('click', 'div.relation-values input[type=checkbox]', function(){\n\t\t\t\tif ($(this).attr('checked') == 'checked') {\n\t\t\t\t\t$(this).parent().children('input[type=text].hidden').remove();\n\t\t\t\t} else {\n\t\t\t\t\t$(this).before('<input type=\"text\" class=\"hidden\" name=\"' + $(this).attr('name') + '\" value=\"0\" />');\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t//]]>\n</script>\n<?php\n\n\t\t$markup = ob_get_clean() . $this->_renderSortable();\n\n\t\tswitch ($this->getPlacement()) {\n\t\t\tcase self::PREPEND:\n\t\t\t\treturn $markup . $this->getSeparator() . $content;\n\t\t\tcase self::APPEND:\n\t\t\tdefault:\n\t\t\t\treturn $content . $this->getSeparator() . $markup;\n\t\t}\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 }", "protected function renderContent()\n\t{\n\n\t\treturn $this->view->render($this->formView, [\n\t\t\t'model'=>$this->model,\n\t\t\t'mode'=>$this->mode,\n\t\t]);\n\t}", "function Content_edit()\n\t{\n\t\t// Without this, the world as we know it will end!\n\t\tparent::Controller();\n\n\t\t// Does the \"core\" class exist? Normally it's initialized\n\t\t// automatically via the autoload.php file. If it doesn't\n\t\t// exist it means there's a problem.\n\t\tif ( ! isset($this->core) OR ! is_object($this->core))\n\t\t{\n\t\t\tshow_error('The ExpressionEngine Core was not initialized. Please make sure your autoloader is correctly set up.');\n\t\t}\n\n\t\t$this->installed_modules = $this->cp->get_installed_modules();\n\t\t\n\t\t$this->load->library('api');\n\n\t\t$this->load->model('channel_model');\n\t\t$this->load->model('channel_entries_model');\n\t\t$this->load->model('category_model');\n\t\t$this->load->model('status_model');\n\t\t$this->load->model('search_model');\n\t}", "protected function actionEdit() {\r\n\r\n //try 1: get the object type and names based on the current object\r\n $objInstance = class_objectfactory::getInstance()->getObject($this->getSystemid());\r\n if($objInstance != null) {\r\n $strObjectTypeName = uniSubstr($this->getActionNameForClass(\"edit\", $objInstance), 4);\r\n if($strObjectTypeName != \"\") {\r\n $strType = get_class($objInstance);\r\n $this->setCurObjectClassName($strType);\r\n $this->setStrCurObjectTypeName($strObjectTypeName);\r\n }\r\n }\r\n\r\n //try 2: regular, oldschool resolving based on the current action-params\r\n $strType = $this->getCurObjectClassName();\r\n\r\n if(!is_null($strType)) {\r\n\r\n $objEdit = new $strType($this->getSystemid());\r\n $objForm = $this->getAdminForm($objEdit);\r\n $objForm->addField(new class_formentry_hidden(\"\", \"mode\"))->setStrValue(\"edit\");\r\n\r\n return $objForm->renderForm(getLinkAdminHref($this->getArrModule(\"modul\"), \"save\".$this->getStrCurObjectTypeName()));\r\n }\r\n else\r\n throw new class_exception(\"error editing current object type not known \", class_exception::$level_ERROR);\r\n }", "function listView($content,$conf)\t{\r\n\t\t$this->conf=$conf;\t\t// Setting the TypoScript passed to this function in $this->conf\r\n\t\t$this->pi_setPiVarDefaults();\r\n\t\t$this->pi_loadLL();\t\t// Loading the LOCAL_LANG values\r\n\t\t$this->pi_initPIflexform();\r\n\t\t\r\n\t\t// read flexform settings\r\n\t\t$piFlexForm = $this->cObj->data['pi_flexform'];\r\n\t\t$index = $GLOBALS['TSFE']->sys_language_uid;\r\n\t\t$sDef = current($piFlexForm['data']); \r\n\t\t$lDef = array_keys($sDef);\r\n\t\t$this->ffVars['detailviewPID'] = $this->pi_getFFvalue($piFlexForm, 'detailview', 'sDEF', $lDef[$index]);\r\n\t\t$this->ffVars['template'] = $this->pi_getFFvalue($piFlexForm, 'template_file', 'sDEF', $lDef[$index]);\r\n\t\t$this->ffVars['max'] = $this->pi_getFFvalue($piFlexForm, 'max_anzahl', 'sDEF', $lDef[$index]);\r\n\t\t$this->ffVars['show_search'] = $this->pi_getFFvalue($piFlexForm, 'show_search', 'display', $lDef[$index]);\r\n\t\t$this->ffVars['date_from'] = $this->pi_getFFvalue($piFlexForm, 'date_from', 'sDEF', $lDef[$index]);\r\n\t\t$this->ffVars['date_to'] = $this->pi_getFFvalue($piFlexForm, 'date_to', 'sDEF', $lDef[$index]);\r\n\t\t\r\n\t\t\r\n\t\t// read template\r\n\t\t$templateCode = $this->cObj->fileResource($this->ffVars['template']);\r\n\t\t$this->templates = array();\r\n\t\t$this->templates[\"list_table\"] = $this->cObj->getSubpart($templateCode, \"###LIST_TABLE###\");\r\n\t\t$this->templates[\"list_row\"] = $this->cObj->getSubpart($this->templates[\"list_table\"], \"###LIST_TABLE_ROW###\");\r\n\t\t$this->templates[\"geo\"] = $this->cObj->getSubpart($this->templates[\"list_row\"], \"###GEO_SCRIPT###\");\r\n\t\t$this->templates[\"single_view\"] = $this->cObj->getSubpart($templateCode, \"###SINGLE_VIEW###\");\r\n\t\t$this->templates[\"single_view_caritem\"] = $this->cObj->getSubpart($this->templates[\"single_view\"], \"###CAR_ITEM###\");\r\n\t\t$this->templates[\"geo_single\"] = $this->cObj->getSubpart($this->templates[\"single_view\"], \"###GEO_SCRIPT###\");\r\n\r\n\t\t$lConf = $this->conf['listView.'];\t// Local settings for the listView function\r\n\t\r\n\t\tif ($this->piVars['showUid'])\t{\t// If a single element should be displayed:\r\n\t\t\t$this->internal['currentTable'] = 'tx_firefighter_einsatz';\r\n\t\t\t$this->internal['currentRow'] = $this->pi_getRecord('tx_firefighter_einsatz',$this->piVars['showUid']);\r\n\t\r\n\t\t\t$content = $this->singleView($content,$conf);\r\n\t\t\treturn $content;\r\n\t\t} else {\r\n\t\t\t$items=array(\r\n\t\t\t\t'1'=> $this->pi_getLL('list_mode_1','Mode 1'),\r\n\t\t\t\t'2'=> $this->pi_getLL('list_mode_2','Mode 2'),\r\n\t\t\t\t'3'=> $this->pi_getLL('list_mode_3','Mode 3'),\r\n\t\t\t);\r\n\t\t\tif (!isset($this->piVars['pointer']))\t$this->piVars['pointer']=0;\r\n\t\t\tif (!isset($this->piVars['mode']))\t$this->piVars['mode']=1;\r\n\t\r\n\t\t\t\t// Initializing the query parameters:\r\n\t\t\t$count = '999999';\r\n\t\t\tif($this->ffVars['max']>0) $count = $this->ffVars['max'];\r\n\t\t\t$this->internal['orderBy'] = \"datefrom\";\r\n\t\t\t$this->internal['descFlag'] = \"DESC\";\r\n\t\t\t$this->internal['results_at_a_time']=t3lib_div::intInRange($lConf['results_at_a_time'],0,1000,$count);\t\t// Number of results to show in a listing.\r\n\t\t\t$this->internal['maxPages']=t3lib_div::intInRange($lConf['maxPages'],0,1000,999);;\t\t// The maximum number of \"pages\" in the browse-box: \"Page 1\", \"Page 2\", etc.\r\n\t\t\t$this->internal['searchFieldList']='title,location,description';\r\n\t\t\t$this->internal['orderByList']='uid,title,location';\r\n\t\t\t$where = \"\";\r\n\t\t\tif($this->ffVars['date_from'] > 1) $where .= \" AND `datefrom`>'\" . $this->ffVars['date_from'] . \"' \";\r\n\t\t\tif($this->ffVars['date_to'] > 1) $where .= \" AND `datefrom`<'\" . $this->ffVars['date_to'] . \"' \";\r\n\t\r\n\t\t\t\t// Get number of records:\r\n\t\t\t$res = $this->pi_exec_query('tx_firefighter_einsatz',1, $where);\r\n\t\t\tlist($this->internal['res_count']) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);\r\n\t\r\n\t\t\t\t// Make listing query, pass query to SQL database:\r\n\t\t\t#$res = $this->pi_exec_query('tx_firefighter_einsatz');\r\n\t\t\t$res = $this->pi_exec_query('tx_firefighter_einsatz', 0, $where, '', '', 'datefrom DESC');\r\n\t\t\t$this->internal['currentTable'] = 'tx_firefighter_einsatz';\r\n\t\r\n\t\t\t\t// Put the whole list together:\r\n\t\t\t$fullTable='';\t// Clear var;\r\n\t\t#\t$fullTable.=t3lib_div::view_array($this->piVars);\t// DEBUG: Output the content of $this->piVars for debug purposes. REMEMBER to comment out the IP-lock in the debug() function in t3lib/config_default.php if nothing happens when you un-comment this line!\r\n\t\t#\t$fullTable.=t3lib_div::view_array($this->ffVars);\r\n\t\t\r\n\t\t\t\t// Adds the mode selector.\r\n\t\t\t//$fullTable.=$this->pi_list_modeSelector($items);\r\n\t\r\n\t\t\t\t// Adds the whole list table\r\n\t\t\t$fullTable.=$this->makelist($res);\r\n\t\r\n\t\t\t\t// Adds the search box:\r\n\t\t\tif($this->ffVars['show_search']) $fullTable.=$this->pi_list_searchBox();\r\n\t\r\n\t\t\t\t// Adds the result browser:\r\n\t\t\t//$fullTable.=$this->pi_list_browseresults();\r\n\t\r\n\t\t\t\t// Returns the content from the plugin.\r\n\t\t\treturn utf8_encode($fullTable);\r\n\t\t}\r\n\t}", "function list_field_views_data($field) {\n $data = field_views_field_default_views_data($field);\n foreach ($data as $table_name => $table_data) {\n foreach ($table_data as $field_name => $field_data) {\n if (isset($field_data['filter']) && $field_name != 'delta') {\n $data[$table_name][$field_name]['filter']['handler'] = 'views_handler_filter_field_list';\n }\n if (isset($field_data['argument']) && $field_name != 'delta') {\n if ($field['type'] == 'list_text') {\n $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list_string';\n }\n else {\n $data[$table_name][$field_name]['argument']['handler'] = 'views_handler_argument_field_list';\n }\n }\n }\n }\n return $data;\n}", "protected function viewAction()\n {\n }", "protected function action()\n {\n switch($this->action)\n {\n case 'load':\n $this->load();\n break;\n }\n }", "function form_init_data($action = FT_ACTION_DELETE)\r\n {\r\n parent::form_init_data($action) ;\r\n }", "function ContentEditor(&$db, $contentType) {\n $this->db = &$db;\n $this->contentType = $contentType;\n }", "function main($content,$conf)\t{\r\n\t\tswitch((string)$conf['CMD'])\t{\r\n\t\t\tcase 'singleView':\r\n\t\t\t\tlist($t) = explode(':',$this->cObj->currentRecord);\r\n\t\t\t\t$this->internal['currentTable']=$t;\r\n\t\t\t\t$this->internal['currentRow']=$this->cObj->data;\r\n\t\t\t\treturn $this->pi_wrapInBaseClass($this->singleView($content,$conf));\r\n\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif (strstr($this->cObj->currentRecord,'tt_content'))\t{\r\n\t\t\t\t\t$conf['pidList'] = $this->cObj->data['pages'];\r\n\t\t\t\t\t$conf['recursive'] = $this->cObj->data['recursive'];\r\n\t\t\t\t}\r\n\t\t\t\treturn $this->listView($content,$conf);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function form( $instance ) {\n\n $title = !empty($instance['title']) ? $instance['title'] : 'Related content';\n $limit = isset($instance['limit']) ? $instance['limit'] : -1;\n $type = isset($instance['type']) ? $instance['type'] : 'dataset';\n\t\t$template = isset($instance['template']) ? $instance['template'] : 'default';\n $max_height = isset($instance['max_height']) ? $instance['max_height'] : '200';\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id('title');?>\"><?php _e('Title:');?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title');?>\" name=\"<?php echo $this->get_field_name('title');?>\" type=\"text\" value=\"<?php _e($title,'odm');?>\">\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'type' ); ?>\"><?php _e( 'Select content type:' ); ?></label>\n\t\t\t<select class='widefat type' id=\"<?php echo $this->get_field_id('type'); ?>\" name=\"<?php echo $this->get_field_name('type'); ?>\" type=\"text\">\n\t\t\t\t<?php foreach ( $this->types as $key => $available_type ): ?>\n\t\t\t\t\t<option <?php if ($type == $available_type[\"label\"]) { echo \" selected\"; } ?> value=\"<?php echo $key ?>\"><?php echo $available_type[\"label\"] ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'template' ); ?>\"><?php _e( 'Select layout:' ); ?></label>\n\t\t\t<select class='widefat template' id=\"<?php echo $this->get_field_id('template'); ?>\" name=\"<?php echo $this->get_field_name('template'); ?>\" type=\"text\">\n\t\t\t\t<?php\n $current_type = $this->types[$type];\n foreach ( $current_type[\"templates\"] as $key => $available_template ): ?>\n\t\t\t\t\t<option <?php if ($template == $available_template) { echo \" selected\"; } ?> value=\"<?php echo $available_template ?>\"><?php echo $available_template ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</select>\n\t\t</p>\n\t\t<?php $limit = !empty($instance['limit']) ? $instance['limit'] : -1 ?>\n\t\t<p class=\"<?php echo $this->get_field_id('limit');?>\">\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'limit' ); ?>\"><?php _e( 'Select max number of posts to list (-1 to show all):' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('limit');?>\" name=\"<?php echo $this->get_field_name('limit');?>\" type=\"number\" value=\"<?php echo $limit;?>\">\n\t\t</p>\n\t\t\t<?php $max_height = !empty($instance['max_height']) ? $instance['max_height'] : '200' ?>\n\t\t<p class=\"<?php echo $this->get_field_id('max_height');?>\">\n\t\t\t<label for=\"<?php echo $this->get_field_id( 'max_height' ); ?>\"><?php _e( 'Define the max height of container:' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('max_height');?>\" name=\"<?php echo $this->get_field_name('max_height');?>\" type=\"number\" value=\"<?php echo $max_height;?>\">\n\t\t</p>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(function($) {\n\t\t\t\tvar $select_template = \"<?php echo $this->get_field_id('template'); ?>\";\n\t\t\t\tdisplay_max_height();\n\t\t\t\t$('#'+$select_template).change(function(){\n\t\t\t\t\tdisplay_max_height();\n\t\t\t\t});\n\n\t\t\t\tfunction display_max_height (){\n\t\t\t\t\tvar $p_limit = \"<?php echo $this->get_field_id('limit');?>\";\n\t\t\t\t\tvar $p_max_height = \"<?php echo $this->get_field_id('max_height');?>\";\n\t\t\t\t\tif($('#'+$select_template).val() == \"html\"){\n\t\t\t\t\t\t$('.'+$p_limit).hide();\n\t\t\t\t\t\t$('.'+$p_max_height).show();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$('.'+$p_limit).show();\n\t\t\t\t\t\t$('.'+$p_max_height).hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t </script>\n\n\t\t<?php\n\t}", "public function actionView() {}", "public function actionView() {}", "public function actionAjaxload()\r\n\t{\r\n\t\tif(isset($_GET['form'])){\r\n\t\t\tif($_GET['form'] == \"_form_question\"){\r\n\t\t\t\t$model = Question::model()->findByPk($_GET['questionId']);\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('model'=>$model, 'ajax'=>true), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_alter_list_edit\"){\r\n\t\t\t\t$model = AlterList::model()->findByPk($_GET['alterListId']);\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('model'=>$model, 'ajax'=>true, 'studyId'=>$model->studyId), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_alter_prompt_edit\"){\r\n\t\t\t\t$model = AlterPrompt::model()->findByPk($_GET['alterPromptId']);\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('model'=>$model, 'ajax'=>true, 'studyId'=>$model->studyId), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_option_edit\"){\r\n\t\t\t\t$model = QuestionOption::model()->findByPk($_GET['optionId']);\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('model'=>$model, 'ajax'=>true, 'questionId'=>$model->questionId), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_expression_text\" || $_GET['form'] == \"_form_expression_counting\" || $_GET['form'] == \"_form_expression_comparison\" || $_GET['form'] == \"_form_expression_compound\"){\r\n\t\t\t\t$questionId = \"\";\r\n\t\t\t\tif(isset($_GET['questionId']) && is_numeric($_GET['questionId']) && $_GET['questionId'] != 0)\r\n\t\t\t\t\t$question = Question::model()->findByPk($_GET['questionId']);\r\n\t\t\t\telse\r\n\t\t\t\t\t$question = new Question;\r\n\t\t\t\tif(isset($_GET['id']))\r\n\t\t\t\t\t$model = Expression::model()->findbyPk($_GET['id']);\r\n\t\t\t\telse\r\n\t\t\t\t\t$model = new Expression;\r\n\r\n\t\t\t\tif(isset($_GET['expressionId']))\r\n\t\t\t\t\t$expression = Expression::model()->findbyPk($_GET['expressionId']);\r\n\t\t\t\telse\r\n\t\t\t\t\t$expression = new Expression;\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('model'=>$model, 'expression'=>$expression, 'ajax'=>true, 'question'=>$question, 'studyId'=>$_GET['studyId']), false, false);\r\n\t\t\t}else if($_GET['form'] == \"_form_option\"){\r\n\r\n\t\t\t\t$criteria=new CDbCriteria;\r\n\t\t\t\t$criteria=array(\r\n\t\t\t\t\t'condition'=>\"questionId = \" . $_GET['questionId'],\r\n\t\t\t\t\t'order'=>'ordering',\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$dataProvider=new CActiveDataProvider('QuestionOption',array(\r\n\t\t\t\t\t'criteria'=>$criteria,\r\n\t\t\t\t\t'pagination'=>false,\r\n\t\t\t\t));\r\n\t\t\t\t$this->renderPartial(\"_form_option\", array('dataProvider'=>$dataProvider, 'questionId'=>$_GET['questionId'], 'ajax'=>true), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_option_list\"){\r\n\t\t\t\t$answerList = AnswerList::model()->findByPk($_GET['answerListId']);\r\n\t\t\t\t$listOptions = preg_split('/,/', $answerList->listOptionNames);\r\n\t\t\t\t$options = array();\r\n\t\t\t\tforeach($listOptions as $listOption){\r\n\t\t\t\t\tif($listOption){\r\n\t\t\t\t\t\tlist($key, $value) = preg_split('/=/', $listOption);\r\n\t\t\t\t\t\t$options[$key] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('options'=>$options, 'answerList'=>$answerList, 'ajax'=>true), false, true);\r\n\t\t\t}else if($_GET['form'] == \"_form_option_list_edit\"){\r\n\t\t\t\t$this->renderPartial($_GET['form'], array('answerListId'=>$_GET['answerListId'], 'key'=>$_GET['key'], 'value'=>$_GET['value'], 'ajax'=>true), false, true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tYii::app()->end();\r\n\t}", "public function display_field($data) {\n\t\t$r = '';\n\t\t$this->_include_js($this->_theme_url() . 'scripts/jquery.ui.sortable.js', $r);\n\t\t$this->_include_js($this->_theme_url() . 'scripts/display_field.js', $r);\n\t\t//$this->_include_js($this->_theme_url() . 'scripts/ee_filebrowser.js', $r);\n\t\t// CSS\n\t\t$this->_include_theme_css('display_field.css', $r);\n\n\t\t// Check to see if we are loading a draft into the publish view\n\t\t/*\n\t\t #0005060\n\t\t if (isset($this->EE->session->cache['ep_better_workflow']['is_draft']) && $this->EE->session->cache['ep_better_workflow']['is_draft']) {\n\n\t\t if (is_array($data))\n\t\t $data = implode(current($data), ',');\n\t\t } */\n\n\t\t// Try unserialize data field\n\t\tif (!is_array($data)) {\n\t\t\t// If member provides UPDATE fix EE security: slashed variables recursively\n\t\t\t$data = html_entity_decode($data, ENT_QUOTES);\n\n\t\t\t// Unserialize\n\t\t\t$data = $this->_compatibilty_mode($data);\n\n\t\t\t$data = @unserialize($data);\n\t\t} else {\n\n\t\t\t// If member provides SAVE & VALIDATION failed\n\t\t\tif (!function_exists('_ce_remove_html_entities')) {\n\n\t\t\t\tfunction _ce_remove_html_entities($input) {\n\t\t\t\t\tif (is_array($input)) {\n\t\t\t\t\t\tforeach ($input as $k => $v) {\n\t\t\t\t\t\t\t$input[$k] = _ce_remove_html_entities($v);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$input = html_entity_decode($input, ENT_QUOTES);\n\t\t\t\t\t}\n\t\t\t\t\treturn $input;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// Fix EE security: slashed variables recursively\t\t\t\n\t\t\t$data = _ce_remove_html_entities($data);\n\t\t}\n\n\t\t// Keep array format (if unserialize failed)\n\t\tif (!is_array($data)) {\n\t\t\t$data = array();\n\t\t}\n\n\t\t// Load Elements\n\t\t$this->_load_elements_lib();\n\t\t$content_elements = $this->EE->elements->fetch_avaiable_elements($this->get_vars2export());\n\t\t$settings = unserialize($this->settings['content_elements']);\n\n\t\t// Prepare \n\t\tglobal $content_elements_initialized;\n\t\tif (!isset($content_elements_eid_defined)) {\n\n\t\t\t// Dialogs\n\t\t\t$r .= '<script type=\"text/javascript\">\n\t\t\t\tvar content_elements_remove_dialog_btn_yes = \"' . $this->EE->lang->line('content_elements_remove_dialog_btn_yes') . '\";\n\t\t\t\tvar content_elements_remove_dialog_btn_no = \"' . $this->EE->lang->line('content_elements_remove_dialog_btn_no') . '\";\n\t\t\t</script>';\n\t\t\t$r .= '<div style=\"display:none\" id=\"ce_delete_alert_body\" title=\"' . $this->EE->lang->line('content_elements_remove_dialog_head') . '\"><div class=\"ui-dialog-content ui-widget-content\" style=\"color: red\">' . $this->EE->lang->line('content_elements_remove_dialog_body') . '</div></div>';\n\n\t\t\t// Elements empty settings list\n\t\t\t$r .= '<script type=\"text/javascript\">if (typeof content_elements_eid == \"undefined\" || !(content_elements_eid instanceof Array)) { var content_elements_eid = [];}</script>';\n\t\t}\n\n\t\t// Fetch each element settings\n\t\t$r .= '<script type=\"text/javascript\">';\n\t\tforeach ($settings as $k => $element) {\n\t\t\t$eid = $element[\"settings\"][\"eid\"];\n\t\t\t$eid_settings = base64_encode(serialize($element));\n\t\t\t$r .= 'content_elements_eid[\"' . $eid . '\"] = \"' . $eid_settings . '\";';\n\t\t}\n\t\t$r .= '</script>';\n\n\t\t// Display prototypes of All available elements\n\t\t$elements_prototypes = '';\n\n\t\tforeach ($settings as $k => $element) {\n\t\t\t$element_type = $element[\"type\"];\n\t\t\t$element_settings = $this->_exclude_setting_system_fields($element[\"settings\"]);\n\n\t\t\tif (!empty($this->EE->elements->$element_type->handler)\n\t\t\t\t\tand method_exists($this->EE->elements->$element_type->handler, 'display_element')) {\n\n\t\t\t\tif (REQ == 'PAGE' and !empty($this->EE->elements->$element_type->handler->only_cp)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach ($element_settings as $setting_var => $setting_value) {\n\t\t\t\t\t$this->EE->elements->$element_type->handler->settings[$setting_var] = $setting_value;\n\t\t\t\t}\n\n\t\t\t\t$this->EE->elements->$element_type->handler->field_name = '__element_name__[__index__][data]';\n\n\t\t\t\t// Set element id\n\t\t\t\t$this->EE->elements->$element_type->handler->element_id = $element[\"settings\"][\"eid\"];\n\n\t\t\t\t$elements_prototypes[$element[\"settings\"][\"eid\"]] = array(\n\t\t\t\t\t\"type\" => $element_type,\n\t\t\t\t\t\"content\" => $this->EE->elements->$element_type->handler->display_element(''),\n\t\t\t\t\t\"settings\" => base64_encode(serialize($element)),\n\t\t\t\t\t\"eid\" => $element[\"settings\"][\"eid\"],\n\t\t\t\t\t\"title\" => $element[\"settings\"][\"title\"],\n\t\t\t\t\t\"element_field_name\" => $this->EE->elements->$element_type->handler->field_name,\n\t\t\t\t\t\"element_field_id\" => !empty($this->settings[\"field_id\"]) ? $this->settings[\"field_id\"] : NULL,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($data as $eid => $element) {\n\n\t\t\tif (empty($element[\"element_type\"]))\n\t\t\t\tcontinue;\n\n\t\t\t$element_type = $element[\"element_type\"];\n\n\t\t\tif (empty($this->EE->elements->$element_type->handler))\n\t\t\t\tcontinue;\n\n\t\t\tif (REQ == 'PAGE' and !empty($this->EE->elements->$element_type->handler->only_cp)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$element_settings = unserialize(base64_decode($element[\"element_settings\"]));\n\n\t\t\tif (!isset($elements_prototypes[$element_settings[\"settings\"][\"eid\"]])) {\n\t\t\t\tforeach ($this->_exclude_setting_system_fields($element_settings[\"settings\"]) as $setting_var => $setting_value) {\n\t\t\t\t\t$this->EE->elements->$element_type->handler->settings[$setting_var] = $setting_value;\n\t\t\t\t}\n\t\t\t\t$this->EE->elements->$element_type->handler->field_name = '__element_name__[__index__][data]';\n\n\t\t\t\t$elements_prototypes[$element_settings[\"settings\"][\"eid\"]] = array(\n\t\t\t\t\t\"type\" => $element_type,\n\t\t\t\t\t\"content\" => $this->EE->elements->$element_type->handler->display_element(FALSE),\n\t\t\t\t\t\"settings\" => base64_encode(serialize($element_settings)),\n\t\t\t\t\t\"eid\" => $element_settings[\"settings\"][\"eid\"],\n\t\t\t\t\t\"title\" => $element_settings[\"settings\"][\"title\"],\n\t\t\t\t\t\"element_field_name\" => $this->EE->elements->$element_type->handler->field_name,\n\t\t\t\t\t\"element_field_id\" => !empty($this->settings[\"field_id\"]) ? $this->settings[\"field_id\"] : NULL,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Compose toolbar icons\n\t\t$buttons = array();\n\t\tforeach ($settings as $k => $element) {\n\n\t\t\t$element_type = $element[\"type\"];\n\t\t\t$element_settings = $this->_exclude_setting_system_fields($element[\"settings\"]);\n\n\t\t\tif (REQ == 'PAGE' and !empty($this->EE->elements->$element_type->handler->only_cp)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$buttons[] = array(\n\t\t\t\t\"type\" => $element['type'],\n\t\t\t\t\"title\" => $element['settings']['title'],\n\t\t\t\t\"eid\" => $element['settings']['eid'],\n\t\t\t\t\"settings\" => $element['settings']\n\t\t\t);\n\t\t}\n\n\t\t// Load tiles\n\t\t$tiles = array();\n\n\t\tforeach ($data as $eid => $element) {\n\n\t\t\tif (empty($element[\"element_type\"]))\n\t\t\t\tcontinue;\n\n\t\t\t$element_type = $element[\"element_type\"];\n\t\t\t$element_settings = unserialize(base64_decode($element[\"element_settings\"]));\n\n\t\t\tif (empty($this->EE->elements->$element_type->handler))\n\t\t\t\tcontinue;\n\n\t\t\t$this->EE->elements->$element_type->handler->element_id = $element_settings[\"settings\"][\"eid\"];\n\n\t\t\t// Load actual settings\n\t\t\tforeach ($settings as $k => $basic_settings) {\n\t\t\t\tif ($settings[$k][\"settings\"][\"eid\"] == $element_settings[\"settings\"][\"eid\"]) {\n\t\t\t\t\t$element_settings = $settings[$k];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Fetch handler\n\t\t\tforeach ($this->_exclude_setting_system_fields($element_settings[\"settings\"]) as $setting_var => $setting_value) {\n\t\t\t\t$this->EE->elements->$element_type->handler->settings[$setting_var] = $setting_value;\n\t\t\t}\n\n\t\t\t$this->EE->elements->$element_type->handler->field_name = $this->_element_field_name() . '[' . $eid . '][data]';\n\t\t\t$this->EE->elements->$element_type->handler->element_field_id = !empty($this->settings[\"field_id\"]) ? $this->settings[\"field_id\"] : NULL;\n\n\t\t\t// Parse data & show field\n\t\t\t$tiles[] =\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"type\" => $element_type,\n\t\t\t\t\t\t\"content\" => $this->EE->elements->$element_type->handler->display_element($element[\"data\"]),\n\t\t\t\t\t\t\"settings\" => base64_encode(serialize($element_settings)),\n\t\t\t\t\t\t\"eid\" => $eid,\n\t\t\t\t\t\t\"title\" => $element_settings[\"settings\"][\"title\"],\n\t\t\t\t\t\t\"element_field_name\" => $this->_element_field_name() . '[' . $eid . ']',\n\t\t\t\t\t\t\"element_field_id\" => !empty($this->settings[\"field_id\"]) ? $this->settings[\"field_id\"] : NULL,\n\t\t\t);\n\t\t}\n\n\t\t$protypes = $this->EE->load->view($this->_get_view_path('publish_prototypes'), array(\n\t\t\t\"field_id\" => $this->settings[\"field_id\"],\n\t\t\t\"tiles\" => $elements_prototypes,\n\t\t\t\t), TRUE\n\t\t);\n\n\t\tif (REQ == 'CP') {\n\t\t\t$this->EE->cp->add_to_foot($protypes);\n\t\t} else {\n\t\t\t$r .= $protypes;\n\t\t}\n\n\t\t// Compose vars\t[print_r($elements_prototypes); exit;]\n\t\t$vars = array(\n\t\t\t\"field_id\" => $this->settings[\"field_id\"],\n\t\t\t\"field_name\" => $this->_element_field_name(),\n\t\t\t\"buttons\" => $buttons,\n\t\t\t\"tiles\" => $tiles,\n\t\t\t\"theme_url\" => $this->_theme_url(),\n\t\t);\n\n\t\t$r .= $this->EE->load->view($this->_get_view_path('publish'), $vars, TRUE);\n\n\t\treturn $r;\n\t}", "public function createView($content, $conf)\n\t{\n\t\t// get NameSpacefor variables\n\t\t$getNS = preg_match_all( '/(.*)(:)(.*)/e', $this->piVars[\"keyword\"] , $NSmatches );\n\t\t$this->currentNameSpace = $NSmatches[1][0];\n\t\t// redirect if the wiki is only editable when a user is logged in\n\t\tif ( ($this->activateAccessControl) )\t\t\t\t\t // Access control active?\n\t\t{ \n\t\t\tif ( !$GLOBALS[\"TSFE\"]->fe_user->user[\"uid\"] > 0 )\t\t// User is NOT logged in?\n\t\t\t{\n\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\n\t\t\t\t$link = ($this->pageRedirect) ? $this->pi_linkToPage('Log-In',$this->pageRedirect,'',$parameters) : '';\n\t\t\t\t\n\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_login_warning\", \"Attention: You need to be logged-in \").\n\t\t\t\t\t\t$link.'<br/><br/></div>';\n\t\t\t\treturn $content;\n\t\t\t } \n\t\t\tif ( ($this->allowedGroups == true) && (!$this->inGroup ($this->allowedGroups))\t// User is NOT in \"Allowed Groups\"?\n\t\t\t\t OR \n\t\t\t\t ($this->disallowedGroups == true) && ($this->inGroup ($this->disallowedGroups)) ) // User IS in \"Disallowed Groups\"?\n\t\t\t{\n\t\t\t\t$parameters = array(\"redirect_url\" => $this->pi_linkTP_keepPIvars_url(array(\"cmd\" => \"edit\", \"submit\" => \"\"), 1, 0));\t\n\t\t\t\t$content = '<div class=\"wiki-box-red\">'.\n\t\t\t \t\t\t$this->cObj->cObjGetSingle($this->conf[\"sys_Warning\"], $this->conf[\"sys_Warning.\"]).\n\t\t\t \t\t\t$this->pi_getLL(\"pi_edit_disallowed\", \"Sorry, you are not allowed to edit or create this article. Please talk to the administrator if you think this is an error.\").\n\t\t\t\t\t\t'<br/><br/></div>';\n\t\t\t\treturn $content;\n\t\t\t}\n\t\t}\n\t\tif ($this->piVars[\"submitCreate\"] && !$this->read_only)\n\t\t{\n\t\t\t// the user has filled out the form before, so we insert the\n\t\t\t// data in the database and reset the pi-variables. Then we display\n\t\t\t// the current keyword (the page we have just created)\n\t\t\t$this->piVars[\"body\"] = $this->replaceSignature($this->piVars[\"body\"]);\n\t\t\t// exec_INSERTquery is sql-injection safe, no quoting needed here\t\t\t\t\n\t\t\t\n\t\t\tif ($this->piVars['summary'] == $this->initSummary) {$this->piVars['summary'] = '';};\n\t\t\t//check if previous record is locked (only when admin user is present)\n\t\t\t$isLocked = 0;\n\t\t\tif ($this->isUserWikiAdmin()) $isLocked = $this->isRecordLocked($this->piVars['keyword']);\n\t\t\t\n\t\t\t// check hiding status --> only set it when email notification is\n\t\t\t// active - otherwise set to false\n\t\t\tif ($this->mailNotify) \n\t\t\t\t{$hidden = $this->mailHideItem;}\n\t\t\telse {$hidden = false;}\n\t\t\t\n\t\t\t$pageContent = array(\n\t\t\t\t\t'pid' => $this->storagePid,\n\t\t\t\t\t'crdate' => time(),\n\t\t\t\t\t'tstamp' => time(),\n\t\t\t\t\t'keyword' => trim($this->piVars['keyword']),\n\t\t\t\t\t'summary' => $this->piVars['summary'],\n\t\t\t\t\t'body' => $this->piVars['body'],\n\t\t\t\t\t'date' => $this->piVars['date'],\n\t\t\t\t\t'author' => $this->piVars['author'],\n\t\t\t\t\t'locked' => $isLocked,\n\t\t\t\t\t'hidden' => $hidden,\n\t\t\t\t);\n\t\t\t\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t\t'tx_drwiki_pages',\n\t\t\t\t $pageContent\n\t\t\t);\n\t\t\t\n\t\t\t$this->clearEditPiVars(); \n\t\t\t$this->piVars[\"section\"] = \"\";\n\t\t\t$this->piVars[\"referer\"] = \"\";\n\t\t\t \n\t\t\t// send mail and add note to the output that everything was saved \n\t\t\t$note =\"\";\t\t\t\n\t\t\tif ($this->mailNotify) {\n\t\t\t\t$this->mailAdmin($GLOBALS['TYPO3_DB']->sql_insert_id(), $pageContent['keyword'], $pageContent['body']);\n\t\t\t\t$note = '<div class=\"wiki-box-yellow\">'.\n\t\t\t\t \t$this->cObj->cObjGetSingle($this->conf[\"sys_Info\"], $this->conf[\"sys_Info.\"]).\n\t\t\t\t \t$this->pi_getLL(\"pi_mail_notify_warning\", \"Your changes were mailed to the wiki editor and will be added later on.\").\n\t\t\t\t\t'<br/><br/></div>';\t\t\t\t\t\n\t\t\t}\n\n\t\t\treturn $note . $this->singleView($content, $conf);\n\t\t} else {\n\t\t\t// the user has freshly clicked a create-link, so we display\n\t\t\t// the form\n\t\t\t\n\t\t\t//create captcha\n\t\t\t//$captcha = $this->freeCap->makeCaptcha();\n\t\t\t\n\t\t\t// get user name\n\t\t\t$author = $this->getUser();\n\t\t\t\n\t\t\t$markerArray = $this->getEditMarkerArray('', $author, '', 'add');\n\t\t\t$content = $this->cObj->getSubpart($this->templateCode, \"###EDIT_FROM###\");\n\t\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###EDIT_FROM_PREVIEW###', '');\n\t\t\t$content = $this->cObj->substituteSubpart($content, '###PREVIEW_BUTTON###', '');\n\t\t\t\n\t\t\t$this->piVars[\"referer\"] = \"\";\n\t\t\treturn $content;\n\t\t}\n\t}", "function onView () {\n\n switch (parent::getAction()) {\n \n case \"edit\":\n $this->printEditView();\n break;\n default:\n $userId = $this->getModeUserId();\n $user = UsersModel::getUser($userId);\n if (RolesModel::hasModuleRole($userId,\"user.files.owner\")) {\n if (empty($user->directoryid)) {\n $user->directoryid = UsersModel::setupUserDirectory($userId);\n }\n parent::onView($user->directoryid);\n }\n }\n }", "protected function view( $view , $data = FALSE)\n {\n if ( ($this->hasHeader) && ($this->customHeaderPath == FALSE) ) {\n require_once '../app/views/common/header.php';\n } else {\n require_once (string)$this->customHeaderPath;\n }\n\n require_once '../app/views/'. $view .'.php';\n\n if ( ($this->hasFooter) && ($this->customFooterPath == FALSE) ) {\n require_once '../app/views/common/footer.php';\n } else {\n require_once (string)$this->customFooterPath;\n }\n\n if ($data) {\n return $data;\n }\n }", "function fields($content, $conf ) {\n\t\n\t\t$this->pi_loadLL();\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_initPIflexForm();\n\t\t\t\t\t\t\t\n\t\t$tv_field = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], $conf['flex_data'], $conf['sheet_pointer'], $conf['lang'], $conf['value_def']);\n\t\t\n\t\tswitch ($conf['flex_data']){\n\t\tcase \"company\":\n\t\t\t$tv_field=explode(\" \",$tv_field);\n\t\t\t//$content=t3lib_div::view_array($tv_field);\n\t\t\t$mod_field=\"<a\";\n\t\t\tif($tv_field[1]!=\"-\"&&$tv_field[1]){$mod_field.=\" target='\".$tv_field[1].\"' \";}\n\t\t\tif($tv_field[2]!=\"-\"&&$tv_field[2]){$mod_field.=\" class='\".$tv_field[2].\"' \";}\n\t\t\tif($tv_field[0]!=\"-\"&&$tv_field[0]){$mod_field.=\" href='http://\".$tv_field[0].\"' \";}\n\t\t\tif($tv_field[3]!=\"-\"&&$tv_field[3]){$mod_field.=\" >\".$tv_field[3];}else{$mod_field.=\" >\".$tv_field[0];}\n\t\t\tunset($tv_field);\n\t\t\t$tv_field.=$mod_field.\"</a>\";\n\t\tbreak;\n\t\tcase \"email\":\n\t\t\t$tv_field=\"<a href='mailto:\".$tv_field.\"'>\".$tv_field.\"</a>\";\n\t\tbreak;\n\t\t}\n\t\treturn $tv_field;\n\n\t}", "public function input_data_staff_akademik(){\n\t\t$data['content'] = 'admin/input_data_staff_akademik';\n\t\t$this->load->view('content',$data);\n\t}", "function generate($content_view, $template_view, $data = null)\n {\n ob_start();\n include($this->pathTpl . $template_view . $this->typeFile);\n $content = ob_get_clean();\n $this->ourInsideTpl($data, $content);\n }", "static public function display($action) {\n if (!file_exists(\"$action.html\")) return;\n $template = new PHPTAL(\"$action.html\");\n $template->setPhpCodeDestination('./tmp/');\n // $template->setPostFilter(new RestoreBrTags());\n $template->instances = self::$instances;\n $template->levels = self::$levels;\n switch ($action) {\n case 'boxes':\n $template->setPostFilter(new RestoreBrTags());\n break;\n case 'manage':\n View::init();\n $template->views = View::$instances;\n break;\n }\n print $template->execute();\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function view_loader(){\n\n\t\tparent::view_loader();\n\t}", "public function setContent($content)\n\t{\n\t\tif ($content instanceof Zend_View) {\n\t\t\t$this->_content = $content;\n\t\t\treturn $this;\n\t\t}\n\n\t\tif (is_scalar($content)) {\n\t\t\t$this->_content = (string) $content;\n\t\t\treturn $this;\n\t\t}\n\n\t\tthrow new Scil_Services_Form_Wizard_Exception(__METHOD__.' content type not recognised : '.gettype($content).', must be Zend_View or scalar.');\n\t}", "function acf_get_view($path = '', $args = array())\n{\n}", "public function importAction()\n {\n $logger = OntoWiki::getInstance()->logger;\n $logger->debug('importAction');\n\n //initialisation of view parameter\n $this->view->placeholder('main.window.title')->set('Select mapping parameter'); \n $this->view->formEncoding = 'multipart/form-data';\n $this->view->formClass = 'simple-input input-justify-left';\n $this->view->formMethod = 'post';\n $this->view->formName = 'selection';\n $this->view->filename\t\t = htmlspecialchars($_SESSION['fname']);\n $this->view->restype \t\t = '';\n $this->view->baseuri\t\t = '';\n $this->view->header\t\t \t = '';\n $this->view->flinecount\t\t = htmlspecialchars($_SESSION['flinecount']);\n $this->view->fline\t\t\t = htmlspecialchars($_SESSION['fline']);\n $this->view->line\t\t \t = explode(';',$this->view->fline);\n\n //toolbar for import of data\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(OntoWiki_Toolbar::SUBMIT, array('name' => 'Submit', 'id' => 'selection'))\n ->appendButton(OntoWiki_Toolbar::RESET, array('name' => 'Cancel', 'id' => 'selection'));\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n \n //handling of request\n if ($this->_request->isPost()) {\n $postData = $this->_request->getPost();\n \n if (!empty($postData)) { \n \n $baseuri = $postData['b_uri'];\n $this->view->baseuri = $baseuri;\n $restype = $postData['r_type'];\n $this->view->restype = $restype;\n $header = $postData['rad'];\n $this->view->header = $header;\n \n if (trim($restype) == '') {\n $message = 'Ressource type must not be empty!';\n $this->_owApp->appendMessage(new OntoWiki_Message($message, OntoWiki_Message::ERROR));\n }\n if ((trim($baseuri) == '')||(trim($baseuri) == 'http://')) {\n $message = 'Base Uri must not be empty!';\n $this->_owApp->appendMessage(new OntoWiki_Message($message, OntoWiki_Message::ERROR));\n }\n if (trim($header) == '') {\n \t$message = 'You must select whether you have a header!';\n \t$this->_owApp->appendMessage(new OntoWiki_Message($message, OntoWiki_Message::ERROR));\n }\n \n //create mapping\n if (\t (trim($restype) != '') \n \t\t&& ((trim($baseuri) != '') || (trim($baseuri) != 'http://'))\n \t\t&& (trim($header) != ''))\n {\n \t$paramArray = array('firstline' => $this->view->line,\n \t\t\t\t\t\t'header' \t=> $header,\n \t\t\t\t\t\t'baseuri'\t=> $baseuri,\n \t\t\t\t\t\t'restype' \t=> $restype,\n \t\t\t\t\t\t'filename' \t=> $this->view->filename\n \t);\n \t\n \t$maippng = $this->_createMapping($paramArray);\n \t$maprpl = str_replace('\"', \"'\", $maippng);\n \t//save mapping into file\n \t$mapfile = tempnam(sys_get_temp_dir(), 'ow');\n \t\n \t$fp = fopen($mapfile,\"wb\");\n \tfwrite($fp,$maprpl);\n \tfclose($fp);\n \t\n \t$ttl = array();\n \t\n \t//call convert for ttl\n \t$ttl = $this->_convert($mapfile, $this->view->filename);\n \t\n \t//save ttl data into file\n \t$ttlfile = tempnam(sys_get_temp_dir(), 'ow');\n \t$temp = fopen($ttlfile, 'wb');\n \tforeach ($ttl as $line) {\n \t\tfwrite($temp, $line . PHP_EOL);\n \t\t}\n \tfclose($temp);\n \t$filetype = 'ttl';\n \t\n \t$locator = Erfurt_Syntax_RdfParser::LOCATOR_FILE;\n \t\n \t// import call\n \t\n \ttry {\n \t\t$this->_import($ttlfile, $filetype, $locator);\n \t\t} catch (Exception $e) {\n \t\t\t$message = $e->getMessage();\n \t\t\t$this->_owApp->appendErrorMessage($message);\n \t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n //after success redirect to index site \n $this->_redirect('');\n }\n }\n }", "protected function resolveView() {}", "protected function resolveView() {}", "public function edit(Content $content)\n {\n //\n }", "public function edit(Content $content)\n {\n //\n }" ]
[ "0.6178999", "0.61031765", "0.5741985", "0.569072", "0.5645308", "0.5645308", "0.5644432", "0.55643666", "0.5563875", "0.55632114", "0.5533033", "0.547266", "0.54551667", "0.54400086", "0.5438061", "0.54230976", "0.5422262", "0.5421088", "0.5400479", "0.5325607", "0.53215325", "0.53015953", "0.5291934", "0.5286656", "0.52719724", "0.52699476", "0.5233477", "0.52331203", "0.52187955", "0.5205453", "0.5204336", "0.51960516", "0.5195138", "0.5192943", "0.5192099", "0.5182754", "0.5164801", "0.5159167", "0.5144643", "0.51413906", "0.5135971", "0.51284236", "0.5103795", "0.5103795", "0.5097798", "0.5095734", "0.50927275", "0.5090926", "0.50873804", "0.508537", "0.5081363", "0.5078671", "0.50695723", "0.506373", "0.50445557", "0.50397587", "0.50378484", "0.5032758", "0.5031196", "0.5027048", "0.5026371", "0.5021501", "0.50111705", "0.50099957", "0.5009917", "0.5008428", "0.5004767", "0.5002648", "0.5002247", "0.49987227", "0.49939254", "0.49845538", "0.4984551", "0.4979674", "0.4978785", "0.49767065", "0.49721444", "0.49644184", "0.49618816", "0.4955217", "0.4948433", "0.49416086", "0.49416086", "0.49361703", "0.49349013", "0.49316725", "0.49300674", "0.49282834", "0.49203038", "0.49172786", "0.49161723", "0.4910899", "0.4909498", "0.4907638", "0.49075633", "0.49018562", "0.4897926", "0.48888192", "0.48888192", "0.48871696", "0.48871696" ]
0.0
-1
This method will be execute before run the main process
public function hook_before(&$postdata) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function beforeProcess() {\n }", "public function preExec()\n {\n }", "protected function _preExec()\n {\n }", "protected function preProcess() {}", "public function preExecute(){\n\n\t\n\t}", "public function before_run(){}", "public function preExecute() {\n }", "private function before_execute()\n {\n }", "public function before_run() {}", "public function preProcess();", "public function preProcess();", "protected function _init(){\n\t\t//Hook called at the beginning of self::run();\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public static function firstRun(){\n\t\tparent::firstRun();\n\n\t}", "protected function main()\n /**/\n {\n parent::run();\n }", "protected function _postExec()\n {\n }", "protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }", "abstract protected function _preProcess();", "public function beforeStart()\n {\n }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _before()\n {\n $this->mCommandLineOptions = new CommandLineOptions();\n }", "public function after_run() {}", "public function beforeStart () {\n }", "protected function _before(){\n $this->startApplication();\n }", "protected function _exec()\n {\n }", "public function preExecute() {\n if ($this->get_option('geocluster_enabled')) {\n if ($algorithm = geocluster_init_algorithm($this->config)) {\n $algorithm->before_pre_execute();\n }\n }\n }", "public function preExecuteCheck()\n {\n return true;\n }", "public function pre()\n {}", "public function onBeforeMain()\n\t{\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Stepper.min.js');\n\t\t$this->addJavascriptFile('media://com_akeeba/js/Alice.min.js');\n\n\t\t/** @var Log $logModel */\n\t\t$logModel = $this->container->factory->model('Log')->tmpInstance();\n\n\t\t// Get a list of log names\n\t\t$this->logs = $logModel->getLogList();\n\t\t$this->log = $this->input->getCmd('log', null);\n\n\t\tJText::script('COM_AKEEBA_ALICE_SUCCESSS');\n\t\tJText::script('COM_AKEEBA_ALICE_WARNING');\n\t\tJText::script('COM_AKEEBA_ALICE_ERROR');\n\t\tJText::script('COM_AKEEBA_BACKUP_TEXT_LASTRESPONSE');\n\t}", "protected function _onStart()\n {\n $this->_raise(self::E_LOAD);\n }", "protected function beforeRun(){\n\t\treturn true;\n\t}", "public function start()\n {\n die(\"Must override this function in a driver\");\n }", "public function after_run(){}", "protected function before(){}", "protected function _preload() {\n }", "protected function _beforeInit() {\n\t}", "public function __before() {\n\t\t// runs after this->data is set up, but before the class methods are run\n\t}", "public static function pre_process() {}", "protected function _before() {\n\t\tparent::_before ();\n\t\tStartup::setConfig ( $this->config );\n\t\t$this->_startCache ();\n\t\t$this->yumlModelsCreator = new YumlModelsCreator ();\n\t}", "public static function run() {\n\t}", "public function before()\r\n {\r\n \t// Profile the loader\r\n \t\\Profiler::mark('Start of loader\\'s before() function');\r\n \t\\Profiler::mark_memory($this, 'Start of loader\\'s before() function');\r\n \t\r\n // Set the environment\r\n parent::before();\r\n \r\n // Load the config for Segment so we can process analytics data.\r\n \\Config::load('segment', true);\r\n \r\n // Load the config file for event names. Having events names in one place keeps things synchronized.\r\n \\Config::load('analyticsstrings', true);\r\n \r\n // Engine configuration\r\n \\Config::load('engine', true);\r\n\t\t\r\n\t\t// Load the package configuration file.\r\n\t\t\\Config::load('tiers', true);\r\n\t\t\r\n\t\t// Soccket connection configuration\r\n\t\t\\Config::load('socket', true);\r\n \r\n /**\r\n * Ensure that all user language strings are appropriately translated.\r\n * \r\n * @link https://github.com/fuel/core/issues/1860#issuecomment-92022320\r\n */\r\n if (is_string(\\Input::post('language', false))) {\r\n \t\\Environment::set_language(\\Input::post('language', 'en'));\r\n }\r\n \r\n // Load the error strings.\r\n \\Lang::load('errors', true);\r\n }", "private function setup()\r\n\t{ }", "protected function _before()\n\t{\n\t\t\n\t}", "public function start() {\n\n // TODO: Maybe sometimes\n\n }", "protected function beforeRun()\n {\n $this->setUtf8Context();\n }", "protected function beforeRun()\n {\n $this->setUtf8Context();\n }", "public function beforeLoop()\n {\n $this->createSavegame();\n }", "protected function afterProcess() {\n }", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "public function preDispatch() {\n\t\t\n\t\t}", "public function postExec()\n {\n }", "public function onBeforeRun()\n\t{\n\t\t$this->raiseEvent('onBeforeRun', new TestRunnerEvent($this, $this->collection));\n\t}", "protected function runBeforeRender() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public function setup(){\n\t\tparent::setup();\n\t\t//Do stuff...\n\t}", "public function beforeInstall()\n\t{}", "protected function initializeProcessAction() {}", "public function setup()\n\t{\n\t\t// we don't do anything here in the base class\n\t}", "public function preInstall()\n {\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function process()\n {\n // do nothing here\n }", "public function startup();", "public function before() {}", "public function before() {}", "public function preSend()\n {\n }", "public static function _before() : void {\n\t}", "public function _before_init(){}", "protected function before(): void\n {\n }", "public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}", "protected function before() {\n }", "public function _postSetup()\n {\n }", "protected function process()\n {}", "public function start()\n {\n // nop\n }", "public function onRun()\n {\n }", "public function beforeSyncing() {}", "protected abstract function before();", "public function run() {}", "public function run(){}", "public function prepareForRestart() {\n\t\tparent::prepareForRestart();\n\t}", "protected function _precreate() {\n }", "protected function before() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "public function start() {}", "protected function _before()\n {\n parent::_before();\n\n $this->setUpEnvironment();\n }", "public function preAction()\n {\n // Nothing to do\n }", "private function init()\n\t{\n\t\treturn;\n\t}", "protected function _afterInit() {\n\t}", "public function run()\n {\n }", "public function beforeSetup()\n {\n }", "abstract protected function beforeRun($data);", "public function preTesting() {}" ]
[ "0.77645326", "0.7729242", "0.76580065", "0.765735", "0.7388166", "0.7385603", "0.7313168", "0.7306214", "0.7297037", "0.71217746", "0.71217746", "0.6886962", "0.67884594", "0.6767631", "0.67318076", "0.6722169", "0.67113966", "0.67084646", "0.66010505", "0.65970695", "0.65970695", "0.65970695", "0.65970695", "0.6593281", "0.6564856", "0.65601563", "0.65511006", "0.65321666", "0.6528298", "0.6527863", "0.6517682", "0.6516064", "0.6500669", "0.6486942", "0.64644736", "0.6456829", "0.6450814", "0.6448507", "0.64361477", "0.6414203", "0.64054525", "0.6377892", "0.6351524", "0.6347414", "0.6340537", "0.63332254", "0.6311066", "0.6295749", "0.6295749", "0.6293946", "0.6288284", "0.62852246", "0.6277408", "0.6265248", "0.6263139", "0.6249424", "0.6246385", "0.6243575", "0.62421805", "0.6235762", "0.62292737", "0.6228142", "0.62101996", "0.62090814", "0.62040097", "0.62040097", "0.62038565", "0.62032145", "0.619544", "0.6193959", "0.61893535", "0.6184501", "0.6177259", "0.617273", "0.61682624", "0.61657107", "0.6164594", "0.6162116", "0.6154183", "0.6153017", "0.6144432", "0.6144055", "0.6138572", "0.6135274", "0.6135259", "0.6135259", "0.61345744", "0.61331844", "0.61331844", "0.61331844", "0.61331844", "0.61331844", "0.61331844", "0.61259943", "0.61234856", "0.6120994", "0.6118183", "0.6109901", "0.6106634", "0.6100936", "0.6100277" ]
0.0
-1
This method is to customize the sql query
public function hook_query(&$query) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSql()\n {\n $operators['='] = '=';\n $operators['like'] = 'like';\n $operators['>='] = '>=';\n $operators['<='] = '<=';\n\n $select = 'SELECT ';\n foreach ($this->columns as $key => $value)\n {\n $alias = '';\n //bairros::nome|bairro\n if(preg_match('/\\|/',$key) && !preg_match('/like/',$key)) \n {\n $explode_values = explode('|',$key);\n $table_field = str_replace('::', '.', $explode_values[0]);\n $alias = $explode_values[1]; \n $alias = \" as {$alias}\"; \n }\n // elseif(preg_match('/like/',$key))\n // {\n \n // $explode_values = explode('|',$key);\n // $exKey = explode('::',$explode_values[0]);\n // $alias = $explode_values[1]; \n // $alias = \" as {$alias}\";\n \n // $table_field = \"{$exKey[0]}.{$exKey[1]}\"; \n // }\n else\n {\n\n $table_field = str_replace('::', '.', $key); \n }\n \n $select.= \" {$table_field}{$alias},\";\n $table = explode('.', $table_field);\n $from[$table[0]] = $table[0];\n\n if ($value->relation)\n {\n $where.= ' ' . $value->relation . ' AND';\n }\n }\n\n if ($this->filter)\n {\n foreach ($this->filter as $key_filter => $filter)\n {\n if ($filter)\n {\n \n\n if(preg_match('/\\|/',$key_filter))\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $explode_values = explode('|',$key_filter[1]);\n $key_filter = $this->model->getTable() . '.' . $explode_values[0]; \n\n }\n else\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $key_filter = $this->model->getTable() . '.' . $key_filter[1]; \n }\n\n if ($operator)\n {\n if ($operator == 'like')\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n elseif ($operators[$operator])\n {\n $where.= \" {$key_filter} {$operators[$operator]} '{$filter}' AND\";\n }\n }\n else\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n }\n }\n }\n if ($where)\n {\n $where = ' WHERE ' . $where;\n }\n $where = substr($where, 0, -3);\n $select = substr($select, 0, -1);\n $from = implode(',', $from);\n \n return $select . ' from ' . $from . $where . ' limit 20';\n }", "public function getQuery(){\n $sql = \"select %s from %s %s %s %s %s %s\";\n\n return sprintf($sql, $this->param, $this->table,\n empty($this->join) ? '' : implode($this->join),\n empty($this->where) ? '' : 'where '. $this->where,\n empty($this->having)? '' : 'having '. $this->having,\n empty($this->order) ? '' : 'order by '. $this->order,\n empty($this->setOperations) ? '' : implode($this->setOperations)\n );\n }", "function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}", "function get_sql(){\r\n\r\n\t\treturn $this->get_sql_select().$this->get_sql_where().$this->get_sql_order().$this->get_sql_limit();\r\n\r\n\t}", "public function getSQL() {\n\t\t$o = $this->obj;\n\t\t$sql = \"SELECT\";\n\t\tif ($this->distinct) {\n\t\t\t$sql .= \" DISTINCT\";\n\t\t}\n\t\t$s = $this->getSelects();\n\t\tif ($s == \"\") {\n\t\t\t$sql .= \" \".$this->getTable().\".*\";\n\t\t} else {\n\t\t\t$sql .= \" \".$s;\n\t\t}\n\t\t$sql .= \" FROM \".$this->getFrom();\n\t\t$sql .= $this->getJoins();\n\t\t$where = $this->getFilters()->getSQL();\n\t\tif ($where != \"\") {\n\t\t\t$sql .= \" WHERE \".$where;\n\t\t}\n\n\n\n\t\tif ($this->group !== false) {\n\t\t\tif ($this->group[1] == false) {\n\t\t\t\t$sql .= \" GROUP BY \".$this->getTable().\".`\".$this->db->escape_string($this->group[0]).\"`\";\n\t\t\t} else {\n\t\t\t\t$sql .= \" GROUP BY \".$this->group[0];\n\t\t\t}\n\t\t}\n\t\t//if ($this->filter) {\n\t\t//\t$sql .= \" WHERE \".$this->filter->getSQL();\n\t\t//}\n\t\tif (count($this->order) > 0) {\n\t\t\tif ($this->order[0][0] === false) {\n\t\t\t\t$sql .= \" ORDER BY RAND()\";\n\t\t\t} elseif (isset($this->order[0][0])) {\n\t\t\t\t$sql .= \" ORDER BY \";\n\t\t\t\tforeach ($this->order as $cols) {\n\t\t\t\t\t$sql .= \"`\".$this->db->escape_string($cols[0]).\"`\";\n\t\t\t\t\tif ($this->orderAsc) {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql .= \" {$cols[1]} \";\n\t\t\t\t\t}\n\t\t\t\t\t$sql .= \", \";\n\t\t\t\t}\n\t\t\t\t$sql = substr($sql, 0, -2);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->start !== false) {\n\t\t\t$sql .= \" LIMIT {$this->start}\";\n\t\t\tif ($this->end !== false) {\n\t\t\t\t$sql .= \",{$this->end}\";\n\t\t\t}\n\t\t}\n\t\treturn $sql;\n\t}", "function createQuery() ;", "public function get_sql()\n {\n }", "abstract protected function buildSQL(): string;", "abstract function getSQL();", "function getSql()\n{\n\textract($this->query, EXTR_SKIP);\n\t\n\tif (!$select or !$from) return '';\n\t\n\t$sql = 'SELECT '.implode(',', $select).' FROM '.$from;\n\tif ($where) $sql .= ' WHERE '.implode(' AND ', array_unique($where));\n\tif ($whereJoin) $sql .= ($where? ' AND ':' WHERE ').implode(' AND ', array_unique($whereJoin));\n\tif ($group) $sql .= ' GROUP BY '.$group;\n\tif ($having) $sql .= ' HAVING '.implode(' AND ', array_unique($having));\n\tif ($order) $sql .= ' ORDER BY '.implode(',', $order);\n\tif ($limit) $sql .= ' LIMIT '.$limit[0].' OFFSET '.$limit[1];\n\treturn $sql;\n}", "protected function buildSql()\n {\n $this->selectSQL = ''; // reset query string\n\n $this->appendSql(\"SELECT \" . $this->buildFieldsList() . \" FROM \" . $this->fromTable)\n ->appendSql(!empty($this->joinsString) ? \" \" . $this->joinsString : \"\")\n ->appendSql(\" WHERE \" . (!empty($this->whereString) ? \" \" . $this->whereString : \" 1\"))\n ->appendSql(!empty($this->groupbyString) ? \" GROUP BY \" . $this->groupbyString : \"\")\n ->appendSql(!empty($this->orderbyString) ? \" ORDER BY \" . $this->orderbyString : \"\")\n ->appendSql(!empty($this->limitString) ? \" \" . $this->limitString : \"\");\n }", "protected function _createColumnQuery()\n\t{\n\t\n\t}", "public function getSQL();", "public function buildQuery() {\n\t\t$where = (sizeof($this->wheres) > 0) ? ' WHERE '.implode(\" \\n AND \\n\\t\", $this->wheres) : '';\n\t\t$order = (sizeof($this->orders) > 0) ? ' ORDER BY '.implode(\", \", $this->orders) : '' ;\n\t\t$group = (sizeof($this->groups) > 0) ? ' GROUP BY '.implode(\", \", $this->groups) : '' ;\n\t\t$query = 'SELECT '.implode(\", \\n\\t\", $this->fields).\"\\n FROM \\n\\t\".$this->class->table.\"\\n \".implode(\"\\n \", $this->joins).$where.' '.$group.' '.$order.' '.$this->limit;\n\t\treturn($query);\n\t}", "public function buildSqlString()\n {\n $param = array();\n\n $join = '';\n $filter = '';\n $order = '';\n $limit = '';\n\n // Create the fieldprefix. If given as alias use this, otherwise we use the tablename\n $field_prefifx = !empty($this->alias) ? $this->alias : '{db_prefix}' . $this->tbl;\n\n // Biuld joins\n if (!empty($this->join))\n {\n $tmp = array();\n\n foreach ( $this->join as $def )\n $tmp[] = ' ' . $def['by'] . ' JOIN ' . '{db_prefix}' . (isset($def['as']) ? $def['tbl'] . ' AS ' . $def['as'] : $def['join']) . ' ON (' . $def['cond'] . ')';\n }\n\n $join = isset($tmp) ? implode(' ', $tmp) : '';\n\n // Create fieldlist\n if (!empty($this->fields))\n {\n // Add `` to some field names as reaction to those stupid developers who chose systemnames as fieldnames\n foreach ( $this->fields as $key_field => $field )\n {\n if (in_array($field, array('date', 'time')))\n $field = '`' . $field . '`';\n\n // Extend fieldname either by table alias or name when no dot as alias/table indicator is found.\n #if (strpos($field, '.') === false)\n # $field .= (!empty($this->alias) ? $this->alias : $this->tbl) . '.' . $field;\n\n $this->fields[$key_field] = $field;\n }\n\n $fieldlist = implode(', ', $this->fields);\n } else\n {\n $fieldlist = '*';\n }\n\n // Create filterstatement\n $filter = !empty($this->filter) ? ' WHERE ' . $this->filter : null;\n\n // Create group by statement\n $group_by = !empty($this->group_by) ? ' GROUP BY ' . $this->group_by : null;\n\n // Create having statement\n $having = !empty($this->having) ? ' HAVING ' . $this->having : null;\n\n // Create order statement\n $order = !empty($this->order) ? ' ORDER BY ' . $this->order : null;\n\n // Create limit statement\n if (!empty($this->limit))\n {\n $limit = ' LIMIT ';\n\n if (isset($this->limit['lower']))\n $limit .= $this->limit['lower'];\n\n if (isset($this->limit['lower']) && isset($this->limit['upper']))\n $limit .= ',' . $this->limit['upper'];\n }\n\n // We need a string for the table. if there is an alias, we have to set it\n $tbl = !empty($this->alias) ? $this->tbl . ' AS ' . $this->alias : $this->tbl;\n\n // Is this an distinct query?\n $distinct = $this->distinct ? 'DISTINCT ' : '';\n\n // Create sql statement by joining all parts from above\n $this->sql = 'SELECT ' . $distinct . $fieldlist . ' FROM {db_prefix}' . $tbl . $join . $filter . $group_by . $having . $order . $limit;\n\n return $this->sql;\n }", "public function getQuerySelect() {\n $R = 'R_'. $this->id;\n return \"$R.value_id AS `\". $this->name.\"`\";\n }", "public function createQuery()\n\t{\n\t\t$this->tab[] = $this->action;\n\t\t$this->tab[] = !is_array($this->field) ? $this->field : join(', ',$this->field);\n\t\t$this->tab[] = ' FROM '.$this->from;\n\t\tif(!empty($this->where)){$this->tab[] = 'WHERE '.$this->where;}\n\t\tif(!empty($this->and)){$this->tab[] = 'AND '.$this->and;}\n\t\tif(!empty($this->or)){$this->tab[] = 'OR '.$this->or;}\n\t\tif(!empty($this->in)){$this->tab[] = 'IN '.$this->in;}\n\t\tif(!empty($this->beetween)){$this->tab[] = 'BEETWEEN '.$this->beetween;}\n\t\tif(!empty($this->not)){$this->tab[] = 'NOT '.$this->not;}\n\t\tif(!empty($this->like)){$this->tab[] = 'LIKE '.$this->like;}\n\t\tif(!empty($this->order)){$this->tab[] = 'ORDER BY '.$this->order;}\n\t\treturn join(\" \",$this->tab);\n\t}", "final public static function toSQL()\n {\n $select = false;\n foreach (self::$starts as $reserved) {\n if (strpos(self::$query, $reserved . ' ') === 0) {\n $select = true;\n break;\n }\n }\n\n if (!$select) {\n self::$query = \"SELECT * FROM \" . self::tableName() . self::$query;\n }\n\n\n $values = [];\n for ($i = 0; $i < sizeof(self::$bindParams); $i++) {\n foreach (self::$bindParams[$i] as $item) {\n $values[] = $item;\n }\n }\n\n if (sizeof($values) > 0) {\n $query = self::$query;\n self::$query = \"\";\n self::$where = false;\n self::$bindParams = array();\n $query = str_replace(\"?\", \"#%s#\", $query);\n $query = sprintf($query, ...$values);\n $query = str_replace(\"#\", \"'\", $query);\n return sprintf($query, ...$values);\n }\n return self::$query;\n }", "public function formatQuery($sql) {\r\n\t\t//regex work with a lookahead to avoid splitting things inside single quotes\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(WHERE|FROM|GROUP BY|HAVING|ORDER BY|LIMIT|OFFSET|UNION|DUPLICATE KEY)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n$0\", $sql\r\n\t\t);\r\n\t\t$sql = preg_replace(\r\n\t\t\t\t\"/(INNER|LEFT|RIGHT|CASE|WHEN|END|ELSE|AND)(?=(?:(?:[^']*+'){2})*+[^']*+\\z)/\", \"\\n $0\", $sql);\r\n\t\treturn $sql;\r\n\t}", "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 getSQL(){\n $sqlString = \"select \";\n $campos = $this->getCampos();\n //var_dump($campos);\n if (is_array($campos) && empty($campos)) {\n $sqlString .= \" * \";\n } else {\n $campos = \"\";\n foreach ($this->getCampos() as $key => $value) {\n if (!$campos == \"\") { \n $campos.=\" ,\"; \n };\n $campos.=\" \".$value.\" as \".$key.\" \";\n }\n $sqlString .= $campos;\n }\n $sqlString .= \" from \" . $this->getTabla();\n if ( $this->getSQLFilter() != \"\" ) {\n $sqlString .= \" where \" . $this->getSQLFilter();\n }\n \n $sqlString .= $this->getSQLGroupBy();\n $sqlString .= $this->getSQLOrderBy();\n //echo $sqlString.\"\\n\";\n return $sqlString; \n }", "private function buildSelectString () \n {\n $this->selectSql = \"SELECT \";\n $this->selectSql .= $this->columns;\n $this->selectSql .= \" FROM \" . $this->tableName;\n if ($this->where !== null && $this->where !== \"\") {\n $this->selectSql .= \" WHERE \" . $this->where;\n }\n if ($this->order !== null && $this->order !== \"\") {\n $this->selectSql .= \" ORDER BY \" . $this->order;\n }\n if ($this->other !== null && $this->other !== \"\") {\n $this->selectSql .= $this->other;\n }\n }", "public function toQuery();", "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 }", "private function createBaseQuery(): string\n {\n // Prefix the table columns with 'entries.'\n $tableColumns = array_map(function ($column) {\n return 'entries.' . $column;\n }, self::TABLE_COLUMNS);\n\n if ($this->listView) {\n // Filter out the properties that are not available to the listview\n $jsonColumns = array_filter($this->properties, function (Collection\\Property $property) {\n return $property->getIncludeInJsonListView();\n });\n }\n\n // Create the select syntax for the json data column\n $jsonColumns = array_map(function (Collection\\Property $property) {\n return $this->jsonUnquote($property->getIdentifier()) . ' AS `' . $property->getIdentifier() . '`';\n }, $jsonColumns ?? $this->properties);\n\n // Merge both of the above\n $columns = array_merge($tableColumns, $jsonColumns);\n\n // Create the select statement\n $select = implode(', ', $columns);\n\n // Create the query\n // We need the entries.data to be able to perform a HAVING query on it, when parsing the entry, the DATA object is removed\n return 'SELECT entries.data, ' . $select . ' FROM collection_entries AS entries WHERE entries.collection_id = :collection_id AND entries.active = 1 ';\n }", "protected function _sql_select ( /* void */ )\n {\n /*\n Start SQL query.\n */\n $sql = ($this->bDistinct) ? 'SELECT DISTINCT ' : 'SELECT ';\n /*\n Select which fields ?\n */\n $sql .= (empty($this->aFields)) ? '*' : implode(', ', $this->aFields);\n /*\n From which tables ?\n */\n $sql .= (empty($this->aTables)) ? '' : \"\\nFROM \" . implode(', ', $this->aTables);\n /*\n Join something ?\n */\n if (!empty($this->aJoin))\n {\n foreach ($this->aJoin as $j)\n {\n $sql .= \"\\n{$j[0]} JOIN {$j[1]} ON {$j[2]}\";\n }\n }\n /*\n Where ?\n */\n if (!empty($this->aWhere))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aWhere);\n $sql .= (!empty($this->aLike)) ? implode(\"\\n\", $this->aLike) : '';\n }\n elseif (!empty($this->aLike))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aLike);\n }\n /*\n Group by ?\n */\n if (!empty($this->aGroupBy))\n {\n $sql .= \"\\nGROUP BY \" . implode(', ', $this->aGroupBy);\n }\n /*\n Having ?\n */\n if (!empty($this->aHaving))\n {\n $sql .= \"\\nHAVING \";\n foreach ($this->aHaving as $i)\n {\n $sql .= \"\\n{$i[0]}{$i[1]} {$i[2]}\";\n }\n }\n /*\n Order by ?\n */\n if (!empty($this->aOrderBy))\n {\n $sql .= \"\\nORDER BY \";\n foreach ($this->aOrderBy as $i)\n {\n $sql .= \"{$i[0]} {$i[1]}, \";\n }\n $sql = trim($sql, ', ');\n }\n /*\n Query limit ?\n */\n if ($this->nLimit !== false)\n {\n if ($this->nOffset !== false)\n {\n $sql .= \"\\nLIMIT \" . $this->nOffset . ', ' . $this->nLimit;\n }\n else\n {\n $sql .= \"\\nLIMIT 0, \" . $this->nLimit;\n }\n }\n /*\n Return SQL.\n */\n return $sql;\n }", "public function sql() {\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/select/query.twig.sql\");\n\t\treturn $sqlT->render([\"query\" => $this]);\n\t}", "public function getMagicSqlSubQuery(): string;", "function SQLFiltering($sql){\n // 해킹 공격을 대비하기 위한 코드\n $sql = preg_replace(\"/\\s{1,}1\\=(.*)+/\", \"\", $sql); // 공백이후 1=1이 있을 경우 제거\n $sql = preg_replace(\"/\\s{1,}(or|and|null|where|limit)/i\", \" \", $sql); // 공백이후 or, and 등이 있을 경우 제거\n $sql = preg_replace(\"/[\\s\\t\\'\\;\\=]+/\", \"\", $sql); // 공백이나 탭 제거, 특수문자 제거\n return $sql;\n}", "public function getQuerySql() {\n $sql = parent::getQuerySql();\n $connection = $this->model->getMeta()->getConnection();\n\n return $this->parseVariablesIntoSql($sql, $connection);\n }", "public function to_sql()\n {\n }", "protected static function buildSelectionQuery() \n {\n return Query::select()->\n from(self::getTableName());\n }", "public function getSql();", "public function getSql();", "protected function toBaseSQL() {\r\n\t\t$sql=' FROM '.$this->resolveTable();\r\n\r\n\t\t$sql.=$this->buildJoinClause();\r\n\t\t$sql.=$this->buildWhereClause();\r\n\r\n\t\t$sql.=$this->buildGroupClause();\r\n\r\n\t\treturn $sql;\r\n\t}", "public function toSQL()\n {\n $sql = '`' . $this->fieldName . '` ' . $this->getOperator() . ' ' . $this->getSearchValue();\n if (null != $this->tableName) {\n $sql = '`' . $this->tableName . '`.' . $sql;\n }\n \n return $sql;\n }", "function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tif ($this->CurrentFilter <> \"\") {\n\t\t\tif ($sFilter <> \"\") $sFilter = \"(\" . $sFilter . \") AND \";\n\t\t\t$sFilter .= \"(\" . $this->CurrentFilter . \")\";\n\t\t}\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),\n\t\t\t$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);\n\t}", "function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}", "abstract protected function _getSQL(): String;", "protected function user_where_clause() {}", "private function setField()\n {\n $sql = '';\n $sql = rtrim($sql , ', ');\n\n foreach (array_keys($this->data) as $key){\n $sql .= '`' . $key . '` = ?, ';\n }\n\n $sql = rtrim($sql , ', ');\n return $sql;\n }", "public function sql($criteria=NULL)\n {\n if($this->limite == 0 OR $this->offset() == 0){\n\t $sql = $this->sql . \"\";\n\t return $sql;\n\t}\n else{\n $sql = $this->sql . \" LIMIT {$this->limite} OFFSET {$this->offset()} \";\n\treturn $sql;\n }\n }", "public function make(){\n $query=$this->select.\" \".$this->from;\n if(!empty($this->where)){\n\t$query=$query.\" \".$this->where;\n }\n if(!empty($this->order)){\n\t$query= $query.\" \".$this->order;\n }\n return $query;\n}", "function str()\n\t{\n return\n \"SELECT $this->select\" .\n \" FROM $this->from \" .\n \" WHERE $this->where \" .\n ($this->group_by ? \" GROUP BY $this->group_by\": '') .\n ($this->having ? \" HAVING $this->having\" : '') .\n ($this->order_by ? \" ORDER BY $this->order_by\": '') .\n ($this->limit ? \" LIMIT $this->limit\": '');\t\t\t\n }", "protected function getSelectStatement()\n {\n return \"SELECT BookID, ISBN10, ISBN13, Title, CopyrightYear, TrimSize, PageCountsEditorialEst\n as PageCount, Description, CoverImage, Status, Subcategories.SubcategoryID, SubcategoryName, Imprints.ImprintID, Imprint, BindingType FROM Books\n JOIN Statuses ON (Books.ProductionStatusID = Statuses.StatusID) JOIN Subcategories ON \n (Books.SubcategoryID = Subcategories.SubcategoryID) JOIN Imprints USING (ImprintID) JOIN BindingTypes USING (BindingTypeID)\";\n }", "private function buildQuery(): void\n {\n $this->query = self::CREATE_TABLE;\n\n if ($this->ifNotExists) {\n $this->query .= self::IF_NOT_EXISTS;\n }\n\n $this->query .= $this->table . self::OPENING_BRACKET;\n\n $this->query .= join(', ', $this->columns);\n\n if (!empty($this->keys)) {\n $this->query .= ',' . join(',', $this->keys);\n }\n\n $this->query .= self::CLOSING_BRACKET;\n\n if (!empty($this->engine)) {\n $this->query .= self::ENGINE . $this->engine;\n }\n\n if (!empty($this->charset)) {\n $this->query .= self::CHARSET . $this->charset;\n }\n }", "public function getWhereSQL()\n {\n return \" AND \" . $this->field_where_name . \" LIKE '%\" . $this->field_row->criteria . \"%' \";\n \n }", "public function GetSQL()\n {\n\n \t$sql = \"\nSELECT \n\temployee.lastName AS employee_last_name,\n\temployee.firstName AS employee_first_name,\n\tcustomer.companyName AS customer_company,\n\torderDate,\n \tCOUNT(DISTINCT(orderDetail.id)) AS distinct_products_ordered,\n \tGROUP_CONCAT(DISTINCT productName) AS product_list,\n\tshipStateProvince,\n\tshipCity,\n\tshipAddress,\n\tshipName,\n\temployee.id AS employee_id,\n\tcustomer.id AS customer_id, \n\torder.id AS order_id\nFROM DURC_northwind_data.`order` \nJOIN DURC_northwind_model.employee ON \n\temployee.id =\n \temployee_id\nJOIN DURC_northwind_model.customer ON \n\tcustomer.id =\n \tcustomer_id\nJOIN DURC_northwind_data.orderDetail ON \n\torderDetail.order_id =\n \t`order`.id\nJOIN DURC_northwind_model.product ON \t\n\torderDetail.product_id =\n \tproduct.id \nGROUP BY `order`.id\n\";\n\t\t\n \treturn $sql;\n }", "public function sql(){\n $str = \"\";\n foreach($this->params as $key => $val){\n if($val != false){\n $str .= \"$key $val \";\n }\n }\n return $str;\n }", "static function custom_get_sql() {\n # this is the default functionality\n $table = static::get_tablename();\n return \"select * from $table\";\n }", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "static function GetCustomQuery($criteria)\r\n\t{\r\n\t\t$sql = \"select\r\n\t\t\t'custom value here...' as CustomFieldExample\r\n\t\t\t,`agenda_sgp`.`agenda_id` as Id\r\n\t\t\t,`agenda_sgp`.`agenda_data` as Data\r\n\t\t\t,`agenda_sgp`.`agenda_horario` as Horario\r\n\t\t\t,`agenda_sgp`.`agenda_publico` as Publico\r\n\t\t\t,`agenda_sgp`.`agenda_evento` as Evento\r\n\t\t\t,`agenda_sgp`.`agenda_equipe` as Equipe\r\n\t\t\t,`agenda_sgp`.`agenda_local` as Local\r\n\t\tfrom `agenda_sgp`\";\r\n\r\n\t\t// the criteria can be used or you can write your own custom logic.\r\n\t\t// be sure to escape any user input with $criteria->Escape()\r\n\t\t$sql .= $criteria->GetWhere();\r\n\t\t$sql .= $criteria->GetOrder();\r\n\r\n\t\treturn $sql;\r\n\t}", "private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }", "private function _prepare_select_sql($columns,$table){\n $this->debugBacktrace();\n $distinct = $this->distinct; $this->distinct = \"\";\n $sql = \"\";\n switch ($this->queryType){\n case \"select\":\n $sql = \"SELECT \". $distinct . \" \" . $columns .\" FROM \" . $table;\n break;\n case \"count\":\n case \"min\":\n case \"max\":\n case \"sum\":\n $aggregateFunctionName = $this->queryType;\n $sql = \"SELECT \". $aggregateFunctionName .\"(\". $distinct . \" \". $columns .\") as `\". $aggregateFunctionName .\"` FROM \" . $table;\n break;\n }\n \n if(!empty($this->joinClause)){\n $sql .= \" \" . $this->joinClause;\n $this->joinClause = \"\";\n }\n \n if(!empty($this->whereClause)){\n $sql .= \" WHERE \" . $this->whereClause;\n $this->whereClause =\"\";\n }\n \n \n if(!empty($this->groupByClause)){\n $sql .= \" GROUP BY \" . $this->groupByClause;\n $this->groupByClause =\"\";\n }\n \n if(!empty($this->havingClause)){\n $sql .= \" HAVING \" . $this->havingClause;\n $this->havingClause = \"\";\n }\n \n if(!empty($this->orderByClause)){\n $sql .= ' ORDER BY '. $this->orderByClause;\n $this->orderByClause = \"\";\n }\n //LIMIT 10 OFFSET 10\n if($this->selectModifier == \"first\"){\n $sql .= ' LIMIT 1';\n }\n else{\n if($this->takeQuantity > 0){\n $sql .= \" LIMIT \" . $this->takeQuantity;\n }\n }\n \n if($this->skipQuantity>0){\n $sql .= \" OFFSET \" . $this->skipQuantity;\n }\n \n return $sql;\n }", "protected function getGeneralWhereClause() {}", "public static function baseQuery() {\n $sql = 'SELECT*FROM '.static::getTable();\n return $sql;\n }", "public function getQuery()\n {\n $query = 'SELECT ';\n $query .= implode(', ', $this->select) . ' ';\n $query .= \"FROM $this->kind \";\n \n if ( ! empty($this->where) )\n {\n $query .= \"WHERE $this->where \";\n }\n \n if ( ! empty($this->groupBy) )\n {\n $query .= \"GROUP BY $this->groupBy \";\n }\n \n if ( ! empty($this->orderBy) )\n {\n $query .= \"ORDER BY $this->orderBy $this->orderByDirection \";\n }\n \n if ( $this->limit !== null )\n {\n $query .= \"LIMIT $this->limit \";\n }\n \n if ( $this->offset !== null )\n {\n $query .= \"OFFSET $this->offset\";\n }\n \n return trim($query);\n }", "function get_sql_select(){\r\n\r\n\t\tif(stripos($this->sql_query,' WHERE ')!==false)\r\n\t\t\t$select_str=substr($this->sql_query,0,stripos($this->sql_query,' WHERE '));\r\n\t\telse\r\n\t\t\t$select_str=$this->sql_query;\r\n\r\n\t\treturn $select_str;\r\n\r\n\t}", "public function fetchSqlString();", "private function _getDatatablesQuery()\n {\n $this->query = DB::table($this->table);\n $this->query->leftJoin('categories', 'categories.id', '=', 'documents.category_id');\n $this->query->select('documents.stt', 'documents.id', 'documents.title','documents.updated_at');\n\n if (strpos(URL::current(), 'admin') < 0) {\n $this->query->where('categories.searchable', 1);\n }\n\n if (Input::get('cat'))\n $this->query->where('documents.category_id', Input::get('cat'));\n\n if (Input::get('isBuyed')) {\n $this->query->join('users_documents', 'users_documents.document_id', '=', 'documents.stt');\n $this->query->where('users_documents.user_id', Auth::user()->id);\n }\n\n if(Input::has('search.value')) {\n $this->_getSearchStringQuery();\n }\n\n // here order processing\n if (isset($_GET['order'])) {\n $this->query->orderBy(\n $this->column_order[$_GET['order']['0']['column']],\n $_GET['order']['0']['dir']\n );\n } else if (isset($this->order)) {\n $order = $this->order;\n $this->query->orderBy(key($order), $order[key($order)]);\n }\n }", "function _create_filter_sql () {\n\t\t$SF = &$_SESSION[$this->_filter_name];\n\t\tforeach ((array)$SF as $k => $v) $SF[$k] = trim($v);\n\t\t// Generate filter for the common fileds\n\t\tif (strlen($SF[\"text\"]))\t\t$sql .= \" AND text LIKE '%\"._es($SF[\"text\"]).\"%' \\r\\n\";\n\t\tif (strlen($SF[\"engine\"]))\t\t$sql .= \" AND engine=\".intval($SF[\"engine\"]).\" \\r\\n\";\n\t\treturn substr($sql, 0, -3);\n\t}", "abstract function get_sql_filter($data);", "function augmentSQL(SQLQuery &$query) {\r\n\t}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }", "abstract public function query($sql);", "private function beginQuery() {\n $this->sql = 'SELECT sum(inv_total_cost) as total_cost,id,businessname,email,businesstelephone,'\n . 'IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0) as pfp_import,'\n . 'ROUND((sum(inv_total_cost) - IFNULL((SELECT SUM(pfp_importo) as pfp_importo FROM plused_fincon_payments where find_in_set(plused_fincon_payments.pfp_bk_id,GROUP_CONCAT(derived_booking_invoice.inv_booking_id)) AND plused_fincon_payments.pfp_dare_avere =\"avere\" ),0)), 2) as overdue '\n . 'FROM (SELECT t.* FROM agnt_booking_invoice t INNER JOIN (SELECT inv_total_cost,MAX(inv_invoice_id) AS latest,inv_booking_id FROM agnt_booking_invoice GROUP BY inv_booking_id) t1 ON t1.inv_booking_id=t.inv_booking_id AND t1.latest=t.inv_invoice_id) AS derived_booking_invoice '\n . 'LEFT JOIN agenti ON agenti.id=derived_booking_invoice.inv_agent_id WHERE agenti.status=\"active\" ';\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_pagto_pedido.id_pedido = pedido.id ) \n LEFT JOIN \".$this->_getFormaPagamento()->getModel()->getTableName().\" forma_pagto ON ( cv_pagto_pedido.id_forma_pagto = forma_pagto.id ) \n LEFT JOIN \".$this->_getParcela()->getModel()->getTableName().\" parcela ON ( cv_pagto_pedido.id_parcela = parcela.id ) \"; \n return $sql;\n }", "protected function get_search_sql($search)\n {\n }", "public function createQuery() {}", "public function createQuery() {}", "public function createQuery() {}", "public function prepareQueryForCategory()\n {\n $sql = new SqlStatement();\n $sql->select(array('p.*'))\n ->from(array('p' => self::RESULTS_TABLE))\n ->innerJoin(array('pp' => 'product'), 'p.product_id = pp.product_id')\n ->innerJoin(array('pd' => 'product_description'), 'p.product_id = pd.product_id')\n ->where('pd.language_id = ?', (int)$this->config->get('config_language_id'))\n ->order($this->sortOrder)\n ->limit($this->productsLimit, $this->productsStart);\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n } \n \n return $sql;\n }", "public function createQuery() {}", "public abstract function get_query();", "protected function getWhereClause() {}", "public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);", "function SQLFormat ($query)\r{\r\t$lowercase = array ('select ', ' max', ' min', ' count', ' avg', ' sum',\r\t\t\t\t\t\t'from ', ' as ',\r\t\t\t\t\t\t'join ', \"left \\nJOIN \", \"right \\nJOIN \", \"inner \\nJOIN \", \"outer \\nJOIN \", ' on ',\r\t\t\t\t\t\t'where ', ' like ', ' and ', ' or ',\r\t\t\t\t\t\t'group by ',\r\t\t\t\t\t\t'order by ', ' asc', ' desc', 'ASC, ', 'DESC, ',\r\t\t\t\t\t\t'limit ',\r\t\t\t\t\t\t\"\\n\\n\");\r\t$uppercase = array ('SELECT ', ' MAX', ' MIN', ' COUNT', ' AVG', ' SUM',\r\t\t\t\t\t\t\"\\nFROM \", ' AS ',\r\t\t\t\t\t\t\"\\nJOIN \", \"\\nLEFT JOIN \", \"\\nRIGHT JOIN \", \"\\nINNER JOIN\", \"OUTER JOIN\", \"\\n\\tON \",\r\t\t\t\t\t\t\"\\nWHERE \", ' LIKE ', ' AND ', ' OR ',\r\t\t\t\t\t\t\"\\nGROUP BY \",\r\t\t\t\t\t\t\"\\nORDER BY\\n\\t\", ' ASC', ' DESC', \"ASC,\\n\\t\", \"DESC,\\n\\t\",\r\t\t\t\t\t\t\"\\nLIMIT \",\r\t\t\t\t\t\t\"\\n\");\r\r\treturn str_replace ($lowercase, $uppercase, $query);;\r}", "public function getQueryOrderby() {\n return '`'.$this->name.'`';\n }", "static function GetCustomQuery($criteria)\n\t{\n\t\t$sql = \"select \";\n\t\t\n\tif ($criteria->IdPalestra_Equals){\t\n\t\t$sql.= \" `palestra`.`id_palestra` as IdPalestra, \";\n\t}\n\t\n\t$sql.=\" `modelo_certificado`.`id_modelo_certificado` as IdModeloCertificado\n\t\t\t,`modelo_certificado`.`nome` as Nome\n\t\t\t,`modelo_certificado`.`texto_participante` as TextoParticipante\n\t\t\t,`modelo_certificado`.`texto_palestrante` as TextoPalestrante\n\t\t\t,`modelo_certificado`.`arquivo_css` as ArquivoCss\n\t\t\t,`modelo_certificado`.`elementos` as Elementos\n\t\tfrom `modelo_certificado`\";\n\t\t\n\t\tif ($criteria->IdPalestra_Equals){\n\t\t\n\t\t\t$sql .= \" inner join palestra on `palestra`.`id_modelo_certificado` = `modelo_certificado`.`id_modelo_certificado` \";\n\t\t\t\n\t\t\t$sql .= \" where `palestra`.`id_palestra` = '\" . $criteria->Escape($criteria->IdPalestra_Equals) . \"' \";\n\t\t\n\t\t}\n\n\t\t// the criteria can be used or you can write your own custom logic.\n\t\t// be sure to escape any user input with $criteria->Escape()\n\t\t//$sql .= $criteria->GetWhere();\n\t\t$sql .= $criteria->GetOrder();\n\n\t\treturn $sql;\n\t}", "public function query($sql);", "public function query($sql);", "public function query($sql);", "public function query($sql);", "protected function sqlToString()\n {\n return implode(' ', $this->query);\n }", "public function build_query(/* ... */)\n {\n $query = [\"SELECT\"];\n $model = $this->get_model();\n // Field selection\n $fields = [];\n foreach ($this->_fields as $_field) {\n $fields[] = $this->_build_select_field($_field);\n }\n $query[] = implode(', ', $fields);\n // Table Selection\n $query[] = 'FROM';\n $query[] = '`' . $model->get_table() . '`';\n // WHERE lookup\n $query[] = $this->build_where();\n if (null !== $this->_orderby) {\n $query[] = $this->_orderby;\n }\n if (null !== $this->_limit) {\n $query[] = $this->_limit;\n }\n return $model->get_connection()->prepare(implode(\" \", $query));\n }", "abstract protected function buildQuery(): string;", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_item_pedido.id_pedido = pedido.id ) \n JOIN \".$this->_getProduto()->getModel()->getTableName().\" produto ON ( cv_item_pedido.id_produto = produto.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_inc ON ( cv_item_pedido.id_usu_inc = usu_inc.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_alt ON ( cv_item_pedido.id_usu_alt = usu_alt.id ) \"; \n return $sql;\n }", "public function toSql()\n {\n if (0 === count($this->getParams())) {\n return 'SELECT *';\n } else {\n return 'SELECT ' . implode(', ', $this->getParams());\n }\n }", "protected function buildQuery()\n\t{\n\t\t$this->query = count($this->conditions) ? 'WHERE ' . implode(' AND ', $this->conditions) : '';\n\t}", "public function getQuerySelect() {\n return \"a.submitted_on AS `\" .$this->name .\"`\";\n }", "protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n LEFT JOIN \".$this->_getPagamento()->getModel()->getTableName().\" pagto_pedido ON ( cv_pagto_lanc.id_pagto_pedido = pagto_pedido.id ) \n LEFT JOIN \".$this->_getLancamento()->getModel()->getTableName().\" lancamento ON ( cv_pagto_lanc.id_lancamento = lancamento.id ) \"; \n return $sql;\n }", "public function newQuery();", "public function query() {\n if (isset($this->value, $this->definition['trovequery'])) {\n $this->query->args['method'] = $this->definition['trovequery']['method'];\n if (is_array($this->value)) {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], implode($this->value, ','));\n }\n else {\n $this->query->add_where($this->options['group'], $this->definition['trovequery']['arg'], $this->value);\n }\n }\n }" ]
[ "0.7006227", "0.6897946", "0.6893941", "0.6873814", "0.6869947", "0.6842704", "0.6829786", "0.6769616", "0.67670196", "0.6760689", "0.67492837", "0.67421883", "0.6740243", "0.6723818", "0.6664229", "0.6628498", "0.66265285", "0.66145337", "0.6605062", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.659942", "0.6594724", "0.65907973", "0.65595704", "0.6555274", "0.655281", "0.65421647", "0.6528092", "0.6510478", "0.65028805", "0.6492233", "0.6490421", "0.6477862", "0.6477661", "0.6477661", "0.64691687", "0.64535296", "0.6453081", "0.6452704", "0.6441406", "0.64281005", "0.6421501", "0.6417312", "0.64121747", "0.64079", "0.6405311", "0.6400475", "0.63891387", "0.63743603", "0.6373378", "0.63676876", "0.63649064", "0.6363111", "0.63434964", "0.63433486", "0.63314897", "0.632967", "0.63293", "0.63290167", "0.6325142", "0.63155466", "0.6313434", "0.6309665", "0.6304597", "0.6296562", "0.6291395", "0.6281047", "0.6279784", "0.62780565", "0.627557", "0.627557", "0.627557", "0.62754804", "0.6274705", "0.62720895", "0.6270132", "0.6265423", "0.626449", "0.62606317", "0.6256071", "0.6248466", "0.6248466", "0.6248466", "0.6248466", "0.62365085", "0.6228352", "0.62275183", "0.62245554", "0.6218834", "0.6218792", "0.6214695", "0.6213319", "0.620265", "0.6201284" ]
0.0
-1
This method will be execute after run the main process
public function hook_after($postdata,&$result) { $email = $postdata['email']; $password = $postdata['password']; $user = DB::table(config('crudbooster.USER_TABLE'))->where("email", $email)->first(); $token = Request::header('X-Authorization-Token'); $result['api_message'] = "ok"; $result['password'] = ''; // $result['sessions'] = $user->sessions(); // $result['user_id'] = $users->id; // $result['token'] = $token; $result['userData']['user_id'] = $user->id; $result['userData']['token'] = $token; $res = response()->json($result, 200); $res->send(); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function after_run() {}", "public function after_run(){}", "protected function afterProcess() {\n }", "protected function _postExec()\n {\n }", "public function run()\n\t{\n\t\t//\n\t}", "public function postExec()\n {\n }", "public function run()\n {\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public static function run() {\n\t}", "protected function finish() {}", "public function run(){}", "public function run() {}", "protected function _exec()\n {\n }", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "public abstract function afterExec();", "public static function post_process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function run()\r\n {\r\n\r\n }", "public function run() {\n }", "public function run()\n {\n //\n $this->grabData();\n }", "public function run() {\n }", "protected function after(){}", "protected function after(){}", "protected function after(){}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\n {\n //\n \n }", "public function onRun()\n {\n }", "public function process() {}", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function process() {}", "public function process() {}", "public function process() {}", "public function postProcess();", "public function process() {\n }", "public function process() {\n }", "public function process() {\n }", "public function extProc_finish() {}", "public function extProc_finish() {}", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function preExec()\n {\n }", "public function RunDataProcess()\n {\n // TODO: Implement RunDataProcess() method.\n }", "public function after() {}", "public function run()\n {\n $this->initiateData();\n }", "public function run()\n {\n $this->initiateData();\n }", "public function proceed()\n {\n }", "protected function process()\n {}", "public function execute()\n\t{\n\t\t$this->run();\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function preExecute(){\n\n\t\n\t}", "public function execute()\n {\n $this->run();\n }", "protected function after_execute() {\n// \t$this->add_related_files('mod_vcubeseminar', 'intro', null);\n// \t$this->add_related_files('mod_vcubeseminar', 'vcubeseminar', null);\n }", "protected function _after() {\n\t\t$this->startup = null;\n\t}", "protected function _afterInit() {\n\t}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function finish() {}", "public function run()\n {\n\n parent::run();\n\n }", "protected function _after()\n {\n }", "function main()\r\n {\r\n $this->setOutput();\r\n }", "protected function _preExec()\n {\n }", "public function run()\n\t{\n\t\t$this->upgrade_to_1_1_0();\n\t}", "protected abstract function run();", "function after_process() {\n return false;\n }", "public function run(): void\n {\n //\n }", "public function __after()\t{\n\t}", "function run()\r\n {\r\n }", "protected function onFinishSetup()\n {\n }", "public function _postSetup()\n {\n }", "public function run() {\n $this->cleanupFilesystem();\n $this->downloadCommunityRegistry();\n $this->downloadAllCommunityDefinitions();\n $this->saveCommunicationDetails();\n }" ]
[ "0.7691825", "0.76911443", "0.73500884", "0.71664333", "0.704315", "0.69860375", "0.69421095", "0.6937926", "0.6895388", "0.6863637", "0.6802592", "0.6790873", "0.6781017", "0.67638224", "0.6736275", "0.67171925", "0.66478384", "0.66478384", "0.66478384", "0.66478384", "0.6602739", "0.6602739", "0.6588956", "0.65842086", "0.6567963", "0.65253806", "0.6522067", "0.6522067", "0.6522067", "0.6521648", "0.6521648", "0.6509471", "0.6495522", "0.6483333", "0.6482919", "0.6482919", "0.6482919", "0.64823925", "0.64823925", "0.64823925", "0.6469368", "0.64326704", "0.64326704", "0.64326704", "0.6399286", "0.639882", "0.6386108", "0.6386108", "0.6386108", "0.6383965", "0.63770205", "0.63753814", "0.63718534", "0.63718534", "0.63666826", "0.63619584", "0.63519996", "0.63449204", "0.63449204", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63403016", "0.63368046", "0.63322246", "0.6328785", "0.6322282", "0.6303891", "0.630076", "0.63001907", "0.62990624", "0.62990624", "0.62990624", "0.62990624", "0.62990624", "0.6298699", "0.62985635", "0.6277049", "0.6258933", "0.6254079", "0.625401", "0.6241541", "0.62402", "0.62376016", "0.6234749", "0.6228485", "0.6217339", "0.62170625", "0.6216722" ]
0.0
-1
Database Tests Phalcon\DataMapper\Pdo\ConnectionLocator :: __construct()
public function dMPdoConnectionLocatorConstruct(DatabaseTester $I) { $I->wantToTest('DataMapper\Pdo\ConnectionLocator - __construct()'); $connection = $I->getDataMapperConnection(); $locator = new ConnectionLocator($connection); $I->assertInstanceOf(ConnectionLocatorInterface::class, $locator); $I->assertInstanceOf(ConnectionLocator::class, $locator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "protected function setUpDatabaseConnectionMock() {}", "function __construct() {\n\t\t$this->dsn = \"mysql:host=\". DB_SERVER . \";dbname=\" . DB_NAME . \";charset=\" . DB_CHAR;\n\t\n\t $this->opt = [\n\t PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n\t PDO::ATTR_EMULATE_PREPARES => false,\n\t ];\n\t\t$this->openConnection();\n\t}", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "public function __construct()\n {\n // Set the options parameter for the PDO connection.\n $options = array(\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\n );\n\n // Generate a database connection using the PDO connector\n parent::__construct(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8', DB_USER, DB_PASS, $options);\n }", "public function __construct()\n {\n //$database = new Database();\n $database = Database::connect();\n $this->dao = $database;\n }", "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "public function init()\n {\n $dependencyInjector = $this->getDi();\n $eventsManager = $this->getEventsManager();\n $config = $this->_config;\n\n $adapter = $this->_getDatabaseAdapter($config->database->adapter);\n if (!$adapter) {\n throw new \\Engine\\Exception(\"Database adapter '{$config->database->adapter}' not exists!\");\n }\n $connection = new $adapter([\n \"host\" => $this->_config->database->host,\n \"username\" => $this->_config->database->username,\n \"password\" => $this->_config->database->password,\n \"dbname\" => $this->_config->database->dbname,\n \"options\" => [\n \\PDO::ATTR_EMULATE_PREPARES => false\n ]\n ]);\n\n if (!$config->application->debug && $config->database->useCache) {\n if ($dependencyInjector->offsetExists('modelsCache')) {\n $connection->setCache($dependencyInjector->get('modelsCache'));\n }\n }\n\n if ($config->application->debug) {\n // Attach logger & profiler\n $logger = new \\Phalcon\\Logger\\Adapter\\File($config->application->logger->path.'/db.log');\n if (isset($config->application->logger->formatter) && $config->application->logger->formatter == 'logstash') {\n $formatter = new \\Engine\\Logger\\Formatter\\Logstash($config->application->logger->project, 'database', gethostname());\n } else {\n $formatter = new \\Phalcon\\Logger\\Formatter\\Line($config->application->logger->format);\n }\n $logger->setFormatter($formatter);\n\n $profiler = new \\Phalcon\\Db\\Profiler();\n\n $eventsManager->attach('db', function ($event, $connection) use ($logger, $profiler) {\n if ($event->getType() == 'beforeQuery') {\n $statement = $connection->getSQLStatement();\n $logger->log($statement, \\Phalcon\\Logger::INFO);\n $profiler->startProfile($statement);\n }\n if ($event->getType() == 'afterQuery') {\n //Stop the active profile\n $profiler->stopProfile();\n }\n });\n\n if ($this->_config->application->profiler && $dependencyInjector->has('profiler')) {\n $dependencyInjector->get('profiler')->setDbProfiler($profiler);\n }\n $connection->setEventsManager($eventsManager);\n }\n\n $dependencyInjector->set('db', $connection);\n\n if (isset($config->database->useAnnotations) && $config->database->useAnnotations) {\n $dependencyInjector->set('modelsManager', function () use ($config, $eventsManager) {\n $modelsManager = new \\Phalcon\\Mvc\\Model\\Manager();\n $modelsManager->setEventsManager($eventsManager);\n\n //Attach a listener to models-manager\n $eventsManager->attach('modelsManager', new \\Engine\\Model\\AnnotationsInitializer());\n\n return $modelsManager;\n }, true);\n }\n\n /**\n * If the configuration specify the use of metadata adapter use it or use memory otherwise\n */\n $service = $this;\n $dependencyInjector->set('modelsMetadata', function () use ($config, $service) {\n if ((!$config->application->debug || $config->application->useCachingInDebugMode) && isset($config->metadata)) {\n $metaDataConfig = $config->metadata;\n $metadataAdapter = $service->_getMetaDataAdapter($metaDataConfig->adapter);\n if (!$metadataAdapter) {\n throw new \\Engine\\Exception(\"MetaData adapter '{$metaDataConfig->adapter}' not exists!\");\n }\n $metaData = new $metadataAdapter($config->metadata->toArray());\n } else {\n $metaData = new \\Phalcon\\Mvc\\Model\\MetaData\\Memory();\n }\n if (isset($config->database->useAnnotations) && $config->database->useAnnotations) {\n $metaData->setStrategy(new \\Engine\\Model\\AnnotationsMetaDataInitializer());\n }\n\n return $metaData;\n }, true);\n }", "private function __construct()\r\n {\r\n $this->conn = new PDO(\r\n \"mysql:host={$this->host};\r\n dbname={$this->name}\",\r\n $this->user,\r\n $this->pass,\r\n array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\")\r\n );\r\n $this->conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\r\n $this->conn->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\r\n $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"orders\";\n }", "public function __construct()\n {\n $this->pdo = Db::getConnection();\n }", "function __construct()\r\n {\r\n $this->_dbh = $this->connect();\r\n }", "public function __construct()\n\t\t{\n\t\t\tbaseDao::__construct();\n\t\t}", "private function __construct()\n\t{\n\t\t$options = [\n\t\t PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n\t\t PDO::ATTR_EMULATE_PREPARES => false,\n\t\t];\n\t\tself::$instance = new PDO('mysql:host='.DBHOST.';dbname='.DBName, DBUsername, DBPassword, $options);\n\t}", "function __construct()\n {\n $this->_dbh = $this->connect();\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct()\n {\n $pdoDouble = \\Mockery::mock('PDO');\n parent::__construct($pdoDouble);\n }", "protected function __construct(){\n if (!is_object(self::$connector)) {\n \n if(isset(self::$config['socket']) && !empty(self::$config['socket'])){\n $connectionString = self::$config['socket'].\";dbname=\".self::$config['base'];\n }else{\n $connectionString = self::$config['type'].\":host=\".self::$config['host'].\";dbname=\".self::$config['base'];\n }\n \n $username = self::$config['log'];\n $password = self::$config['pass'];\n \n try{\n $connector = new PDO($connectionString, $username, $password);\n $connector->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $connector->query(\"SET NAMES utf8\");\n $this->setConnector($connector);\n }catch(Exception $e){\n //if the ORM is used with the Jet framework, use the Log class\n if(class_exists('Log')){\n Log::fatal($e);\n }else{\n trigger_error($e->getMessage(), E_USER_ERROR);\n }\n }\n }\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function __construct()\n {\n $this->db = DataBase::dbConnect();\n }", "public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "public function testPdoConnection() {\n\n\t\t$conn = self::$context->connection;\n\n\t\t// Test instance id member\n\t\t$instId = self::$context->config->INSTANCE_ID;\n\t\t$this->assertEquals($instId, $conn->instanceId);\n\n\t\t// Test id generation\n\t\t$idA = $conn->generateId();\n\t\t$idB = $conn->generateId();\n\t\t$this->assertGreaterThan($idA, $idB);\n\n\t\t// Test binding of the instace id\n\t\t$sth = $conn->prepare(\"SELECT :instId as test\");\n\t\t$conn->bindInstance($sth);\n\t\t$sth->execute();\n\t\t$rd = $sth->fetch(\\PDO::FETCH_ASSOC);\n\t\t$this->assertEquals($rd[\"test\"], \"$instId\");\n\n\t}", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "function __construct()\n\t{\n\t\t$this->connection = Application::getDatabaseConnection();\n\t\t$this->connection->SetFetchMode(2);\n\t}", "public function __construct()\n {\n $con = new PDO('mysql:host=localhost;dbname=inventorymanagement', 'root', '');\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $con->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->setDbConx($con);\n }", "public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }", "private function __construct()\n {\n $dataSourceName = \"mysql:host=\" . DBHOST . \";dbname=\" . DBNAME . \";charset=utf8\";\n // on appelle le constructeur de la classe PDO\n $this->PDOInstance = new PDO($dataSourceName, DBUSER, DBPASSWD, array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n }", "protected function setUp() {\r\n $this->_instance = $this->getProvider()->get('PM\\Main\\Database');\r\n\r\n parent::setUp();\r\n }", "public function __construct() {\n $db = new Connection();\n $this->conn = $db->connect();\n }", "private function __construct()\n {\n $this->conn = new PDO(\"mysql:host={$this->host};\n dbname={$this->name}\", $this->user,$this->pass, $this->opt);\n }", "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "public function __construct() {\n $this->adapter = new PDOAdapter();\n }", "private function __construct() {\n // PDO connection variables\n $host = DBHOST;\n $db = DBDATABASE;\n $user = DBUSER;\n $pass = DBPASS;\n $charset = \"utf8\";\n\n $dsn = \"mysql:host=$host;dbname=$db;charset=$charset\";\n // PDO options for error mode, default fetch mode and prepare statement eumulation\n $opt = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO:: ATTR_EMULATE_PREPARES => false,\n ];\n\n // try - catch block for error handling\n try {\n // new PDO connection with set parameters\n $this -> pdo = new PDO($dsn, $user, $pass, $opt);\n } catch(PDOException $e) {\n die($e -> getMessage());\n }\n }", "public function __construct(){\n \n $this->_db = new \\PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . '; charset=utf8', DB_USERNAME , DB_PASSWORD , array(\\PDO::ATTR_ERRMODE=>\\PDO::ERRMODE_WARNING,\\PDO::ATTR_DEFAULT_FETCH_MODE=>\\PDO::FETCH_OBJ));\n }", "function __construct()\n {\n $ATTR = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n );\n\n // New PDO instance\n try{\n $this->_connect = new PDO($this->HOST, $this->USER, $this->PASS, $ATTR);\n } catch (PDOException $e) {\n $this->_error = $e->getMessage();\n }\n }", "public function __construct()\n {\n $dsn = 'mysql:host=' . Config::DB_HOST . ';dbname=' . Config::DB_NAME . ';port=' . Config::DB_PORT;\n try {\n $this->connection = new \\PDO($dsn, Config::DB_USER, Config::DB_PASS);\n } catch (\\PDOException $e) {\n throw new \\PDOException($e->getMessage());\n }\n }", "public function __construct(){\n global $dbconnection;\n $this->pdo = $dbconnection->open(); \n }", "public function __construct() {\n // Handle Exceptions\n try {\n // Setup PDO attributes\n $options = [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n ];\n \n // Create a PDO Object\n $this->db = new PDO(self::DSN, self::UN, self::PW, $options);\n \n } catch (PDOException $e) {\n // Output Connection Errors\n echo $e->getMessage();\n // End the script's execution\n exit();\n }\n }", "private function __construct() {\n\t\ttry \n\t\t{\n\t\t\t$this->pdo = new PDO($this->source, $this->user, $this->pass);\n\t\t} \n\t\tcatch (PDOException $e) \n\t\t{\n\t\t\tdie( $e->getMessage() );\n\t\t}\n\t}", "public function __construct()\n {\n $data = new Constant();\n $this->connect = new PDO(\"$data->database:host=$data->host;dbname=$data->dbname\", \"$data->user\", \"$data->password\");\n $this->connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n }", "public function __construct(){\r\n $this->conn = $this->getConnection();\r\n }", "public function __construct()\n {\n $database = new Database();\n $dbConnection = $database->dbConnection();\n $this->pdo = $dbConnection;\n }", "private function __construct()\n {\n try {\n $dsn = \"{$this->dbtype}:host={$this->dbhost};dbname={$this->dbname};charset=utf8\";\n $options = array(\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n );\n $this->dbConn = new PDO($dsn, $this->dbuser, $this->dbpass, $options);\n } catch (PDOException $e) {\n print 'Error!: ' . $e->getMessage();\n die();\n }\n }", "public function __construct() {\n\t\ttry {\n\t\t\t$this->conn = new \\PDO(DRIVER . ':dbname=' . DBNAME . ';host=' . HOST, USERNAME, PASSWORD);\n\t\t\t$this->conn->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\techo $e->getMessage();\n\t\t\tdie();\n\t\t}\n\t}", "private function __construct() {\n try {\n $this->_pdo = new PDO(Config::get('mysql/dsn'), Config::get('mysql/user'), Config::get('mysql/pass'), Config::get('mysql/opt')); \n } catch(PODExeception $e) {\n die($e->getMessage());\n }\n }", "public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}", "function __construct() {\n $this->createConnection();\n }", "public function __construct()\n {\n $this->m_DataAccess = new PDOMySQLActorrDataModel();\n }", "function __construct() {\n $this->open_db_connection();\n }", "public function __construct(){\n $database = new Database();\n $db = $database->dbConnection();\n $this->conn = $db;\n }", "public function __construct() {\n $this->_db = DB::connect();\n }", "function __construct()\n {\n $this->db = new PDO ($this->dbSettings, $this->dbUsername, $this->dbPassword, $this->dbAttr);\n // TODO: Implement __construct() method.\n }", "function __construct()\r\n {\r\n $this->db = null;\r\n $this->pdo = null;\r\n $this->db = new DatabaseProxy();\r\n if($this->db->isConnected()){\r\n $this->pdo = $this->db->getPDO();\r\n Log::i(__CLASS__.'::'.__FUNCTION__.'() Line:'.__LINE__.' at '.__FILE__ ,\r\n self::STR_DB_CONN_SUCCESS );\r\n }\r\n else{\r\n Log::i(__CLASS__.'::'.__FUNCTION__.'() Line:'.__LINE__.' at '.__FILE__ ,\r\n self::STR_DB_CONN_FAILED,\r\n Log::ERR_ERROR);\r\n }\r\n }", "private function __construct()\n {\n $dsn = 'mysql:host=' . Config::read('db.host') .\n ';dbname=' . Config::read('db.basename') .\n ';charset=utf8';\n\n $user \t\t= Config::read('db.user');\n $password \t= Config::read('db.password');\n\n $this->dbh \t= new PDO($dsn, $user, $password);\n }", "public function __construct()\n {\n $this -> database = new DbConfig();\n $this -> pdo = $this -> database->dbConnect();\n\n }", "public function __construct()\n {\n $this->db = \\Config\\Database::connect();\n }", "function __construct(){\n $this->Connection=Connector::GetConnection();\n if($this->TestStructure){\n $this->TestTableStructure();\n }\n }", "public function __construct() {\n try {\n $handler = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS);\n $handler->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $e) {\n printf (\"Connect failed %s\\n\", $e->getMessage());\n exit();\n }\n\n $this->_connection = $handler;\n }", "public function __construct() {\n // Set DSN\n $dsn = 'mysql:host='.$this->host.';dbname='.$this->dbName;\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n );\n \n // Create PDO Instance.\n try {\n $this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n } catch(PDOException $e) {\n $this->error = $e->getMessage();\n echo $this->error;\n }\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "public function __construct()\n {\n try {\n $this->conexion = new Zend_Db_Adapter_Pdo_Mysql(\n array(\n 'host' => $this->host,\n 'username' => $this->username,\n 'password' => $this->password,\n 'dbname' => $this->dbname,\n 'port' => $this->port,\n 'driver_options' => array(MYSQLI_INIT_COMMAND => 'SET NAMES UTF8;')\n )\n );\n } catch (PDOException $e) {\n echo 'Connection failed: ' . $e->getMessage();\n $this->conexion = false;\n }\n }", "public function __construct()\n {\n $this->pdo = new PDO('mysql:host=' . HOST_NAME . ';dbname=' . DB_NAME, USER_NAME, DB_PASSWORD);\n }", "public function __construct()\n {\n $this->pdo = $this->getPDO();\n }", "public function __construct()\n\t{\n\t\t$this->db = IEM::getDatabase();\n\t}", "public function __construct () \n\t{\n\t\trequire_once(\"./inc/connect_pdo.php\");\n\t\t$this->dbo = $dbo;\n\t\t\n\t}", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "public function __construct()\n {\n\n try {\n $this->pdo = new PDO($this->dsn, self::USERNAME, self::PASSWORD, $this->options);\n } catch (Exception $e) {\n error_log($e->getMessage());\n exit('Connection Failed');\n }\n\n }", "public function __construct() {\n\t\t// Connect to the DB\n\t\t$this->PDODB = EP_Util_Database::pdo_connect();\n\t}", "public function __construct() {\n\t\t// Connect to the DB\n\t\t$this->PDODB = EP_Util_Database::pdo_connect();\n\t}", "function __construct() {\n $this->open_db_connection();\n }", "private function __construct(){\n try{\n $this->_pdo = new PDO('mysql:host='.Config::get('mysql/host').';dbname='. Config::get('mysql/db'), Config::get('mysql/username'),Config::get('mysql/password'));\n //echo 'connected';\n }catch(PDOException $e){\n die($e->getMessage());\n }\n }", "private function __construct()\n {\n $this->setDatabaseConfig();\n\n //set DSN\n $dsn = $this->_type . ':host=' . $this->_host . ';dbname=' . $this->_name;\n\n //set options\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n );\n\n try {\n /*\n * PDO has three params upon construction\n * specify driver, username, password\n * specify driver: mysql,needs host and database name\n * host = server you are running usually 127.0.0.1\n */\n $this->_dbHandler = new PDO($dsn, $this->_user, $this->_pass, $options);\n } catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "function __construct()\n {\n //$this->log->debug(\"Core: Loading...\");\n $this->dsn = \"mysql:host=\".getenv('dbHost').\";dbname=\".getenv('dbDatabase').\";charset=utf8\";\n $opt = [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC,\n \\PDO::ATTR_EMULATE_PREPARES => false,\n ];\n $this->pdo = new \\PDO($this->dsn, getenv('dbUser'), getenv('dbPass'), $opt);\n var_dump($this->pdo->exec(\"SELECT VERSION();\"));\n }", "private function __construct(){\n try {\n $this->dbh = Conexion::singleton_conexion();\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage();\n die();\n }\n }", "public function __construct(){\n\t\t$this->db = new Connection();\n\t\t$this->db = $this->db->dbConnect();\n\t}", "public function __construct()\n {\n $bool = ENV == 'dev';\n try {\n $this->dbo = parent::__construct(\"pgsql:host=\" . DBHOST . \"; port=\" . $this->bdd_port . \"; dbname=\" . DBNAME, DBUSER, DBPASSWD,\n array(PDO::ATTR_PERSISTENT => true, PDO::ATTR_ERRMODE => $bool, PDO::ERRMODE_EXCEPTION => $bool));\n $this->query(\"set names 'utf8';\");\n } catch (PDOException $e) {\n echo 'Echec lors de la connexion à la base de données : ' . $e->getMessage();\n }\n }", "public function __construct(){\n\t\t$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;\n\t\t\n\t\t//Set options\n\t\t$options = array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE\t => PDO::ERRMODE_EXCEPTION\n\t\t);\n\t\t\n\t\t//Create a new PDO instance\n\t\ttry {\n\t\t\t$this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n\t\t}\n\t\t//Catch any errors\n\t\tcatch(\\PDOException $e){\n\t\t\t$this->error = $e->getMessage();\n\t\t}\n\t\t\n\t}", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"user_sub_users\";\n }", "function __construct() {\n\n\t\t$this->open_db_connection();\n\n\t}", "public function __construct()\n {\n $this->db = new PDO(DB_INFO,DB_USER,DB_PASS);\n }", "function __construct()\n {\n $dsn = 'mysql:host='.$this->host.';dbname='.$this->db;\n try {\n $this->pdo = new PDO($dsn, $this->username, $this->pass);\n $this->pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC);\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage() . \"<br>\";\n die();\n }\n }", "public function __construct()\n {\n global $database;\n $db = new PDO($database['connstring'],$database['username'],$database['password']) or die(\"Database Problemo\");\n $this->_db = $db;\n return true;\n }", "public function __construct() {\n $this->dbName = new DataBase($this->db);\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"special_fees\";\n }", "function __construct () {\r\n // PARAM : DB_HOST, DB_CHARSET, DB_NAME, DB_USER, DB_PASSWORD\r\n \r\n try {\r\n $this->pdo = new PDO(\r\n \"mysql:host=\" . DB_HOST . \";dbname=\" . DB_NAME . \";charset=\" . DB_CHARSET, DB_USER, DB_PASSWORD, [\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_EMULATE_PREPARES => false\r\n ]\r\n );\r\n return true;\r\n } catch (Exception $ex) {\r\n $this->CB->verbose(0, \"DB\", $ex->getMessage(), \"\", 1);\r\n }\r\n }", "public function __construct()\n {\n $databaseHost = $_ENV['DATABASE_HOST'];\n $databaseName = $_ENV['DATABASE_NAME'];\n $databaseUser = $_ENV['DATABASE_USER'];\n $databasePass = $_ENV['DATABASE_PASS'];\n\n try {\n $this->connection = new PDO(\"mysql:host={$databaseHost};dbname={$databaseName};\", $databaseUser, $databasePass);\n $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n\n }", "public function __construct()\n\t{\n\n\t\ttry {\n\n\t\t\t$dsn = sprintf(\n\t\t\t\t'mysql:dbname=%s;host=%s;charset=utf8;',\n\t\t\t\tself::$dsn['database'],\n\t\t\t\tself::$dsn['hostname']\n\t\t\t);\n\n\t\t\tparent::__construct(\n\t\t\t\t$dsn,\n\t\t\t\tself::$dsn['username'],\n\t\t\t\tself::$dsn['password'],\n\t\t\t\tarray(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')\n\t\t\t);\n\n\t\t} catch (PDOException $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}//end try\n\n\t\tif (array_key_exists('cachelvl', self::$dsn) === false) {\n\n\t\t\tself::$dsn['cachelvl'] = self::CACHE_NORMAL;\n\n\t\t}\n\n\t\ttry {\n\n\t\t\t// Legacy fallback to prevent old applications from crashing.\n\t\t\tif (class_exists('Cache') === false) {\n\n\t\t\t\tinclude_once __DIR__.'/Cache.class.php';\n\n\t\t\t}\n\n\t\t\t$this->_cache = Cache::loadEngine('Memcached');\n\t\t\t$this->connections++;\n\n\t\t} catch (Exception $e) {\n\n\t\t\tthrow new DatabaseException($e->getMessage());\n\n\t\t}\n\n\t}", "public function __construct(){\n $this->connectToDatabase();\n }", "function __construct(){\r\n try {\r\n $this->openconnection();\r\n }catch(\\PDOException $e){\r\n exit('Database connection could not be started.');\r\n }\r\n }", "public function __construct() {\n // settings local\n $dsn = 'mysql:host=localhost;dbname=z_mvc';\n $username = 'root';\n $password = '';\n // PDO options\n $opt = array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES UTF8, time_zone = '+04:00'\"\n );\n // connection\n try {\n $this->con = new PDO($dsn, $username, $password, $opt);\n } catch(PDOException $e) {\n echo 'Connection failed: '.$e->getMessage();\n }\n }", "public function __construct()\n {\n $database = new UserDatabase();\n $db = $database->dbConnection();\n $this->conn = $db;\n }", "protected function initDatabase()\n {\n $this->di->setShared('db', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config')->get('database')->toArray();\n $em = $this->getShared('eventsManager');\n $that = $this;\n\n $adapter = '\\Phalcon\\Db\\Adapter\\Pdo\\\\' . $config['adapter'];\n unset($config['adapter']);\n\n /** @var \\Phalcon\\Db\\Adapter\\Pdo $connection */\n $connection = new $adapter($config);\n\n // Listen all the database events\n $em->attach(\n 'db',\n function ($event, $connection) use ($that) {\n /**\n * @var \\Phalcon\\Events\\Event $event\n * @var \\Phalcon\\Db\\AdapterInterface $connection\n * @var DiInterface $that\n */\n if ($event->getType() == 'beforeQuery') {\n $variables = $connection->getSQLVariables();\n $string = $connection->getSQLStatement();\n\n if ($variables) {\n $string .= ' [' . join(',', $variables) . ']';\n }\n\n // To disable logging change logLevel in config\n $that->get('logger', ['db'])->debug($string);\n }\n }\n );\n\n // Assign the eventsManager to the db adapter instance\n $connection->setEventsManager($em);\n\n return $connection;\n });\n\n $this->di->setShared('modelsManager', function () {\n /** @var DiInterface $this */\n $em = $this->getShared('eventsManager');\n\n $modelsManager = new ModelsManager;\n $modelsManager->setEventsManager($em);\n\n return $modelsManager;\n });\n\n $this->di->setShared('modelsMetadata', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $config = $config->get('metadata')->toArray();\n $adapter = '\\Phalcon\\Mvc\\Model\\Metadata\\\\' . $config['adapter'];\n unset($config['adapter']);\n\n $metaData = new $adapter($config);\n\n return $metaData;\n });\n }", "private function __construct() {\n $connections = array(\n array(\n \"language\"=>\"de\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n ),\n array(\n \"language\"=>\"en\",\n \"host\"=>\"\",\n \"db\"=>\"\",\n \"username\"=>\"\",\n \"password\"=>\"\"\n )\n );\n // Define Default Connection\n ORM::configure('mysql:host='.$connections[0][\"host\"].';dbname='.$connections[0][\"db\"]);\n ORM::configure('username', $connections[0][\"username\"]);\n ORM::configure('password', $connections[0][\"password\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));\n\n // Define Connections for Languages\n foreach($connections as $connection) {\n ORM::configure('mysql:host='.$connection[\"host\"].';dbname='.$connection[\"db\"], null, $connection[\"language\"]);\n ORM::configure('username', $connection[\"username\"], $connection[\"language\"]);\n ORM::configure('password', $connection[\"password\"], $connection[\"language\"]);\n ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'), $connection[\"language\"]);\n }\n }", "function __construct(){\n try{\n $this->dbConnection = new PDO('mysql:host='.Config::get('db/host').';dbname='.Config::get('db/database'),Config::get('db/username'),Config::get('db/password'));\n $this->dbConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(Exception $e){\n die($e->getMessage());\n }\n \n }", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "public function __construct()\n\t{\n\t\t$this->dbInfo = new DbInfo();\n\t}" ]
[ "0.7387204", "0.72705716", "0.7182583", "0.7166514", "0.7118039", "0.71118724", "0.7095707", "0.70922506", "0.70547396", "0.70525753", "0.7027727", "0.70155275", "0.69955564", "0.6989077", "0.6980356", "0.69657296", "0.69657296", "0.69351125", "0.69342697", "0.6933796", "0.6916388", "0.69151396", "0.6911621", "0.69025683", "0.688749", "0.68828857", "0.6881924", "0.6874918", "0.6857025", "0.68526137", "0.683305", "0.6830427", "0.68209326", "0.68140954", "0.6808821", "0.6805261", "0.6802889", "0.67873", "0.67868066", "0.6786051", "0.6786007", "0.67858595", "0.6785818", "0.6778514", "0.67737436", "0.67688674", "0.6766913", "0.6766153", "0.67652094", "0.6764323", "0.67638975", "0.6763156", "0.67438376", "0.67374706", "0.6736835", "0.673007", "0.6724505", "0.6721421", "0.671675", "0.6714402", "0.6708401", "0.67080337", "0.670678", "0.6702086", "0.6697545", "0.6692126", "0.6689481", "0.6688615", "0.668729", "0.6684589", "0.6684576", "0.66844255", "0.66844255", "0.668207", "0.66815424", "0.668121", "0.6680137", "0.66717064", "0.667072", "0.6666084", "0.66638964", "0.6660675", "0.6660399", "0.66568285", "0.664543", "0.6639911", "0.66384095", "0.6632515", "0.6631759", "0.6629057", "0.66278297", "0.66261834", "0.66261214", "0.66240394", "0.66232926", "0.6620392", "0.6619464", "0.661551", "0.6615125", "0.6614195" ]
0.7043216
10
put your code here
public function admin_login_check_info($email,$password){ $this->db->select('*'); $this->db->from('tbl_admin'); $this->db->where('email',$email); $this->db->where('password',$password); $query_result= $this->db->get(); $result=$query_result->row(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public function custom()\n\t{\n\t}", "public function run()\n {\n //\n }", "public function run()\n {\n //\n }", "public function run()\r\n {\r\n\r\n }", "public function run(){\n parent::run();\n //Do stuff...\n }", "function run() {\r\n $this->set_demopage();\r\n\r\n $options_def = array(\r\n __class__ => '', // code CSS. ATTENTION [ ] à la place des {}\r\n 'id' => ''\r\n );\r\n\r\n $options = $this->ctrl_options($options_def);\r\n\r\n // il suffit de charger le code dans le head\r\n $this->load_css_head($options[__class__]);\r\n\r\n // -- aucun code en retour\r\n return '';\r\n }", "public function run()\n {\n\n parent::run();\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "public function run()\n {\n\n }", "function execute()\r\n\t{\r\n\t\t\r\n\t}", "protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}", "function use_codepress()\n {\n }", "public function run()\n {\n // Put your code here;\n }", "function run()\r\n {\r\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run()\n {\n }", "public function run() {\n }", "public static function run() {\n\t}", "public function onRun()\n {\n }", "public function run() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\tif(\\Yii::app()->user->isGuest === true) {\n\t\t\techo $content;\n\t\t} else {\n\t\t\t$this->render('header');\n\t\t}\n\t}", "public function run() {\n }", "public function render_content() {\n\t}", "public function main()\r\n {\r\n \r\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "public function render_content()\n {\n }", "function render() ;", "function execute()\n {\n }", "public function run(): void\n {\n //\n }", "protected function main()\n /**/\n {\n parent::run();\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "public function render()\n {\n //\n }", "public function run(){\n echo CHtml::closeTag( \"div\" );\n $this->registerScript();\n }", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "public function run();", "function __desctuct(){\r\n\t\t?>\r\n\r\n\t\t</body>\r\n\t\t</html>\r\n\t\t<?php\r\n\t}", "public function run(){}", "public function demo()\n {\n // xu ly logic\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "protected function render_content()\n {\n }", "public function render(){\n\t\t\n\t}", "public static function main(){\n\t\t\t\n\t\t}", "public function render() {\r\n\t\t\r\n\t}", "public function main()\n\t{\n\t}", "function handle() ;", "public function execute() {\n\t}", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "public function run() {}", "public\n\n\tfunction generate_code()\n\t{\n\t\t$data[\"hitung\"] = $this->Madmin->buat_code();\n\t\t$this->load->view('admin/Generate_code', $data);\n\t}", "public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}", "function main()\r\n {\r\n $this->setOutput();\r\n }", "public function run()\n\n {\n DB::table('actives')->insert([\n 'script_tag' => 0,\n 'status' =>0\n \n ]);\n //\n }", "protected function _exec()\n {\n }", "public function run() {\n\n\t\t// generate random string md5(uniqid(rand(), true));\n\t\t$this->goneta();\n\t\t$this->pamparam();\n\t\t$this->insideOut();\n\t\t$this->morfoza();\n\t\t$this->basorelief();\n\t\t$this->acajouWasZuSagen();\n\t}", "protected function after_load(){\n\n\n }", "public function work()\n {\n }", "function run();", "function run();", "public function run() {\n\t\t// include other classes\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-render.php';\n\t\trequire_once plugin_dir_path ( __FILE__ ) . 'class-top-ratter-sso.php';\n\t\t\n\t\t// enque styles for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_styles' \n\t\t) );\n\t\t// enque jquery scripts for this plugin\n\t\tadd_action ( 'wp_enqueue_scripts', array (\n\t\t\t\t$this,\n\t\t\t\t'register_plugin_script' \n\t\t) );\n\t\t// add submit action form to redirect and catch from admin.php\n\t\tadd_action ( 'admin_post_tr_action', array (\n\t\t\t\t$this,\n\t\t\t\t'prefix_admin_tr_action' \n\t\t) );\n\t\t\n\t\t// check if plugin tables exist\n\t\t$this->table_check ();\n\t\t\n\t\t// instantiate the render class for shortcodes to work\n\t\t$shortcodes = new Top_Ratter_Render ();\n\t}", "function tap_run_page_handler() \n {\n include(\"/var/www/html/run/tap_run.php\");\n \n $params = cargaArray('Torneo Argentino de Programación', $form, '');\n \n include('body.php'); \n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "function custom_construction() {\r\n\t\r\n\t\r\n\t}", "public function run()\n {\n \\App\\Model\\TemplateLib::create([\n 'name' => 'FNK Test',\n 'stylesheet' => 'body {background:white};',\n 'javascript' => '',\n 'code_header' => $this->codeHeader,\n 'code_footer' => $this->codeFooter,\n 'code_index' => $this->codeIndex,\n 'code_search' => '<h1>saya di search</h1>',\n 'code_category' => '<h1>saya di category</h1>',\n 'code_page' => $this->codePage,\n 'code_post' => $this->codePost,\n 'code_about' => '<h1>saya di about</h1>',\n 'code_404' => '<h1>saya di 404</h1>',\n ]);\n }", "public function helper()\n\t{\n\t\n\t}", "public function drawContent()\n\t\t{\n\t\t}" ]
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407", "0.56068903", "0.56068903", "0.56068903", "0.56016845", "0.5597219", "0.5595339", "0.5591545", "0.558057", "0.55636305", "0.55034596", "0.5487096", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.5477182", "0.54594034", "0.5446425", "0.5446197", "0.54451364", "0.54319674", "0.5426377", "0.54072845", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.5401934", "0.53981763", "0.5394762", "0.5392594", "0.5392164", "0.5391672", "0.5391672", "0.5391672", "0.5386191", "0.53823715", "0.5374112", "0.5373851", "0.5371084", "0.5369742", "0.53666246", "0.5365522", "0.5358571", "0.53542304", "0.5353158", "0.5345768", "0.5339915", "0.53389114", "0.53339213", "0.5332912", "0.5323722", "0.5323722", "0.5321411", "0.5318719", "0.53184503", "0.5300535", "0.5290181", "0.52723837", "0.52723306" ]
0.0
-1
Returns the "shortName" of this article
function getshortName() { return $this->shortName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShortName()\n {\n return $this->shortName;\n }", "public function getShortName()\n {\n return $this->shortName;\n }", "public function getShortName() {\n return $this->shortName;\n }", "function getShortName() \n {\n return $this->_shortName;\n }", "public function shortName()\n {\n if (strlen($this->name) > 30) {\n return '<span title=\"' . e($this->name) . '\">' . substr(e($this->name), 0, 28) . '...</span>';\n }\n return $this->name;\n }", "public function getShortName()\n\t{\n\t\treturn $this->getName();\n\t}", "public function getShortName():string\n {\n return $this->short_name;\n }", "public function getShortname()\n {\n return $this->shortname;\n }", "public function get_Short_Title() {\n return $this->short_title;\n }", "function getName($short = false) {\n return $this->getDisplayName($short);\n }", "public function shortTitle()\n {\n if (!$this->title_short()->empty()) {\n $shortTitle = $this->title_short();\n } else {\n $shortTitle = $this->title();\n };\n\n return $shortTitle;\n }", "public function get_shortname(){\n\t\treturn $this->_shortname;\n\t}", "public function get_short_entry_title()\n {\n if (strlen($this->hero_shorter_title) > 0) {\n return $this->hero_shorter_title;\n }\n\n return $this->title;\n }", "public function getShortName();", "public function name()\n {\n \treturn $this->article->name;\n }", "public function getShortName() {}", "public function shortName(): String\n {\n return $this->shortNames[$this->suit];\n }", "public function getArticleName()\n {\n return $this->_articleName;\n }", "public function getFullname(): string\n {\n return $this->product->lang->title . ' ' . $this->lang->title;\n }", "protected function _getAssetTitle() {\n return $this->shortname;\n }", "public function getShortName(){\n return mb_strimwidth($this->name, 0, 25, '...');\n }", "public function getTitle()\n {\n return self::TITLE_PREFIX.$this->getShortName();\n }", "public function shortName();", "public function getShortName(): string\n {\n return class_basename($this);\n }", "public function getShort() {\n return $this->short;\n }", "public function getName()\n {\n return $this->item['friendly_name'];\n }", "public function get_name() {\n\t\treturn esc_html__( $this->title, 'dashwp' );\n\t}", "public function getFullname() {\n return $this->getName();\n }", "public function getShortName()\n\t{\n\t\t$pos = strrpos($this->name, '\\\\');\n\t\treturn false === $pos ? $this->name : substr($this->name, $pos + 1);\n\t}", "public function getShortName() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "public function get_full_name()\n\t\t{\n\t\t\treturn $this->name().($this->suffix() ? '.'.$this->suffix():'');\n\t\t}", "function getDisplayName() {\n\t\treturn __('plugins.generic.thesisfeed.displayName');\n\t}", "public function getName()\r\n {\r\n return $this->vest() ? $this->vest()->prefix.$this->is_name.'『'.$this->vest()->tuan.$this->vest()->suffix.'』'.$this->vest()->remark : '';\r\n }", "public function getFriendlyName()\n {\n return $this->friendly_name;\n }", "public function getFriendlyName()\n {\n return $this->friendly_name;\n }", "public function getShortName()\n {\n return trim($this->first_name . ' ' . ($this->last_name ? $this->last_name{0} . '.' : ''));\n }", "public function getName(): string\n {\n return $this->title;\n }", "public function get_friendly_name()\n\t{\n\t\treturn $this->get_name();\n\t}", "public function getArticleTitle() {\n return $this->article_title;\n }", "function getDisplayName() {\r\n\t\treturn __('plugins.generic.markup.displayName');\r\n\t}", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "function GetFriendlyName()\n {\n return $this->Lang('friendlyname');\n }", "public function getShortDescription()\n {\n return $this->shortDescription;\n }", "public function getDisplayName()\n {\n return $this['display_name'];\n }", "public function getShortName() {\n return trim(ucwords(trim($this->firstName)) . ' ' . strtoupper(substr(trim($this->lastName), 0, 1))) . '.';\n }", "function getDisplayName() {\n\t\treturn __('plugins.generic.announcementfeed.displayName');\n\t}", "public function getFullNameShort() {\r\n $fullNameShort = $this->firstName .' '. $this->lastName;\r\n return $fullNameShort;\r\n }", "public function getShortDescription()\n {\n return isset($this->oxarticles__oxshortdesc->value) ? $this->oxarticles__oxshortdesc->value : null;\n }", "public function getShowTitle()\n {\n return sprintf($this->_('Showing %s'), $this->getTopic(1));\n }", "public function getTitle()\n {\n return $this->display_name;\n }", "public function get_name()\r\n {\r\n \t$data = $this->get_exercise_data();\r\n \treturn $data['title'];\r\n }", "public function getShortName() {\r\n $displayName = $this->fname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getDisplayName()\n {\n return $this->display_name;\n }", "public function getName()\n {\n return $this->alias;\n }", "public function getDisplayName()\n\t{\n\t\treturn $this->display_name;\n\t}", "public function getDisplayName()\n\t{\n\t\treturn $this->display_name;\n\t}", "public function getTopicFullName(): string\n {\n return $this->_topicFullName;\n }", "final public function getShortName()\n {\n $className = get_class($this);\n if (strpos($className, '\\\\') === false) {\n return strtolower($className);\n }\n\n $parts = explode('\\\\', $className);\n\n return strtolower(end($parts));\n }", "public function getDisplayName()\n {\n return $this->getProperty(\"DisplayName\");\n }", "public function getName() {\n return $this->getFullName();\n }", "public function getFullname()\n\t{\n\t\treturn $this->fullname();\n\t}", "public function getDisplayname()\n\t{\n\t\treturn $this->displayname;\n\t}", "public function getDirectiveShortName() {\r\n\t\t\treturn self::DIRECTIVE_SHORT_NAME;\r\n\t\t}", "public function getShortMessage()\n {\n return $this->shortMessage;\n }", "public function fullname()\n\t{\n\t\treturn $this->product->name .' - '. $this->name();\n\t}", "protected function getSlugName() {\n return $this->title;\n }", "function getDisplayName($short = false) {\n if($this->display_name === false) {\n if($this->getFirstName() && $this->getLastName()) {\n if($short) {\n return $this->getFirstName() . ' ' . substr_utf($this->getLastName(), 0, 1) . '.';\n } // if\n\n $this->display_name = $this->getFirstName() . ' ' . $this->getLastName();\n } elseif($this->getFirstName()) {\n $this->display_name = $this->getFirstName();\n } elseif($this->getLastName()) {\n $this->display_name = $this->getLastName();\n } else {\n $this->display_name = $this->getEmail();\n } // if\n } // if\n\n return $this->display_name;\n }", "public function getFriendlyName();", "public function metaTitle()\n\t{\n\t\treturn ($this->title == '') ? $this->name : $this->title;\n\t}", "public function title()\n {\n return $this->resource->getName();\n }", "public function getDisplayName()\n {\n return $this->DisplayName;\n }", "public function getDescription()\n {\n return $this->getShortTitle();\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getName()\n {\n return isset($this->name) ? $this->name : '';\n }", "public function getShortName()\n {\n return Helper::getGatewayShortName(get_class($this));\n }", "public function getTitle() {\r\n\tif (!is_null($this->title))\r\n\t return $this->title;\r\n\telse\r\n\t return $this->name;\r\n }", "public function getShortDescription() {\n return $this->shortDesc;\n }", "public function get_full_name(){\n\t\treturn \"{$this->id}_full.png\";\n\t}", "public function name() { return $this->post->post_name; }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "public function getSynopsis(bool $short = false): string\n {\n $key = $short ? 'short' : 'long';\n\n if (!isset($this->synopsis[$key])) {\n $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short)));\n }\n\n return $this->synopsis[$key];\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }", "public function getName()\n {\n return $this->__get(\"name\");\n }" ]
[ "0.8082753", "0.8082753", "0.80470115", "0.80320585", "0.78876513", "0.787322", "0.7831776", "0.77869105", "0.77632815", "0.77409244", "0.7717981", "0.76782036", "0.7669078", "0.74990964", "0.7475929", "0.744115", "0.74065894", "0.7308346", "0.7182908", "0.7117368", "0.70965624", "0.70905674", "0.7089319", "0.7033685", "0.7032896", "0.69925356", "0.69884145", "0.6983356", "0.6967773", "0.6940118", "0.6927128", "0.69158876", "0.69049436", "0.6903058", "0.6903058", "0.68812704", "0.6870644", "0.6864639", "0.6859809", "0.68532944", "0.68366826", "0.68358856", "0.6823225", "0.68215907", "0.6799991", "0.67987275", "0.6795308", "0.6786125", "0.678126", "0.67808783", "0.67778546", "0.6772514", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.67497665", "0.673626", "0.67273283", "0.67273283", "0.67248964", "0.6720074", "0.6704158", "0.6698984", "0.66870356", "0.6682625", "0.6680047", "0.6672791", "0.66652167", "0.6662969", "0.6658681", "0.6658387", "0.6650406", "0.6647828", "0.6641008", "0.6637914", "0.66332406", "0.66332406", "0.66332406", "0.66332406", "0.6619845", "0.6618768", "0.6613885", "0.66128314", "0.6611225", "0.6603846", "0.6603152", "0.66009295", "0.66009295" ]
0.8277329
0
Sets the shortname for this article Since a shortname can not contain certain characters the new shortname is validated and possibly changed.
function setShortName($newShortName) { // we keep it simple, // a shortname can contain a-z 0-9 _ , . /* 48-57 number 65-90 a-z 97-122 A-Z 46 . 45 - 95 _ */ // a shortname must not be one of these $arrReservedWords = pb_shortname_reserved_words(); $convertTable = array( " " => "-", "å" => "a", "ä" => "a", "ö" => "o", "Å" => "a", "Ä" => "ä", "Ö" => "o" ); $validatedShortName = ''; // empty shortnames or only numbers is not ok $newShortName = trim($newShortName); if (empty($newShortName)) { $newShortName = trim($this->getTitleArticle()); if (empty($newShortName) || is_numeric($newShortName)) { $newShortName = "article"; } } // todo: this code should probably use the utf8-functions instead of this homebuilt utf-convert-thingie for ($i=0; $i<=strlen($newShortName); $i++) { #$char = $newShortName[$i]; // probs with chars like å, ä and ö $char = utf8_encode(substr(utf8_decode($newShortName), $i, 1)); if (array_key_exists($char, $convertTable)) { $char = $convertTable[$char]; } $code = ord($char); if ( ($code>=48 && $code <= 57) // number || ($code>=65 && $code <= 90) // a-z || ($code>=97 && $code <= 122) // A-Z || ($code == 45 || $code == 95) // - ) { // ok $validatedShortName .= $char; } } $validatedShortName = strtolower($validatedShortName); // we got a name, make sure its unique and not a reserved word if (in_array($validatedShortName, $arrReservedWords)) { $validatedShortName .= rand(1,9); } // no other article may have this name, mkay? // article that has isRevisionTo = this id is ok // or article that global $polarbear_db; $isUnique = false; while (!$isUnique) { $sql = " SELECT count(id) FROM " . POLARBEAR_DB_PREFIX . "_articles WHERE shortName = '$validatedShortName' AND id != $this->id AND (isRevisionTo IS NULL OR isRevisionTo IS NOT NULL AND isRevisionTo <> $this->id) AND status <> 'deleted' AND status <> 'preview' "; $isUnique = ! (int) $polarbear_db->get_var($sql); if (!$isUnique ) { $validatedShortName = $validatedShortName . rand(1,9999); } } $this->shortName = $validatedShortName; return $this->shortName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setShortName($shortName)\n {\n if (strlen($shortName) > 16) {\n throw new InvalidArgumentException(\"Input must be 16 characters or less\n in length!\");\n }\n $this->_shortName = $shortName;\n }", "public function set_Short_Title($str_Short_Title) {\n $this->short_title = $str_Short_Title;\n }", "public function setShortName(string $short_name)\n {\n $this->short_name = $short_name;\n\n return $this;\n }", "public function setShortName($shortName)\n {\n $this->shortName = $shortName;\n return $this;\n }", "public function set_full_name($full_name=\"\"){\n $this->full_name = $full_name;\n }", "public function setShortMessage(string $shortMessage)\n {\n $this->shortMessage = $shortMessage;\n }", "public function shortName()\n {\n if (strlen($this->name) > 30) {\n return '<span title=\"' . e($this->name) . '\">' . substr(e($this->name), 0, 28) . '...</span>';\n }\n return $this->name;\n }", "public function setShortDescription($shortDescription)\n {\n $this->shortDescription = (string) $shortDescription;\n }", "public function set_name( $name ) {\n\t\t$this->label = $name;\n\t\t$this->slug = sanitize_title_with_dashes( $name );\n\t}", "public function setShortname($shortname)\n {\n $this->shortname = $shortname;\n\n return $this;\n }", "protected function stTemplateVar($short_name)\n {\n $s = self::$settings[$short_name];\n\n $this->template->$short_name = Settings::get($s[self::ST_DB_NAME],\n $s[self::ST_DEFAULT_VALUE]);\n }", "function getshortName() {\n\t\treturn $this->shortName;\n\t}", "public function createShortDesc() {\n if (strlen($this->getDescription()) > 500) {\n $shortDesc = substr($this->getDescription(), 0, 500);\n $shortDesc = substr($shortDesc, 0, strrpos($shortDesc, ' ')) . '...';\n } else {\n $shortDesc = $this->getDescription();\n }\n $this->setShortDesc($shortDesc);\n }", "public function shortener(string $name = null);", "function set_first_name($first_name='*')\r\n{\r\n\t$this->first_name = '';\t\t// return\r\n\t\r\n\t// Get Random Name\r\n\tif ( $first_name == '*' )\r\n\t{\r\n\t\tif ( !isset($this->gender) ) $this->set_gender();\r\n\t\t$this->first_name = $this->_get_random_first_name($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->first_name = $first_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->first_name = ucwords($this->first_name);\r\n\t\r\n\t// adjust hyphenates\r\n\tif ( $_pos = strpos($this->first_name, '-') )\r\n\t{\r\n\t\t$this->first_name = substr($this->first_name, 0, $_pos+1) . '-' . ucwords( substr($this->first_name, $_pos+1) );\r\n\t}\r\n\t\r\n\treturn $this->first_name;\r\n}", "public function getShortname()\n {\n return $this->shortname;\n }", "function name($name)\n {\n $name = utf8ize($name);\n\n /* The shortname is a simple way to make sure people don't use names */\n /* that are too similar */\n /* FIXME: We should handle letters with accents, etc as well - */\n /* setting the character set to utf8 will probably work. */\n $shortname = strtolower(preg_replace('/[_\\W]+/', \"\", $name));\n\n if ($name != $this->name)\n $this->update['name'] = $name;\n if ($shortname != $this->shortname)\n $this->update['shortname'] = $shortname;\n\n $this->name = $name;\n $this->shortname = $shortname;\n\n return true;\n }", "private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "private function setName(string $name)\n {\n $this->name = trim($name);\n }", "public function shortName();", "public function setTitle($title)\n {\n if(strlen($title) <= 50 && strlen($title) > 0 && preg_match('#^[a-zA-Z0-9- ]*$#', $title)) {\n $this->title = $title;\n }\n }", "function getDisplayName($short = false) {\n if($this->display_name === false) {\n if($this->getFirstName() && $this->getLastName()) {\n if($short) {\n return $this->getFirstName() . ' ' . substr_utf($this->getLastName(), 0, 1) . '.';\n } // if\n\n $this->display_name = $this->getFirstName() . ' ' . $this->getLastName();\n } elseif($this->getFirstName()) {\n $this->display_name = $this->getFirstName();\n } elseif($this->getLastName()) {\n $this->display_name = $this->getLastName();\n } else {\n $this->display_name = $this->getEmail();\n } // if\n } // if\n\n return $this->display_name;\n }", "function setName( $family='', $first='', $additional='', $prefix='', $suffix='' )\n {\n $this->properties[\"N\"] = \"$family;$first;$additional;$prefix;$suffix\";\n $this->setFormattedName( trim( \"$prefix $first $additional $family $suffix\" ) );\n }", "public function setFullname($fullname)\n {\n $this->_fullname = $fullname;\n }", "protected function setSiteName() {\r\n\t\t$this->siteName = trim($this->settings['site']['siteName']);\r\n\t}", "public function SetEntityName($strName) {\n if(!is_string($strName) || !strlen(trim($strName))) {\n $this->SetGoodToGo(false);\n $this->XaoThrow(\n \"Entity name needs to be a valid string.\"\n , debug_backtrace()\n );\n return;\n }\n $strName = trim($strName);\n if(strlen($strName) > 256) {\n $this->XaoThrow(\n \"Entity name should be short. Specified name was: \".$strName\n , debug_backtrace()\n );\n }\n $this->strName = $strName;\n }", "public function set_name($title)\n {\n if (!empty($title)) {\n $this->title = Database::escape_string($title);\n }\n }", "function getName($short = false) {\n return $this->getDisplayName($short);\n }", "public function setName ($name){\n\t\tif($name){\n\t\t\t$this->Item['name'] = substr($name, 0,100);\n\t\t}\n\t}", "public function setFirstName($newFirstName) {\n //sanitize the string\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->firstName = $newFirstName;\n }", "function setFirstName($name)\n {\n $this->addParam('first_name', (string)$name);\n }", "public function getShortName(){\n return mb_strimwidth($this->name, 0, 25, '...');\n }", "function getShortName() \n {\n return $this->_shortName;\n }", "public function shortTitle()\n {\n if (!$this->title_short()->empty()) {\n $shortTitle = $this->title_short();\n } else {\n $shortTitle = $this->title();\n };\n\n return $shortTitle;\n }", "public function setShort($short) {\n $this->short = $short;\n return $this;\n }", "public function getShortName()\n {\n return $this->shortName;\n }", "public function getShortName()\n {\n return $this->shortName;\n }", "public function setName($_name)\n {\n if (is_string($_name)) {\n \t$this->_name = $_name;\n }\n }", "public function setFullNameAttribute($name)\n {\n $parts = explode(' ', $name);\n $this->first_name = $parts[0];\n $this->last_name = $parts[count($parts) - 1];\n }", "public function getShortName():string\n {\n return $this->short_name;\n }", "public function setFirstname(string $firstname): void\n {\n $this->_firstname = $firstname;\n }", "public function shortName($short)\n\t{\n\t\t$query = $this->createQueryBuilder('tn')\n ->where('tn.short_name = \\''.$short.'\\'')\n ->getQuery();\n return $query->getResult();\n\t}", "public function getShortName() {\n return $this->shortName;\n }", "public function setFirstName(string $first_name): void\n {\n $this->_first_name = $first_name;\n }", "public function SetFullName ($fullName);", "public function get_Short_Title() {\n return $this->short_title;\n }", "public function setShort_desc ($short_desc) {\n\t$this->short_desc = $short_desc;\n\treturn $this;\n}", "function setLongName($longName)\n {\n if (strlen($longName) > 48) {\n throw new InvalidArgumentException(\"Input must be 48 characters or less\n in length!\");\n }\n $this->_longName = $longName;\n }", "public function shortName(): String\n {\n return $this->shortNames[$this->suit];\n }", "public function get_short_entry_title()\n {\n if (strlen($this->hero_shorter_title) > 0) {\n return $this->hero_shorter_title;\n }\n\n return $this->title;\n }", "function setDisplayName($name){\n\t\t$this->display_name =$name;\n\t}", "function isValidShortName($name) {\n return preg_match('#^[a-z0-9]+$#i', $name);\n}", "public function set_name($new_name) {\r\n\t\t$this->name = strtoupper($new_name);\r\n\t}", "function set_name(string $name) {\n\t\t$tmp = preg_match('/[^a-zA-Z0-9_-]/', $name);\n\t\tif ($tmp) {\n\t\t\tthrow new ArgException(\"Invalid chars in slide name.\");\n\t\t} else if ($tmp === NULL) {\n\t\t\tthrow new IntException(\"Regex match failed.\");\n\t\t}\n\n\t\t// Check name length.\n\t\tif (strlen($name) === 0) {\n\t\t\tthrow new ArgException(\"Invalid empty slide name.\");\n\t\t} else if (strlen($name) > gtlim('SLIDE_NAME_MAX_LEN')) {\n\t\t\tthrow new ArgException(\"Slide name too long.\");\n\t\t}\n\t\t$this->name = $name;\n\t}", "public function getShortName();", "public function setFirstnameAttribute($value)\n {\n $this->attributes['firstname'] = title_case(trim($value));\n }", "public function setName($string)\r\n {\r\n $this->_name = $string;\r\n }", "public function setInternalName( $value ) { $this->_internalName = $value; }", "public function getShortName() {}", "public function setFirstName(string $firstName): void\n {\n $this->firstName = $firstName;\n }", "public function setName($name) {\n\t\t$this->_name = (string)$name;\n\t}", "public function setFirstName($first_name)\n\t{\n\t\t$this->first_name = $first_name;\n\t}", "public function setFirstName(String $firstName)\n {\n $this->firstName = $firstName;\n }", "private function setFullName($fullName)\n {\n if(strlen($fullName) < 3)\n throw new \\InvalidArgumentException('Full name must be at least 3 characters in length.');\n\n $this->fullName = $fullName;\n }", "public function get_shortname(){\n\t\treturn $this->_shortname;\n\t}", "public function setFirstname($firstname) {\n\t\t$this->firstname = $firstname;\n\t}", "public function setAreaShortName($area_short_name)\n {\n $this->area_short_name = $area_short_name;\n\n return $this;\n }", "public function setFirstname($firstname) {\n $this->firstname = $firstname;\n }", "protected function setMetaTitle() {\r\n\t\t$partStg = trim($this->settings['news']['semantic']['general']['metaTitle']);\r\n\t\tif (is_int(strpos($partStg, '+'))) {\r\n\t\t\t$parts = t3lib_div::trimExplode('+', $partStg);\r\n\t\t\tforeach ($parts as $part) {\r\n\t\t\t\t$action = 'get' . ucfirst($part);\r\n\t\t\t\t$value = $this->newsItem->$action();\r\n\t\t\t\tif ($value !== '') {\r\n\t\t\t\t\t$data[] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->metaTitle = implode(': ', $data);\r\n\t\t} elseif (is_int(strpos($partStg, '//'))) {\r\n\t\t\t$parts = t3lib_div::trimExplode('//', $partStg);\r\n\t\t\tforeach ($parts as $part) {\r\n\t\t\t\t$action = 'get' . ucfirst($part);\r\n\t\t\t\t$data = $this->newsItem->$action();\r\n\t\t\t\tif ($data !== '') {\r\n\t\t\t\t\t$this->metaTitle = $data;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$action = 'get' . ucfirst($partStg);\r\n\t\t\t$this->metaTitle = $this->newsItem->$action();\r\n\t\t}\r\n\t}", "private function setBrandName() {\n\t\t$wordName = htmlspecialchars_decode(urldecode($this->request->REQUEST['word_name']));\n\t\tif (!empty($wordName)) {\n\t\t\t$this->wordName = $wordName;\t\n\t\t}\n\t\treturn TRUE;\n\t}", "public function setName($var)\n {\n GPBUtil::checkString($var, False);\n $this->name = $var;\n }", "public function setName($var)\n {\n GPBUtil::checkString($var, True);\n $this->name = $var;\n }", "public function setName($var)\n {\n GPBUtil::checkString($var, True);\n $this->name = $var;\n }", "public function setName($var)\n {\n GPBUtil::checkString($var, True);\n $this->name = $var;\n }", "public function setName($var)\n {\n GPBUtil::checkString($var, True);\n $this->name = $var;\n }", "public function setName($var)\n {\n GPBUtil::checkString($var, True);\n $this->name = $var;\n }", "public function setName($name)\n {\n $this->_name = (string)$name;\n }", "public function set_firstname($firstname) {\n $this->firstname = $firstname;\n }", "public function setADFirstName($firstName)\n\t{\n\t\t$this->firstName = $firstName;\n\t}", "function vnit_change_title($alias) {\r\n\t\r\n\t$alias = vnit_EncString ( $alias );\r\n\t\r\n\t$search = array ('&amp;', '&#039;', '&quot;', '&lt;', '&gt;', '&#x005C;', '&#x002F;', '&#40;', '&#41;', '&#42;', '&#91;', '&#93;', '&#33;', '&#x3D;', '&#x23;', '&#x25;', '&#x5E;', '&#x3A;', '&#x7B;', '&#x7D;', '&#x60;', '&#x7E;' );\r\n\t\r\n\t$alias = str_replace ( $search, \" \", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/([^a-z0-9-\\s])/is\", \"\", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/[\\s]+/\", \" \", $alias );\r\n\t\r\n\t$alias = preg_replace ( \"/\\s/\", \"-\", $alias );\r\n\t\r\n\t$alias = preg_replace ( '/(\\-)$/', '', $alias );\r\n\t\r\n\t$alias = preg_replace ( '/^(\\-)/', '', $alias );\r\n\t\r\n\t$alias = preg_replace ( '/[\\-]+/', '-', $alias );\r\n\t\r\n\treturn strtolower ( $alias );\r\n\r\n}", "public function setNameAttribute($name)\n\t{\n\t\t$this->attributes['name'] = $name;\n\t\t$this->attributes['slug'] = $this->generateSlug($name);\n\t}", "public function setNameAttribute( $value ) {\n\t\t$this->attributes['name'] = $value;\n\t\t$this->attributes['slug'] = str_slug( $value );\n\t}", "public function setName($x) { $this->name = $x; }", "function setRealname($realname){\n $this->realname = $realname;\n }", "public function setFirstname(string $newFirstname)\n\t{\n\t if (strlen($newFirstname) <= 3 && strlen($newFirstname) >=20) {\n\t $this->firstname = $newFirstname;\n\t return $this;\n\t }else{\n\t echo \"Choose a name between 3 to 20 Characters\"\n\t throw new Exception();\n\t }\n\t}", "private function setName($name) {\n if (is_string($name)) {\n $this->name = $name;\n }\n }", "function set_admin_name($name) {\n $this->admin_name = $name;\n }", "public function setFirstname($value)\n {\n $this->_firstname = $value;\n }", "public function setName($name) {\n\t\t$this->_name = $name;\n\t}", "public function setName($x) {\n $this->name = $x;\n }", "public function onBeforeWrite()\n {\n if (empty($this->Name)) {\n $str = preg_replace('/[^a-z0-9]+/i', ' ', $this->Title);\n $str = trim($str);\n $str = ucwords($str);\n $this->Name = str_replace(\" \", \"\", $str);\n }\n\n parent::onBeforeWrite();\n }", "protected function setName($value)\n\t{\n\t\t$this->name = $value;\n\t}", "protected function setName($value)\n\t{\n\t\t$this->name = $value;\n\t}", "public function _validWikName($str)\n\t{\n\t\tif (preg_match('/[^a-z0-9\\-\\_]/i', $str))\n\t\t{\n\t\t\tee()->form_validation->set_message('_validWikName', lang('invalid_short_name'));\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function setNameAttribute($value)\n {\n $this->attributes['name'] = trim(strtolower($value));\n }", "public function setNameEn($name_en)\n {\n $this->setName(sprintf(\"en:%s;fr:%s\", $name_en, $this->getNameFr()));\n }", "function setSingularName($setTaxonomySingularName) {\n $this->taxonomySingularName = $setTaxonomySingularName;\n }", "public function getShortName()\n {\n return trim($this->first_name . ' ' . ($this->last_name ? $this->last_name{0} . '.' : ''));\n }", "private function _set_movie_name($file_name){\n\t\t\n\t\t$this->movie_name = preg_replace('/(\\_|\\.|\\-|\\[|\\]|\\(|\\)|\\{|\\})/', ' ', $file_name);\n\t\t\n\t\tforeach($this->remove_from_title as $key => $patern){\n\t\t\t$this->remove_from_title[$key] = '/(\\s'.$patern.'\\s)/i';\n\t\t}\n\t\t$this->movie_name = preg_replace($this->remove_from_title, '', ' '.$this->movie_name.' ');\n\t\t$this->movie_name = preg_replace('/([\\s\\s]+)/', ' ', trim($this->movie_name));\n\t\t$this->movie_name = preg_replace_callback('%[0-9]{4}(?!.*[0-9]{4}.*)(.*)%', create_function('$match', 'return substr($match[0], 0, 4);'), $this->movie_name);\n\t}", "public function setName($strName)\n\t{\n\t\t$this->name = $strName;\n\t}" ]
[ "0.7796682", "0.73806196", "0.69870585", "0.68049914", "0.6706634", "0.6396947", "0.6278543", "0.61932653", "0.614404", "0.6088412", "0.6042589", "0.60007316", "0.60005105", "0.59791195", "0.5974426", "0.5969552", "0.5910076", "0.5898393", "0.58786386", "0.58748", "0.58625597", "0.5842442", "0.58401006", "0.58283836", "0.58265865", "0.5825426", "0.57841223", "0.57828176", "0.5778047", "0.5770148", "0.57508475", "0.5728527", "0.5728129", "0.571618", "0.5715004", "0.5707806", "0.5707806", "0.56944305", "0.5693053", "0.56849855", "0.5682108", "0.56805384", "0.5679498", "0.56699884", "0.5647022", "0.56300503", "0.55971813", "0.5587948", "0.5583462", "0.55834377", "0.5572955", "0.55647016", "0.556438", "0.55557746", "0.5548698", "0.5540698", "0.55387104", "0.55324644", "0.55295444", "0.5521004", "0.5512819", "0.55007106", "0.55000824", "0.54916567", "0.5486452", "0.54808617", "0.5478753", "0.5444613", "0.544102", "0.54409665", "0.5438273", "0.54191816", "0.54191816", "0.54191816", "0.54191816", "0.54191816", "0.54183155", "0.54161555", "0.54085857", "0.540563", "0.5404258", "0.5402714", "0.53967315", "0.5394722", "0.53903025", "0.5389647", "0.53877527", "0.538368", "0.5379778", "0.53790355", "0.5378325", "0.5372539", "0.5372539", "0.5364765", "0.53563553", "0.5351887", "0.5350949", "0.5344839", "0.5343185", "0.5338801" ]
0.8073771
0
gets the previous published article
function prevArticle() { $parent = $this->parent(); if (!$parent) { return false; } $parentChildren = $parent->children(); $aCount = sizeof($parentChildren); $foundAtPos=null; for ($i=0;$i<$aCount;$i++) { if ($parentChildren[$i]->getId() == $this->getId()) { $foundAtPos=($i-1); break; } } if ($foundAtPos>=0) { return $parentChildren[$foundAtPos]; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPreviousArticle() {\n return ArticleLanguageVersion::join('article', 'translated_article.article_id', '=', 'article.id')\n ->where('article.created', '<', $this->article->created)\n ->where('translated_article.language', $this->articleLanguageVersion->language)\n ->where('translated_article.published', true)\n ->orderBy('article.created', 'DESC')\n ->first();\n }", "public function getPrevious(Article $article){\n $qb = $this->createQueryBuilder('a')\n ->where('a.published = true')\n ->andWhere('a.date < :givendate')\n ->orderBy('a.date', 'DESC')\n ->setParameter('givendate', $article->getDate())\n ->setFirstResult(0)\n ->setMaxResults(1);\n \n return $qb->getQuery()->getOneOrNullResult();\n }", "public function getPrevious() {}", "public function getPrevious();", "public function getPreviousPost()\n\t{\n\t\treturn static::find()\n\t\t\t->where('id < :id', [':id' => $this->id])\n\t\t\t->orderBy('time_create DESC')->limit(1)->One();\n\t}", "function previous_post($format = '%', $previous = 'previous post: ', $title = 'yes', $in_same_cat = 'no', $limitprev = 1, $excluded_categories = '')\n {\n }", "function prevPage() {\n\t\treturn $this->hasPrevPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "public function previous() {\r\n return prev($this->collection);\r\n }", "public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}", "public function getPrev() {\n\t\treturn $this->pagefiles->getPrev($this); \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}", "public function getPreviousPage();", "function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}", "public function getPrevious(ArticleRepository $repo)\n {\n $articles = $repo->findBy([],['id'=>'DESC'],6);\n return $this->json($articles);\n }", "final public function getPrevious() {\n\t\treturn null;\n\t}", "function get_previous_post($in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "public function getPrev()\n {\n return self::find()->where(['<', 'id', $this->id])->orderBy(['id' => SORT_DESC])->limit(1)->one();\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getPrevLink()\n {\n return $this->getAlbum()->getPrevLink($this);\n }", "public function Previous()\n {\n return parent::Previous();\n }", "public function previousPage()\n {\n return$this->currentPage - 1;\n }", "public function getPreviousUrl() {\r\n\t\treturn $this->Session->read('history.current');\r\n\t}", "public function getPrevious()\n {\n return $this->hasPrevious() ? $this->curPage - 1 : null;\n }", "public function previous_page(){\n if($this->current_page > 1){\n return $this->current_page - 1;\n }\n else{\n return NULL;\n }\n }", "public function prev_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() - 1);\n\t}", "public function previousElement();", "private function prevLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('last sunday', strtotime($time . ' +1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . ' -1 week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '-1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 -1month'));\n }\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }", "public function getNextArticle() {\n return ArticleLanguageVersion::join('article', 'translated_article.article_id', '=', 'article.id')\n ->where('article.created', '>', $this->article->created)\n ->where('translated_article.language', $this->articleLanguageVersion->language)\n ->where('translated_article.published', true)\n ->orderBy('article.created')\n ->first();\n }", "public function getPrevPage()\n {\n return $this->prevPage;\n }", "public function prev()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getBefore();\n }\n }", "public function getPrevious()\n {\n $objPrevious = \\Database::getInstance()->prepare(\"SELECT project FROM tl_page_ac_project WHERE pid=? AND sorting<(SELECT sorting FROM tl_page_ac_project WHERE project=?) ORDER BY sorting DESC\")\n ->limit(1)\n ->execute($this->page, $this->id);\n\n if (!$objPrevious->numRows)\n {\n return null;\n }\n\n $t = static::$strTable;\n $arrColumns[] = \"$t.id=?\";\n\n if (!BE_USER_LOGGED_IN)\n {\n $arrColumns[] = \"$t.published=1\";\n }\n\n return static::findOneBy($arrColumns, $objPrevious->project);\n }", "public function getPreviousPageUrl();", "public function getPreviousPageUrl();", "public function previous(): static\n {\n $link = Arr::get($this->links, 'prev');\n\n throw_unless($link, NoPreviousPageException::class);\n\n return $this->getResults($link);\n }", "function prev() {\n\n $next = $this->find('first', array('conditions'=>array('position <'=>$this->data['Ringsite']['position']),\n 'order'=>'position DESC'));\n\n if (empty($next)) {\n $next = $this->find('first', array('conditions'=>array('position >='=>0),\n 'order'=>'position DESC'));\n }\n\n return $next;\n }", "public function getPreviousObject()\n {\n return $this->__object;\n }", "public function previous_day()\n {\n return $this->subDay();\n }", "public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }", "public function getPrevious()\n {\n $prev = $this;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($c === $this) {\n $find=true;\n break;\n }\n if (!$find) {\n $prev = $c;\n }\n }\n }\n return $prev;\n }", "function previous_post_smart( $format = '%link', $title = '%title', $fallback = true, $in_same_cat = true, $excluded_categories = '' ) {\n\treturn Smarter_Navigation::adjacent_post( $format, $title, true, $fallback, $in_same_cat, $excluded_categories );\n}", "static public function getPrevPage() {\n\t\treturn self::$prev_page;\n\t}", "public function getPreviousValue();", "public function PrevLink()\n {\n if ($this->NotFirstPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() - $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }", "public function getPreviousPage()\n\t{\n\t\treturn $this->previousPage;\n\t}", "public function previousVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->limit(1)->offset(1)->first();\n }", "public function get_previous() { return $this->getPrevious(); }", "public function prev()\n {\n return prev($this->steps);\n }", "public function prevpage() {\n return $this->current_page - 1;\n }", "public function getPreviousPageNumber(): int;", "public function getPreviousPageUrl()\n {\n return $this->previousPageUrl;\n }", "public function previous(): int;", "function get_previous_posts_page_link()\n {\n }", "function PreviousUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id - 1;\n\t\t// if id=0 this is the first article, so don't show text\n\t\tif ($new_id == 0){\n\t\t\treturn \"\";\n\t\t// jump an article because this is deleted\n\t\t}else if (file_exists($path . $new_id) == false){\n\t\t\treturn PreviousUrl($new_id, $text);\n\t\t}else{\n\t\t\t$string = '<a href=\"' . ARTICLE_HOME . '?id=' . $new_id . '\">' . $text . '</a>';\n\t\t\treturn $string;\n\t\t}\n \t}", "private function previous()\n {\n $this->m--;\n $this->init();\n }", "public function previousPage() {\r\n\t\t$intReturn = ($this->getCurrentPage() - 1 > 0) ? ($this->getCurrentPage() - 1) : 1;\r\n\r\n\t\treturn $intReturn;\r\n\t}", "public function getPrevious() {\r\n $previousDate = $this->getStartDate();\r\n $previousDate->modify('-1 ' . $this->getMode());\r\n\r\n return $previousDate->getTimestamp();\r\n }", "function get_previous_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->previous();\n}", "public function getPreviousVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 1 ? $versions[1] : 0;\n }", "public function previousPage()\n\t{\n\t\treturn $this->getIsPreviousPageAvailable() ? parent::previousPage() : false;\n\t}", "function previous_posts($display = \\true)\n {\n }", "public function previous()\n {\n return $this->getHeaders()['HTTP_REFERER'];\n }", "public function previousItem() {\n\t\treturn $this->previous()->current();\n\t}", "public function getPrevSibling();", "public function getPreviousUrl(): ?string\n {\n // Any records haven't been saved so far\n if (!is_array($this->session->getSession()['url-history'])) {\n return null;\n }\n\n // -1 -> convert to numbering from 0, -1 -> move to penultimate key\n $penultimateUrlKey = count($this->session->getSession()['url-history']) - 2;\n\n if ($penultimateUrlKey >= 0) {\n return $this->session->getUrlHistory()[$penultimateUrlKey];\n } else {\n return null;\n }\n }", "public function prev()\n {\n --$this->offset;\n }", "public function getPrev(): ?LinkInterface;", "public function getPrevious($field);", "function prev_url($url)\n {\n \n $page = curl_get_file($url);\n //To find prev url\n $regex = '@<link\\s*rel=\"prev\"\\s*href=\"(.*)?\"@';\n preg_match($regex,$page,$u);\n if($u == null)\n return null;\n else \n return $u[1];\n }", "function prev_post_rel_link($title = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "public function getPreviousPage() {\n\t\tif (($this->currentPage - 1) <= 0) {\n\t\t\t$this->currentPage = $this->countPages();\n\t\t\treturn $this->currentPage;\n\t\t} else {\n\t\t\treturn --$this->currentPage;\n\t\t}\n\t}", "public function previousPageTitle()\n {\n $page = $this->structure->getPreviousPage($this->currentPage);\n\n return $page ? $this->pageGuide->getTitle($page) : null;\n }", "public function previousPageUrl()\n {\n $this->resetQuery();\n\n if ($this->currentPage() > 2) {\n $this->appends('end', session()->get('accountant.api.end'));\n }\n\n return parent::previousPageUrl();\n }", "public function getPrev()\n {\n return base64_encode($this->prev);\n }", "protected function getPreviousUrl()\n {\n $slug = array_last($this->memory->getPageHistory());\n\n if (null === $slug || false === $slug) {\n return null;\n }\n\n if ($slug === WikiMemory::INDEX_SLUG) {\n return cms_route('wiki.page.index');\n }\n\n return cms_route('wiki.page', [ $slug ]);\n }", "public function previousAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $issue = $em->getRepository('BorrowersIssueBundle:Issue')->findPreviousIssue();\n\n if (!$issue) {\n throw $this->createNotFoundException('Unable to find Issue entity.');\n }\n\n return array('issue' => $issue,);\n }", "function previousWeek(){ return $this->_getDate(-7); }", "function previousDay($interval=1){ return $this->_getDate(-$interval); }", "public function getPrevText()\n {\n return _t(__CLASS__ . '.PREVIOUS', 'Previous');\n }", "public function previousPageUrl()\n {\n $previousPage = $this->structure->getPreviousPage($this->currentPage);\n if ($previousPage) {\n return $this->structure->getUrl($this->currentPage, $previousPage);\n }\n\n return;\n }", "function dsq_prev_permalink($post_id) {\n\t$post = get_post($post_id);\n\tif ($post->post_status != 'publish') {\n\t\treturn;\n\t}\n\tglobal $dsq_prev_permalinks;\n\t$dsq_prev_permalinks['post_'.$post_id] = get_permalink($post_id);\n}", "public static function previous_post_link () : void\n {\n add_filter(\"previous_post_link\", function ($output) {\n $previousPost = get_adjacent_post();\n \n if ($previousPost !== '') {\n $previousPostTitle = strlen(get_the_title($previousPost)) > 30 ? substr(get_the_title($previousPost), 0, 30) . \"...\" : get_the_title($previousPost);\n\n $output = '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\">' . get_the_post_thumbnail($previousPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><span class=\"lnr text-white ti-arrow-left\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"detials\">';\n $output .= '<p>' . __(\"Prev Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($previousPost). '\"><h4>' . $previousPostTitle . '</h4></a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n \n return $output;\n });\n }", "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 getPreviousVersionID()\n {\n return $this->previousVersionID;\n }", "function nextPrevArticleName($order) {\n\tglobal $activePages, $currentArticle; //\n\t$keys = array_keys($activePages); \n\t$position = array_search($currentArticle, $keys); \n\tif (isset($keys[$position + 1]) || isset($keys[$position - 1])) { \n\t\t$nextPrevArticleName = $order == 'next' ? $keys[$position + 1] : $keys[$position - 1];\n\t}\n\treturn $nextPrevArticleName;\n}", "function get_previous_post_id( $post_id ) {\n\t // Get a global post reference since get_adjacent_post() references it\n\t global $post;\n\t // Store the existing post object for later so we don't lose it\n\t $oldGlobal = $post;\n\t // Get the post object for the specified post and place it in the global variable\n\t $post = get_post( $post_id );\n\t // Get the post object for the previous post\n\t $previous_post = get_previous_post();\n\t // Reset our global object\n\t $post = $oldGlobal;\n\t if ( '' == $previous_post )\n\t return 0;\n\t return $previous_post->ID;\n\t}", "public function PrevPage()\n {\n if ($this->m_CurrentPage <= 1)\n $this->m_CurrentPage = 1;\n else \n $this->m_CurrentPage--;\n return $this->ReRender();\n }", "function previousPage()\n\t\t{\n\t\t\tif(!$this->hasPrevious())\n\t\t\t\tthrow new Exception(\"Page out of bounds\");\n\t\t\t\t\n\t\t\t$this->currentPage--;\n\t\t}", "public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }", "public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }", "public function getPrev($criteria = null)\n\t{\n\t\treturn $this->_getRelativeElement($criteria, -1);\n\t}", "function previous_post_link($format = '&laquo; %link', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "protected function previous($text)\n\t{\n\t\treturn $this->backwards(__FUNCTION__, $text, $this->page - 1);\n\t}", "public function loadPreviousSibling()\n {\n $id = $this->_cache->getBackend()->getPreviousSiblingId($this);\n return $this->setPreviousSiblingId($id);\n }", "public function previous()\n {\n $this->cursor--;\n }", "#[\\ReturnTypeWillChange]\n public function prev()\n {\n $value = prev($this->_data);\n return key($this->_data) !== null ? $value : null;\n }", "public function Previous()\n {\n $item = false;\n if ($this->getItemPointer() >= 0) {\n $item = $this->Current();\n $this->setItemPointer($this->getItemPointer() - 1);\n }\n\n return $item;\n }", "function ts_get_prev_slider_text()\r\n{\r\n\treturn SLIDER_PREV_TEXT;\r\n}", "public function previousPage()\n\t{\n\t\t$this->_currentPage--;\n\n\t\tif ($this->_currentPage < 0) {\n\t\t\t$this->_currentPage = $this->count()-1;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function previous_question()\n {\n\n $offset = $this->input->post('offset');\n $offset = ($offset - 1 < 0) ? 0 : $offset - 1;\n $this->session->set_userdata('offset', $offset);\n\n $question = $this->OnlineExam->getPreviousQuestion($this->input->post('id'), $offset);\n\n $this->get_question_view($question, $offset);\n die;\n }" ]
[ "0.80965644", "0.7494172", "0.72369367", "0.70843303", "0.70685524", "0.7001448", "0.69961494", "0.69523007", "0.6924606", "0.6908015", "0.68887955", "0.68739927", "0.68441105", "0.6774995", "0.67562634", "0.67459005", "0.67010295", "0.6700513", "0.6700513", "0.6683991", "0.6612179", "0.6600172", "0.65433145", "0.65397656", "0.65373373", "0.65350825", "0.65188116", "0.6505952", "0.6497952", "0.6475381", "0.6470903", "0.6462208", "0.64462024", "0.64462024", "0.6441499", "0.6441128", "0.644025", "0.64342123", "0.6426228", "0.64198273", "0.6402665", "0.6399665", "0.63723", "0.63643074", "0.6364187", "0.6362855", "0.63586324", "0.6337278", "0.6330201", "0.6317353", "0.62867874", "0.62804645", "0.62575614", "0.6215207", "0.6209133", "0.6204469", "0.6176732", "0.61701655", "0.61657506", "0.61521196", "0.6150979", "0.613517", "0.6125588", "0.61048", "0.6099781", "0.6097649", "0.60930085", "0.60927224", "0.60925967", "0.60820866", "0.60742277", "0.60735124", "0.6064399", "0.6063405", "0.60609233", "0.6050744", "0.6048035", "0.6029317", "0.60283846", "0.602247", "0.6016972", "0.60090756", "0.59783727", "0.5973628", "0.5972581", "0.5968671", "0.59652895", "0.59582216", "0.5956596", "0.5956596", "0.5955569", "0.5949419", "0.5948877", "0.5940656", "0.5934662", "0.59251344", "0.59051955", "0.59042716", "0.5902785", "0.5895026" ]
0.6872631
12
gets the next published article
function nextArticle() { $parent = $this->parent(); if (!$parent) { return false; } $parentChildren = $parent->children(); $aCount = sizeof($parentChildren); $foundAtPos=null; for ($i=0;$i<$aCount;$i++) { if ($parentChildren[$i]->getId() == $this->getId()) { $foundAtPos=($i+1); break; } } if ($foundAtPos>=0 && $foundAtPos<$aCount) { return $parentChildren[$foundAtPos]; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNextArticle() {\n return ArticleLanguageVersion::join('article', 'translated_article.article_id', '=', 'article.id')\n ->where('article.created', '>', $this->article->created)\n ->where('translated_article.language', $this->articleLanguageVersion->language)\n ->where('translated_article.published', true)\n ->orderBy('article.created')\n ->first();\n }", "public function getNext(Article $article){\n $qb = $this->createQueryBuilder('a')\n ->where('a.published = true')\n ->andWhere('a.date > :givendate')\n ->orderBy('a.date', 'ASC')\n ->setParameter('givendate', $article->getDate())\n ->setFirstResult(0)\n ->setMaxResults(1);\n \n return $qb->getQuery()->getOneOrNullResult();\n }", "function nextPage() {\n\t\treturn $this->hasNextPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "function next_post($format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '')\n {\n }", "public function getNextPage();", "public function next_post()\n {\n }", "public function getNextPost()\n\t{\n\t\treturn static::find()\n\t\t\t->where('id > :id', [':id' => $this->id])\n\t\t\t->orderBy('time_create ASC')->limit(1)->One();\n\t}", "public function getNext() {}", "public function getNext() {}", "public function getNext();", "public function getNext();", "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}", "private function nextLink()\n {\n $y = $this->year;\n $d = intval($this->day);\n $d = $d < 10 ? '0' . $d : $d;\n $m = intval($this->month);\n $m = $m < 10 ? '0' . $m : $m;\n\n $time = $y . '-' . $m . '-' . $d;\n\n if ($this->view == \"week\") {\n $time = strtotime('next sunday', strtotime($time . ' -1 day'));\n $time = date('Y-m-d', $time);\n $time = date('Y-m-d', strtotime($time . '+1week'));\n } elseif ($this->view == \"day\") {\n $time = date('Y-m-d', strtotime($time . '+1day'));\n } else {\n $time = date('Y-m', strtotime($y . '-' . $m . '-01 +1month'));\n }\n\n $url = $this->basePath . '?cdate=' . $time;\n return $url . $this->getOldGET();\n }", "public function next_link()\n\t{\n\t\treturn $this->link_to_page($this->get_cur_page() + 1);\n\t}", "public function getNextPageUrl();", "public function getNextPageUrl();", "public function getNextLink()\n {\n return $this->getAlbum()->getNextLink($this);\n }", "function get_next_post($in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "function getNext();", "public function getNext()\n {\n return self::find()->where(['>', 'id', $this->id])->limit(1)->one();\n }", "function get_next_posts_page_link($max_page = 0)\n {\n }", "public function next() { \n\t\t$page = &$this->touchPage();\n\t\t\n\t\tnext($page);\n\t\t\n\t\tif(key($page) === null && count($page) == $this->booksPerPage) {\n\t\t\t$this->currentPage++;\n\t\t\t$page = &$this->touchPage();\n\t\t\treset($page);\n\t\t}\n\t\t\n\t\treturn current($page);\n\t}", "public function getNextDocumentNumber() {\n \n }", "public function getNextPageNumber(): int;", "public function getNext()\n {\n $objNext = \\Database::getInstance()->prepare(\"SELECT project FROM tl_page_ac_project WHERE pid=? AND sorting>(SELECT sorting FROM tl_page_ac_project WHERE project=?) ORDER BY sorting\")\n ->limit(1)\n ->execute($this->page, $this->id);\n\n if (!$objNext->numRows)\n {\n return null;\n }\n\n $t = static::$strTable;\n $arrColumns[] = \"$t.id=?\";\n\n if (!BE_USER_LOGGED_IN)\n {\n $arrColumns[] = \"$t.published=1\";\n }\n\n return static::findOneBy($arrColumns, $objNext->project);\n }", "public function getNext()\n {\n return $this->hasNext() ? $this->curPage + 1 : null;\n }", "public function getNext() \n {\n $page_next = $this->page_current + 1;\n \n if($this->page_current >= $this->num_pages) {\n\t\t $page_next = $this->num_pages;\n } \n \n return $page_next;\n }", "public function getNextEpisodeReleaseDate()\n {\n return $this->next_episode_release_date;\n }", "public function next()\n {\n $this->incrIndex();\n\n return $this->getCurrent();\n }", "public function next()\n {\n return $this->pager->next();\n }", "function NextUrl($id, $text)\n\t{\n\t\t$path = ARTICLE;\n\t\t$new_id = $id + 1;\n\t\t$last = LastArticle('parameters/last_article_id');\n\t\tif ($new_id > (int)$last)\n\t\t{\n\t\t\treturn \"\";\t\n\t\t// jump an article because this is deleted\n\t\t}else if (file_exists($path . $new_id) == false){\n\t\t\treturn NextUrl($new_id, $text);\t\n\t\t}else{\n\t\t\t$string = '<a href=\"' . ARTICLE_HOME . '?id=' . $new_id . '\">' . $text . '</a>';\n\t\t\treturn $string;\n\t\t}\n \t}", "public function getNext()\n {\n return $this->next;\n }", "function get_next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "function next_posts($max_page = 0, $display = \\true)\n {\n }", "static public function getNextPage() {\n\t\treturn self::$next_page;\n\t}", "public function getNextPage()\n {\n return $this->nextPage;\n }", "public function nextEvent() {\n\t\t$events = $this->client->getGroupEvents( [\n\t\t\t'urlname' => $this->group,\n\t\t\t'scroll' => 'next_upcoming',\n\t\t] );\n\n\t\treturn $events[0];\n\t}", "public function NextLink()\n {\n if ($this->NotLastPage()) {\n return HTTP::setGetVar(\n $this->getPaginationGetVar(),\n $this->getPageStart() + $this->getPageLength(),\n ($this->request instanceof HTTPRequest) ? $this->request->getURL(true) : null\n );\n }\n }", "public function getNextPage()\n\t{\n\t\treturn $this->nextPage;\n\t}", "function get_next_posts_link($label = \\null, $max_page = 0)\n {\n }", "abstract protected function fetchNextPage(): ?int;", "public function getNextPubkey()\n {\n return $this->next_pubkey;\n }", "function next_event() {\n include(\"connection.php\");\n try {\n $next_result = $db->query(\n \"SELECT date_time, event, description\n FROM events\n WHERE date_time >= CURDATE()\n ORDER BY date_time ASC\n LIMIT 1\"\n );\n } catch (Exception $e) {\n echo \"Unable to retrieve results\";\n exit;\n }\n\n $next = $next_result->fetchALL();\n return $next;\n}", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n // instead of the hardcoded date, we introduced the parameter\n return $this->getNextProgressiveNumberByDate($currentDate);\n }", "function next_post_smart( $format = '%link', $title = '%title', $fallback = true, $in_same_cat = true, $excluded_categories = '' ) {\n\treturn Smarter_Navigation::adjacent_post( $format, $title, false, $fallback, $in_same_cat, $excluded_categories );\n}", "public function getNext() {\n\t\treturn $this->pagefiles->getNext($this); \n\t}", "public function testFindNext() {\n /**\n * @var BlogEntry $current\n * @var BlogEntry $next\n */\n $current = $this->blogEntryRepository->find(1);\n $next = $this->blogEntryRepository->find(2);\n\n $this->assertEquals(\n $next->getId(),\n $this->blogEntryRepository->findNext($current)->getId()\n );\n }", "public function nextAction()\n {\n // check if request is ajax\n if (Helper::isAjaxRequest()) {\n // get request\n $code = Helper::requestGet('code', null);\n $userName = Helper::requestGet('userName', null);\n\n // get next url string\n $url = $this->getMediaNextUrlByCode($code);\n\n if ($url) {\n // do request for content\n $media = file_get_contents($url);\n\n // decode json\n $media = json_decode($media);\n\n // check for error\n $this->hasError($media);\n\n // check if json valid and response success\n if (!json_last_error() && $media->meta->code == self::SUCCESS_RESPONSE && !empty($media->data)) {\n $hasNextUrl = false;\n\n if (isset($media->pagination->next_url)) {\n $hasNextUrl = true;\n\n // set next pagination url\n $this->setMediaNextUrlByCode($code, $media->pagination->next_url);\n }\n\n // options for view rendering\n $options = [\n 'c' => Config::get('defaultController'),\n 'a_next' => 'next',\n 'code' => $code,\n 'userName' => $userName,\n 'hasNextUrl' => $hasNextUrl,\n ];\n\n // rendering view without layout\n Helper::renderStatic('main/_viewMediaMore', compact('media', 'options'), false);\n exit;\n }\n }\n }\n }", "final public function getNext() {\n\t\treturn null;\n\t}", "public function next_entry()\n\t{\n\t\treturn $this->_prev_next('next');\n\t}", "public function getNextEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// extract the next event that will happen\n\t\t$nextEvent = array_shift($events);\n\t\tfor ($i = 1; $i < sizeof($events); $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($events[0]['is_approved'] == 1 && $events[0]['date'] > $nextEvent['date']){\n\t\t\t\t$nextEvent = $event;\n\t\t\t}\n\t\t}\n\n\t\treturn $nextEvent;\n\t}", "public function nextPage()\n {\n return $this->nextPage;\n }", "public function next(): static\n {\n $link = Arr::get($this->links, 'next');\n\n throw_unless($link, NoNextPageException::class);\n\n return $this->getResults($link);\n }", "function nextPrevArticleName($order) {\n\tglobal $activePages, $currentArticle; //\n\t$keys = array_keys($activePages); \n\t$position = array_search($currentArticle, $keys); \n\tif (isset($keys[$position + 1]) || isset($keys[$position - 1])) { \n\t\t$nextPrevArticleName = $order == 'next' ? $keys[$position + 1] : $keys[$position - 1];\n\t}\n\treturn $nextPrevArticleName;\n}", "public function get_next_object() { \n\n\t\t$tmp_id = Dba::escape($this->id);\n\t\t$order = \" ORDER BY tmp_playlist_data.id DESC\";\n\n\t\t$sql = \"SELECT tmp_playlist_data.object_id FROM tmp_playlist_data \" . \n\t\t\t\"WHERE tmp_playlist_data.tmp_playlist = '$tmp_id' $order LIMIT 1\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results['object_id'];\n\n\t}", "public function next()\n {\n // If the current element is the last element, return null\n if ($this->current === ($this->count() - 1)) {\n $this->current = null;\n\n return;\n }\n\n // If the next element is greater than the result count, and this is the last page, return null\n if (($this->current + 1) > count($this->results) && (($this->page + 1) > $this->pages)) {\n $this->current = null;\n\n return;\n }\n\n // Advance to the next page\n $this->request->getQuery()->set(\"page\", ++$this->page);\n\n // Retrieve the next page\n $response = $this->request->send()->json();\n\n // Append the results to the results array\n $this->results = array_merge($this->results, $response[\"results\"]);\n\n // Advance to the next element\n $this->current++;\n\n return;\n }", "public function getNext()\n {\n $nextIndex = $this->getIndex() + 1;\n\n return $this->offsetGet($nextIndex);\n }", "function next_posts_link($label = \\null, $max_page = 0)\n {\n }", "private function getNext()\n {\n $this->result = null;\n // Load next result if there's a next token or it's the first request.\n if (!$this->requestCount || $this->nextToken) {\n $this->loadNextResult();\n }\n\n return $this->result;\n }", "public function nextPage()\n {\n return $this->currentPage + 1;\n }", "static function nextID()\n {\n $postID = get_the_ID();\n if (!isset(self::$nextIDForEachPage[$postID]))\n self::$nextIDForEachPage[$postID] = 0 ;\n\n $ab = self::$nextIDForEachPage;\n return ('ec'.self::$nextIDForEachPage[$postID]++);\n }", "public function next($index=1){\n return $this->results()[$index]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function next()\n {\n next($this->revs);\n }", "public function nextpage() {\n return $this->current_page + 1;\n }", "public function getNext() {\r\n $nextDate = $this->getStartDate();\r\n $nextDate->modify('+1 ' . $this->getMode());\r\n\r\n return $nextDate->getTimestamp();\r\n }", "public function nextPageUrl()\n {\n $this->resetQuery();\n\n if ($this->items->count() == $this->perPage()) {\n $this->appends('start', session()->get('accountant.api.start'));\n\n return $this->url($this->currentPage() + 1);\n }\n }", "function parse(){\n\t\t// Pull the next non parsed article from the database, and look for dates in it\n\t\t// Create a DB connection\n\t\tglobal $sess;\n\t\t$db = $sess->db();\n\t\t\n\t\tif(!isset($_SESSION['month'])) $_SESSION['month'] = 1;\n\t\tif(!isset($_SESSION['day'])) $_SESSION['day'] = 1;\n\t\t\n\t\t$this->month = $_SESSION['month'];\n\t\t$this->day = $_SESSION['day'];\n\t\t\n\t\t$url = ucfirst(date(\"F\", mktime(0, 0, 0, $this->month, 10))).'_'.$this->day;\n\t\t\n\t\techo '<h1>'.$url.'</h1>';\n\t\t\n\t\t//* ONLINE\n\t\t// Pull article from Wikipedia\n\t\t$data = json_decode($this->wiki->request($url,'parse','text'),true);\n\t\t\n\t\t$toParse = $data['parse']['text']['*'];\n\t\t\n\t\t//*/\n\t\t\n\t\t/* OFFLINE */\n\t\t//$toParse = file_get_contents('data/march.txt');\n\t\t\n\t\t// Time counter\n\t\t$this->times['download'] = $sess->execTime();\n\t\t\n\t\t// Parser\n\t\t$events = array();\n\t\tpreg_match_all('@\\<li\\>(.+)\\</li\\>@',$toParse,$events);\n\t\t\n\t\t$events = $events[1];\n\t\t\n\t\t$total = count($events);\n\t\tfor($i=0;$i<$total;$i++){\n\t\t\t$p = explode(' – ',$events[$i],2);\n\t\t\tif(count($p)<2) continue;\n\t\t\t\n\t\t\t$year = strip_tags($p[0]);\n\t\t\t$event = strip_tags($p[1]);\n\t\t\t\n\t\t\t$links = array();\n\t\t\tpreg_match_all('@\\<a\\shref=\"([\\w/_\\.-]*(\\?\\S+)?)\"@siU',$p[1],$links, PREG_SET_ORDER);\n\t\t\t\n\t\t\t$found = count($links);\n\t\t\t$tags = array();\t\t\t\n\t\t\tfor($a=0;$a<$found;$a++){ $tags[] = substr($links[$a][1],6); }\n\t\t\t\n\t\t\t// Default type\n\t\t\t$type = 0;\n\t\t\t\n\t\t\t// Entity\n\t\t\t$entity = '';\n\t\t\tif(isset($tags[0])) $entity = $tags[0];\n\t\t\t\n\t\t\t// Detect born/dead dates\n\t\t\t$years = array();\n\t\t\tif(preg_match('@\\(([b|d])\\.\\s(-)?([0-9]{1,4})\\)@',$event,$years)){\n\t\t\t\t// Name of person\n\t\t\t\t$n = explode(',',$event,2);\n\t\t\t\tif(strlen($n[0])>0) $entity = $n[0];\n\t\t\t\t\n\t\t\t\t$type = 3;\n\t\t\t\tif($years[1]=='b') $type = 4;\n\t\t\t}\n\t\t\t/*\n\t\t\t * 0\t->\tNormal event\t(Not in any of the categories below)\n\t\t\t * \t1\t->\tStart of event\t(i.e. Start of a war)\n\t\t\t * \t2\t->\tEnd of event\t(It will refer to the inmediate before)\n\t\t\t * \t3\t->\tStart of entity (birth)\n\t\t\t * \t4\t->\tEnd of entity\t(death)\n\t\t\t */\n\t\t\t\n\t\t\t// Store in local\n\t\t\t$this->add($event,$this->format($year,$this->month,$this->day),$type,$tags,$entity);\n\t\t}\n\t\t\n\t\t//var_dump($events);\n\t\t\n\t\t$this->times['process'] = $sess->execTime() - $this->times['download'];\n\t\t\n\t\t$this->times['import'] = $sess->execTime();\n\t\t\n\t\techo '<hr /><h3>Begin import</h3>';\n\t\t$this->import();\n\t}", "public function getNext ()\n {\n return prev ( $this->_list ) ;\n }", "public function getNext(): ?LinkInterface;", "public function getNextHref(): ?TagInterface;", "public function getNextPageUrl()\n {\n return $this->nextPageUrl;\n }", "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 next()\n\t{\n\t\t$this->current = $this->runFetch();\n\n\t\tif ($this->current) {\n\t\t\t$this->index++;\n\t\t}\n\t}", "public function testGetNextPage()\n {\n // most directory\n $this->assertStringEndsWith(\n '2.3/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/subfolder/subsubfolder/subsubpage.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n // after sorting, 2 is shown.\n $this->assertContains(\n '/intermediate/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/sort/01-basic.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )->Link\n );\n\n\n // next gets the following URL\n $this->assertContains(\n '/test/',\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/index.md',\n DOCSVIEWER_PATH . '/tests/docs-v2.4/en/'\n )->Link\n );\n\n\n // last folder in a entity does not leak\n $this->assertNull(\n $this->manifest->getNextPage(\n DOCSVIEWER_PATH . '/tests/docs/en/test.md',\n DOCSVIEWER_PATH . '/tests/docs/en/'\n )\n );\n }", "public function next($id,$key=''){\n $this->page = $id;\n \n $this->page += 1;\n \n return $this->page;\n }", "function next() {\r\n $this->index++;\r\n return $this->list[$this->index];\r\n }", "public function next_page(){\n if($this->current_page < $this->number_of_pages()){\n return $this->current_page + 1;\n }\n else{\n return NULL;\n }\n }", "public static function next()\n {\n\n \t$oTask = Task::where('processFrom', '<', Carbon::now())->first();\n\n \treturn $oTask;\n }", "public function nextPage()\n\t{\n\t\treturn $this->getIsNextPageAvailable() ? parent::nextPage() : false;\n\t}", "public function getFirst(){\n return ($this->page > 1) ? ($this->page * $this->amountArticle) - $this->amountArticle : 0;\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 }", "private function get_newest_post() {\n\t\t// If set in the admin get the top story.\n\t\t$newest_post = get_option( 'current-top-story' );\n\t\t$title = '' !== $newest_post ? sanitize_text_field( wp_unslash( $newest_post ) ) : '';\n\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t's' => $title,\n\t\t);\n\n\t\t$post_array = wp_get_recent_posts( $args, OBJECT );\n\n\t\treturn $post_array[0];\n\t}", "public function next() {\n $this->index++;\n return $this->valid() ? $this->current() : null;\n }", "public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }", "public function findNext(Tx_TlPhotoblog_Domain_Model_Article $article, Tx_TlPhotoblog_Domain_Model_Category $category = null) {\n\t\t$query = $this->createQuery();\n\n\t\t// build constraint array\n\t\t$constraint = array();\n\t\t$constraint[] = $query->greaterThan('uid', $article->getUid());\n\t\tif($category != null) {\n\t\t\t$constraint[] = $query->contains('category', $category);\n\t\t}\n\t\t$query->matching($query->logicalAnd($constraint));\n\t\t\n\t\t$query->setOrderings(array('uid' => Tx_Extbase_Persistence_QueryInterface::ORDER_ASCENDING));\n\t\treturn $query->execute()->getFirst();\n\t}", "public function getPrevious(Article $article){\n $qb = $this->createQueryBuilder('a')\n ->where('a.published = true')\n ->andWhere('a.date < :givendate')\n ->orderBy('a.date', 'DESC')\n ->setParameter('givendate', $article->getDate())\n ->setFirstResult(0)\n ->setMaxResults(1);\n \n return $qb->getQuery()->getOneOrNullResult();\n }", "function next_post_rel_link($title = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n foreach ($this->invoiceDates as $number => $date) {\n if ($date > $currentDate) {\n $nextNumber = $number;\n break;\n }\n }\n if (!isset($nextNumber)) {\n $nextNumber = count($this->invoiceDates) + 1;\n }\n return $nextNumber;\n }", "public function getNextId() {\n \treturn $this->getNextTerm()->getId();\n }", "public static function next_post_link () : void\n {\n add_filter(\"next_post_link\", function ($output) {\n $nextPost = get_adjacent_post(false, '', false);\n\n if ($nextPost !== '') {\n $nextPostTitle = strlen(get_the_title($nextPost)) > 30 ? substr(get_the_title($nextPost), 0, 30) . \"...\" : get_the_title($nextPost);\n\n $output = '<div class=\"detials\">';\n $output .= '<p>' . __(\"Next Post\", \"dingo\") . '</p>';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\"><h4>' . $nextPostTitle . '</h4></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"arrow\">';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\"><span class=\"lnr text-white ti-arrow-right\"></span></a>';\n $output .= '</div>';\n \n $output .= '<div class=\"thumb\">';\n $output .= '<a href=\"' . get_the_permalink($nextPost). '\">' . get_the_post_thumbnail($nextPost, \"pagination_between_post\", [\"class\" => \"img-fluid\"]) . '</a>';\n $output .= '</div>';\n } else {\n $output = '';\n }\n\n return $output;\n });\n }", "function _next($type,$title,$id,$more=''){\r\n // title : cot ten\r\n // id : id hien tai cua bai viet\r\n // more : dieu kien mo rong\r\n global $mysql,$table_prefix,$lang;\r\n $total = $mysql->num_rows($mysql->query('select * from '.$table_prefix.$type.' where id>'.$id.' '.$more.''));\r\n if(!$total){\r\n $code = '...';\r\n }else{\r\n $q = $mysql->query('select * from '.$table_prefix.$type.' where id>'.$id.' '.$more.' order by id ASC limit 0,1');\r\n while($r=$mysql->fetch_array($q)){\r\n $code = \"<a href='javascript: void(0);' onclick=\\\"viewpages('main','\".$type.\"=view&id=\".$r['id'].\"');web_title('\".$type.\" - \".$r['title'].\"');\\\" title='\".$r[$title].\"'>\".cut_str($r[$title],25).\"</a>\";\r\n }\r\n }\r\nreturn $code;\r\n}", "function getNext():string {\r\n\t\t\tif ($this->items === NULL) {\r\n\t\t\t\t$this->init();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($this->cursor >= count($this->items)) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->cursor++;\r\n\r\n\t\t\treturn $this->items[$this->cursor - 1];\r\n\t\t}", "public function getNextPage(): ?string\n {\n return $this->nextPage;\n }", "final public function getNextEvent()\n\t\t{\n\n\t\t\treturn $this->getEventByTimeAlgo(\"next_event\");\n\n\t\t}", "function next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "public static function fetchNextScheduledExport()\n {\n \t$aDueList = self::fetchDueList();\n \tif ($aDueList)\n \t\treturn $aDueList[0];\n \t\t\n \treturn false;\n }", "function get_next_post_id( $post_id ) {\n\t global $post;\n\t // Store the existing post object for later so we don't lose it\n\t $oldGlobal = $post;\n\t // Get the post object for the specified post and place it in the global variable\n\t $post = get_post( $post_id );\n\t // Get the post object for the next post\n\t $next_post = get_next_post();\n\t // Reset our global object\n\t $post = $oldGlobal;\n\t if ( '' == $next_post )\n\t return 0;\n\t return $next_post->ID;\n\t}", "function eo_get_next_occurrence($format='d-m-Y',$id=''){\n\tglobal $post, $wpdb;\n\n\tif(!isset($id) || $id=='') $id = $post->ID;\n\t\n\t//Retrieve the blog's local time and create the date part\n\t$blog_now = new DateTIme(null, eo_get_blog_timezone() );\n\t$now_date =$blog_now->format('Y-m-d');\n\t$now_time =$blog_now->format('H:i:s');\n\t\n\t$querystr =$wpdb->prepare(\"\n\t\tSELECT StartDate, StartTime\n\t\tFROM {$wpdb->eo_events}\n\t\tWHERE {$wpdb->eo_events}.post_id=%d\n\t\tAND ( \n\t\t\t({$wpdb->eo_events}.StartDate > %s) OR\n\t\t\t({$wpdb->eo_events}.StartDate = %s AND {$wpdb->eo_events}.StartTime >= %s))\n\t\tORDER BY {$wpdb->eo_events}.StartDate ASC\n\t\tLIMIT 1\",$id,$now_date,$now_date,$now_time);\n\n\t$nextoccurrence = $wpdb->get_row($querystr);\n\tif($nextoccurrence !==null){\n\t\t$date = esc_html($nextoccurrence->StartDate).' '.esc_html($nextoccurrence->StartTime);\n\t\tif(empty($date)||$date==\" \")\n\t\t\treturn false;\n\n\t\treturn eo_format_date($date,$format);\n\t}\t\t\n}", "public function next()\n {\n $this->iCurrentKey++;\n $this->strCurrentValue = strftime('%Y-%m-%d', strtotime($this->strCurrentValue . ' +1 day'));\n }", "public function getNextTerm() {\n \treturn $this->next();\n }" ]
[ "0.7924571", "0.77064264", "0.66519886", "0.66099244", "0.6566093", "0.64965445", "0.6445507", "0.631449", "0.63142806", "0.6305385", "0.6305385", "0.62224925", "0.61876047", "0.6186175", "0.6176919", "0.6176919", "0.61366636", "0.61313057", "0.60822815", "0.60089296", "0.60007864", "0.59884185", "0.59734833", "0.5965915", "0.5919174", "0.5874982", "0.5864305", "0.58558005", "0.58545554", "0.58530754", "0.58524936", "0.5844902", "0.58420277", "0.58197606", "0.5817557", "0.58101547", "0.58015954", "0.57947034", "0.5793075", "0.5786309", "0.57836413", "0.57681197", "0.57677823", "0.57604903", "0.57415974", "0.57338303", "0.572089", "0.57146096", "0.56910264", "0.5688728", "0.5685941", "0.5673242", "0.5665686", "0.5641705", "0.56329274", "0.56254756", "0.562059", "0.5618458", "0.5614601", "0.56098235", "0.55997604", "0.5595042", "0.55823034", "0.55796283", "0.55784243", "0.5559371", "0.55414784", "0.5539079", "0.553633", "0.5535455", "0.5533055", "0.55274713", "0.5524149", "0.55181515", "0.55150616", "0.55063164", "0.5492224", "0.5490807", "0.548786", "0.5487471", "0.54780704", "0.5477345", "0.5475655", "0.5469407", "0.5465822", "0.5453684", "0.54525155", "0.54261595", "0.54254544", "0.5423421", "0.54127365", "0.54076034", "0.5389754", "0.53891826", "0.5388931", "0.5388532", "0.5385487", "0.5377579", "0.53607404", "0.53603774" ]
0.6384105
7
/ setTitlePage finns redan... den vs. setCustom??
function getTitleArticle() { return $this->titleArticle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPageTitle($page_name);", "public function setPageTitle($page_name);", "protected function setPageTitle() {\r\n\t\t$pageTitleText = (empty($this->settings['news']['semantic']['general']['pageTitle']['useAlternate'])) ? $this->newsItem->getTitle() : $this->newsItem->getAlternativeTitle();\r\n\t\t$pageTitleAction = $this->settings['news']['semantic']['general']['pageTitle']['action'];\r\n\r\n\t\tif (!empty($pageTitleAction)) {\r\n\t\t\tswitch ($pageTitleAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$pageTitleText .= ': ' . $GLOBALS['TSFE']->page['title'];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$pageTitleText = $GLOBALS['TSFE']->page['title'] . ': ' . $pageTitleText;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t\t$this->pageTitle = html_entity_decode($pageTitleText, ENT_QUOTES, \"UTF-8\");\r\n\t\t\t$GLOBALS['TSFE']->page['title'] = $this->pageTitle;\r\n\t\t\t$GLOBALS['TSFE']->indexedDocTitle = $this->pageTitle;\r\n\t\t}\r\n\t}", "public function setPageTitle($title);", "protected function regeneratePageTitle() {}", "function set_title() {\n \tglobal $pageTitle;\n \tif (isset($pageTitle))\n \t\techo 'Tanqeeb | ' . $pageTitle;\n \telse\n \t\techo 'Tanqeeb';\n}", "function setTitle() {\n global $pageTitle;\n\n $pageTitle = isset($pageTitle) ? $pageTitle : 'Default' ;\n echo $pageTitle;\n }", "function od_set_page_title($orig_title) {\n\t\treturn \"Map | \"; // set the page title (could be improved, eg based on filters. Might be something the user wants to set\n\t}", "function setPageTitle($pageTitle)\n\t{\n\t\t$this->pageTitle = $pageTitle;\n\t}", "public function setTitle($value);", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}", "function setPageTitle($pagename, $config, $langCode){\n\t\tif( $ptpropval = getConfigPropertyValue($config, $pagename, TITLEPROPERTY) )\n\t\t\t$pagename = $ptpropval;\n\t\telse{\t\t//FIXME: this code snippet is duplicated in BreadCrumbBuilder::getBreadCrumbs()\n\t\t\t$parheadpluslang = PARHEADINGPROPERTY.strtolower($langCode);\n\t\t\t//get value(s!) of MODELLINKPROPERTY on page $pagename\n\t\t\t$query = \"[[-\".MODELLINKPROPERTY.\"::\".$pagename.\"]]|?\".$parheadpluslang;\n\t\t\t$result = APIAsker::getInstance()->ask($query);\n\t\t\t$result = array_shift($result['query']['results']);\n\t\t\t$paragraphHeading = $result['printouts'][$parheadpluslang][0];\n\t\t\tif($paragraphHeading)\n\t\t\t\t$pagename = $paragraphHeading;\n\t\t}\n\n\t\t//remove VN suffix if present in page name\n\t\t$pagename = str_replace(\" VN\", \"\", $pagename);\n\n\t\treturn $pagename;\n\t}", "protected function set_page($page){\n self::$page_name = $page;\n }", "public function setTitle($t){\n\t\t$this->title = $t;\n\t}", "public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "protected function renderPageTitle() {}", "public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }", "public function set_title($text){\n $this->title=$text;\n }", "public function setTitle($title){\n \t$this->title = $title;\n }", "function setTitle($title)\n {\n $this->m_title = $title;\n }", "public function setTitle($newTitle) { $this->Title = $newTitle; }", "public function setTitle(string $text = \"untitled\");", "public function setPageTitle($pageTitle) {\n $this->pageTitle = $pageTitle;\n }", "function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setPageTitle(array $config): void\n {\n foreach ($config as $item) {\n if (isset($item['active']) && $item['active']) {\n $this->_View->assign('title', $item['title']);\n break;\n }\n }\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setPageTitle($title)\n\t{\n\t\t$this->_themeExtras['title'] = $title;\n\t}", "function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}", "public function set_page($page);", "function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}", "final public function setPageTitle($title) {\n if ($title === null) {\n return;\n }\n if ($this->title !== null) {\n trigger_warning(\"Setting page title more than once! Was {$this->title} but now is $title\", E_USER_WARNING);\n }\n $this->title = $title;\n return $this;\n }", "function PageTitle ($set = false) {\n \tif (!$set) {\n \t\treturn $this->pagetitle;\n \t}\n \telse {\n \t\t$this->pagetitle = $set . ' | ' . $this->config->item('server_name');\n \t\treturn $this->pagetitle;\n \t}\n }", "protected function setupPage() {}", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setPageID(){\n\t\t\n\t\t$id = 'page';\n\t\t$s = '-';\n\t\t$pound = (!self::USE_SPLASH)?'#':'';\n\t\t$prefix = $pound.$id.$s;\n\t\t$this->headerContainerId = $prefix.'header'.$s.'container';\n\t\t$this->headerId = $prefix.'header';\n\t\t$this->subtitleId = $prefix.'subtitle';\n\t\t$this->brandId = $prefix.'brand';\n\t\t\n\t}", "public function setTitle($value)\n {\n $this->_title = $value;\n }", "function setTitle($title) {\n\t\t$this->_title = $title;\n\t}", "abstract protected function getPageTitle(): string;", "public function setTitle($title){\n $this->p_title = $title;\n }", "public function setPageID(){/*ACTUALLY NOT DEFINED*/}", "function setTitle ($titulo) {\n\t\t$this->_title = $titulo;\n\t\treturn true;\n\t}", "static public function setTitle($new_title) {\n\t\tif (is_array($new_title)) {\n\t\t\t$new_title = implode(' • ', $new_title);\n\t\t}\n\t\tself::$page_title = 'Illarion • ' . $new_title;\n\t}", "public function setTitle($value)\n {\n $this->title = $value;\n }", "public static function setTitle(string $title) {}", "function udesign_page_title_before() {\r\n do_action('udesign_page_title_before');\r\n}", "public static function setPageTitle($title)\n\t{\n\t\tYii::app()->controller->pageTitle = $title;\n\t}", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle(string $title);", "public function setTitle($title){\n $this->title = $title;\n }", "function setTitle( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Title = $value;\n }", "public function set_page_title($p_page_title)\n\t{\n\t\t$this->c_page_title = $p_page_title;\n\t}", "protected function initTitles() {\n\t\t$title \t = \"\";\n\t\t\n\t\tif(isset($this->config['titles']['title']))\n\t\t \t$title = $this->config['titles']['title'];\n\n\t\tif(isset($this->config['titles'][$this->request->getControllerName()]['title']))\n\t\t \t$title .= $this->config['titles']['seperator'] . $this->config['titles'][$this->request->getControllerName()]['title'];\n\t\t \t\n\t\tif(isset($this->config['titles'][$this->request->getControllerName()]['action'][$this->request->getActionName()]))\n\t\t \t$title .= $this->config['titles']['seperator'] . $this->config['titles'][$this->request->getControllerName()]['action'][$this->request->getActionName()];\n\t\t \t\n\t\t$this->layout->setTitle($title);\n\t}", "protected function setPageTitle($title) {\n\n $this->pageTitle = $title;\n\n $args = array('class' => 'title');\n $titleTag = \\MUtil_Html::create('h3', $title, $args);\n\n $this->html->append($titleTag);\n }", "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "function pageTitle(){\n\t\tglobal $pageTitle;\n\t\techo isset($pageTitle) ? $pageTitle : \"Default\";\n\t}", "public function setTitle($title) {\n $this->title = $title ;\n }", "public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setCurrentPage( $page );", "public function setTitle($title = ''){\n $this->setVar('TITLE', $title);\n }", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t\t//\n\t\t$this->view->title = \"Codini\";\n\t}", "public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function set_pagename($wt) {\n switch ($wt){\n case \"Name\" : $urlname=\"/\"; break;\n case \"Bio\" : $urlname=\"/bio\"; break;\n default :\n $this->page[$wt] = \"unknown page identifier\";\n $this->debug_scalar(\"Unknown page identifier: $wt\");\n return false;\n }\n return $urlname;\n }", "function show_title()\r\n{\r\n\tglobal $WebPagesList,$CurrentActivePage;\r\n\techo getTitle( $CurrentActivePage );\r\n}", "public function setTitle($title = '')\n {\n $this->title = $title;\n }", "public function prePageHeader();", "protected function setPageTitle($title, $raw = false)\n {\n $this->data[\"site\"][\"page_title\"] = $raw ? $title : config(\"site_name\") . \" - \" . $title;\n }", "public function setTitle($var)\n {\n $this->_title = $var;\n }", "function setHeaderTitle($value) {\n $this->header_title = $value;\n}", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "function getTitle(){\r\n\r\n \tglobal $pageTitle;\r\n \r\n if(isset($pageTitle)){\r\n\r\n \techo $pageTitle;\r\n\r\n }else{\r\n\r\n \techo 'Default';\r\n }\r\n\r\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "private function setIndexPageTitle($pageKey)\n {\n $titles = [\n 'comments1' => \"Anax-MVC kommentarsida 1\",\n 'comments2' => \"Anax-MVC kommentarsida 2\"\n ];\n $this->theme->setTitle($titles[$pageKey]);\n $this->views->add('comment/index', [\n 'pageTitle' => $this->theme->getVariable(\"title\")\n ], 'main');\n }", "public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}", "public static function set_page_title($auth, $args, $tabalias, $options, $path) {\n if (!isset($options['title'])) {\n return 'Please set the template for the title in the @title parameter';\n }\n foreach($_GET as $key => $value) {\n $options['title'] = str_replace(\"#$key#\", $value, $options['title']);\n }\n hostsite_set_page_title($options['title']);\n return '';\n }", "public function setPageTitle($title) {\n $this->configuration['page_title'] = $title;\n return $this;\n }", "public function beforeRender(){\n\t\t$title_for_layout = __('エネルギー効率評価システム | 一般社団法人 日本工業炉協会');\n\t\t$this->set('title_for_layout', $title_for_layout);\t\t\n\t}", "public function setShortcodePage()\n {\n /* We are going to add a subpage */\n $subpage = array (\n array (\n 'parent_slug' => 'edit.php?post_type=testimonial', //We use the url of the Testimonial posts\n 'page_title' => 'Shortcodes',\n 'menu_title' => 'Shortcodes',\n 'capability' => 'manage_options',\n 'menu_slug' => 'mtk_testimonial_shortcode',\n 'callback' => array ( $this->callbacks , 'shortcodePage' )\n ));\n $this->settings->addSubPages( $subpage )->register();\n }", "public function setTitle($title)\n\t{\n\t\t$this->setBodyTitle($title);\n\t\t$this->setPageTitle($title);\n\t}", "public function adaptPageTitle(&$title)\n {}", "public function setTitle($title)\n {\n $this->title = $title;\n }" ]
[ "0.7394576", "0.7394576", "0.72500193", "0.7077241", "0.68990153", "0.6873838", "0.68593746", "0.6793337", "0.67239213", "0.6676422", "0.6657411", "0.6588385", "0.65776384", "0.6549001", "0.6530939", "0.6483105", "0.6483105", "0.6483105", "0.6483105", "0.6483105", "0.6483105", "0.6483105", "0.64795625", "0.6455406", "0.6420887", "0.63948375", "0.6393456", "0.6390196", "0.6375779", "0.63696843", "0.6363482", "0.6351257", "0.63408226", "0.63408226", "0.63370764", "0.6327959", "0.6314373", "0.6291552", "0.6282719", "0.62820685", "0.6279727", "0.62751734", "0.6270701", "0.6264223", "0.62586534", "0.6239951", "0.62348205", "0.6228719", "0.6214682", "0.62130576", "0.6211915", "0.6204044", "0.61909735", "0.61877334", "0.61804605", "0.6177531", "0.61711043", "0.61711043", "0.61711043", "0.61610234", "0.615992", "0.61530936", "0.6118903", "0.6108456", "0.60914916", "0.60885143", "0.6085514", "0.60853773", "0.6081436", "0.60510385", "0.6048992", "0.60377306", "0.6031251", "0.60306305", "0.602949", "0.6026403", "0.6026403", "0.6026403", "0.6024206", "0.60203373", "0.602002", "0.5998445", "0.59970796", "0.5996563", "0.5994997", "0.5982299", "0.5978512", "0.5974254", "0.5970465", "0.5961001", "0.5957781", "0.5957781", "0.59555733", "0.59433234", "0.5942228", "0.5934306", "0.5933664", "0.59219515", "0.5916957", "0.5916598", "0.5910027" ]
0.0
-1
ger publiceringsdatum i unixtid
function getDatePublish($format = null) { if ($format == 'human') { return polarbear_time2str($this->datePublish); } else if ($format) { return strftime($format, $this->datePublish); } else { return $this->datePublish; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dbdatetime2unix ($tanggal = '') {\r\n list($year,$month,$day,$hour,$minute,$second) = sscanf($tanggal,'%4d-%2d-%2d %2d:%2d:%2d');\r\n return mktime($hour,$minute,$second,$month,$day,$year);\r\n}", "function get_unix_time()\n {\n return $this->timestamp;\n }", "function fechaDesdeUnix($fecha){\n\t$fecha2 = date('Y-m-d H:i:s', $fecha);\n\treturn $fecha2;\n}", "public static function timeuuid() {}", "function getUid($ip, $date) {\n\t}", "function shadow_to_unixtime($t) {\n return (int)($t * 24 * 60 * 60);\n}", "private static function get_unique_id(){\n\t\tself::$u_id+=1;\n\t\treturn (string) self::$u_id;\n\t}", "function cata_ts2unixts($timestamp) {\n\tif (strlen($timestamp) == 14) {\n\t\t$year = intval(substr($timestamp, 0, 4));\n\t\t$month = intval(substr($timestamp, 4, 2));\n\t\t$day = intval(substr($timestamp, 6, 2));\n\t\t$hour = intval(substr($timestamp, 8, 2));\n\t\t$minute = intval(substr($timestamp, 10, 2));\n\t\t$second = intval(substr($timestamp, 12, 2));\n\n\t\treturn mktime($hour, $minute, $second, $month, $day, $year);\n\t} else {\n\t\treturn 0;\n\t}\n}", "static function uniqueID()\n {\n return substr(str_pad(str_replace('.', '', microtime(true)), 12, 0), 0, 12);\n }", "function readTimestamp(): int;", "protected function make_uid()\n\t{\n\t\t$date = date('Ymd\\THisT');\n\t\t$unique = substr(microtime(), 2, 4);\n\t\t$base = 'aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPrRsStTuUvVxXuUvVwWzZ1234567890';\n\t\t$start = 0;\n\t\t$end = strlen( $base ) - 1;\n\t\t$length = 6;\n\t\t$str = null;\n\t\tfor( $p = 0; $p < $length; $p++ )\n\t\t{\n\t\t\t$unique .= $base{mt_rand( $start, $end )};\n\t\t}\n\t\treturn $date . '-' . $unique . ($this->num_to_letter(++$this->uid_counter));\n\t}", "function get_uuid() {\n\t\t$t = explode(\" \", microtime());\n\t\treturn sprintf('%04x%04x-%04x-%08s-%08s-%04s',\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff), \n\t\tmt_rand(1, 0xffff), mt_rand(1, 0xffff), \n\t\tgetmypid(),\n\t\tsubstr(\"00000000\" . dechex($t[1]), -8), // get 8HEX of unixtime\n\t\tsubstr(\"0000\" . dechex(round($t[0] * 65536)), -4) // get 4HEX of microtime\n\t\t);\n\t}", "static public function uid ()\n\t{\n\t\t$t = gettimeofday();\n\t\treturn $t['sec'] . $t['usec'] . mt_rand(100, 999);\n\t}", "function _unix_timestamp($date) { return strtotime($date); }", "private function generateFileUID( $table ) {\n $today = date( 'Ymd' );\n $array = glob( $this->path . trim( $table, DIRECTORY_SEPARATOR ) . DIRECTORY_SEPARATOR . $today . ( $this->gzip ? '*.dat.gz' : '*.dat' ) );\n\n if( !empty( $array ) ) {\n natsort( $array );\n\n $last = basename( end( $array ), ( $this->gzip ? '.dat.gz' : '.dat' ) );\n $date = substr( $last, 0, 8 );\n $dec = base_convert( substr( $last, 8 ), 36, 10 );\n\n // Overflow\n if( $dec >= 2821109907455 )\n throw new \\OverflowException( \"File UID ($last) overflow\" );\n\n $id = sprintf( \"%8s%08s\", $today, base_convert( ( $dec + 1 ), 10, 36 ) );\n }\n else {\n $id = sprintf( \"%8s%08s\", $today, base_convert( 1, 10, 36 ) );\n }\n\n return $id;\n }", "abstract public function getTstamp();", "function shadow_from_unixtime($t=null) {\n if($t === null)\n $t = time();\n\n return (int)($t / 24 / 60 / 60);\n}", "function datetime_unix2mysql($timestamp) {\n\treturn date('Y-m-d H:i:s', $timestamp);\n}", "public function getUnixTimestamp() : int\n {\n return $this->time->getTimestamp();\n }", "public function id_tarjeta();", "function crystal_sqlite_from_unixtime($timestamp)\n {\n $timestamp = trim($timestamp);\n if (!preg_match(\"/^[0-9]+$/is\", $timestamp))\n $ret = strtotime($timestamp);\n else\n $ret = $timestamp;\n \n $ret = date(\"Y-m-d H:i:s\", $ret);\n crystal_sqlite_debug(\"FROM_UNIXTIME ($timestamp) = $ret\");\n return $ret;\n }", "function Uuid()\n {\n $unid = uniqid() . str_replace('-', '', Guid());\n $uuid = substr($unid, 0, 8) . '-' . substr($unid, 8, 4) . '-' . substr($unid, 12, 4) . '-' . substr($unid, 16, 4) . '-' . substr($unid, 20, 12);\n return $uuid;\n }", "private static function makeRpcUid()\n {\n return bin2hex(openssl_random_pseudo_bytes(90));\n }", "function ibm_uid ( $dn ) { return dn2uid($dn); }", "function obtener_sal()\n{\n\treturn uniqid('', true);\n}", "function ical_uid_evt($evt_tmp)\r\n{\r\n\treturn md5($evt_tmp[\"date_crea\"].$evt_tmp[\"id_evenement\"]);\r\n}", "function _convert_to_unix_timestamp($timestamp)\n\t{\n\t\tlist($time, $date) = explode('.', $timestamp);\n\t\t\n\t\t// breakdown time\n\t\t$hour = substr($time, 0, 2);\n\t\t$minute = substr($time, 2, 2);\n\t\t$second = substr($time, 4, 2);\n\t\t\n\t\t// breakdown date\n\t\t$day = substr($date, 0, 2);\n\t\t$month = substr($date, 2, 2);\n\t\t$year = substr($date, 4, 2);\n\t\t\n\t\treturn gmmktime($hour, $minute, $second, $month, $day, $year);\n\t}", "public function getCreatedOTPUuid()\n {\n return $this->getOTPHandler()->getUuid();\n }", "private function generateUID(){\n if(function_exists(\"random_bytes\")){\n return md5(bin2hex(random_bytes(16)) . time());\n } else if(function_exists(\"openssl_random_pseudo_bytes\")){\n return md5(bin2hex(openssl_random_pseudo_bytes(16)) . time());\n }\n return md5(uniqid() . time());\n }", "function _unix2DOSTime($unixtime = null) \n {\n $timearray = (is_null($unixtime)) ? getdate() : getdate($unixtime);\n if ($timearray['year'] < 1980) {\n $timearray['year'] = 1980;\n $timearray['mon'] = 1;\n $timearray['mday'] = 1;\n $timearray['hours'] = 0;\n $timearray['minutes'] = 0;\n $timearray['seconds'] = 0;\n }\n return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);\n }", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "function datetime_mysql2unix($str) {\n\tlist($date, $time) = explode(' ', $str);\n\tlist($year, $month, $day) = explode('-', $date);\n\tlist($hour, $minute, $second) = explode(':', $time);\n\n\t$timestamp = mktime((int)$hour, (int)$minute, (int)$second, (int)$month, (int)$day, (int)$year);\n\n\treturn $timestamp;\n}", "function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\n{\n// Building binary data.\n$bin = sprintf(\n \"%s%s%s%s\",\n pack('N', $timestamp),\n substr(md5($hostname), 0, 3),\n pack('n', $processId),\n substr(pack('N', $id), 1, 3)\n);\n\n// Convert binary to hex.\n$result = '';\nfor ($i = 0; $i < 12; $i++) {\n $result .= sprintf(\"%02x\", ord($bin[$i]));\n}\nreturn $result;\n}", "function datum_nu2() {\n //\n\t\t\t$datestring \t\t\t\t= \"%Y-%m-%d\" ; \n\t\t\t$time \t\t\t\t\t\t= time();\t\t\t\n\t\t\treturn mdate($datestring, $time);\n\t}", "public function uuid() : Uuid;", "function unixstamp_to_human( $unix=0 )\n {\n \t$offset = $this->get_time_offset();\n \t$tmp = gmdate( 'j,n,Y,G,i', $unix + $offset );\n \t\n \tlist( $day, $month, $year, $hour, $min ) = explode( ',', $tmp );\n \n \treturn array( 'day' => $day,\n \t\t\t\t 'month' => $month,\n \t\t\t\t 'year' => $year,\n \t\t\t\t 'hour' => $hour,\n \t\t\t\t 'minute' => $min );\n }", "function waktudunia_createid( $tbl_waktudunia ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_waktudunia ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$UID = $data[\"id\"];\n\t\t$UID = $UID+1; \n\t\treturn $UID;\n\t}", "public function obtenerID();", "function uniqueid ()\r\n{\r\n $stamp = date(\"Ymdhis\");\r\n $c = uniqid(rand(), true);\r\n return $stamp.\"-\".$c;\r\n}", "function Tguid16()\n {\n $entropicGuid = str_replace('.', '-', uniqid('', true)) . '-' . Guid();\n return $entropicGuid;\n }", "function datum_nu() {\n\t\t//\n\t\t$datestring \t\t\t\t= \"%d-%m-%Y\" ; \n\t\t$time \t\t\t\t\t\t= time();\t\t\t\n\t\t\n\t\treturn date($datestring, $time);\n\t\t//-----/\n\t}", "public abstract function fromUnixtime ($timestamp);", "function tstamptotime($tstamp) {\n // 1984-09-01T14:21:31Z\n sscanf($tstamp,\"%u-%u-%uT%u:%u:%uZ\",$year,$month,$day,\n $hour,$min,$sec);\n $newtstamp=mktime($hour,$min,$sec,$month,$day,$year);\n return $newtstamp;\n }", "function unix_to_jd($t) {\n\t\treturn ( UNIX_EPOCH + t / SECS_IN_DAY);\n\t}", "function gen_id() {\n\t\t$this->id = get_uid();\n\t\t$this->mk_paths($this->id);\n\t}", "public function getUuid(): string;", "function MysqlToUnix($timestamp)\n\t{\n\t\t// and returns the unix timestamp in seconds since 1970\n\t\t$timestamp = (string)$timestamp;\n\t\t$yyyy = substr($timestamp, 0, 4);\n\t\t$month = substr($timestamp, 4, 2);\n\t\t$dd = substr($timestamp, 6, 2);\n\t\t$hh = substr($timestamp, 8, 2);\n\t\t$mm = substr($timestamp, 10, 2);\n\t\t$ss = substr($timestamp, 12, 2);\n\t\t$time = mktime($hh, $mm, $ss, $month, $dd, $yyyy);\n\t\treturn $time;\n\t}", "function sql2stamp($ymd) { #trace();\r\n if ( $ymd=='0000-00-00' )\r\n $t= 0;\r\n else {\r\n $y= 0+substr($ymd,0,4);\r\n $m= 0+substr($ymd,5,2);\r\n $d= 0+substr($ymd,8,2);\r\n $t= mktime(0,0,0,$m,$d,$y)+1;\r\n }\r\n return $t;\r\n}", "public function getCreationTimeInUnixType()\n {\n return $this->creation_time;\n }", "function uid_generuj($l_uzytkownik)\n{\n\n\t\t//najpierw sprawdzamy czy uzytkownik jest juz w bazie (weryfikujemy po mailu), jesli nie ma to dodajemy, a jak jest to robimy aktualizacje danych\n\tif($uid=$GLOBALS['o_db']->komorka('id', \"WHERE `email`='\".htmlspecialchars($l_uzytkownik['email']).\"'\", 'cms_uzytkownicy'))\n\t{\necho '1';\n\t\t$GLOBALS['o_db']->aktualizuj(array('logowanie'=>time(), 'email'=>htmlspecialchars($l_uzytkownik['email']), 'imie'=>htmlspecialchars($l_uzytkownik['first_name'])), \"WHERE `id`='$uid'\", 'cms_uzytkownicy');\n\t\treturn $uid;\n\t}\n\telse\n\t{\necho '2';\n\t\t$GLOBALS['o_db']->rekord_dodaj(array('rejestracja'=>time(), 'logowanie'=>time(), 'email'=>htmlspecialchars($l_uzytkownik['email']), 'status'=>1, 'imie'=>htmlspecialchars($l_uzytkownik['first_name'])), 'cms_uzytkownicy');\nvar_dump($GLOBALS['o_db']->sql, $GLOBALS['o_db']->error);\n\t\treturn $GLOBALS['o_db']->rekord_id;\n\t}\n}", "public function getId() : Uuid;", "function getTempo()\r\n {\r\n return $this->getData(DATE_FORMAT_UNIXTIME);\r\n }", "function n_makeID($id, $parms=NULL, $ntype=0)\r\n{\r\n // Obtain parameters\r\n $id = intval($id);\r\n if ($id <= 0) return FALSE; // cannot make using invalid ID\r\n\r\n $ntype = intval($ntype);\r\n if ($ntype==0) {\r\n $id = ($id - 1) % 999999 + 1;\r\n $s1 = sprintf(\"%06u\", $id);\r\n }\r\n else if ($ntype==1) {\r\n $id = ($id - 1) % 99999 + 1;\r\n $s1 = sprintf(\"%05u\", $id);\r\n }\r\n else if ($ntype==2 || $ntype==3) {\r\n $id = ($id - 1) % 9999999 + 1;\r\n $s1 = sprintf(\"%07u\", $id);\r\n }\r\n else return FALSE; // unsupported ntype\r\n\r\n if (is_array($parms)) {\r\n $service = trim($parms['service']);\r\n $rn = intval($parms['rn']);\r\n $timeAt = trim($parms['timeAt']);\r\n }\r\n else if (is_string($parms))\r\n $service = $parms;\r\n $service = preg_match(\"%^([a-z][a-z_]{2,})%i\", $service, $matches) ? strtoupper($matches[1]) : '';\r\n $rn = (empty($rn) || $rn <= 0) ? mt_rand(1,9) : ($rn - 1) % 9 + 1; // digits [1,9]\r\n\r\n if ($ntype % 2 == 0) {\r\n $hash = md5('n'.$service.$ntype.$rn.$id);\r\n $s2 = sprintf(\"%02u\", hexdec(substr($hash,-6)) % 99 + 1); // digits [01,99]\r\n }\r\n else { // day-check\r\n if ($timeAt==='0') {\r\n $dayt = '';\r\n $t = '0';\r\n }\r\n else {\r\n $time = strlen($timeAt) ? strtotime($timeAt) : time();\r\n if ($time <= 0) $time = time(); // invalid time\r\n $dayt = floor(strtotime(date('Y-m-d', $time)) / 86400);\r\n $t = sprintf(\"%01u\", $dayt % 9 + 1); // digit [1,9]\r\n }\r\n\r\n $hash = md5('n'.$service.$ntype.$rn.$id.$dayt);\r\n $s2 = $t.sprintf(\"%02u\", hexdec(substr($hash,-6)) % 99 + 1); // digits [01,99]\r\n }\r\n $sout = $ntype.$rn.$s1.$s2;\r\n\r\n return $sout;\r\n}", "function toUnix($local = false)\n\t{\n\t\t$date = null;\n\t\tif ($this->_date !== false) {\n\t\t\t$date = ($local) ? $this->_date + $this->_offset : $this->_date;\n\t\t}\n\t\treturn $date;\n\t}", "function getTimestamp($datum,$uur){\n\t\tlist($uur,$min)=split(':',$uur);\n\t\t//print(date('D d M Y h:m',$datum));\n\t\t//print (\"uur $uur min $min\");\n\t\t$result=strtotime(\"+ $uur hours $min minutes\",$datum);\n\t\t\n\t\treturn $result;\n\t}", "function unix2DosTime($unixtime = 0) {\n $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);\n\n if ($timearray['year'] < 1980) {\n $timearray['year'] = 1980;\n $timearray['mon'] = 1;\n $timearray['mday'] = 1;\n $timearray['hours'] = 0;\n $timearray['minutes'] = 0;\n $timearray['seconds'] = 0;\n } // end if\n\n return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |\n ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);\n }", "protected function getUid() {\n\t\treturn UUIDUtil::getUUID();\n\t}", "private function musGetNodeId(){\n }", "public function getUid ();", "function timestamp2utime($string2format) {\n \t\treturn mktime(substr($string2format, 8,2), substr($string2format, 10, 2), substr($string2format, 12, 2), substr($string2format, 4,2), substr($string2format, 6, 2), substr($string2format, 0, 4));\n \t}", "function getUID() { \n\t\treturn $this->_uid; \n\t}", "function mysql_to_unix($time = '')\n\t{\n\t\t// since the formatting changed with MySQL 4.1\n\t\t// YYYY-MM-DD HH:MM:SS\n\n\t\t$time = str_replace('-', '', $time);\n\t\t$time = str_replace(':', '', $time);\n\t\t$time = str_replace(' ', '', $time);\n\n\t\t// YYYYMMDDHHMMSS\n\t\treturn mktime(\n\t\t\t\t\t\tsubstr($time, 8, 2),\n\t\t\t\t\t\tsubstr($time, 10, 2),\n\t\t\t\t\t\tsubstr($time, 12, 2),\n\t\t\t\t\t\tsubstr($time, 4, 2),\n\t\t\t\t\t\tsubstr($time, 6, 2),\n\t\t\t\t\t\tsubstr($time, 0, 4)\n\t\t\t\t\t\t);\n\t}", "function jd_to_unix($jd) {\n\t\t$val=(($jd-UNIX_EPOCH) * SECS_IN_DAY * 1000);\n\t\treturn ( round($val/1000) ) ;\n\t}", "function createGutenId() {\n\tif (!is_file(\"/usr/local/great/workspace/gutendump/listed\")) {\n \t \techo \"Please specify a directory listing\\n\";\n \treturn;\n \t }\n \t $dirsList = file(\"/usr/local/great/workspace/gutendump/listed\");\n \t $gutenXmlReader = NULL;\n \t $gutenDocCount = 0;\n\n \t $nameToIdFile = fopen(\"/usr/local/great/workspace/gutendump/nametoid\", \"w\");\n\n \t foreach ($dirsList as $dirName) {\n \t \t$dirName = trim($dirName);\n \t \t$gutenContentFilePath = \n \t \t\t\"/usr/local/great/workspace/gutendump/cache/epub/$dirName/pg$dirName.rdf\";\n \t \tif (!is_file($gutenContentFilePath)) {\n \t \t\techo \"No file found $gutenContentFilePath \\n\";\n \t \t\tcontinue;\n \t \t} \n\n \t \t$gutenDocCount += 1;\n\n \t \ttry {\n \t \t\t$gutenXmlReader = new XMLReader();\n \t \t\t$gutenXmlReader->open($gutenContentFilePath);\n\n \t \t\twhile ($gutenXmlReader->read()) {\n \t \t\t\tif ($gutenXmlReader->nodeType != XMLReader::ELEMENT ) {\n \t \t\t\t\tcontinue;\n \t \t\t\t}\n\n\t $tagName = $gutenXmlReader->localName;\n\n\t if ($tagName === \"title\") {\n\t \t$gutenXmlReader->read();\n\t \t$gutenDocName = $gutenXmlReader->value;\n\t \tfwrite($nameToIdFile, \"$gutenDocName=$dirName\\n\");\n\t \techo \"$dirName - $gutenDocName\\n\";\n\t } \n \t \t\t}\n\n \t \t} catch (Exception $exc) {\n \t \t\techo $exc->getTraceAsString();\n \t \t} finally {\n \t \t\tif ($gutenXmlReader != NULL) {\n \t \t\t\t$gutenXmlReader->close();\n \t \t\t}\n \t \t}\n\n \t \techo \"---------------------------- \\n\";\n \t }\n\n \t fclose($nameToIdFile);\n}", "public function getUuid();", "public function generate_archieve_comparison_id() {\n $result = $this->db2->query(\"SELECT archieve_id FROM `comparison_summary_history_all` ORDER BY archieve_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $archieve_id = $data->archieve_id;\n//generate user_id\n $archieve_id = str_pad( ++$archieve_id, 5, '0', STR_PAD_LEFT);\n return $archieve_id;\n } else {\n $archieve_id = 'archieve_1001';\n return $archieve_id;\n }\n }", "public function getRootUid() {}", "function suid(int $length = 6, int $base = 62): string\n{\n return Uuid::generateSuid($length, $base);\n}", "abstract public function unique_id();", "private function make_id () {\n // http://sourceforge.net/projects/phunction/\n return sprintf('%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n }", "function utime2timestamp($string2format) {\n \t\treturn date(\"YmdHis\",$string2format);\n \t}", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUUID()\n {\n return $this->uUID;\n }", "public function getUUID()\n {\n return $this->uUID;\n }", "function en2timestamp($date,$sep='-') {\n\n\n $date = explode($sep,$date);\n $unix = mktime(0,0,0,$date[1],$date[2],$date[0]);\n\n\n return $unix;\n\n }", "private function _mktime(){\n\t\t$this->_timestamp = self::mktime($this->_month, $this->_day, $this->_year);\n\t}", "public function readableTimeStamp($unixtime): string\n {\n return human_time_diff($unixtime, current_time('timestamp'));\n }", "function readLong();", "public function getTimestamp(): int;", "public function getTimestamp(): int;", "function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\r\n{\r\n\t// Building binary data.\r\n\t$bin = sprintf(\r\n\t\t\"%s%s%s%s\",\r\n\t\tpack('N', $timestamp),\r\n\t\tsubstr(md5($hostname), 0, 3),\r\n\t\tpack('n', $processId),\r\n\t\tsubstr(pack('N', $id), 1, 3)\r\n\t);\r\n\r\n\t// Convert binary to hex.\r\n\t$result = '';\r\n\tfor ($i = 0; $i < 12; $i++) {\r\n\t\t$result .= sprintf(\"%02x\", ord($bin[$i]));\r\n\t}\r\n\r\n\treturn $result;\r\n}", "function getTid() {\n return $this->tid;\n }", "function getAssignedUnixName() {\n\t\treturn $this->data_array['assigned_unixname'];\n\t}", "public function getOldUid();", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function getTid()\n {\n return $this->get(self::_TID);\n }", "public function generate_archieve_monthly_id() {\n $result = $this->db2->query(\"SELECT archive_id FROM `monthly_summary_history_all` ORDER BY archive_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $archieve_id = $data->archive_id;\n//generate user_id\n $archieve_id = str_pad( ++$archieve_id, 5, '0', STR_PAD_LEFT);\n return $archieve_id;\n } else {\n $archieve_id = 'archieve_1001';\n return $archieve_id;\n }\n }", "public static function unixTimeNow(): int\n {\n return time();\n }", "protected function createTokenTimestamp(): int\n {\n return time();\n }", "public function getTimestampUnix()\r\n {\r\n if ($this->month && $this->day && $this->year)\r\n {\r\n return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "function getTimestamp($data) {\r\n\t// yyyy-mm-dd HH:ii:ss\r\n\t// 0123456789012345678\r\n\t$h = substr($data, 11, 2);\r\n\t$i = substr($data, 14, 2);\r\n\t$s = substr($data, 17, 2);\r\n\t$m = substr($data, 5, 2);\r\n\t$d = substr($data, 8, 2);\r\n\t$y = substr($data, 0, 4);\r\n\t//**************\r\n\treturn mktime($h, $i, $s, $m, $d, $y);\r\n}", "function getNewId();", "public function getTid()\n {\n return $this->getTitler()->getVarighet();\n }", "private static function generateNewPayloadId(\\DateTimeInterface $timestamp): string\n\t{\n\t\t// datetime.process id.random number@hostname\n\t\treturn \\sprintf(\n\t\t\t'%s.%s.%s@%s',\n\t\t\t$timestamp->format('U.v'), // include milliseconds\n\t\t\t\\getmypid(),\n\t\t\t\\mt_rand(1000, 9999),\n\t\t\t\\gethostname()\n\t\t);\n\t}" ]
[ "0.57875705", "0.5741585", "0.56347865", "0.56317663", "0.5621009", "0.56154054", "0.5391334", "0.537474", "0.5371553", "0.5366268", "0.53577566", "0.5357647", "0.5347889", "0.53263617", "0.5311228", "0.53014696", "0.53011626", "0.528255", "0.5272937", "0.52619064", "0.5247175", "0.52427244", "0.5236175", "0.52272004", "0.5214994", "0.5201527", "0.5184425", "0.51723665", "0.5153864", "0.51447743", "0.5144661", "0.5143116", "0.51430947", "0.51430947", "0.51430947", "0.51430947", "0.51400846", "0.5133819", "0.51330286", "0.5128681", "0.5127689", "0.5121611", "0.51028407", "0.51020175", "0.5101158", "0.51011103", "0.50939524", "0.50873977", "0.5085993", "0.50633305", "0.50632995", "0.5058547", "0.5049996", "0.50491625", "0.50329554", "0.50313556", "0.502995", "0.5027948", "0.5022358", "0.50124204", "0.5002433", "0.49954015", "0.4994645", "0.49927604", "0.4972508", "0.49527493", "0.49438602", "0.49375647", "0.49274063", "0.49135587", "0.4903662", "0.48994082", "0.4893653", "0.48875123", "0.48816565", "0.48810083", "0.48793325", "0.48793325", "0.48793325", "0.48717907", "0.48688468", "0.48679003", "0.48667362", "0.48658648", "0.48658648", "0.48525015", "0.48492637", "0.48395884", "0.48355666", "0.4834921", "0.4834921", "0.4834921", "0.4834921", "0.48164856", "0.48157907", "0.48154837", "0.48147717", "0.48129767", "0.48105887", "0.48030546", "0.4797855" ]
0.0
-1
Date article was modified/changed
function getDateChanged($format = null) { if ($format == 'human') { return polarbear_time2str($this->dateChanged); } else if ($format) { return strftime($format, $this->dateChanged); } else { return $this->dateChanged; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateModified();", "public function get_date_modified();", "function getDateModified() {\n\t\treturn $this->_DateModified;\n\t}", "public function getDateModified()\n {\n return $this->dateModified;\n }", "public function getDateModified()\n {\n return $this->_DateModified;\n }", "public function getDateModified() {\n\t\t\treturn $this->date_modified;\n\t\t}", "public function getAuthorUpdatedDate();", "public function getModifiedDate()\n\t{\n\t\treturn $this->_mdate;\n\t}", "public function getModifiedStamp();", "public function getDateModification()\n {\n return $this->dateModification;\n }", "public function getPurchaseDateModified() {\n return $this->PurchaseDateModified;\n }", "public function getModeratorUpdatedDate();", "public function getModifiedDate() : \\DateTime {\n return $this->modifiedDate;\n }", "public function getDateCreated()\n {\n return $this->getDateModified();\n }", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }", "function stampModified() {\n\t\treturn $this->setLastModified(Core::getCurrentDate());\n\t}", "function article_date() {\n if($created = Registry::prop('article', 'created')) {\n return $created->format('jS F, Y');\n }\n}", "public function getDateModified(): DateTime\n {\n return $this->dateModified;\n }", "public function getChangeDate()\n {\n return $this->changeDate;\n }", "public function getRevisioned() ;", "public function getUpdatedDate()\n {\n return $this->updated;\n }", "public function getModificationDate()\n {\n return $this->modificationDate;\n }", "public function getLastModifiedAudit();", "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "public function getDateUpdated()\n {\n return $this->date_updated;\n }", "private function get_article_modified_date() {\n\n\t\tif ( ! $this->is_json_valid() )\n\t\t\treturn [];\n\n\t\tif ( ! ( $post = $this->get_current_post() ) )\n\t\t\treturn [];\n\n\t\t$i = strtotime( $post->post_modified );\n\n\t\treturn [\n\t\t\t'dateModified' => \\esc_attr( date( 'c', $i ) ),\n\t\t];\n\t}", "public function getEditDate() { return $this->tstamp; }", "public function getModifiedOn(): \\DateTime\n {\n return $this->modifiedOn;\n }", "public function getModificationDate() {\n return $this->modificationDate;\n }", "public function getModifyDate()\n {\n return $this->modifyDate;\n }", "public function getDateUpdated() {\n return $this->dateUpdated;\n }", "public function getRevisionDate()\n {\n return $this->revisionDate;\n }", "public function getModDate();", "public function get_modification_date()\n {\n return $this->get_default_property(self::PROPERTY_MODIFICATION_DATE);\n }", "public function getDateModified()\n {\n if (array_key_exists('datemodified', $this->data)) {\n return $this->data['datemodified'];\n }\n\n $date = null;\n\n if ($this->getType() == Reader\\Reader::TYPE_YML) {\n $dateModified = $this->xpath->evaluate('string(/yml_catalog/@date)');\n if ($dateModified) {\n $dateModifiedParsed = strtotime($dateModified);\n if ($dateModifiedParsed) {\n $date = new DateTime('@' . $dateModifiedParsed);\n } else {\n $dateStandards = [\"Y-m-d H:i\",\"Y-m-d H:i:s\"];\n foreach ($dateStandards as $standard) {\n try {\n $date = DateTime::createFromFormat($standard, $dateModified);\n break;\n } catch (\\Exception $e) {\n if ($standard === null) {\n throw new Exception(\n 'невозможно загрузить дату'\n .'допускаются форматы (\"Y-m-d H:i\",\"Y-m-d H:i:s\") :'\n . $e->getMessage(),\n 0,\n $e\n );\n }\n }\n }\n }\n }\n }\n $this->data['datemodified'] = $date;\n\n return $this->data['datemodified'];\n }", "function the_modified_date($format = '', $before = '', $after = '', $display = \\true)\n {\n }", "function get_date_mod(){\n\treturn date (\"F d Y H:i:s.\", filemtime(lastModifiedInFolder(ABSPATH . 'wp-content/')));\n}", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this->temp_files[$this->path]->year . '-' .\n $this->temp_files[$this->path]->month . '-' .\n $this->temp_files[$this->path]->day . ' ' .\n $this->temp_files[$this->path]->time;\n\n return;\n }", "public function getDateUpdate()\n {\n return $this->dateUpdate;\n }", "public function getUpdatedDate()\n {\n return $this->updated_date;\n }", "function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}", "public function getDate_added() {\n\t\treturn $this->date_added;\n\t}", "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "public function getUpdatedDate() {\n\t\treturn $this->updatedDate;\n\t}", "public function getdateModifiedAttribute()\n {\n return Carbon::parse($this->date)->translatedFormat('d M Y');\n }", "public function getModifiedDateAttribute($value){ \n return date(\"n/d/Y g:i:s A\",strtotime($this->attributes['ModifiedDate']));\n }", "public function getModDate() \r\n { \r\n return $this->_modDate; \r\n }", "function get_timemodified() {\n return $this->timemodified;\n }", "public function getModifiedTime()\n\t{\n\t\treturn $this->modifiedTime; \n\n\t}", "public function getLastModificationDateTime() {\n $timestamp = $this->getUpdatedAt();\n // we don't know when the module content is updated, so we \"guess\"\n if ($this->getModule() != '') {\n $timestamp->setDate(date('Y'), date('m'), date('d'));\n }\n return $timestamp;\n }", "public function getModified() {}", "public function getModifiedAt()\n {\n return $this->getProperty(self::MODIFIED_AT);\n }", "public function last_modified() {\n\t\treturn $this->timestamp;\n\t}", "public function getLastModifiedDate() {\n\t\treturn date(\"d/m/Y\", strtotime($this->lastModifiedDate));\n\t}", "public function getUpdate_date(){\n return $this->update_date;\n }", "public function getRevdate()\n {\n return $this->revdate;\n }", "function modified() { $this->_modified=1; }", "function modified() { $this->_modified=1; }", "function getModificationTime() ;", "public function getModifiedAt()\n {\n return $this->modifiedAt;\n }", "function column_modified( $item ) {\r\n\t\tif ( '0000-00-00 00:00:00' == $item->post_modified ) {\r\n\t\t\t$h_time = __( 'Unpublished', 'media-library-assistant' );\r\n\t\t} else {\r\n\t\t\t$m_time = $item->post_modified;\r\n\t\t\t$time = get_post_time( 'G', true, $item, false );\r\n\r\n\t\t\tif ( ( abs( $t_diff = time() - $time ) ) < 86400 ) {\r\n\t\t\t\tif ( $t_diff < 0 ) {\r\n\t\t\t\t\t$h_time = sprintf( __( '%1$s from now', 'media-library-assistant' ), human_time_diff( $time ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$h_time = sprintf( __( '%1$s ago', 'media-library-assistant' ), human_time_diff( $time ) );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$h_time = mysql2date( __( 'Y/m/d', 'media-library-assistant' ), $m_time );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $h_time;\r\n\t}", "public function getModified()\r\n {\r\n return $this->modified;\r\n }", "function getModDate() \n {\n return $this->getValueByFieldName( 'label_moddate' );\n }", "public function modified($rtrn='')\n\t{\n\t\tswitch (strtolower($rtrn))\n\t\t{\n\t\t\tcase 'date':\n\t\t\t\treturn JHTML::_('date', $this->get('modified'), JText::_('DATE_FORMAT_HZ1'));\n\t\t\tbreak;\n\n\t\t\tcase 'time':\n\t\t\t\treturn JHTML::_('date', $this->get('modified'), JText::_('TIME_FORMAT_HZ1'));\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn $this->get('modified');\n\t\t\tbreak;\n\t\t}\n\t}", "public function getRevisionCreationTime();", "public function getRevisionCreationTime();", "public function getRevisionCreationTime();", "public function getRevisionCreationTime();", "public function getRevisionCreationTime();", "public function getDateCreated();", "function article_time() {\n if($created = Registry::prop('article', 'created_at')) {\n return $created->getTimestamp();\n }\n}", "public function getModifiedAt();", "public function getModifiedAt();", "function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}", "function get_the_modified_date($format = '', $post = \\null)\n {\n }", "function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "public function getLastModified();", "function getUpdateDate() {\n\t\treturn $this->_UpdateDate;\n\t}", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function getUpdateDate()\n {\n return $this->updateDate;\n }", "public function _getDatePublish()\n {\n return $this->_getArticleDataVal('pubDate');\n }", "public function getModified()\n {\n return $this->modified;\n }", "public function getModified()\n {\n return $this->modified;\n }", "public function getModified()\n {\n return $this->modified;\n }", "public function getModified()\n {\n return $this->modified;\n }", "public function getModified()\n {\n return $this->modified;\n }", "public function getModified()\n {\n return $this->modified;\n }", "function getDateReminded() {\n\t\treturn $this->getData('dateReminded');\n\t}", "public function lastModified();", "public function lastModified();", "public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }", "public function getDatePublished() {\n\t\treturn date(\"d/m/Y\", strtotime($this->datePublished));\n\t}", "public function get_date_created();", "public function getModificationTime() {}" ]
[ "0.8045748", "0.8037266", "0.764196", "0.75204504", "0.74823046", "0.746156", "0.7353333", "0.72069407", "0.71242857", "0.71056944", "0.703271", "0.70080864", "0.699248", "0.6934534", "0.6931676", "0.6920655", "0.69182736", "0.6907028", "0.69003034", "0.68908405", "0.6876842", "0.6874261", "0.683006", "0.68102586", "0.68102586", "0.67975104", "0.67872816", "0.67660856", "0.67578536", "0.6757542", "0.67556363", "0.6718682", "0.6714543", "0.66856503", "0.6642058", "0.6626494", "0.6614302", "0.65928113", "0.65928113", "0.65618104", "0.6555907", "0.6536256", "0.6525342", "0.6521878", "0.65077215", "0.65077215", "0.6505927", "0.64792365", "0.64628434", "0.6459251", "0.64575315", "0.6435295", "0.63874596", "0.6383715", "0.63570774", "0.6357049", "0.63569975", "0.633979", "0.6335191", "0.6335191", "0.63350004", "0.63322955", "0.63193077", "0.62975", "0.628035", "0.6272925", "0.6272763", "0.6272763", "0.6272763", "0.6272763", "0.6272763", "0.6270465", "0.6268115", "0.6260041", "0.6260041", "0.625768", "0.62507516", "0.6241668", "0.62387943", "0.62387943", "0.62387943", "0.62387943", "0.62151843", "0.62128985", "0.62128985", "0.62128985", "0.62128985", "0.62022614", "0.61964273", "0.61964273", "0.61964273", "0.61964273", "0.61964273", "0.61964273", "0.6191508", "0.61668146", "0.61668146", "0.61608815", "0.61510205", "0.61486405", "0.614458" ]
0.0
-1
Returns when this article is to be unpublished
function getDateUnpublish($unix = false) { return $this->dateUnpublish; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnpublish() {\n return $this->changeFilter('unpublish');\n }", "protected function getUnpublishDescription(): string {\n $date = $this->getScheduledDate('unpublish');\n\n if ($date) {\n return $this->t('Scheduled unpublish date: <span>@date</span>', [\n '@date' => $this->dateFormatter->format($date, 'tieto_date'),\n ]);\n }\n\n return '';\n }", "function unpublish() {\n\t\tif (! $this->id) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->saveField('is_published', 0);\n\t}", "public function getIsUnPublishScheduled()\n {\n /** @var DBDatetime $unpublish */\n $unpublish = $this->owner->dbObject('UnPublishOnDate');\n\n if ($unpublish->InFuture()) {\n return true;\n }\n\n if ((int) $this->owner->UnPublishJobID !== 0) {\n return true;\n }\n\n return false;\n }", "function unpublish() { \n\t\t$adsdetail = JRequest::get('POST');\n\t\t$model = $this->getModel('showads');\n\t\t$model->statusChange($adsdetail);\n\t}", "public function unpublish()\n {\n $message = new MailMessage;;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post {$this->post->titile} has been unpublished successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }", "public function onBeforeUnpublish()\n {\n\t\t$context = [\n PublishingEngine::CONTEXT_ACTION => PublishingEngine::CONTEXT_ACTION_UNPUBLISH\n\t\t];\n\t\t$this->collectChanges($context);\n\t}", "private function get_unpublish_timestamp( $post_id ) {\n\t\treturn get_post_meta( $post_id, self::$post_meta_key, true );\n\t}", "public function testIsUnPublishScheduled()\n {\n $page = SiteTree::create();\n $page->Title = 'My page';\n $page->PublishOnDate = '2010-01-01 00:00:00';\n $page->AllowEmbargoedEditing = false;\n $page->write();\n\n $this->assertFalse($page->getIsUnPublishScheduled());\n\n $page->UnPublishOnDate = '2016-02-01 00:00:00';\n DBDatetime::set_mock_now('2016-01-16 00:00:00');\n $this->assertTrue($page->getIsUnPublishScheduled());\n\n DBDatetime::set_mock_now('2016-02-16 00:00:00');\n $this->assertFalse($page->getIsUnPublishScheduled());\n }", "public function unpublish()\n {\n $this->published = false;\n\n return $this;\n }", "public function actionUnpublished()\n {\n $Formatter=CommonHelpers::returnFormatter();\n\n //set returnUrl so you can use $this->goBack in actionDelete()\n Yii::$app->user->returnUrl = Url::to(['unpublished']);\n $status=Story::STATUS_UNPUBLISHED;\n $searchModel = new StorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $status);\n\n return $this->render('stories', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'status' => $status,\n 'Formatter'=>$Formatter,\n ]);\n }", "function isPublished() {\n\t\tif ($this->status == 'published') {\n\t\t\t$now = time();\n\t\t\tif ($this->datePublish <= $now) {\n\t\t\t\tif ($this->dateUnpublish > $now || $this->dateUnpublish == null) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function publishedStatus()\n {\n if ( !$this->owner->getScheduledStatus() && !$this->owner->getExpiredStatus() ) {\n return true;\n }\n\n return false;\n }", "public function isPublished()\n {\n # code...\n return !is_null($this->published_at) && $this->published_at < today();\n }", "function unpublish_events() {\r\n if (!CALENDARS) {\r\n return;\r\n }\r\n\r\n // Get the last time that this check was run so we can determine if we do it now.\r\n // We only unpublish events once per day even though the general job\r\n // might run more often, like once every 5 minutes, so that the cron job\r\n // do not cause unnecessary load on the server.\r\n\r\n $unpublish_event_timestamp = db_value(\"SELECT unpublish_event_timestamp FROM config\");\r\n\r\n $current_timestamp = time();\r\n\r\n // If we have already performed this check in the last day, then abort.\r\n if ($unpublish_event_timestamp > ($current_timestamp - 86400)) {\r\n return;\r\n }\r\n\r\n // Get all events that are currently published and that might need to be unpublished.\r\n $events = db_items(\r\n \"SELECT id\r\n FROM calendar_events\r\n WHERE\r\n (published = '1')\r\n AND (unpublish_days != '0')\");\r\n\r\n foreach ($events as $event) {\r\n\r\n $event = get_calendar_event($event['id'], 0);\r\n\r\n // If the event is a recurring event, then get info for the last recurrence.\r\n // because we need to figure out if the last recurrence is old enough.\r\n if ($event['recurrence']) {\r\n $event = get_calendar_event($event['id'], $event['total_recurrence_number']);\r\n }\r\n\r\n // Calculate when the event should be allowed to be unpublished.\r\n $unpublish_timestamp = strtotime($event['end_date_and_time']) + ($event['unpublish_days'] * 86400);\r\n\r\n // If the event is old enough, then unpublish it.\r\n if ($current_timestamp >= $unpublish_timestamp) {\r\n\r\n db(\r\n \"UPDATE calendar_events\r\n SET\r\n published = '0',\r\n last_modified_user_id = '\" . USER_ID . \"',\r\n last_modified_timestamp = UNIX_TIMESTAMP()\r\n WHERE id = '\" . $event['id'] . \"'\");\r\n\r\n log_activity('calendar event (' . $event['name'] . ') was unpublished by general job because event was old');\r\n\r\n }\r\n\r\n }\r\n\r\n // Remember that we just checked if events needed to be unpublished,\r\n // so that we don't check again for 24 hours.\r\n db(\"UPDATE config SET unpublish_event_timestamp = UNIX_TIMESTAMP()\");\r\n}", "private function updateUnPublishOnDate()\n {\n $this->owner->UnPublishOnDate = $this->owner->DesiredUnPublishDate;\n // Remove the DesiredUnPublishDate.\n $this->owner->DesiredUnPublishDate = null;\n }", "function get_unpublished_post_statuses() {\n $status = [ 'draft', 'pending', 'auto-draft'/*, 'future' */ ];\n\n /**\n * Filter the unpublished post statuses.\n *\n * @param array $status List of non-public post statuses.\n */\n return apply_filters( 'unpublished_post_statuses', $status );\n }", "public function getIsUnPublishJobRunning()\n {\n return $this->isUnPublishJobRunning;\n }", "public function timeSincePublished()\n {\n return$this->created_at->diffForHumans();\n }", "public function timeSincePublished()\n\t{\n\t\treturn $this->created_at->diffForHumans();\n\t}", "public function justPublished()\n {\n\n return $this->created_at->gt(Carbon::now()->subMinute());\n }", "public function _getDatePublish()\n {\n return $this->_getArticleDataVal('pubDate');\n }", "public function publishedAt()\n {\n $publishedAt = array_get($this->data, 'published_at', null);\n\n if ($publishedAt === null) {\n return trans('gzero-core::common.unknown');\n }\n\n return $publishedAt;\n }", "public function embargoUntilPublished();", "function isPublished(){\n\t\tif($this->isPublished == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getPublishedAt()\n {\n return $this->_publishedAt;\n }", "public function getPublishedAt()\n {\n return $this->publishedAt;\n }", "public function getPublishedAt()\n {\n return $this->publishedAt;\n }", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function getPublishedAt()\n {\n return $this->published_at;\n }", "public function getPublished() {\n\t\treturn $this->published;\n\t}", "public function isPublished()\n {\n return $this->published_at->lte(Carbon::now());\n }", "public function getIsPublished()\n\t{\n\t\treturn $this->is_published;\n\t}", "public function getDatePublished() {\n\t\t\treturn $this->date_published;\n\t\t}", "public function isPublished()\n {\n return $this->postID > 0;\n }", "function unpublish() {\n\t\t$option = JRequest::getCmd('option');\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se obtienen los ids de los registros a publicar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n\t\tJArrayHelper::toInteger($cids);\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a despublicar\n\t\tif (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_UNPUBLISH'));\n\t\t}\n\n\t\tif ($model->publish($cids, false, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.ROWS_UNPUBLISHED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_UNPUBLISHED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function getPublishStatusAttribute()\n {\n $value = $this->content->publish_status;\n $publish_date = date('Y-m-d H:i:s', strtotime($this->content->publish_date));\n\n if ($value === Status::PUBLISHED && $publish_date > Carbon::now()) {\n return Status::SCHEDULED;\n }\n return $value;\n }", "public function getArticlePublish() {\n return $this->article_publish;\n }", "public function getPublishTime()\n {\n return $this->publish_time;\n }", "public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }", "public function isPublished()\n {\n return ($this->published == 1);\n }", "public function unpublish(Post $p)\n {\n if ($p->status === 'published') {\n $p->status = 'draft';\n $p->save();\n }\n\n return $p;\n }", "public function isPublished()\n {\n return $this->status == static::PUBLISHED;\n }", "public function getIncludeUnannounced()\n {\n return $this->include_unannounced;\n }", "public function isPublished()\n {\n return $this->attribute('state') == self::STATUS_PUBLISHED;\n }", "public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}", "public function hasPublished() {\n return $this->_has(14);\n }", "public function hasPublished() {\n return $this->_has(6);\n }", "protected function getMetaUnpublishDate(): ?array {\n $revision = $this->nodeRevisionManager->loadLatestUnpublishedRevision($this->node());\n if (NULL === $revision || !$revision->isDefaultRevision()) {\n return [];\n }\n\n $revisionDate = $revision->getChangedTime();\n\n return [\n '#type' => 'container',\n '#weight' => 10,\n '#attributes' => [\n 'class' => [\n 'node-meta--unpublish-date',\n ],\n ],\n 'label' => [\n '#type' => 'html_tag',\n '#tag' => 'label',\n '#attributes' => [\n 'class' => [\n 'node-meta-label',\n 'node-meta--unpublish-date--label',\n ],\n ],\n '#value' => $this->t('Unpublish date'),\n ],\n 'value' => [\n '#type' => 'html_tag',\n '#tag' => 'span',\n '#attributes' => [\n 'class' => [\n 'node-meta-value',\n 'node-meta--unpublish-date--value',\n ],\n ],\n '#value' => $this->dateFormatter->format($revisionDate, 'tieto_date'),\n ],\n ];\n }", "public function unpublish_content() {\n\t\tglobal $_wp_post_type_features;\n\n\t\t$post_types = array();\n\t\tforeach ( $_wp_post_type_features as $post_type => $features ) {\n\t\t\tif ( ! empty( $features[ self::$supports_key ] ) ) {\n\t\t\t\t$post_types[] = $post_type;\n\t\t\t}\n\t\t}\n\n\t\t$args = array(\n\t\t\t'fields' => 'ids',\n\t\t\t'post_type' => $post_types,\n\t\t\t'post_status' => 'any',\n\t\t\t'posts_per_page' => 40,\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'meta_key' => self::$post_meta_key,\n\t\t\t\t\t'meta_value' => current_time( 'timestamp' ),\n\t\t\t\t\t'compare' => '<',\n\t\t\t\t\t'type' => 'NUMERIC',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'meta_key' => self::$post_meta_key,\n\t\t\t\t\t'meta_value' => current_time( 'timestamp' ),\n\t\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$query = new WP_Query( $args );\n\n\t\tif ( $query->have_posts() ) {\n\t\t\tforeach ( $query->posts as $post_id ) {\n\t\t\t\twp_trash_post( $post_id );\n\t\t\t}\n\t\t} else {\n\t\t\t// There are no posts scheduled to unpublish, we can safely remove the old cron.\n\t\t\twp_clear_scheduled_hook( self::$deprecated_cron_key );\n\t\t}\n\t}", "public function getPublishTime() {\n return $this->publish_time;\n }", "public function action_save_unpublish_timestamp( $post_id ) {\n\t\tif ( ! isset( $_POST['unpublish-nonce'] ) || ! wp_verify_nonce( $_POST['unpublish-nonce'], 'unpublish' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! post_type_supports( get_post_type( $post_id ), self::$supports_key ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$units = array( 'aa', 'mm', 'jj', 'hh', 'mn' );\n\t\t$units_count = count( $units );\n\t\t$date_parts = [];\n\n\t\tforeach ( $units as $unit ) {\n\t\t\t$key = sprintf( 'unpublish-%s', $unit );\n\t\t\t$date_parts[ $unit ] = $_POST[ $key ];\n\t\t}\n\n\t\t$date_parts = array_filter( $date_parts );\n\n\t\t// The unpublish date has just been cleared.\n\t\tif ( empty( $date_parts ) ) {\n\t\t\tdelete_post_meta( $post_id, self::$post_meta_key );\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if one of the fields is empty.\n\t\tif ( count( $date_parts ) !== $units_count ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$unpublish_date = vsprintf( '%04d-%02d-%02d %02d:%02d:00', $date_parts );\n\t\t$valid_date = wp_checkdate( $date_parts['mm'], $date_parts['jj'], $date_parts['aa'], $unpublish_date );\n\n\t\tif ( ! $valid_date ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$timestamp = strtotime( get_gmt_from_date( $unpublish_date ) );\n\n\t\tupdate_post_meta( $post_id, self::$post_meta_key, $timestamp );\n\t}", "public function getUnsubscribeDate()\n {\n return $this->unsubscribeDate;\n }", "public function onAfterUnpublish() {\n $this->doDeleteDocumentIfInSearch();\n }", "public function searchUnpublishPending( \\DateTime $currentDatetime = null );", "function block_core_calendar_update_has_published_posts()\n {\n }", "public function unpublish($id)\n\t{\n\t\t$data = array(\n\t\t\t\t\t\t'status' => 0\n\t\t\t\t\t );\n\n\t\t$result = $this->common_model->UpdateDB('blog_post',array('id' => $id),$data);\n\n\t\tif ($result) \n\t\t{\n\t\t\tset_flashdata('success','Post Status Changed to Unpublish');\n\t\t\tredirect('blog/posts/manage_posts','refresh');\n\t\t} \n\t}", "function unpublish()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to unpublish' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->publish($cid, 0)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "function exa_is_published_yesterday( $post ) {\n\t$post = get_post($post);\n\t$postTime = get_post_time('U',true);\n\t$firstDayOfYear = strtotime('yesterday',current_time('timestamp'));\n\treturn ($postTime >= $firstDayOfYear);\n}", "public function isPublished()\n {\n return $this->publish_status == Status::PUBLISHED;\n }", "public function getDatePublished() {\n\t\treturn date(\"d/m/Y\", strtotime($this->datePublished));\n\t}", "public function ArchivedStatus() {\n\t\tif ($this->Archived == 1) {\n\t\t\treturn _t('GridField.Archived', 'Archived');\n\t\t}\n\t\treturn _t('GridField.Live', 'Live');\n\t}", "protected function doTestPublishedStatus() {\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n\n // Unpublish translations.\n foreach ($this->langcodes as $index => $langcode) {\n if ($index > 0) {\n $url = $entity->toUrl('edit-form', ['language' => ConfigurableLanguage::load($langcode)]);\n $edit = ['content_translation[status]' => FALSE];\n $this->drupalGet($url);\n $this->submitForm($edit, $this->getFormSubmitAction($entity, $langcode));\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n $this->assertFalse($this->manager->getTranslationMetadata($entity->getTranslation($langcode))->isPublished(), 'The translation has been correctly unpublished.');\n }\n }\n\n // Check that the last published translation cannot be unpublished.\n $this->drupalGet($entity->toUrl('edit-form'));\n $this->assertSession()->fieldDisabled('content_translation[status]');\n $this->assertSession()->fieldValueEquals('content_translation[status]', TRUE);\n }", "public function onAfterUnpublish()\n {\n\t\t$this->flushChanges();\n\t}", "function getDoNotPublishList()\r\n\t\t{\r\n\t\t\tif (!empty($this->_doNotPublishList)) {\r\n\t\t\t\treturn $this->_doNotPublishList;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "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 }", "public function get_unseen() {\n $this->authenticate();\n $result = $this->discussion->get_unseen_discussions();\n if (!is_null($result)) {\n exit(json_encode([\n 'flg' => TRUE,\n 'msg' => $result\n ]));\n } else {\n exit(json_encode([\n 'flg' => FALSE\n ]));\n }\n }", "public function processUnPublish(array $ids)\n {\n return $this->_toggleField($ids, STATUS_UN_PUBLISH);\n }", "public function isArchived()\n {\n return $this->publish_status == Status::ARCHIVED;\n }", "public function toggle_published() {\n $will_be_published = !$this->post->is_published();\n $this->post->toggle_published();\n redirect(\n '/backend/posts/edit',\n ['notice' => $will_be_published ? 'Published' : 'Unpublished'],\n ['id' => $this->post->id]\n );\n }", "public function onUnpublishPage($data) {\n return $this->worker()->onUnpublishPage($data);\n }", "private function publishUnpublishSchedule($status, $date_published)\n {\n if(isset($_POST[\"selection\"]) && !empty($_POST[\"selection\"]))\n {\n //if user wants to schedule, get date\n if($date_published==Story::STATUS_SCHEDULE)\n {\n $date_published=$_POST[\"Story\"][\"date_published\"];\n if(empty($date_published))\n {\n Yii::$app->session->setFlash('danger', Yii::t('app', 'Select the date'));\n return $this->goBack();\n }\n\n }\n\n $selection=$_POST[\"selection\"]; //it is checkbox array and value is \"id\" in Story\n foreach ($selection as $key=>$IDstory)\n {\n $story=Story::findOne($IDstory);\n if($date_published==NULL)//unpublish story but leave last date_published\n $date_published=$story->date_published;\n\n $story->status = $status;\n $story->date_published = $date_published;\n $story->date_modified = date(\"Y-m-d H:i:s\"); //this is necesary because of cache dependancy so cache can change\n $story->save(false, ['status', 'date_published', 'date_modified']);\n }\n Yii::$app->session->setFlash('success', Yii::t('app', 'Everything went fine'));\n }\n else\n Yii::$app->session->setFlash('danger', Yii::t('app', 'Something was wrong'));\n\n return $this->goBack();\n }", "public function doUnpublish() {\n\t\tif($this->Fields()) {\n\t\t\tforeach($this->Fields() as $field) {\n\t\t\t\t$field->doDeleteFromStage('Live');\n\t\t\t}\n\t\t}\n\t\t\n\t\tparent::doUnpublish();\n\t}", "public function unpublish_expired_posts() {\n $expired_posts = $this->get_expired_posts();\n foreach ( $expired_posts as $expired_post ) {\n // Only automatically unpublish if the corresponding option is enabled for this post\n if ( $expired_post->bbx_best_before_unpublish_when_expired ) {\n // Set post to draft\n wp_update_post(\n array(\n 'ID' => $expired_post->ID,\n 'post_status' => 'draft'\n )\n );\n }\n }\n }", "public function getPublishDateTo();", "public function unpublished($id) {\n $affected_row = Property::where('id', $id)\n ->update(['publication_status' => 0]);\n\n if (!empty($affected_row)) {\n return redirect('/setting/properties')->with('message', 'Unpublished successfully.');\n }\n return redirect('/setting/properties')->with('exception', 'Operation failed !');\n }", "public function getWasArchived()\n {\n if (!is_null($this->time_archived)){\n return true;\n }\n return false;\n }", "public function getDateRemoved()\n {\n return $this->__get(self::FIELD_DATE_REMOVED);\n }", "public function isPublished()\n {\n if (\n $this->getStatus() === PageStatus::PUBLISHED ||\n ($this->getStatus() === PageStatus::SCHEDULED &&\n $this->getPublishedAt() < new \\DateTime())\n ) {\n return true;\n } else {\n return false;\n }\n }", "public function hasPublishedTag() {\n return $this->_has(1);\n }", "function getDatePublished()\n {\n $datePublished = $this->get('schema:datePublished');\n return $datePublished;\n }", "function block_core_calendar_has_published_posts()\n {\n }", "public function shouldBePublished()\n {\n return $this->publish;\n }", "public function getPublishedTime()\n {\n $this->initialRequest();\n if (isset($this->item['snippet']['publishedAt'])) {\n return date('Y-m-d H:i:s', strtotime($this->item['snippet']['publishedAt']));\n }\n else {\n $this->onApiBadInterpretation(\"snippet.publishedAt not found\");\n }\n }", "function timeSincePublish($pub_date){\r\n\t\t\t$now_date = date('U');\r\n\t\t\t$since_date = $now_date - $pub_date;\r\n\t\t\t$since_hours = floor($since_date / 60 / 60);\r\n\t\t\t$since_days = floor($since_hours / 24);\r\n\t\t\r\n\t\t\t?><span style=\"display:none;\"><?php echo $pub_date; ?></span><?php\r\n\t\t\r\n\t\t\tif($since_hours<1 && $since_days<1){\r\n\t\t\t?><em>recently</em><?php\r\n\t\t\t}elseif($since_hours>=1 && $since_days<1){\r\n\t\t\t?><em><?=$since_hours?> hour<?= ($since_hours>1 ? 's':''); ?> ago</em><?php\r\n\t\t\t}elseif($since_hours>1 && $since_days>=1){\r\n\t\t\t?><em><?= ($since_days==1 ? 'yesterday':$since_days.' days ago'); ?></em><?php\r\n\t\t\t}\r\n\t\t}", "public function unpublish($oid=null)\n\t{\n\t\tif (!$oid)\n\t\t{\n\t\t\t$oid = $this->id;\n\t\t}\n\t\t$this->_db->setQuery(\"UPDATE $this->_tbl SET state=0 WHERE id=\" . $this->_db->quote($oid));\n\t\t$this->_db->query();\n\t}", "public function getPublishTimeAttribute()\n { \n return Carbon::createFromTimeStamp(\n strtotime($this->created_at)\n )->diffForHumans();\n }", "public function isPublishedField()\n {\n return $this->get('check_publish') == 1;\n }" ]
[ "0.7436658", "0.7308806", "0.6983075", "0.6827626", "0.6384254", "0.6352843", "0.6175079", "0.61296237", "0.61020553", "0.60126823", "0.59500027", "0.59387046", "0.5932939", "0.5919629", "0.5919065", "0.58961034", "0.5890423", "0.5868171", "0.58538485", "0.58226836", "0.5815913", "0.5804431", "0.57960933", "0.5792855", "0.5778477", "0.5756048", "0.57474226", "0.57474226", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5732428", "0.5697606", "0.56942636", "0.56615514", "0.56554693", "0.56552213", "0.56534714", "0.5640696", "0.5636494", "0.56241566", "0.56174606", "0.56067026", "0.56038046", "0.5597606", "0.559441", "0.5590362", "0.55882543", "0.55810285", "0.5573471", "0.5564829", "0.55539227", "0.5552345", "0.5530474", "0.54987526", "0.5497884", "0.5485591", "0.54818535", "0.546966", "0.54618496", "0.5459551", "0.54592216", "0.5454434", "0.5447019", "0.54460734", "0.54448414", "0.5442539", "0.54400384", "0.5428205", "0.542515", "0.542327", "0.54219645", "0.5413604", "0.54002243", "0.53924346", "0.5390616", "0.5386871", "0.5383271", "0.53803056", "0.53749263", "0.5373531", "0.53691906", "0.5368819", "0.5351105", "0.53369385", "0.5331875", "0.53264433", "0.53250676", "0.53192997", "0.5305087", "0.5295896" ]
0.704906
2
Type of template to use If articles for any reason don't have a template, "inherit" will be used as a default
function getTemplateType() { if (!$this->templateType) { return 'inherit'; } else { return $this->templateType; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function templateToUse() {\n\t\t// loop until templateType = name | custom\n\t\t$templateType = $this->getTemplateType();\n\t\t$templateCustom = $this->getTemplateCustom();\n\t\t$templateName = $this->getTemplateName();\n\t\t$articleName = $this->getTitleArticle();\n\t\t$articleId = $this->getId();\n\t\t$parent = $this->parent();\n\t\t\n\t\t$i = 0;\n\t\twhile ($templateType != 'name' && $templateType != 'custom' && $parent !== null) {\n\t\t\t$templateType = $parent->getTemplateType();\n\t\t\t$templateCustom = $parent->getTemplateCustom();\n\t\t\t$templateName = $parent->getTemplateName();\n\t\t\t$articleName = $parent->getTitleArticle();\n\t\t\t$articleId = $parent->getId();\n\t\t\t$parent = $parent->parent();\n\t\t}\n\t\t\n\t\t/*\n\t\techo \"<br><br>templateType: \" . $templateType;\n\t\techo \"<br>templateCustom: \" . $templateCustom;\n\t\techo \"<br>templateName: \" . $templateName;\n\t\techo \"<br>articleName: \" . $articleName;\n\t\techo \"<br>articleID: $articleId\";\n\t\t// */\n\t\t\n\t\t$templates = polarbear_getTemplates();\n\t\t\n\t\tpb_pqp_log_speed(\"article templateToUse\");\n\t\t\n\t\tif ($templateType == 'custom') {\n\t\t\treturn $templateCustom;\n\t\t} else if (isset($templates[$templateName])) {\n\t\t\treturn $templates[$templateName]['file'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "abstract public function getTemplate();", "protected function content_template() {}", "protected function content_template() {}", "protected function _content_template()\n {\n\n }", "protected function content_template() {\n\t}", "function edd_pup_template(){\r\n\r\n\t$template = edd_get_option( 'edd_pup_template' );\r\n\r\n\tif ( ! isset( $template ) ) {\r\n\t\t$template = 'default';\r\n\t}\r\n\r\n\tif ( $template == 'inherit' ) {\r\n\t\treturn edd_get_option( 'email_template' );\r\n\t} else {\r\n\t\treturn $template;\r\n\t}\r\n}", "protected function _content_template() {\n \n }", "protected function _content_template() {\n\t}", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "public function content_template()\n {\n }", "protected function content_template()\n\t{\n\t\t//\n\t}", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "public function template();", "public function getGathercontentTemplate();", "protected function getDefaultTemplate()\n {\n return 'modules/XCExample/Recommendations/recommendation/body.twig';\n }", "function portal_template_hierarchy( $template ) {\n\n $template\t= ( substr( $template, -4, 4 ) == '.php' ? $template : $template . '.php' );\n $base_dir = ( $template == 'archive-portal_projects.php' ? 'projects/' : '' );\n\n if ( $theme_file = locate_template( array( 'yoop/' . $base_dir . $template ) ) ) {\n \t$file = $theme_file;\n } else {\n \t$file = portal_BASE_DIR . '/templates/' . $base_dir . $template;\n }\n\n return apply_filters( 'portal_standard_template_' . $template, $file );\n\n}", "abstract protected function template(): string;", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "function setupTemplate($subclass = false) {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\tif ($subclass) {\n\t\t\t$templateMgr->append(\n\t\t\t\t'pageHierarchy',\n\t\t\t\tarray(\n\t\t\t\t\tRequest::url(null, 'dataverse'), \n\t\t\t\t\tAppLocale::Translate('plugins.generic.dataverse.displayName'),\n\t\t\t\t\ttrue\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "function rc_tc_template_chooser( $template ) {\r\n \r\n // Post ID\r\n $post_id = get_the_ID();\r\n $post_type = get_post_type( $post_id );\r\n echo ('<!-- Have Post Type ' . __( $post_type, 'nmmc' ) . '-->' );\r\n // For all other CPT\r\n if ( $post_type != 'nsbr' && $post_type !='ydd' ) {\r\n echo ('<!-- Unknown Type returning ' . __( $template, 'nmmc' ) . '-->' );\r\n return $template;\r\n }\r\n \r\n // Else use custom template\r\n if ( is_single() ) {\r\n echo ('<!-- Is Single returning ' . __( 'single-'.$post_type, 'nmmc' ) . '-->' );\r\n return rc_tc_get_template_hierarchy( 'single-'.$post_type);\r\n }else{\r\n return rc_tc_get_template_hierarchy( 'category-'.$post_type);\r\n }\r\n echo ('<!-- Returning nothing -->' );\r\n return $template;\r\n}", "function get_custom_post_type_template($single_template) {\n global $post;\n\n if ($post->post_type == 'employee_news') {\n $single_template = get_template_directory() . '/single-templates/employee_news.php';\n }\n return $single_template;\n}", "function getTemplate();", "protected function setupTemplate() {\r\n \r\n }", "public function getTemplate() {}", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "function getDefault($url){\n \n\t \n\t \n\t $path = explode('/', $url);\n\t \t \n\t $temp = $path[$this -> getPos($url)];\n\t \n\t if($temp != ''){\n\t \n\t\t$file = DIR_TEMPLATE.'/'.$temp.'.php';\n\t\t\n\t if (is_readable($file)) {\n\n //include the alternative template\n\t\t $template = $file;\n\t\t\n\t\t}else{\n\t\t\n\t\t //include the default template\n\t\t $template = DIR_TEMPLATE.'/default.php';\n\t\t\n\t\t}\n }else{\n \n\t\t //include the default template\n\t\t $template = DIR_TEMPLATE.'/default.php';\n\n }\t \n \n return $template;\n \n }", "protected function getPageTemplate()\n {\n return new Template();\n }", "public function forTemplate() {\n\t\treturn; \n\t}", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "function defaultTemplate() {\n//\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n//\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n//\t\t$this->api->pathfinder->addLocation($addon_location,array(\n//\t\t\t'js'=>'templates/js',\n//\t\t\t'css'=>'templates/css',\n// 'template'=>'templates',\n//\t\t))->setParent($l);\n\n return array('view/draw');\n }", "function get_template()\n {\n }", "function portfolio_page_template( $template ) {\n $post_id = get_the_ID();\n if ( get_post_type( $post_id ) == 'actividad' && is_single() ) {\n $new_template = dirname( __FILE__ ) . '/includes/templates/single.php';\n if ( $new_template != '' ) {\n return $new_template ;\n }\n }\n return $template;\n}", "function isCustomTemplate() {\n\t\treturn false;\n\t}", "function ae_template_type( ) {\n\n\t$tmpl = get_site_option( 'ae-appearance' );\n\n\t$tmpl = ( !empty($tmpl) && $tmpl == 1 ) ? 1 : 0;\n\n\tif ( !defined('AE_TMPL') ) define( 'AE_TMPL', $tmpl );\n}", "public function getViewTemplate();", "function rc_tc_get_template_hierarchy( $template ) {\r\n \r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n // Get the template slug\r\n $template_slug = rtrim( $template, '.php' );\r\n $template = $template_slug . '.php';\r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n \r\n \r\n // Check if a custom template exists in the theme folder, if not, load the plugin template file\r\n if ( $theme_file = locate_template( array( 'plugin_template/' . $template ) ) ) {\r\n $file = $theme_file;\r\n }\r\n else {\r\n $file = RC_TC_BASE_DIR . '/templates/' . $template;\r\n }\r\n echo ('<!-- Use Template ' . __( $file, 'nmmc' ) . '-->' );\r\n return apply_filters( 'rc_repl_template_' . $template, $file );\r\n}", "function resolve_block_template($template_type, $template_hierarchy, $fallback_template)\n {\n }", "abstract public function getLayoutTemplateClassName();", "private function getTemplate($a_purpose = 'toolbar')\n\t{\n\t\tswitch ($a_purpose)\n\t\t{\n\t\t\tcase 'toolbar':\n\t\treturn new ilTemplate(\n\t\t\t'tpl.tst_question_navigation.html', true, true, 'Modules/Test'\n\t\t);\n\n\t\t\tcase 'actions':\n\t\t\t\treturn new ilTemplate(\n\t\t\t\t\t'tpl.tst_question_actions.html', true, true, 'Modules/Test'\n\t\t\t\t);\n\t}\n\t}", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "protected function getDefaultTemplate()\n {\n return 'modules/CDev/FileAttachments/product.twig';\n }", "function templatePage ($s_content, $s_title, $s_header='', $s_footer='') {\n\treturn template_tags (template_load ('base.html'), array (\n\t\t'TITLE' => $s_title, 'HEADER' => $s_header, 'FOOTER' => $s_footer, 'CONTENT' => $s_content\n\t));\n}", "function br_rc_content_none_template() {\n\n\t// Get our plugin options and check the set layout\n\t$options \t = get_option( 'br_rc_settings_group' );\n\t$layout_type = $options['br_rc_layout_type'];\n\n\t$content_none_template = plugin_dir_path( dirname( __FILE__ ) );\n\n\t// Depending upon layout type adjust template path (default is sidebar)\n\tif ( 'full_width' == $layout_type ) :\n\t\t$content_none_template .= 'templates/br-rc-content-full-width-none.php'; // full-width template w/o sidebar\n\n\t\t// Filter the full-width path\n\t\t$content_none_template = apply_filters( 'br_rc_content_full_width_none_template_filter',\n\t\t\t\t\t\t\t\t\t\t\t\t$content_none_template );\n\telse:\n\t\t$content_none_template .= 'templates/br-rc-content-none.php'; // default template w/ sidebar\n\n\t\t// Filter the default path\n\t\t$content_none_template = apply_filters( 'br_rc_content_none_template_filter',\n\t\t\t\t\t\t\t\t\t\t\t\t$content_none_template );\n\tendif;\n\n\t// Return the path\n\treturn $content_none_template;\n}", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\t\t$this->content_template();\n\t}", "public function renderTemplate();", "function dg_choose_template( $template ) {\n\n\tif ( !is_admin() && is_home() ) {\n\t\t\n\t\t$new_template = locate_template( array( 'single.php' ) );\n\t\t\n\t\tif ( !empty( $new_template ) ) {\n\t\t\treturn $new_template;\n\t\t}\n\t}\n\n\treturn $template;\n}", "abstract protected function getDefaultView();", "function defaultTemplate(){\n $this->addLocations(); // add addon files to pathfinder\n return array($this->template_file);\n }", "public function set_default_view_template($content = null) {\n if ($content === null) {\n // Notifications.\n $notifications = \\html_writer::tag('div', '##notifications##', array('class' => ''));\n\n // Add new entry.\n $addnewentry = \\html_writer::tag('div', '##addnewentry##', array('class' => 'addnewentry-wrapper'));\n\n // Filtering.\n $quickfilters = \\html_writer::tag('div', $this->get_default_filtering_template(), array('class' => 'quickfilters-wrapper'));\n\n // Paging bar.\n $pagingbar = \\html_writer::tag('div', '##paging:bar##', array('class' => ''));\n // Entries.\n $entries = \\html_writer::tag('div', '##entries##', array('class' => ''));\n\n // Set the view template.\n $exporthide = \\html_writer::tag('div', $addnewentry. $quickfilters. $pagingbar, array('class' => 'exporthide'));\n\n $content = \\html_writer::tag('div', $exporthide. $entries);\n }\n $this->section = $content;\n }", "function page_template_dropdown($default_template = '', $post_type = 'page')\n {\n }", "protected function get_template() {\n\t\treturn 'post';\n\t}", "protected function template($template) {\n if(is_string($template)){\n $template = AppTemplate::load($template);\n }\n return parent::template($template);\n }", "protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "function setupTemplate($subclass = false) {\n\t\tif ($subclass) {\n\t\t\t$templateMgr = &TemplateManager::getManager();\n\t\t\t$templateMgr->assign('pageHierarchy', array(array('user', 'navigation.user')));\n\t\t}\n\t}", "public function set_default_entry_template($content = null) {\n }", "public function provideForTemplate() {\n\t\treturn $this()->renderWith($this()->ContentType);\n\t}", "public function initTemplate() {}", "public function getDefaultView()\n {\n return 'PageParts/testPagePart/view.html.twig';\n }", "function bethel_custom_template() {\n global $post;\n if (is_page() && isset($post) && is_object($post)) {\n $post->page_template = get_post_meta( $post->ID, '_wp_page_template', true );\n }\n}", "public function ClassTemplate(){\n\t\t$this->template = new Template;\n\t}", "function mm_template_chooser( $template ) {\n global $wp_query;\n $post_type = get_query_var('post_type');\n if ( $wp_query->is_search && $post_type == 'photos' ) {\n return locate_template('search-photos.php');\n } elseif ( is_tax( 'albums' ) || is_tax( 'keywords' ) ) {\n $template = get_query_template( 'archive-photos' );\n }\n return $template;\n}", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "function br_rc_single_content_template() {\n\n\t$single_content_template = plugin_dir_path( dirname( __FILE__ ) );\n\t$single_content_template .= 'templates/br-rc-content-single.php';\n\n\t// Filter the default path\n\t$single_content_template = apply_filters( 'br_rc_single_content_template_filter', \n\t\t\t\t\t\t\t\t\t\t\t $single_content_template );\n\n\t// Return the path\n\treturn $single_content_template;\n}", "public function getTemplate(): string;" ]
[ "0.68173414", "0.6627138", "0.65420103", "0.65420103", "0.64612937", "0.64459676", "0.64409584", "0.6440243", "0.6392396", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6360422", "0.6346921", "0.63359374", "0.63359374", "0.63359374", "0.63359374", "0.63359374", "0.63359374", "0.62463784", "0.6140033", "0.6139887", "0.6139236", "0.6097687", "0.60403496", "0.5962769", "0.59558666", "0.592529", "0.59087086", "0.59087086", "0.59087086", "0.59087086", "0.59087086", "0.59087086", "0.5906357", "0.58743674", "0.58743674", "0.58743674", "0.58743674", "0.5874305", "0.5873921", "0.5873921", "0.58738047", "0.58738047", "0.5864371", "0.5858849", "0.5849524", "0.5830628", "0.58232266", "0.5821354", "0.58160317", "0.5810655", "0.58006245", "0.5792169", "0.57689655", "0.576224", "0.575927", "0.57550997", "0.5742574", "0.5738719", "0.5733464", "0.5725483", "0.57212985", "0.57138354", "0.5693824", "0.5690454", "0.5652602", "0.5634273", "0.5621423", "0.5620284", "0.5616619", "0.56151366", "0.5612488", "0.56070715", "0.5603228", "0.5601847", "0.55901545", "0.5590049", "0.55712646", "0.55659723", "0.55632144", "0.556118", "0.5560778", "0.5559074", "0.55571586", "0.5552931", "0.55483216", "0.5538937", "0.55381227", "0.55368656", "0.5523561", "0.55221015", "0.55156004" ]
0.6854448
0
Get name of template used for this article todo: if a template has been removed, check for that and.. do what? default to inherit?
function getTemplateName() { return $this->templateName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "function get_current_template_name() {\n\tglobal $wp_query;\n \n // Page\n\n if(is_page()) {\n return basename(get_page_template(), \".php\");\n }\n\n // Single post\n\n elseif (is_single()) {\n $post_id = $wp_query->get_queried_object_id();\n\t\t$post = $wp_query->get_queried_object();\n\t\t$post_type = $post->post_type;\n\n if ( isset( $post->post_type ) ) {\n // If a regular/default post then assign the name as single.\n if($post->post_type === 'post') {\n return 'single';\n }\n // Else use the post type name.\n else {\n return 'single-' . sanitize_html_class( $post->post_type );\n }\n }\n }\n\n // Search\n\n elseif ( is_search() ) {\n\t\treturn 'search';\n\t}\n}", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "abstract public function getTemplateName();", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "abstract public function getTemplate();", "public function getTemplateName(): string;", "function get_template_name($instance) {\n return 'template';\n }", "function edd_pup_template(){\r\n\r\n\t$template = edd_get_option( 'edd_pup_template' );\r\n\r\n\tif ( ! isset( $template ) ) {\r\n\t\t$template = 'default';\r\n\t}\r\n\r\n\tif ( $template == 'inherit' ) {\r\n\t\treturn edd_get_option( 'email_template' );\r\n\t} else {\r\n\t\treturn $template;\r\n\t}\r\n}", "function templateToUse() {\n\t\t// loop until templateType = name | custom\n\t\t$templateType = $this->getTemplateType();\n\t\t$templateCustom = $this->getTemplateCustom();\n\t\t$templateName = $this->getTemplateName();\n\t\t$articleName = $this->getTitleArticle();\n\t\t$articleId = $this->getId();\n\t\t$parent = $this->parent();\n\t\t\n\t\t$i = 0;\n\t\twhile ($templateType != 'name' && $templateType != 'custom' && $parent !== null) {\n\t\t\t$templateType = $parent->getTemplateType();\n\t\t\t$templateCustom = $parent->getTemplateCustom();\n\t\t\t$templateName = $parent->getTemplateName();\n\t\t\t$articleName = $parent->getTitleArticle();\n\t\t\t$articleId = $parent->getId();\n\t\t\t$parent = $parent->parent();\n\t\t}\n\t\t\n\t\t/*\n\t\techo \"<br><br>templateType: \" . $templateType;\n\t\techo \"<br>templateCustom: \" . $templateCustom;\n\t\techo \"<br>templateName: \" . $templateName;\n\t\techo \"<br>articleName: \" . $articleName;\n\t\techo \"<br>articleID: $articleId\";\n\t\t// */\n\t\t\n\t\t$templates = polarbear_getTemplates();\n\t\t\n\t\tpb_pqp_log_speed(\"article templateToUse\");\n\t\t\n\t\tif ($templateType == 'custom') {\n\t\t\treturn $templateCustom;\n\t\t} else if (isset($templates[$templateName])) {\n\t\t\treturn $templates[$templateName]['file'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public function getTemplateName()\n {\n }", "function getTemplateType() {\n\t\tif (!$this->templateType) {\n\t\t\treturn 'inherit';\n\t\t} else {\n\t\t\treturn $this->templateType;\n\t\t}\n\t}", "function getTemplate();", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplateName()\n {\n return $this->_sThisTemplate;\n }", "function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}", "public function getTemplateName()\n {\n return $this->templateName;\n }", "final public function getTemplate() {\n\t\treturn '';\n\t}", "public function getTemplate() {}", "function get_template()\n {\n }", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "public function getTemplateName()\n {\n // TODO: Implement getTemplateName() method.\n return 'Tem';\n }", "protected function _getTemplateName()\n {\n $tag = $this->getTemplateTag();\n $lang = app()->getLocale();\n $fallbackLang = config('app.fallback_locale');\n\n $name = \"mail_{$tag}_{$lang}\";\n\n if (empty(setting($name))) return \"mail_{$tag}_{$fallbackLang}\";\n\n return $name;\n }", "public function getTemplateName()\n {\n return isset($this->TemplateName) ? $this->TemplateName : null;\n }", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "public function getTemplateSlug(): string;", "function get_template_name( $instance ) {\n return 'yc-headline';\n }", "abstract public function getLayoutTemplateClassName();", "function get_template_name( $instance ) {\n\t\treturn $instance['tpl'] ? $instance['tpl'] : 'base';\n\t}", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "function portfolio_page_template( $template ) {\n $post_id = get_the_ID();\n if ( get_post_type( $post_id ) == 'actividad' && is_single() ) {\n $new_template = dirname( __FILE__ ) . '/includes/templates/single.php';\n if ( $new_template != '' ) {\n return $new_template ;\n }\n }\n return $template;\n}", "function rc_tc_get_template_hierarchy( $template ) {\r\n \r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n // Get the template slug\r\n $template_slug = rtrim( $template, '.php' );\r\n $template = $template_slug . '.php';\r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n \r\n \r\n // Check if a custom template exists in the theme folder, if not, load the plugin template file\r\n if ( $theme_file = locate_template( array( 'plugin_template/' . $template ) ) ) {\r\n $file = $theme_file;\r\n }\r\n else {\r\n $file = RC_TC_BASE_DIR . '/templates/' . $template;\r\n }\r\n echo ('<!-- Use Template ' . __( $file, 'nmmc' ) . '-->' );\r\n return apply_filters( 'rc_repl_template_' . $template, $file );\r\n}", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "public function getTemplateAttribute(): string\n {\n return $this->meta->_wp_page_template ?: '';\n ;\n }", "function get_template_name( $instance ) {\n if ( !empty( $instance['layout'] ) ) {\n return $instance['layout'];\n } else {\n return 'base';\n }\n }", "protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}", "public function getNewTemplateName()\n {\n return isset($this->NewTemplateName) ? $this->NewTemplateName : null;\n }", "public function getReidentifyTemplateName()\n {\n return $this->reidentify_template_name;\n }", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\t\t\n\t\tif ( $theme_file = locate_template(array('image-widget/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'sp_template_image-widget_'.$template, $file);\n\t}", "function services_get_custom_post_type_template($single_template) {\n global $post;\n\n if ($post->post_type == 'gon_services_menu') {\n $single_template = dirname( __FILE__ ) . '/single-gon_services_menu.php';\n }\n return $single_template;\n}", "function get_template_name($instance)\n {\n return isset($instance['style']) ? $instance['style'] : 'base';\n }", "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "function rc_tc_template_chooser( $template ) {\r\n \r\n // Post ID\r\n $post_id = get_the_ID();\r\n $post_type = get_post_type( $post_id );\r\n echo ('<!-- Have Post Type ' . __( $post_type, 'nmmc' ) . '-->' );\r\n // For all other CPT\r\n if ( $post_type != 'nsbr' && $post_type !='ydd' ) {\r\n echo ('<!-- Unknown Type returning ' . __( $template, 'nmmc' ) . '-->' );\r\n return $template;\r\n }\r\n \r\n // Else use custom template\r\n if ( is_single() ) {\r\n echo ('<!-- Is Single returning ' . __( 'single-'.$post_type, 'nmmc' ) . '-->' );\r\n return rc_tc_get_template_hierarchy( 'single-'.$post_type);\r\n }else{\r\n return rc_tc_get_template_hierarchy( 'category-'.$post_type);\r\n }\r\n echo ('<!-- Returning nothing -->' );\r\n return $template;\r\n}", "protected function _getTplName()\n {\n // assign template name\n $sTplName = oxRegistry::getConfig()->getRequestParameter('tpl');\n\n if ($sTplName) {\n // security fix so that you cant access files from outside template dir\n $sTplName = basename($sTplName);\n\n //checking if it is template name, not content id\n if (!getStr()->preg_match(\"/\\.tpl$/\", $sTplName)) {\n $sTplName = null;\n } else {\n $sTplName = 'message/' . $sTplName;\n }\n }\n\n return $sTplName;\n }", "public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }", "protected function get_template() {\n\t\treturn 'post';\n\t}", "public function getSlug() : string\n {\n return 'template';\n }", "function portal_template_hierarchy( $template ) {\n\n $template\t= ( substr( $template, -4, 4 ) == '.php' ? $template : $template . '.php' );\n $base_dir = ( $template == 'archive-portal_projects.php' ? 'projects/' : '' );\n\n if ( $theme_file = locate_template( array( 'yoop/' . $base_dir . $template ) ) ) {\n \t$file = $theme_file;\n } else {\n \t$file = portal_BASE_DIR . '/templates/' . $base_dir . $template;\n }\n\n return apply_filters( 'portal_standard_template_' . $template, $file );\n\n}", "function my_single_template($single) {\n global $wp_query, $post;\n\n /**\n * Checks for single template by category\n * Check by category slug and ID\n */\n foreach((array)get_the_category() as $cat) :\n\n if(file_exists(TEMPLATEPATH . '/single-' . $cat->slug . '.php'))\n return TEMPLATEPATH . '/single-' . $cat->slug . '.php';\n\n endforeach;\n\n return $single;\n\n}", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "function single_template( $template, $type, $template_names ) {\n\t\t\tglobal $wp_query, $post;\n\n\t\t\t$paths = apply_filters( 'unity3_custom_template_path', array() );\n\t\t\tforeach ( $paths as $path ) {\n foreach ( (array) get_the_category() as $cat ) {\n if ( file_exists( $path . '/single-cat-' . $cat->slug . '.php' ) ) {\n return $path . '/single-cat-' . $cat->slug . '.php';\n } elseif ( file_exists( $path . '/single-cat-' . $cat->term_id . '.php' ) ) {\n return $path . '/single-cat-' . $cat->term_id . '.php';\n }\n }\n //\n //else search for standard templates in the custom directory path\n foreach ( (array) $template_names as $template_name ) {\n if (!$template_name) {\n continue;\n }\n if (file_exists($path . '/' . $template_name)) {\n return $path . '/' . $template_name;\n }\n }\n }\n\n\t\t\treturn $template;\n\t\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplateName() {\n\t\treturn 'uitypes/Tree.tpl';\n\t}", "function dg_choose_template( $template ) {\n\n\tif ( !is_admin() && is_home() ) {\n\t\t\n\t\t$new_template = locate_template( array( 'single.php' ) );\n\t\t\n\t\tif ( !empty( $new_template ) ) {\n\t\t\treturn $new_template;\n\t\t}\n\t}\n\n\treturn $template;\n}", "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "function get_template_name( $instance ) {\n\n\t\tswitch ( $instance['box_style'] ) {\n\t\t\tcase 'simple':\n\t\t\t\t$template = 'simple';\n\t\t\t\tbreak;\n\t\t\tcase 'iconbox':\n\t\t\t\t$template = 'iconbox';\n\t\t\t\tbreak;\n\t\t\tcase 'image':\n\t\t\t\t$template = 'image';\n\t\t\t\tbreak;\n\t\t\tcase 'list':\n\t\t\t\t$template = 'list';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$template = 'base';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $template;\n\t}", "public function get_utemplate_name() {\n $fs = get_file_storage();\n $xmlfile = $fs->get_file_by_id($this->utemplateid);\n\n return $xmlfile->get_filename();\n }", "function rbm_single_template( $single_template ) {\n global $post;\n\n if ( is_singular ( 'members' ) ) {\n $single_template = dirname( __FILE__ ) . '/templates/single-member.php';\n }\n return $single_template;\n}", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\n\t\tif ( $theme_file = locate_template(array('social-icons/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'template_social-icons_'.$template, $file);\n\t}", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "private function getTemplateForPage($page)\n {\n return (view()->exists($page->template)) ? $page->template : 'default';\n }", "public function getTemplateName (string $type, string $name) : string\n {\n return $this->registry->getComponent($type, $name)->getTemplatePath();\n }", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "function dt_get_template_name( $post_id = 0, $force_in_loop = false ) {\n\tglobal $post;\n\n\t// work in admin\n\tif ( is_admin() && !$force_in_loop ) {\n\n\t\tif ( isset($_GET['post']) ) {\n\n\t\t\t$post_id = $_GET['post'];\n\t\t} elseif( isset($_POST['post_ID']) ) {\n\n\t\t\t$post_id = $_POST['post_ID'];\n\t\t}\n\t}\n\n\t// work in the loop\n\tif ( !$post_id && isset($post->ID) ) {\n\t\t$post_id = $post->ID;\n\t}\n\n\treturn get_post_meta( absint($post_id), '_wp_page_template', true );\n}", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "function getTemplateType() {\n\t\t\t\t\treturn $this->templateType;\n\t\t\t\t}", "function get_custom_post_type_template($single_template) {\n global $post;\n\n if ($post->post_type == 'employee_news') {\n $single_template = get_template_directory() . '/single-templates/employee_news.php';\n }\n return $single_template;\n}", "public function getTemplate()\n\t{\n\t\treturn $this->_template;\n\t}", "protected function template() {\n\t\treturn '';\n\t}", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}" ]
[ "0.82025933", "0.7506931", "0.74785143", "0.74384886", "0.7422751", "0.7369426", "0.73517907", "0.7330679", "0.72766703", "0.72704417", "0.7245323", "0.72442466", "0.7175602", "0.71671987", "0.71671987", "0.71671987", "0.71671987", "0.714398", "0.714398", "0.714398", "0.714398", "0.714398", "0.714398", "0.7112904", "0.7095518", "0.70951295", "0.7078046", "0.7068029", "0.7045117", "0.69961894", "0.69682014", "0.69682014", "0.6942911", "0.69354707", "0.69168156", "0.6915936", "0.6871405", "0.6842208", "0.6838767", "0.6835537", "0.68296003", "0.68268305", "0.6811253", "0.68103874", "0.67992127", "0.67975104", "0.67973846", "0.67537755", "0.6736906", "0.6734681", "0.6706941", "0.6686402", "0.6673531", "0.66695386", "0.66667974", "0.66658545", "0.66615623", "0.6658157", "0.66506636", "0.66185147", "0.66140133", "0.66106474", "0.6608671", "0.66007054", "0.6591275", "0.6591275", "0.65898305", "0.6576152", "0.6566888", "0.6547489", "0.6535349", "0.6523271", "0.6504621", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649975", "0.649552", "0.64918226", "0.64911187", "0.6480991", "0.6477484", "0.6434587", "0.6419358", "0.64187866", "0.64185166", "0.6412096", "0.64044225", "0.64044225", "0.640429", "0.6403572" ]
0.74349576
4
get the template we actually are gonna use taking inherit in consideration
function templateToUse() { // loop until templateType = name | custom $templateType = $this->getTemplateType(); $templateCustom = $this->getTemplateCustom(); $templateName = $this->getTemplateName(); $articleName = $this->getTitleArticle(); $articleId = $this->getId(); $parent = $this->parent(); $i = 0; while ($templateType != 'name' && $templateType != 'custom' && $parent !== null) { $templateType = $parent->getTemplateType(); $templateCustom = $parent->getTemplateCustom(); $templateName = $parent->getTemplateName(); $articleName = $parent->getTitleArticle(); $articleId = $parent->getId(); $parent = $parent->parent(); } /* echo "<br><br>templateType: " . $templateType; echo "<br>templateCustom: " . $templateCustom; echo "<br>templateName: " . $templateName; echo "<br>articleName: " . $articleName; echo "<br>articleID: $articleId"; // */ $templates = polarbear_getTemplates(); pb_pqp_log_speed("article templateToUse"); if ($templateType == 'custom') { return $templateCustom; } else if (isset($templates[$templateName])) { return $templates[$templateName]['file']; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate() {}", "function getTemplate();", "function getTemplateType() {\n\t\tif (!$this->templateType) {\n\t\t\treturn 'inherit';\n\t\t} else {\n\t\t\treturn $this->templateType;\n\t\t}\n\t}", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "function get_template()\n {\n }", "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "public function getTemplateClass();", "public function getTemplate()\r\n {\r\n return $this->_customTemplate;\r\n }", "public function getTemplate(){\n\t\treturn $this->CustomTemplate ? $this->CustomTemplate : $this->config()->get('default_template');\n\t}", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "public function getTemplate()\n {\n return $this->repeatParent;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n {\n return $this->template;\n }", "public function getTemplate()\n\t{\n\t\treturn $this->_template;\n\t}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "public function getTemplate(): TemplateInterface;", "public function getTemplate() {\n return $this->template;\n }", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "public function getBaseTemplateClass()\n {\n return $this->baseTemplateClass;\n }", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate() {\r\n return $this->_template;\r\n }", "public function getTemplate() {\n\t\t\treturn $this->template;\n\t\t}", "function edd_pup_template(){\r\n\r\n\t$template = edd_get_option( 'edd_pup_template' );\r\n\r\n\tif ( ! isset( $template ) ) {\r\n\t\t$template = 'default';\r\n\t}\r\n\r\n\tif ( $template == 'inherit' ) {\r\n\t\treturn edd_get_option( 'email_template' );\r\n\t} else {\r\n\t\treturn $template;\r\n\t}\r\n}", "public function get_template() {\n return $this->_template;\n }", "public function returnTemplate() {\n\t\treturn $this->template;\n\t}", "final public function getTemplate() {\n\t\treturn '';\n\t}", "abstract public function getTemplate($tpl);", "protected function getPageTemplate()\n {\n return new Template();\n }", "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "function ct_get_template_hierarchy( $template ) {\n \n // Get the template slug\n $template_slug = rtrim( $template, '.php' );//single\n $template = $template_slug . '.php'; //single.php\n\n //logit($template,'$template: ');\n //logit($template_slug,'$template_slug: ');\n\n //$locate = locate_template( array( 'plugin_templates/single.php' ) );\n //$locateString = 'plugin_template/' . $template;\n //logit($locateString,'$locateString: ');\n //logit($locate,'$locate: ');\n \n // Check if a custom template exists in the theme folder, if not, load the plugin template file\n if ( $theme_file = locate_template( array( 'cals_teams_templates/' . $template ) ) ) {\n $file = $theme_file;\n logit($file,'$file: ');\n\n }\n else {\n $file = CT_PLUGIN_BASE_DIR . '/includes/templates/' . $template;\n }\n \n //return apply_filters( 'rc_repl_template_' . $template, $file );\n return $file;\n}", "abstract public function getLayoutTemplateClassName();", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\t\t\n\t\tif ( $theme_file = locate_template(array('image-widget/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'sp_template_image-widget_'.$template, $file);\n\t}", "protected function getTemplate()\n {\n $template = parent::getTemplate();\n\n if (\n $template == $this->getDefaultTemplate()\n && self::WIDGET_TYPE_SIDEBAR == $this->getParam(self::PARAM_WIDGET_TYPE)\n ) {\n $template = self::TEMPLATE_SIDEBAR;\n }\n\n return $template;\n }", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "function get_template_name( $instance ) {\n\t\treturn 'base';\n\t}", "public function getViewTemplate();", "public function template() {\n\t\tif( !$this->template ) {\n\t\t\t$this->template = new Template( $this->template_id );\n\t\t}//end if\n\t\treturn $this->template;\n\t}", "function rc_tc_template_chooser( $template ) {\r\n \r\n // Post ID\r\n $post_id = get_the_ID();\r\n $post_type = get_post_type( $post_id );\r\n echo ('<!-- Have Post Type ' . __( $post_type, 'nmmc' ) . '-->' );\r\n // For all other CPT\r\n if ( $post_type != 'nsbr' && $post_type !='ydd' ) {\r\n echo ('<!-- Unknown Type returning ' . __( $template, 'nmmc' ) . '-->' );\r\n return $template;\r\n }\r\n \r\n // Else use custom template\r\n if ( is_single() ) {\r\n echo ('<!-- Is Single returning ' . __( 'single-'.$post_type, 'nmmc' ) . '-->' );\r\n return rc_tc_get_template_hierarchy( 'single-'.$post_type);\r\n }else{\r\n return rc_tc_get_template_hierarchy( 'category-'.$post_type);\r\n }\r\n echo ('<!-- Returning nothing -->' );\r\n return $template;\r\n}", "protected function GetTemplate()\n\t{\n\t\treturn 'heads.tpl';\n\t}", "function getTemplateType() {\n\t\t\t\t\treturn $this->templateType;\n\t\t\t\t}", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "function rc_tc_get_template_hierarchy( $template ) {\r\n \r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n // Get the template slug\r\n $template_slug = rtrim( $template, '.php' );\r\n $template = $template_slug . '.php';\r\n echo ('<!-- Looking for Template ' . __( $template, 'nmmc' ) . '-->' );\r\n \r\n \r\n // Check if a custom template exists in the theme folder, if not, load the plugin template file\r\n if ( $theme_file = locate_template( array( 'plugin_template/' . $template ) ) ) {\r\n $file = $theme_file;\r\n }\r\n else {\r\n $file = RC_TC_BASE_DIR . '/templates/' . $template;\r\n }\r\n echo ('<!-- Use Template ' . __( $file, 'nmmc' ) . '-->' );\r\n return apply_filters( 'rc_repl_template_' . $template, $file );\r\n}", "private function getTemplate(): string\n {\n $sTemplate = $this->getViewPath() . static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= $this->getCurrentClassName() . DIRECTORY_SEPARATOR;\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n if (!is_file($sTemplate)) {\n $sTemplate = $this->getViewRootDirectory();\n $sTemplate .= static::TEMPLATE . static::TEMPLATE_EXT;\n }\n }\n\n return $sTemplate;\n }", "public function findTemplate(){\n if($this->hasErrors()) return false;\n $located = false;\n if(!$this->hasErrors()){\n $module_file = trailingslashit($this->location).$this->type.'.php';\n $file = trailingslashit($this->module).trailingslashit($this->location).$this->type.'.php';\n switch(true){\n //Check Stylesheet directory first (Child Theme)\n case file_exists(trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_stylesheet_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check Template directory Second (Parent Theme)\n case file_exists(trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file):\n $located = trailingslashit(get_template_directory()).trailingslashit(self::TEMPLATE_DIRECTORY).$file;\n break;\n //Check filtered custom template directory, if it's set.\n case (apply_filters($this->prefix('custom_template_directory_root'), '', $this) !== '' && file_exists(trailingslashit(apply_filters($this->prefix('custom_template_directory_root'), '', $this)).$file)):\n $located = trailingslashit($this->prefix('custom_template_directory_root')).$file;\n break;\n //If nothing else exists, go ahead and get the default\n default:\n $file = trailingslashit(ModuleLoader::getModuleDir($this->module)).$module_file;\n if($this->fileExists($file)) $located = $file;\n break;\n }\n }\n\n return $located;\n }", "public function findTemplate() {\n\n\t\t$templatePath = $this->_template;\n\n\t\tif (empty($templatePath)) {\n\n\t\t\t$templateFolders = array();\n\n\t\t\tif (strlen($tmp = $this->_Model->templatePath)) {\n\t\t\t\t$templateFolders[] = \\Finder::joinPath(APP_ROOT, $tmp);\n\t\t\t}\n\t\t\t// bubble up for template path\n\t\t\telseif (strlen($tmp = $this->_Model->getBubbler()->templatePath)) {\n\t\t\t\t$templateFolders[] = \\Finder::joinPath(APP_ROOT, $tmp);\n\t\t\t}\n\t\t\t// I should add the root page model's template path if exists\n\t\t\t$templateFolders[] = NINJA_ROOT . '/src/ninja/Mod/' . $this->_Module->getModName() . '/template';\n\n\t\t\t$templateFolders = array_unique($templateFolders);\n\n\t\t\t$templateNames = array();\n\t\t\t// I respect what's set in the model, and it should not be invalid\n\t\t\tif (strlen($templateName = $this->_Model->template)) {\n\t\t\t\t$templateNames[]= $templateName;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$Module = $this->_Module;\n\t\t\t\t$modName = $Module->getModName();\n\n\t\t\t\t$a = $Module::moduleNameByClassname(get_class($this->_Model));\n\t\t\t\t$templateNames[] = \\Finder::joinPath($modName, \\Finder::classToPath($a));\n\t\t\t\t$b = $Module::moduleNameByClassname(get_class($this->_Module));\n\t\t\t\t$templateNames[] = \\Finder::joinPath($modName, \\Finder::classToPath($b));\n\t\t\t}\n\n\t\t\t$extension = '.html.mustache';\n\n\t\t\t// for debug\n\t\t\t//echop($templateFolders); echop($templateNames); die;\n\n\t\t\t$templatePath = \\Finder::fileByFolders($templateFolders, $templateNames, $extension);\n\n\t\t}\n\n\t\treturn $templatePath;\n\n\t}", "function get_template_name( $instance ) {\n\t\t\treturn isset($instance['template']) ? $instance['template'] : 'base';\n\t\t}", "function getXTemplate() {\n return $this->xTemplate;\n}", "protected function content_template() {}", "protected function content_template() {}", "protected function GetTemplate()\n\t{\n\t\tif ($this->Plain())\n\t\t\treturn 'blobplain.tpl';\n\t\treturn 'blob.tpl';\n\t}", "public function template() {\n return labelTemplate::where([\n ['CUSTOMER',$this->CUSTOMER],\n ['TMPCODE',$this->TEMPLATE],\n ])->first();\n }", "protected function getFluidTemplateObject() {}", "protected function get_template() {\n\t\treturn 'post';\n\t}", "public function getGathercontentTemplate();", "protected function getCurrentParsedTemplate() {}", "public function getTemplate()\n {\n return isset($this->parseTemplate)?$this->parseTemplate:false;\n }", "abstract public function getTemplateFile();", "public function getHtmlTemplate() {}", "function get_template_name($instance) {\n return 'template';\n }", "public static function getTemplate() {\n $settings = self::getSettings();\n \n return $settings->template;\n }", "public function get_template_name(){\n\n return str_replace(\"_\",\"\",str_replace(\"_page\", \"\", get_class($this))) . \".tpl\";\n }", "protected function _content_template() {\n \n }", "function get_template_name( $instance ) {\n if ( !empty( $instance['layout'] ) ) {\n return $instance['layout'];\n } else {\n return 'base';\n }\n }", "public function template();", "function getTemplateHierarchy($template) {\n\t\t// whether or not .php was added\n\t\t$template_slug = rtrim($template, '.php');\n\t\t$template = $template_slug . '.php';\n\n\t\tif ( $theme_file = locate_template(array('social-icons/'.$template)) ) {\n\t\t\t$file = $theme_file;\n\t\t} else {\n\t\t\t$file = 'views/' . $template;\n\t\t}\n\t\treturn apply_filters( 'template_social-icons_'.$template, $file);\n\t}" ]
[ "0.83265114", "0.7874619", "0.7874619", "0.7874619", "0.7874619", "0.7874619", "0.7874619", "0.7782503", "0.760529", "0.7594811", "0.7537962", "0.7536522", "0.7499788", "0.7439588", "0.74201876", "0.7405425", "0.73901165", "0.7387207", "0.73592657", "0.72687465", "0.72687465", "0.7258664", "0.7188589", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.7165607", "0.71446174", "0.70988595", "0.70988595", "0.70988595", "0.70988595", "0.70986915", "0.70986915", "0.7097277", "0.7096099", "0.7096099", "0.7087466", "0.7082086", "0.7078825", "0.707849", "0.70765865", "0.70765865", "0.70765865", "0.70765865", "0.70672494", "0.7045474", "0.70414305", "0.70377594", "0.70324343", "0.69609934", "0.69437647", "0.693982", "0.693161", "0.6925519", "0.6916766", "0.6914251", "0.69092757", "0.68736404", "0.68701273", "0.68701273", "0.686952", "0.6852353", "0.6838044", "0.68299717", "0.67940223", "0.67926043", "0.6773265", "0.674079", "0.67296726", "0.67216694", "0.6716536", "0.67099226", "0.67032564", "0.67032564", "0.6691901", "0.66845745", "0.6681486", "0.6679758", "0.66697705", "0.66632086", "0.66568255", "0.6639467", "0.663495", "0.6633784", "0.6603021", "0.65952796", "0.65885836", "0.6575758", "0.6568824", "0.65663564" ]
0.7335747
19
Does this article has a parent article If not it is at the root
function hasParent() { return (bool) ($this->parentID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function is_parent()\n\t{\n\t\treturn is_null($this->category_id);\n\t}", "public function hasParent() {}", "public function hasParent();", "public function hasParent();", "public function hasParent();", "public function hasParent()\n\t{\n\t\treturn !empty($this->parent);\n\t}", "public function hasParent() {\n\t\treturn $this->parent()->count() == 1;\n\t}", "public function hasParent()\n {\n return $this->currentParent !== null;\n }", "public function isParent();", "public function hasParent() {\n return isset($this->_parent);\n }", "public function hasParent()\n {\n }", "public function isRoot()\n {\n return empty($this->parent_id);\n }", "public function isParent() {\n\t\treturn $this->isParent;\n\t}", "final public function hasParent() {\n\t\treturn ($this->_parentNode !== null);\n\t}", "public function hasParent(BaseObject $node)\n {\n return (bool)$node->getParentIdValue();\n }", "public function isRoot(): bool\n {\n return $this->parent === null;\n }", "function is_root() {\n\t\treturn $this->_parent === NULL;\n\t}", "public function is_parent_available() {\n\t\t$parent = get_posts( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'name' => $this->theme->get_template(),\n\t\t\t'posts_per_page' => 1,\n\t\t\t'post_type' => 'repopackage',\n\t\t\t'orderby' => 'ID',\n\t\t\t'suppress_filters' => false,\n\t\t) );\n\t\t$this->theme->post_parent = current( $parent );\n\n\t\treturn ! empty( $parent );\n\t}", "public function hasParentId(){\n return $this->_has(3);\n }", "function has_post_parent($post = \\null)\n {\n }", "abstract public function is_for_parent_node(Jquarry_Node $parent);", "function salmon_parent_is($atom, $parent, $breadcrumbs) {\n\treturn ($breadcrumbs[$atom['level'] - 1] == $parent); \n}", "function prevArticle() {\n\t\t$parent = $this->parent();\n\t\tif (!$parent) {\n\t\t\treturn false;\n\t\t}\n\t\t$parentChildren = $parent->children();\n\t\t$aCount = sizeof($parentChildren);\n\t\t$foundAtPos=null;\n\t\tfor ($i=0;$i<$aCount;$i++) {\n\t\t\tif ($parentChildren[$i]->getId() == $this->getId()) {\n\t\t\t\t$foundAtPos=($i-1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($foundAtPos>=0) {\n\t\t\treturn $parentChildren[$foundAtPos];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getIsParent() {\n\t\treturn $this->isParent;\n\t}", "public function isRoot()\n {\n // return (empty($this->{$this->getTreeColumn('parent')})) ? true : false;\n return $this->{$this->getTreeColumn('path')} === $this->getKey() . '/'\n && $this->{$this->getTreeColumn('level')} === 0;\n }", "function L_catHasParent($catid) {\n\t\t\n\t\t$category = get_category($catid);\n\t\tif ($category->category_parent > 0) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\n\t}", "public function isRoot();", "public function isRoot();", "public function isRoot();", "public function isRoot();", "public function isRoot() {\n return ($this->owner->owner == null);\n }", "public function isAncestor()\n {\n $model_ticket_forwarded_to = self::find()->andWhere(['forwarded_from_id' => $this->id])->one();\n\n return !is_null($model_ticket_forwarded_to);\n }", "public static function currentUserisParent()\n {\n return (check_user_role('parent')) ? true : false;\n }", "function ep_is_subpage() {\n\tglobal $post; // load details about this page\n if ( is_page() && $post->post_parent ) { // test to see if the page has a parent\n $parentID = $post->post_parent; // the ID of the parent is this\n return $parentID; // return the ID\n } else { // there is no parent so...\n return false; // ...the answer to the question is false\n };\n}", "function is_parent($parent_node, $child_node)\r\n\t{\r\n\t\t$p_root_id = $parent_node['root_id'];\r\n\t\t$p_l = $parent_node['l'];\r\n\t\t$p_r = $parent_node['r'];\r\n\r\n\t\t$c_root_id = $child_node['root_id'];\r\n\t\t$c_l = $child_node['l'];\r\n\t\t$c_r = $child_node['r'];\r\n\r\n\t\tif (($p_root_id == $c_root_id) && ($p_l < $c_l && $p_r > $c_r))\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "function isChildOrSubChildOf($refArticle) {\n\t\tif (is_numeric($refArticle)) {\n\t\t\t$refArticle = polarbear_article::getInstance($refArticle);\n\t\t}\n\t\t$isChild = false;\n\t\t// loop our way up until we reach the top article or refArticle\n\t\t// $refArticle\n\t\t$doLoop = true;\n\t\t$tmpA = $this;\n\t\twhile ($doLoop) {\n\t\t\t// get parent article\n\t\t\t$tmpA = $tmpA->parent();\n\t\t\tif ($tmpA == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t#echo \"<br><br>tmpA:\".$tmpA->getTitleArticle();\n\t\t\t#echo \"<br> refArticle->getId():\" . $refArticle->getId();\n\t\t\t#echo \"<br> tmpA->getId():\" . $tmpA->getId();\n\t\t\t#echo \"<br> tmpA->getParentId():\"; var_dump($tmpA->getParentId());\n\t\t\t// check if the parent article is the refArticle. if it is, that means that $this is a child of $refArticle\n\t\t\tif ($tmpA->getId() == $refArticle->getId()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// if parent is null = is at top level\n\t\t\tif ($tmpA->getParentId()==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article isChildOrSubChildOf()\");\n\n\t\treturn false;\n\t}", "public function hasChildren($parent) {\n\t\t// If the left and right are x and x+1, then there is no kids\n\t\tif ($parent['Aco']['rght'] == $parent['Aco']['lft'] +1 ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function is_parent()\n{ \n global $post;\n\n if ( is_page() && $post->post_parent ) {\n // This is a subpage\n return;\n\n } else {\n // This is not a subpage\n return true;\n }\n \n}", "public function isRoot()\n\t{\n\t\treturn $this->getOwner()->{$this->leftAttribute}==1;\n\t}", "public function isAncestor ($Item)\r\n {\r\n \tif ($this->path == '')\r\n \t\treturn false;\r\n \telse\r\n \t{\r\n \t\t$return = (strpos($Item->path,$this->path)===0);\r\n\r\n \t\treturn $return;\r\n \t}\r\n }", "private function is_can_parent_node($local_root) {\n if ($local_root !== null) {\n return !($local_root->type == qtype_preg_node::TYPE_NODE_ALT);\n }\n return true;\n }", "public function isAncestor ($Page)\r\n {\r\n \tif ($this->path == '')\r\n \t\treturn false;\r\n \telse\r\n \t{\r\n \t\t$return = (strpos($Page->path,$this->path)===0);\r\n\r\n \t\treturn $return;\r\n \t}\r\n }", "public function hasParentMessage(): bool {\n return isset($this->parentMessageId);\n }", "public function isChildOnly();", "public function hasParentRelayCount()\n {\n return $this->parent_relay_count !== null;\n }", "function nextArticle() {\n\t\t$parent = $this->parent();\n\t\tif (!$parent) {\n\t\t\treturn false;\n\t\t}\n\t\t$parentChildren = $parent->children();\n\t\t$aCount = sizeof($parentChildren);\n\t\t$foundAtPos=null;\n\t\tfor ($i=0;$i<$aCount;$i++) {\n\t\t\tif ($parentChildren[$i]->getId() == $this->getId()) {\n\t\t\t\t$foundAtPos=($i+1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\tif ($foundAtPos>=0 && $foundAtPos<$aCount) {\n\t\t\treturn $parentChildren[$foundAtPos];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isRoot() {\n return $this->{$this->leftAttribute} == 1;\n }", "public function isSelf(){\n\t\t$db = new DB_WE();\n\n\t\tif($this->ID){\n\t\t\t$count = 0;\n\t\t\t$parentid = $this->ParentID;\n\t\t\twhile($parentid != 0){\n\t\t\t\tif($parentid == $this->ID){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t$parentid = f('SELECT ParentID FROM ' . escape_sql_query($this->_table) . ' WHERE ID=' . intval($parentid), '', $db);\n\t\t\t\t$count++;\n\t\t\t\tif($count == 9999){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasParentInTrustChain()\n {\n return (! $this->getParentCertificateURL() == '');\n }", "public function hasParentInTrustChain()\n {\n return (! $this->getParentCertificateURL() == '');\n }", "protected function hasParentMenuItem() {}", "function is_tree( $pid ) {\n\tglobal $post; // load details about this page\n\tif ( is_page() && ( $post->post_parent == $pid || is_page( $pid ) ) ) {\n\t\treturn true;\n\t} // we're at the page or at a sub page\n\telse {\n\t\treturn false;\n\t} // we're elsewhere\n}", "public function isParentOf($path)\n\t{\n\t\t$path = $this->resolve($path);\n\n\t\tif ($path === $this->root) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn 0 === \\strpos($path, $this->root);\n\t}", "public function isParentOf($page) {\n if(!is_a($page, 'Page')) $page = page($page);\n\n return $this->is($page) ? false : $page->parent->is($this);\n }", "public function isParentOf(AbstractNode $node) :bool {\n return $node->hasParent()&&$node->parent->isSameNode($this);\n }", "public function isChild() {\n\t\treturn $this->_parent !== null;\n\t}", "public function isChild()\n {\n return $this->parentId != null;\n }", "public function isChild()\n {\n if (false === $this->parent_category) {\n return false;\n }\n\n return true;\n\n }", "function is_tree($pid) {\n\tglobal $post; // load details about this page\n\tif(is_page()&&($post->post_parent==$pid||is_page($pid))) \n return true; // we're at the page or at a sub page\n\telse \n return false; // we're elsewhere\n}", "private function check_for_no_recursion() {\n $parent_id=$this->navi_parent_page_id;\n if($parent_id=='0') return true;\n for($i=0;$parent_id!='0'&&$i<20;$i++) {\n if(strpos($parent_id,'s')===0) {\n $parent_id=substr($parent_id,1);\n if($parent_id==$this->page_id) return false;\n\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"pages\")->prepare(\"SELECT\n navi_parent_page_id\n FROM\n u235_pages_html\n WHERE\n page_id=:page_id AND\n site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':page_id', $parent_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n /** @noinspection PhpUndefinedVariableInspection PhpUndefinedMethodInspection */\n if(!$qr=$stm->fetch(PDO::FETCH_OBJ)) return false;\n $parent_id=$qr->navi_parent_page_id;\n if($parent_id=='0') return true;\n }\n elseif(strpos($parent_id,'p')===0) {\n $parent_id=substr($parent_id,1);\n if($parent_id==$this->page_id) return false;\n\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uPage\")->prepare(\"SELECT\n navi_parent_page_id\n FROM\n u235_pages\n WHERE\n page_id=:page_id AND\n site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':page_id', $parent_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('130'/*.$e->getMessage()*/);}\n\n /** @noinspection PhpUndefinedVariableInspection PhpUndefinedMethodInspection */\n if(!$qr=$stm->fetch(PDO::FETCH_OBJ)) return false;\n $parent_id=$qr->navi_parent_page_id;\n if($parent_id=='0') return true;\n }\n else return true;\n }\n return false;\n }", "Public function getParentPageId() {\n\t\tif(!empty($this->parent_pageid))\n\t\t\treturn $this->parent_pageid;\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function no_location_and_parent_match($parent_id)\n\t{\n\t\t$data = $this->find_one_array(array($this->_tables['fuel_navigation'].'.id' => $parent_id));\n\t\tif (!empty($data))\n\t\t{\n\t\t\tif ($data['id'] == $data['parent_id']) return FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}", "function is_tree($pid) { // $pid = The ID of the page we're looking for pages underneath\n\tglobal $post; // load details about this page\n\tif(is_page()&&($post->post_parent==$pid||is_page($pid)))\n return true; // we're at the page or at a sub page\n\telse\n return false; // we're elsewhere\n}", "function is_child($parent) {\n\tglobal $wp_query;\n\tif ($wp_query->post->post_parent == $parent) { $return = true; } else { $return = false; }\n\treturn $return;\n}", "public function hasLeftChild()\n\t{\n\t\treturn isset($this->leftChild);\n\t}", "final public function allowsParent() {\n\t\treturn true;\n\t}", "function is_tree($pid)\n\t\t{\n\t\t global $post;\n\t\t $ancestors = get_post_ancestors($post->$pid);\n\t\t $root = count($ancestors) - 1;\n\t\t $parent = $ancestors[$root];\n\t\t if(is_page() && (is_page($pid) || $post->post_parent == $pid || in_array($pid, $ancestors)))\n\t\t {\n\t\t return true;\n\t\t }\n\t\t else\n\t\t {\n\t\t return false;\n\t\t }\n\t\t}", "public function getRenderParents(): bool;", "function _haveValidParent(&$cat) {\n\t\t$parentCat = $this->get($cat->getVar('cat_pid'));\n\t\treturn !$this->_isAlbum($parentCat);\n\t}", "function test_get_parent()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Create a new tree\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\t\t$allnodes = $this->_tree->get_all_nodes(); \r\n\t\t// Walk trough all nodes and compare it's relations whith the one provided\r\n\t\t// by the relation tree\r\n\t\tforeach($allnodes AS $nid => $node)\r\n\t\t{\r\n\t\t\t$parent = $this->_tree->get_parent($nid, true);\r\n\t\t\tif (!isset($relation_tree[$nid]['parent_id']))\r\n\t\t\t{\r\n\t\t\t\t$this->assertFalse($parent, 'A rootnode returned a parent');\r\n\t\t\t\tcontinue;\r\n\t\t\t} \r\n\t\t\t$this->assertEqual($relation_tree[$nid]['parent_id'], $parent['id'], 'Relation tree parent doesn\\'t match method return');\r\n\t\t} \r\n\t\treturn true;\r\n\t}", "public function isEmbeddedOneChangedInParent()\n {\n if (empty($this->_root)) {\n return false;\n }\n\n if ($this->_root instanceof EmbeddedGroup) {\n return false;\n }\n\n $exPath = explode('.', $this->_path);\n unset($exPath[count($exPath) -1 ]);\n\n $parentDocument = $this->_root;\n foreach ($exPath as $embedded) {\n $parentDocument = $parentDocument->{'get'.ucfirst($embedded)}();\n if ($parentDocument instanceof EmbeddedGroup) {\n return false;\n }\n }\n\n $exPath = explode('.', $this->_path);\n $name = $exPath[count($exPath) - 1];\n\n return $parentDocument->isEmbeddedOneChanged($name);\n }", "public function hasMain()\n\t{\n\t\treturn $this->OfParent($this->parent_type, $this->parent_id)->where('mainoffice', 1)->count() > 0;\n\t}", "public function parentIsNode($model = false)\n {\n $model = ($model ? $model : $this);\n\n $class = new ReflectionClass($model);\n $parent = $class->getParentClass();\n $parentName = $parent->getShortName();\n\n if($parentName == 'Node')\n {\n return true;\n }\n\n return false;\n }", "public function is_root()\n {\n return ($this->left === 1);\n }", "public function get_parent();", "public function get_isTableWiTreeParentField()\n {\n if ( empty( $this->arr_tablesWiTreeparentfield ) )\n {\n return false;\n }\n\n return true;\n }", "public function getParentNode()\r\n {\r\n return $this->_parentNode ? $this->_parentNode : false;\r\n }", "public function isCurrentChild(): bool;", "private function landing_pregnancy_and_parenting($articles)\r\n\t{\r\n\t\t/* Get data */\r\n\t\t$link = SITEURL . '/explore/pregnancy_and_parenting';\r\n\r\n\t\t/* Load template */\r\n\t\tinclude(BLUPATH_TEMPLATES . '/explore/landing/pregnancy_and_parenting.php');\r\n\t}", "public function testGetParent()\n {\n $this->checkSetup();\n $parent = $this->bundle->getParent();\n $this->assertNull($parent);\n }", "public function isChild(): bool\n {\n return false;\n }", "public function parent() { return $this->post->post_parent; }", "public function is_ancestor( $post_id ){\n\t\tglobal $wp_query;\n\t\t$ancestors = $wp_query->post->ancestors;\n\t\tif ( in_array( $post_id, $ancestors ) ){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getIsChildAttribute(){\n return $this->parent_id != NULL;\n }", "protected function isInMainNamespace(): bool\n { if ($this->wikiPageAction->getNs() !== 0) {\n $this->log->notice(\"SKIP : page n'est pas dans Main (ns 0)\\n\");\n $this->db->skipArticle($this->title);\n\n return false;\n }\n return true;\n }", "protected function loadParentId(){return 0;}", "public function isOrphan(){\n\t\treturn is_null( $this->father );\n\t}", "function get_parent()\r\n {\r\n return $this->parent;\r\n }", "function get_parent()\r\n {\r\n return $this->parent;\r\n }", "public function hasAncestors();", "public function is_parent($target)\n {\n if ( ! ($target instanceof $this))\n $target = $this->factory_item($target);\n elseif ( !$target->loaded )\n $target->reload();\n\n return ((int) $this->primary_key === (int) $target->parent_key);\n }", "public function isAncestorOf(AbstractNode $node) :bool {\n if ($this->hasChild()===false || $node->hasParent()===false || $this->isSameNode($node)) {\n return false;\n }\n\t\twhile ($node instanceof AbstractNode) {\n\t\t\tif ($this->isParentOf($node)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$node = $node->parent;\n\t\t}\n\t\treturn false;\n }", "public function validator()\n {\n if (!$this->getElement(self::PARENT_ID_KEY)->getValue() && !$this->skinsetModel->getTemplateConfigByKey($this->getRecord()->template)->getAllowedOnRoot()) {\n $this->getElement(self::PARENT_ID_KEY)->addError('form.categoryMove.parentId.error');\n return false;\n }\n return true;\n }", "public static function is_parent($id)\n {\n if ('parent_service' == BA_Lib::get_product_type($id)) {\n return true;\n }\n return false;\n }", "function custom_is_child($pid)\n{\n global $post; // load details about this page\n $anc = get_post_ancestors($post->ID);\n foreach ($anc as $ancestor) {\n if (is_page() && $ancestor == $pid) {\n return true;\n }\n }\n return false; // we're elsewhere\n}", "public function isRoot(): bool\n {\n return ($this->getKey() === static::ROOT_ID);\n }", "public function isParent($dir)\n {\n return 0 === strpos($this->referencePath, realpath($dir));\n }", "public function parent()\n {\n if ( !$this->loaded )\n $this->reload();\n\n if ($this->is_root())\n return NULL;\n\n if ( ! in_array('parent', $this->_objects) )\n {\n $sql = \"SELECT * FROM $this->_table_name\n WHERE \n $this->primary_column = $this->parent_key\n ORDER BY \". $this->_sorting[0] .\" \". $this->_sorting[1] .\"\n \";\n\n $result = $this->_db->query($sql);\n\n $this->_objects['parent'] = $this->factory_set($result)[0];\n }\n\n return $this->_objects['parent'];\n }", "public function hasParentChildFilter() {\n return $this->_has(4);\n }", "function onBeforeCheckForParent($db, $format, &$object, &$parentObject) {\n\t}" ]
[ "0.7358635", "0.7341622", "0.73391825", "0.73391825", "0.73391825", "0.7266606", "0.7242384", "0.7201033", "0.71857864", "0.7149637", "0.71470565", "0.697956", "0.6933541", "0.6899916", "0.68857074", "0.67768085", "0.6744927", "0.6726278", "0.66935897", "0.6680812", "0.66453916", "0.66290027", "0.65595925", "0.6502417", "0.6501693", "0.6402006", "0.6395514", "0.6395514", "0.6395514", "0.6395514", "0.6392238", "0.634212", "0.6336918", "0.63341284", "0.63235784", "0.62845504", "0.62776965", "0.62711596", "0.62656265", "0.6239969", "0.6220542", "0.6171495", "0.6147551", "0.614343", "0.613188", "0.61295986", "0.610242", "0.60977864", "0.6094007", "0.6094007", "0.6092653", "0.6079749", "0.6066801", "0.6053156", "0.60499173", "0.60498434", "0.60319126", "0.60250574", "0.601128", "0.600836", "0.5970674", "0.5956797", "0.59564745", "0.5955912", "0.59522504", "0.59512675", "0.5937388", "0.5930845", "0.59196365", "0.59121287", "0.5910576", "0.5887295", "0.58631057", "0.58315337", "0.5822563", "0.5814201", "0.58137816", "0.58098483", "0.58073074", "0.5796033", "0.5790196", "0.57887226", "0.57849604", "0.57810724", "0.57779056", "0.577281", "0.5771837", "0.57661545", "0.57661545", "0.57594925", "0.5758454", "0.5742984", "0.57289773", "0.5709513", "0.5689797", "0.56833726", "0.5680819", "0.56756926", "0.5672733", "0.56627697" ]
0.7207983
7
Does article have child nodes?
function hasChildren($options = null) { return (bool) $this->numChildren($options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasChildNodes() {}", "public function hasChildren();", "public function hasChildren();", "public function hasChildren();", "public function hasChildren();", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren(): bool;", "public function hasDescendants();", "public function hasChildren()\n {\n }", "public function hasChildren()\n {\n }", "public function hasChildren() {\n\t\treturn $this->children()->count() > 0;\n\t}", "public function hasChildren()\n {\n return !empty($this->children);\n }", "public function hasChildren() \n {\n return count($this->children) > 0;\n }", "final public function hasChildren() {\n\t\treturn false;\n\t}", "#[\\ReturnTypeWillChange]\n public function hasChildren()\n {\n return $this->current()->hasChildNodes();\n }", "public function hasChildren()\n {\n return $this->children->count() == 0 ? false : true;\n }", "function isChildren()\n {\n return count($this->children)>0;\n }", "public function hasChildren(): bool\n {\n return $this->children()->count() > 0;\n }", "public function hasChildren()\n\t{\n\t\treturn !empty($this->children);\n\t}", "public function hasChildren()\n {\n return count($this->children) > 0 ? true : false;\n }", "public function hasChildren() : bool\n {\n return $this->children->isNotEmpty();\n }", "public function hasChildren() {\n return $this->children()->count();\n }", "public function hasChildren()\n {\n return $this->myChildren()->exists();\n }", "public function isChildOnly();", "function has_children(){\n\t\tglobal $post;\n\t\t$pages = get_pages('child_of='.$post->ID);\n\t\treturn count($pages);\n\t}", "public function hasChild()\n {\n return count($this->_children) > 0;\n }", "public function hasContentElement(): bool\n {\n return $this->isChildElementSet(1);\n }", "public function hasChildren()\n {\n return $this->childContainer->hasItem();\n }", "public function has_children()\n {\n return ($this->size > 2);\n }", "private function hasContent( $node ) {\n return $node->count() > 0 ? true : false;\n }", "function has_child () {\n\t\treturn sizeof($this->children) ? true : false;\n\t}", "final public function hasChildren(): bool\n {\n return $this->valid() && $this->current()->hasPages();\n }", "function has_children(){\n\tglobal $post;\n\t$pages = get_pages('child_of=' . $post->ID);\n\treturn count($pages);\n}", "public function hasChildren()\n\t{\n\t\treturn ! $this->current()->isLeaf();\n\t}", "#[ReturnTypeWillChange]\n public function hasChildren()\n {\n return $this->iterator->hasChildren();\n }", "static function cws_has_children() {\n\t\tglobal $post;\n\n\t\t$children = get_pages( array( 'child_of' => $post->ID ) );\n\n\t\tif ( count( $children ) == 0 ) {\n\n\t\t\treturn false;\n\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "public function hasChildDocuments() {}", "public function hasChildren()\n {\n return (null !== $this->children) && count($this->children);\n }", "private function hasContent($node)\n {\n return $node->count() > 0 ? true : false;\n }", "public function hasListedChildren(): bool\n {\n return $this->children()->listed()->count() > 0;\n }", "function has_children() {\n \n global $post;\n\n $pages = get_pages('child_of=' . $post->ID);\n \n return count($pages);\n}", "public function is_article();", "function has_children() {\n global $post;\n\n $pages = get_pages('child_of=' . $post->ID);\n return count($pages);\n}", "public function has_children($nid)\n\t{\n\t\treturn !empty($this->children[$nid]);\n\t}", "function has_children(){\n global $post;\n\n $pages = get_pages('child_of= '. $post->ID);\n return count($pages);\n}", "public function hasChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n if ($result->getRows() > 0) {\n return true;\n }\n\n return false;\n\n }", "private function has_children() {\n return !empty($this->menuitems);\n }", "public function hasInvisibleChildren() {\n return $this->children()->invisible()->count();\n }", "function has_children(){\n global $post;\n\n $pages = get_pages( 'child_of=' . $post->ID );\n return count($pages);\n}", "public function getHasChildren()\n {\n return (boolean)$this->_has_children;\n }", "abstract public function isNode ( );", "public function childElementsAllowed() {}", "public function hasChildren () {\n return ($this->current () instanceof self);\n }", "final public function hasChild(CtkBuildable $node) {\n\t\treturn false;\n\t}", "public function hasChildren(BaseObject $node)\n {\n return (bool)($node->getRightValue() - $node->getLeftValue() > 1);\n }", "abstract public function hasContent();", "function isChildOrSubChildOf($refArticle) {\n\t\tif (is_numeric($refArticle)) {\n\t\t\t$refArticle = polarbear_article::getInstance($refArticle);\n\t\t}\n\t\t$isChild = false;\n\t\t// loop our way up until we reach the top article or refArticle\n\t\t// $refArticle\n\t\t$doLoop = true;\n\t\t$tmpA = $this;\n\t\twhile ($doLoop) {\n\t\t\t// get parent article\n\t\t\t$tmpA = $tmpA->parent();\n\t\t\tif ($tmpA == null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t#echo \"<br><br>tmpA:\".$tmpA->getTitleArticle();\n\t\t\t#echo \"<br> refArticle->getId():\" . $refArticle->getId();\n\t\t\t#echo \"<br> tmpA->getId():\" . $tmpA->getId();\n\t\t\t#echo \"<br> tmpA->getParentId():\"; var_dump($tmpA->getParentId());\n\t\t\t// check if the parent article is the refArticle. if it is, that means that $this is a child of $refArticle\n\t\t\tif ($tmpA->getId() == $refArticle->getId()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// if parent is null = is at top level\n\t\t\tif ($tmpA->getParentId()==null) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article isChildOrSubChildOf()\");\n\n\t\treturn false;\n\t}", "public function canHaveChildren() {}", "function has_descendants()\n\t{ \n\t\treturn (($this->model->{$this->right_column} - $this->model->{$this->left_column}) > 1);\n\t}", "public function hasHandleArticle(){\n return $this->_has(3);\n }", "function has_visible_children() {\n\t\t$this->load_children();\n\t\tforeach ($this->_children as $c) {\n\t\t\tif ($c->visible()) return true;\n\t\t}\n\t\treturn false;\n\t}", "public function HasChild()\n\t{\n\t\treturn ($this->Child()->count()) ? true : false;\n\t}", "public function hasVisibleChildren() {\n return $this->children()->visible()->count();\n }", "public function element_has_childs($id) {\n global $db;\n if ($db->fetch_atom(\"SELECT count(*) FROM `\".$this->table.\"` WHERE ROOT=\".$this->root.\" AND PARENT=\".$id) > 0)\n return true;\n return false;\n }", "public function isChild(): bool;", "function category_has_children() {\n global $wpdb;\n $term = get_queried_object();\n $category_children_check = $wpdb->get_results(\" SELECT * FROM wp_term_taxonomy WHERE parent = '$term->term_id' \");\n if ($category_children_check) {\n return true;\n } else {\n return false;\n }\n}", "public function isOnlyChild(): bool\n {\n if ($this->isFirstChild() === true && $this->isLastChild() === true) {\n return true;\n } else {\n return false;\n }\n }", "public function hasUnlistedChildren(): bool\n {\n return $this->children()->unlisted()->count() > 0;\n }", "public function hasAdvisorTree() {\n return sizeof($this->advisorTree) > 0;\n }", "public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }", "public function WantsChildren() {\r\n return false;\r\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function hasElements() {}", "public function hasChilds() {\n if(is_bool($this->hasChilds)){\n if(($this->hasChilds and empty($this->childs)) or (!$this->hasChilds and !empty($this->childs))){\n return $this->getResource()->hasChilds();\n } else {\n return $this->hasChilds;\n }\n }\n return $this->getResource()->hasChilds();\n }", "private function hasChilds(): bool\n {\n return (bool)$this->treePathModelClass::find()\n ->byParentId($this->owner->id)\n ->byChildId($this->owner->getAttribute($this->ownerParentIdAttribute))\n ->count();\n }", "public function getChildNodes();", "public function isRootNode()\n {\n return true;\n }", "public function countChildren();", "function domTreeIsEmpty() {\n global $dom;\n $root = $dom->documentElement;\n $isEmpty = !($root->hasChildNodes());\n return $isEmpty;\n}", "public function hasContent(){\n return $this->_has(6);\n }", "public function isChild(): bool\n {\n return false;\n }", "public function hasChildNodes( $nodeId )\n {\n return $this->getChildCount( $nodeId ) > 0;\n }", "public function hasContent(){\n return $this->_has(4);\n }", "public function evaluateChildNodes();", "public function hasContent() {}", "public function hasOrderableChildNodes()\n {\n return $this->hasOrderableChildNodes;\n }", "function test_get_children()\r\n\t{\r\n\t\t$rnc = 1;\r\n\t\t$depth = 2;\r\n\t\t$npl = 3; \r\n\t\t// Just see if empty nodes are recognized\r\n\t\t$nids = $this->_setup_root_nodes(3);\r\n\t\tforeach($nids AS $rix => $nid)\r\n\t\t{\r\n\t\t\t$this->assertFalse($this->_tree->get_children($nid), 'getChildren returned value for empty rootnode');\r\n\t\t} \r\n\t\t// Now build a little tree to test\r\n\t\t$relation_tree = $this->_create_sub_node($rnc, $depth, $npl);\r\n\r\n\t\t$rootnodes = $this->_tree->get_root_nodes();\r\n\t\t$exp_cct = 0;\r\n\t\t$cct = 0;\r\n\t\tforeach($rootnodes AS $rid => $rootnode)\r\n\t\t{ \r\n\t\t\t// Traverse the tree and verify it against the relationTree\r\n\t\t\t$cct = $cct + $this->_traverse_children($rootnode, $relation_tree, true); \r\n\t\t\t// Calc the expected number of children from lft-rgt\r\n\t\t\t$exp_cct = $exp_cct + floor(($rootnode['r'] - $rootnode['l']) / 2);\r\n\t\t} \r\n\t\t// Test if all created nodes got returned\r\n\t\t$this->assertEqual($exp_cct, $cct, 'Total node count returned is wrong');\r\n\t\treturn true;\r\n\t}", "function getChildNodes() ;", "public function isEmpty()\r\n {\r\n return count($this->childs) > 0 ? false : true;\r\n }", "public function getIsShowChildren();", "public function isChildOf($node)\n\t{\n\t\treturn $this->getLevel()>$node->getLevel();\n\t}", "public function hasChildren($parent) {\n\t\t// If the left and right are x and x+1, then there is no kids\n\t\tif ($parent['Aco']['rght'] == $parent['Aco']['lft'] +1 ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function hasChildrenMinimumAge() {\n\t\treturn !empty($this->childrenMinimumAge);\n\t}", "public function testHasChildren()\n {\n $this->assertTrue($this->p1->hasChildren());\n $this->assertTrue($this->p2->hasChildren());\n\n $this->assertTrue($this->c11->hasChildren());\n $this->assertFalse($this->c12->hasChildren());\n\n $this->assertFalse($this->c21->hasChildren());\n $this->assertFalse($this->c22->hasChildren());\n $this->assertFalse($this->c23->hasChildren());\n\n $this->assertFalse($this->c111->hasChildren());\n }", "public function valid()\r\n {\r\n return (current($this->children) !== FALSE);\r\n }", "public function hasSiblings() {}" ]
[ "0.7510717", "0.7395093", "0.7395093", "0.7395093", "0.7395093", "0.72784597", "0.72779894", "0.72779894", "0.72779894", "0.72779894", "0.71846014", "0.71190166", "0.69492006", "0.69492006", "0.68695533", "0.6866107", "0.6863684", "0.68415356", "0.68367183", "0.68110967", "0.6808611", "0.67938656", "0.6780917", "0.6755458", "0.67415726", "0.66866064", "0.6672832", "0.6669294", "0.66612405", "0.662242", "0.66061085", "0.6601203", "0.6586028", "0.6582232", "0.6578854", "0.65696317", "0.65546143", "0.6546611", "0.6546035", "0.65451473", "0.65368015", "0.652832", "0.65177035", "0.651322", "0.6512936", "0.6490066", "0.64820784", "0.64501613", "0.64473325", "0.64316875", "0.64232814", "0.6393296", "0.6376619", "0.63729554", "0.63655204", "0.62987345", "0.62932193", "0.62732995", "0.62451875", "0.62174463", "0.62004197", "0.61746126", "0.61690795", "0.6146153", "0.61442906", "0.6141646", "0.61384565", "0.61370933", "0.6127215", "0.6115804", "0.60686326", "0.603117", "0.6023646", "0.60089", "0.60021067", "0.6001233", "0.6000898", "0.5975974", "0.5956903", "0.5956461", "0.5949605", "0.59368277", "0.5933981", "0.5929143", "0.59258354", "0.5919256", "0.59044653", "0.58967286", "0.58953875", "0.58824164", "0.58819956", "0.58734125", "0.5857784", "0.5854796", "0.5849708", "0.58472514", "0.58420384", "0.58326143", "0.5832191", "0.5825391", "0.5808122" ]
0.0
-1
get number of children
function numChildren($options = null) { # if (!isset($this->numChildren)) { $children = $this->children($options); return sizeof($children); # $this->numChildren = sizeof($children); # } # return $this->numChildren; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberChildren();", "public function countChildren();", "#[Pure] public function get_children_number(): int\n {\n return $this -> children -> size();\n }", "public function count() {\n\t\treturn count($this->children);\n\t}", "public function count(): int\n {\n return \\count($this->children);\n }", "public function count ( ) {\n\n return count($this->_childs);\n }", "public function getChildrenCount()\n {\n if (!isset($this->_childrenCount)) {\n $this->_childrenCount = $this->_getRepository()->countByParent($this->id);\n }\n\n return $this->_childrenCount;\n }", "function ep_post_childcount() {\n\tglobal $wp_query;\n\t$queried_object = $wp_query->get_queried_object();\n\t$child_count = 0;\n\tif (isset($queried_object)) {\n\t\t$parents = get_post_ancestors($queried_object->ID);\n\t\t$args = array(\n\t\t\t\"post_parent\" => $queried_object->ID,\n\t\t\t\"post_type\" => $queried_object->post_type,\n\t\t\t\"post_status\" => \"publish\"\n\t\t);\n\t\t$children = get_children($args);\n\t\t$child_count = sizeof($children);\n\t}\n\treturn $child_count;\n}", "public function count()\n {\n return $this->getChildsObject()->count();\n }", "public function countDescendants();", "function countChilds($id);", "public function childCount()\n\t{\n\t\tif( $this->childCount===null )\n\t\t\t$this->childCount = count($this->owner->getChildren());\n $link = CHtml::link($this->childCount, array(\n\t\t\t'tab/menus',\n\t\t\t'pid'=>urlencode($this->owner->id),\n\t\t));\n\t\treturn $this->childCount>0 ? ' [ <span class=\"child-count\">'.$link.'</span> ]' : '';\n\t}", "public function count()\n {\n $children = @unserialize($this->attributes['__members']);\n if (!is_array($children)) {\n return 0;\n } else {\n return count($children);\n }\n }", "public function count()\n\t{\n\t\treturn $this->getParentObject()->count();\n\t}", "public function getNumberDescendants();", "public function numChildren(bool $withTrashed = true);", "public function getNumChildrenFieldName()\n {\n return $this->prototype->getNumChildrenFieldName();\n }", "protected function get_descendents_count()\n\t{\n\t\t$n = 0;\n\n\t\tforeach ($this->children as $child)\n\t\t{\n\t\t\t$n += 1 + $child->descendents_count;\n\t\t}\n\n\t\treturn $n;\n\t}", "public function numChildFolders()\n {\n return $this->ChildFolders()->count();\n }", "public function children_count($nid)\n\t{\n\t\treturn $this->has_children($nid) ? count($this->children[$nid]) : 0;\n\t}", "public function hasChildren() {\n return $this->children()->count();\n }", "public function getChildDocumentsCount() {}", "public function count(){\n\t\treturn count($this->nodes);\n\t}", "public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }", "public function count(): int\n {\n return $this->nodes->count();\n }", "public function getMinNbChilds()\n {\n return $this->getOption('min', 0);\n }", "public function countSiblings();", "public function getDescendantsCount()\n {\n if (!isset($this->_descendantsCount)) {\n $this->_descendantsCount = $this->_getRepository()->countDescendantsByParent($this->id);\n }\n\n return $this->_descendantsCount;\n }", "public function getChildCount(PartFilter $filter = null)\n {\n return count($this->getChildParts($filter));\n }", "public function count() { \r\n\t\t\treturn $this->namedNodeMap->length;\r\n\t\t}", "function CountChildren( $key_category ) {\n\n \t$strwhere = \"select count(*) from category where key_parent = $key_category\"; \n \t$recordSet = runSQL( $strwhere );\n \t$count += $recordSet->fields[0];\n\n\treturn $count;\n}", "public function getDepthAttribute()\n {\n $count = 0;\n $parent = $this->parent;\n while ($parent)\n {\n $count += 1;\n $parent = $parent->parent;\n }\n return $count;\n }", "public function count() : int {\n return count($this->elements);\n }", "public function getNumberOfChildren(BaseObject $node)\n {\n $peer_name = get_class($node->getPeer());\n $con = Propel::getConnection();\n $scope_sql = '';\n if (!is_null($node->getScopeIdValue()))\n {\n $scope_sql = sprintf(' AND %s = \\'%s\\'',\n self::getColumnConstant(get_class($node), 'scope'),\n $node->getScopeIdValue());\n }\n\n $sql = sprintf('SELECT COUNT(*) AS num_children FROM %s WHERE %s = %s %s',\n constant(\"$peer_name::TABLE_NAME\"),\n self::getColumnConstant(get_class($node), 'parent'),\n $node->getPrimaryKey(),\n $scope_sql\n );\n\n $stmt = $con->prepareStatement($sql);\n $resultset = $stmt->executeQuery();\n $resultset->next();\n\n return $resultset->getInt('num_children');\n }", "public function count(): int\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "public function count()\n {\n return count($this->elements);\n }", "function number_of_elements() {\n return count($this->page_object);\n }", "public function getLevel()\n {\n return sizeof($this->getParentsID());\n }", "public function getNodeCount()\n {\n return $this->node_count;\n }", "public function getNumberOfChildValveGroups()\n {\n return count($this->getChildValveGroups());\n }", "public function count() {\n\t\treturn sizeof($this->elements);\n\t}", "public function count()\n {\n $this->setIteratorFilter(self::FLIST_NOCONTAINER | self::FLIST_UNSUB);\n return count(iterator_to_array($this));\n }", "public function count()\n {\n return count($this->_elements);\n }", "public function getNbEleves()\n {\n return $this->nbEleves;\n }", "public function count(): int\n {\n return \\count($this->container);\n }", "public function count(): int\n {\n return \\count($this->elements);\n }", "public function getCount()\n {\n if (! isset($this->count)) {\n $this->count = (int)$this->getXPath($this->getDom())->query($this->getCountQuery())->item(0)->value;\n }\n return $this->count;\n }", "public function count()\n {\n return count($this->container);\n }", "public function child_acl_resource_count() {\n $fieldvals = [\n 'parent_id' => (int) $this->vars['id'],\n ];\n\n $key = parent::_count_var_key('child_acl_resource_count', $fieldvals);\n if (! array_key_exists($key, $this->_vars)) {\n $this->_vars[$key] = entity::dao('acl\\resource')->count($fieldvals);\n }\n return $this->_vars[$key];\n }", "public function childrenCount( $permissionCheck='view', $member=NULL, $subnodes=TRUE, $_where=array() )\n\t{\n\t\t/* We almost universally need the children after getting the count, so let's just cut to the chase and run one query instead of 2 */\n\t\treturn count( $this->children( $permissionCheck, $member, $subnodes, NULL, $_where ) );\n\t}", "function tep_childs_in_category_count($categories_id) {\n $categories_count = 0;\n\n $categories_query = tep_db_query(\"select categories_id from \" . TABLE_CATEGORIES . \" where parent_id = '\" . $categories_id . \"'\");\n while ($categories = tep_db_fetch_array($categories_query)) {\n $categories_count++;\n $categories_count += tep_childs_in_category_count($categories['categories_id']);\n }\n\n return $categories_count;\n}", "public function size(): int\n {\n return count($this->elements);\n }", "public function count() \r\n {\r\n return sizeof($this->elements);\r\n }", "public function size() {\n return count($this->elements);\n }", "function assetTreeCount(\n AssetOperationHandlerService $service,\n Child $child, $params=NULL, &$results=NULL )\n{\n $type = $child->getType();\n\n if( !isset( $results[ F::COUNT ][ $type ] ) )\n $results[ F::COUNT ][ $type ] = 1;\n else\n $results[ F::COUNT ][ $type ] =\n $results[ F::COUNT ][ $type ] + 1;\n}", "public function numNodes() {\r\n return $this->nodeCount;\r\n }", "#[Pure] public function size(): int\n {\n return sizeof($this->nodes);\n }", "function getRowCount($modelNode = null) { \n\t\tif ($modelNode == null) {\n\t\t\t//$modelNode = new Cgn_Mvc_ModelNode(0,0,$this->root());\n\t\t\t$modelNode = $this->root();\n\t\t} else {\n\t\t\t$parent = $modelNode->_parentPointer;\n\t\t\t$modelNode = $parent;\n\t\t}\n\t\t$count = 0;\n//\t\techo \"get row count \\n<br/>\\n\";\n\t\t$child = $this->findItem($modelNode);\n\t\t$count = count($child->children);\n//\t\techo \"got $count \\n<br/>\\n\";\n//\t\techo \"DONE: get row count \\n<br/>\\n\";\n\t\t/*\n\t\tif ($child) {\n\t\t\t$count++;\n\t\t}\n\t\twhile ($sib = $child->getSibling($child)) {\n\t\t\t$count++;\n\t\t}\n\t\t */\n//\t\techo \"Row Count \";Cgn::debug($modelNode); //exit();\n//\t\techo \"Row Count \";Cgn::debug($child); //exit();\n\t\treturn $count;\n\t}", "public function hasVisibleChildren() {\n return $this->children()->visible()->count();\n }", "public function count_node()\n\t\t{\n\t\t\t$query = \"SELECT\n\t\t\t\t\t\tCOUNT(1) AS 'total' \n\t\t\t\t\tFROM \n\t\t\t\t\t\t`\".$this->tree_caption.\"`\n\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\tAND `language` = '\".$this->language.\"'\n\t\t\t\t\t\tAND `application_release` = '\".$this->application_release.\"'\";\n\t\t\t\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\n\t\t\t\n\t\t\t$this->total_node = $row['total'];\n\t\t\t\n\t\t\treturn $this->total_node;\n\t\t}", "public function getParentsCount()\n {\n if (!isset($this->_parentsCount)) {\n $this->_parentsCount = $this->_getRepository()->countParents($this->id);\n }\n\n return $this->_parentsCount;\n }", "public function getTreeCount(){\n\t\t\t$sql = mysql_query(\"\n SELECT\n count(*) AS `count`\n FROM\n `structure`\n \");\n\n $result = mysql_fetch_row($sql);\n\t\t\treturn $result[0];\n\t\t}", "public function getMaxChildCountAttribute() : int\n {\n $counts = $this->allChild->pluck('max_child_count')->toArray();\n\n return count($counts) ? max($counts) + 1 : 0;\n }", "public function count()\n {\n return count($this->getInnerIterator());\n }", "public function count(){\n $query = \"SELECT count(*) FROM \" . $this->parent_tbl;\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // execute query\n\n \\Database::execute($stmt);\n\n // get row value\n $rows = $stmt->fetch(\\PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n\n }", "protected function countGridelementChildren()\n {\n $select_fields = 'uid, CType';\n $where = 'CType LIKE \"%gridelements_pi1%\"';\n $resource = $this->execSelect($select_fields, $where);\n if ($resource === false) {\n $this->results['error'] = 'error_no_ge_containers';\n return false;\n }\n\n // Go through all containers\n while ($row = $GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($resource)) {\n\n // Find children\n $select_fields = 'tx_gridelements_container';\n $where = 'tx_gridelements_container = ' . $row['uid'];\n $res = $this->execSelect($select_fields, $where);\n\n $i = 0;\n if ($res !== false) {\n while ($GLOBALS[\"TYPO3_DB\"]->sql_fetch_assoc($res)) {\n ++$i;\n }\n $where = 'uid = ' . $row['uid'];\n $fields_values = array('tx_gridelements_children' => $i);\n $this->execUpdate($where, $fields_values);\n $GLOBALS[\"TYPO3_DB\"]->sql_free_result($res);\n }\n }\n $GLOBALS[\"TYPO3_DB\"]->sql_free_result($resource);\n $this->results['countGridelementChildren'] = true;\n return true;\n }", "public static function getSubCount(): int\n {\n return self::$subCount;\n }", "public function totalNode(){\r\n return $this->count;\r\n }", "public function count()\n {\n return $this->getNumParts();\n }", "public function count()\n {\n return count($this->stack);\n }", "public function count()\n {\n return count($this->stack);\n }", "public function countNodeStack() {}", "function size()\n\t{\n\t\treturn $this->nb;\n\t}", "public function countAncestors();", "function has_children(){\n\t\tglobal $post;\n\t\t$pages = get_pages('child_of='.$post->ID);\n\t\treturn count($pages);\n\t}", "public function elementCount(): int {\n\t\treturn count($this->m_elements);\n\t}", "public function size() {\n return n(count($this->value()));\n }", "public function length(): int {\n return count($this->elements);\n }", "public function get_children();", "public function getNumberOfDescendants(BaseObject $node)\n {\n $right = $node->getRightValue();\n $left = $node->getLeftValue();\n $num = ($right - $left - 1) / 2;\n\n return $num;\n }", "public function count(): int\n {\n return count($this->stack);\n }", "public function count()\n\t{\n\t\treturn count($this->_elementNames);\n\t}", "public function count():int\n\t{\n\t\treturn count($this->stackArray);\n\t}", "function acf_get_field_count($parent)\n{\n}", "public function count()\n {\n return $this->size();\n }", "function getAllNumNodes(){\n\t\t$clase=$this->nmclass;\n\t\t$u=$this->cant_nodos;\n\t\treturn $u;\n\t}", "function findWithChildCount($id)\r\n\t{\r\n\t\t$db = & ConnectionManager::getDataSource($this->useDbConfig);\r\n\t\t$table = $db->name($db->fullTableName('nodes'));\r\n\t\t\r\n\t\t$sql = \"SELECT Node.*, \" .\r\n\t\t \t\t\"SUM(Child.type = 'L') as num_lists, \" .\r\n\t\t \t\t\"SUM(Child.done = 1 AND Child.type = 'T') as num_done, \" .\r\n\t\t\t\t\"SUM(Child.done = 0 AND Child.type = 'T') as num_undone \" .\r\n\t\t \t\t\"FROM $table Node LEFT JOIN $table Child ON Child.parent_id = Node.id \" .\r\n\t\t \t\t\"WHERE Node.parent_id = $id AND Node.done = 0 \" .\r\n\t\t \t\t\"GROUP BY Node.id \" .\r\n\t\t \t\t\"ORDER BY Node.type ASC, Node.position ASC\";\r\n\r\n\t\t return $db->query($sql);\r\n\t}", "public function count() {\n\t\treturn $this->length();\n\t}", "public function size() {\r\n\t\treturn count($this->stack) ? count($this->stack) : 0;\r\n\t}", "public function count()\n {\n return count($this->pages);\n }", "public function countNodeArrayValue(): int\n {\n return count($this->nodeValue);\n }", "public function count()\n {\n return $this->items()->count();\n }", "public function count()\n {\n return $this->length;\n }", "public function count()\n {\n return $this->__size;\n }", "public function count()\n {\n return $this->length();\n }", "public function count() : int\n {\n return count($this->entries);\n }", "public function count()\n {\n return $this->length;\n }", "function has_children(){\n\tglobal $post;\n\t$pages = get_pages('child_of=' . $post->ID);\n\treturn count($pages);\n}", "public function count()\n\t{\n\t\treturn $this->getCount();\n\t}" ]
[ "0.92674404", "0.9071308", "0.8799655", "0.87061006", "0.8634643", "0.8350916", "0.80838126", "0.80648506", "0.79034513", "0.7739844", "0.77191114", "0.7711546", "0.76818836", "0.7580745", "0.75685936", "0.7427926", "0.741482", "0.7402939", "0.73371494", "0.73342663", "0.73332447", "0.7292091", "0.72693986", "0.70528996", "0.7050726", "0.7012908", "0.6934196", "0.6932387", "0.69105124", "0.69057804", "0.68732697", "0.6837564", "0.68207985", "0.68007594", "0.67487574", "0.67485785", "0.67485785", "0.67446595", "0.6740482", "0.6728507", "0.6714675", "0.6698286", "0.66888446", "0.6682082", "0.66642255", "0.6657727", "0.6636214", "0.6631306", "0.6620673", "0.6617589", "0.66038847", "0.6598806", "0.6591638", "0.65872264", "0.6566546", "0.6566454", "0.656316", "0.65457636", "0.654337", "0.6531615", "0.65308064", "0.65295035", "0.65240383", "0.64819986", "0.6474925", "0.64692736", "0.6468998", "0.64556277", "0.6438106", "0.6434112", "0.6432918", "0.6432918", "0.6425126", "0.64185137", "0.64039576", "0.6395004", "0.6393884", "0.63879824", "0.6382008", "0.6341597", "0.632662", "0.63220936", "0.63180614", "0.63099104", "0.6301414", "0.6288778", "0.628626", "0.6284619", "0.62828153", "0.6280225", "0.627151", "0.62697655", "0.62661177", "0.62647766", "0.62555873", "0.6239943", "0.6239341", "0.62380016", "0.6237662", "0.6235023" ]
0.8135758
6
Get child articles as array Array $options sort, direction, how many to get etc. See $defaults for details.
function children($options = null) { $defaults = array( 'sort' => 'prio', 'sortDirection' => 'desc', 'limitStart' => 0, 'limitCount' => null, 'includeUnpublished' => false, 'tagsMustInclude' => null, // comma seperated? 'tagsMustNotInclude' => null ); $options = polarbear_extend($defaults, $options); if ($options['limitCount'] === null) { // To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. $limitCount = 2147483647; } else { $limitCount = $options['limitCount']; } // done with options, check cache $optionsQuery = http_build_query($options); if (isset($this->childrenCache[$optionsQuery])) { return $this->childrenCache[$optionsQuery]; } // not in cache, go on and query $sql = "SELECT id FROM " . POLARBEAR_DB_PREFIX . "_articles "; $sql .= "WHERE (parentID = '$this->id' AND status <> 'deleted' AND status <> 'revision' ) "; if ($options["includeUnpublished"]) { // include unpublished articles } else { // don't include unpublished, remove'em $sql .= " AND status = 'published' AND datePublish < now() AND (dateUnpublish > now() OR dateUnpublish IS NULL) "; } // tags if ($options["tagsMustInclude"]) { $tagsMustInclude = explode(",", $options["tagsMustInclude"]); $strTagArticleIds = ""; foreach($tagsMustInclude as $oneTagID) { $oneTag = polarbear_tag::getInstance($oneTagID); // fetch articles for this tag $tagArticles = $oneTag->articles(); foreach ($tagArticles as $oneA) { $strTagArticleIds .= $oneA->getId() . ","; } } $strTagArticleIds = preg_replace("/,$/", "", $strTagArticleIds); if (!empty($strTagArticleIds)) { $strTagArticleIds = " AND id IN ($strTagArticleIds) "; } $sql .= $strTagArticleIds; } $sql .= "ORDER BY $options[sort] $options[sortDirection] "; $sql .= "LIMIT $options[limitStart], $limitCount"; // children = all articles that have current article as parentID global $polarbear_db; $childrenArr = array(); if ($r = $polarbear_db->get_results($sql)) { $preloader = pb_query_preloader::getInstance(); $strArticleIDs = ""; foreach ($r as $row) { // in med hittade id:n i preloadern $strArticleIDs .= ",".$row->id; } $preloader->addArticle($strArticleIDs); $preloader->update(); foreach ($r as $row) { $childrenArr[] = PolarBear_Article::getInstance($row->id); } } pb_pqp_log_speed("article children()"); $this->childrenCache[$optionsQuery] = $childrenArr; return $this->childrenCache[$optionsQuery]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArticles()\n {\n return NewsArticle::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function getChapters() \n\t{\n\n\t\t$req = $this->db->query('SELECT id, article_number, title FROM articles ORDER BY date_creation');\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$chapters[] = new Article($value);\n\t\t}\n\n\t\treturn $chapters;\n\t}", "function &getChildren()\n\t{\n global $jlistConfig;\n \n\t\tif (!is_object($this->_item)) {\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\t// Order subcategories\n\t\tif (sizeof($this->_children)) {\n\t\t\t$params = $this->getState()->get('params');\n \n // Sort order defined in menu?\n $orderby_pri = $params->get('orderby_pri');\n \n if (!$orderby_pri){\n // When not we use jD settings\n $cats_order = (int)$jlistConfig['cats.order'];\n if ($cats_order == 1){\n $params->set('orderby_pri', 'alpha');\n } elseif ($cats_order == 2){\n $params->set('orderby_pri', 'ralpha');\n } \n }\n \n\t\t\tif ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha') {\n\t\t\t\t$this->_children = ArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : (-1));\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_children;\n\t}", "public function getArticles()\n\t{\n\t\treturn $this->getOptionData('tl_article');\n\t}", "function &getChildren()\n\t{\n\t\tif (!is_object($this->_item))\n\t\t{\n\t\t\t$this->getCategory();\n\t\t}\n\n\t\t// Order subcategories\n\t\tif (count($this->_children))\n\t\t{\n\t\t\t$params = $this->getState()->get('params');\n\t\t\tif ($params->get('orderby_pri') == 'alpha' || $params->get('orderby_pri') == 'ralpha')\n\t\t\t{\n\t\t\t\tjimport('joomla.utilities.arrayhelper');\n\t\t\t\tJArrayHelper::sortObjects($this->_children, 'title', ($params->get('orderby_pri') == 'alpha') ? 1 : -1);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_children;\n\t}", "public function getArticles();", "public function getArticles()\n {\n // TODO: prepare the database connection\n // Note: you might want to use a re-usable databaseManager class - the choice is yours\n // obtain the passed params from array in the config file\n // TODO: fetch all articles as $rawArticles (as a simple array)\n $sql = \"SELECT * FROM articles\";\n $result = $this->databaseManager->connection->query($sql)->fetchAll();\n $rawArticles = $result;\n\n $articles = [];\n foreach ($rawArticles as $rawArticle) {\n // We are converting an article from a \"dumb\" array to a much more flexible class\n\n $articles[] = new Article($rawArticle['title'], $rawArticle['description'], $rawArticle['publish_date']);\n\n }\n\n return $articles;\n }", "public function get_children();", "function descendants() {\n\t\t/*\n\t\tget all children of this article\n\t\tfor each child, run the same query..\n\t\t*/\n\t\t$childs = $this->children();\n\t\t$subChilds = array();\n\t\tforeach ($childs as $oneChild) {\n\t\t\t$subChilds = array_merge($subChilds, $oneChild->descendants());\n\t\t}\n\t\t$childs = array_merge($childs, $subChilds);\n\t\tpb_pqp_log_speed(\"article descendants()\");\n\t\treturn $childs;\n\t}", "protected function getChildEntities() {\n\n\t\treturn array();\n\t}", "public function getBasePageArticlesOptions(): array\n {\n if (Input::get('act') !== 'edit') {\n return [];\n }\n\n $pageRepository = $this->repositoryManager->getRepository(PageModel::class);\n $pageModel = $pageRepository->find((int) Input::get('id'));\n if (! $pageModel instanceof PageModel) {\n return [];\n }\n\n $repository = $this->repositoryManager->getRepository(ArticleModel::class);\n assert($repository instanceof ContaoRepository);\n $collection = $repository->findByPid($pageModel->languageMain);\n if (! $collection) {\n return [];\n }\n\n $options = [];\n foreach ($collection as $article) {\n $options[$article->id] = sprintf(\n '%s (ID %s) [%s]',\n $article->title,\n $article->id,\n $article->inColumn,\n );\n }\n\n return $options;\n }", "public function getAllArticles()\n {\n $user = \\BackendUser::getInstance();\n $pids = array();\n $articles = array();\n\n // Limit pages to the user's pagemounts\n if ($user->isAdmin) {\n $objArticle = \\Database::getInstance()->execute(\n 'SELECT a.id, a.pid, a.title, a.inColumn, p.title AS parent FROM tl_article a\n LEFT JOIN tl_page p ON p.id=a.pid ORDER BY parent, a.sorting'\n );\n } else {\n foreach ($user->pagemounts as $id) {\n $pids[] = $id;\n $pids = array_merge($pids, \\Database::getInstance()->getChildRecords($id, 'tl_page'));\n }\n\n if (empty($pids)) {\n return $articles;\n }\n\n $pids = implode(',', array_map('intval', array_unique($pids)));\n\n $objArticle = \\Database::getInstance()->execute(\n 'SELECT a.id, a.pid, a.title, a.inColumn, p.title AS parent\n FROM tl_article a LEFT JOIN tl_page p ON p.id=a.pid WHERE a.pid IN(' . $pids . ')\n ORDER BY parent, a.sorting'\n );\n }\n\n // Edit the result\n if ($objArticle->numRows) {\n \\Controller::loadLanguageFile('tl_article');\n\n while ($objArticle->next()) {\n $key = $objArticle->parent . ' (ID ' . $objArticle->pid . ')';\n $articles[$key][$objArticle->id] = $objArticle->title\n . ' (' . ($GLOBALS['TL_LANG']['tl_article'][$objArticle->inColumn] ?: $objArticle->inColumn)\n . ', ID ' . $objArticle->id . ')';\n }\n }\n\n return $articles;\n }", "public function getArticles()\n {\n return $this->articles;\n }", "public function getArticles()\n\t{\n\t$qb = $this ->createQueryBuilder(\"a\")\n\t\t\t\t->leftJoin('a.image','i')\n\t\t\t\t->addSelect('i')\n\n\t\t\t\t->leftJoin('a.categories','c')\n\t\t\t\t->addSelect('c')\n\n\t\t\t\t->where('a.publication = :val')\n\t\t\t\t->setParameter('val', 1)\n\n\t\t\t\t->orderBy('a.datecreation', 'DESC');\n\t$query = $qb->getQuery();\n\treturn $query->getResult();\n\t}", "function getArticleObjects() \t{\n \t\treturn $this->articles;\n \t}", "public function getArticles() {\n return $this->articles;\n }", "function get_children() {\n\t\t\n\t\tif (!is_array($this->children)) :\n\t\t\n\t\t\t$this->children = array();\n\t\t\t\n\t\t\tif ($this->is_type('variable')) $child_post_type = 'product_variation'; else $child_post_type = 'product';\n\t\t\n\t\t\tif ( $children_products =& get_children( 'post_parent='.$this->id.'&post_type='.$child_post_type.'&orderby=menu_order&order=ASC' ) ) :\n\n\t\t\t\tif ($children_products) foreach ($children_products as $child) :\n\t\t\t\t\t\n\t\t\t\t\tif ($this->is_type('variable')) :\n\t\t\t\t\t\t$child->product = &new woocommerce_product_variation( $child->ID );\n\t\t\t\t\telse :\n\t\t\t\t\t\t$child->product = &new woocommerce_product( $child->ID );\n\t\t\t\t\tendif;\n\t\t\t\t\t\n\t\t\t\tendforeach;\n\t\t\t\t$this->children = (array) $children_products;\n\t\t\tendif;\n\t\t\t\n\t\tendif;\n\t\t\n\t\treturn $this->children;\n\t}", "public function getAdminArticles()\n\t{\n\t\t$articles = [];\n\n\t\t$req = $this->db->query('SELECT id, article_number, title FROM articles ORDER BY date_creation DESC LIMIT 0, 5');\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\t\t\n\t\treturn $articles;\n\t}", "private function getChildList(){\n\t\tif ($this->_childList == null) {\n\t\t\t$this->_childList = $this->getStructureNode()->getChildren();\n\t\t\t$this->_childList = $this->_childList->sort(array(\n\t\t\t\tnew SortRule($this->_childList->exprMember('title'))));\n\t\t}\n\t\treturn $this->_childList;\n\t}", "public function getChilds();", "public function children() {\n\t\treturn $this->hasMany(Forum::getSectionClass(), \"parent_id\")->orderBy(\"weight\", \"desc\");\n\t}", "public function getLimitedChapters(): array\n {\n $sql = \"\n SELECT posts.id,\n posts.title,\n posts.image_posts,\n posts.date_posts,\n posts.content,\n admins.name\n FROM posts\n JOIN admins\n WHERE posted='1'\n ORDER BY date_posts DESC\n LIMIT 0,1\n \";\n\n $query = Database::getDb()->query($sql);\n $results = $query->fetchAll(PDO::FETCH_OBJ);\n return $results;\n }", "public function childs()\n {\n return $this->hasMany(Category::class, 'procreator_id')->orderBy('index');\n }", "function & getChilds() {\r\n // Load the data\r\n if (empty ($this->_childs)) {\r\n $database = $this->_db;\r\n /* retrieve values */\r\n $query = 'SELECT * FROM #__custom_properties_values' . ' WHERE parent_id = ' . $this->_id . ' ORDER BY ordering ';\r\n\r\n $database->setQuery($query);\r\n $this->_childs = $database->loadObjectList();\r\n }\r\n return $this->_childs;\r\n }", "public function transformCollection( $articles, $options = [] )\n {\n $response = [];\n \n $this->articlesToShowEachDay = 100; \n\n if( isset($options['perDayLimit']) ) {\n $this->articlesToShowEachDay = $options['perDayLimit'];\n }\n\n // grab the days array. This is an empty array with the keys set to the coming seven days\n if( isset($options['days']) ) {\n $days = $options['days'];\n }\n else {\n sd('The required DAYS array has not been provided to ListingTransformer::transformCollection()');\n }\n\n // go through each of the days supplied, format and assign any articles\n foreach( $days AS $key => $day )\n {\n $date = $key;\n\n $this->days[$date]['publication'] = [\n 'date' => $date,\n 'day' => date('D', strtotime($date)),\n 'fullDay' => date('l', strtotime($date)),\n 'iso8601Date' => date('c', strtotime($date)),\n 'epoch' => strtotime($date),\n ]; \n\n $this->days[$date]['categories'] = null;\n $this->days[$date]['articles'] = null;\n\n // now grab the articles for the given day\n $this->getArticlesForAGivenDay($articles, $date, $options);\n } \n\n // once we're done reset the array keys for the category listing\n foreach( $this->days AS $key => $day )\n {\n // if we added some articles then we also added some categories. Reset those array keys to integers\n if( isset($this->days[$key]['categories']) )\n {\n $this->days[$key]['categories'] = array_values($day['categories']); \n } \n }\n\n // no reset all top level array keys and return the result\n return array_values($this->days);\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 getAll()\n {\n $query = $this->dc->qb()\n ->select('*')\n ->from($this->dc->p('plugin_ff_articles'), 'a');\n\n if (!$this->getAuth()->hasAccess('maccess.mod')) {\n $query->where('hidden = 0');\n }\n\n $result = $query->orderBy('title', 'asc')\n ->execute()\n ->fetchAll();\n\n return $result;\n }", "public function articles()\n\t{\n\t\treturn $this->morphedByMany(Article::class, 'taggable');\n\t}", "function get_children($args = '', $output = \\OBJECT)\n {\n }", "public function getAllArticles()\r\n\t{\r\n\t\t$bdd\t=\tmyConnection();\r\n\r\n\t\t$sqlSelect\t=\t$bdd\t->\tprepare(\"SELECT * FROM article ORDER BY designation\");\r\n\r\n\r\n\t\t$sqlSelect\t->\texecute();\r\n\r\n\t\t$resultat\t=\t$sqlSelect->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n\t\treturn $resultat;\r\n\t}", "function getArticles() \t{\n \t\treturn $this->getArticleUids();\n \t}", "function getChilds($a_node_id, $a_order = \"\", $a_direction = \"ASC\")\n\t{\n\t\tglobal $ilBench,$ilDB, $ilObjDataCache, $ilUser;\n\t\t\n\t\tif (!isset($a_node_id))\n\t\t{\n\t\t\t$message = get_class($this).\"::getChilds(): No node_id given!\";\n\t\t\t$this->ilErr->raiseError($message,$this->ilErr->WARNING);\n\t\t}\n\n\t\t// init childs\n\t\t$childs = array();\n\n\t\t// number of childs\n\t\t$count = 0;\n\n\t\t// init order_clause\n\t\t$order_clause = \"\";\n\n\t\t// set order_clause if sort order parameter is given\n\t\tif (!empty($a_order))\n\t\t{\n\t\t\t$order_clause = \"ORDER BY \".$a_order.\" \".$a_direction;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$order_clause = \"ORDER BY \".$this->table_tree.\".lft\";\n\t\t}\n\n\t\t\t \n\t\t$query = sprintf('SELECT * FROM '.$this->table_tree.' '.\n\t\t\t\t$this->buildJoin().\n\t\t\t\t\"WHERE parent = %s \" .\n\t\t\t\t\"AND \".$this->table_tree.\".\".$this->tree_pk.\" = %s \".\n\t\t\t\t$order_clause,\n\t\t\t\t$ilDB->quote($a_node_id,'integer'),\n\t\t\t\t$ilDB->quote($this->tree_id,'integer'));\n\n\t\t$res = $ilDB->query($query);\n\t\t\n\t\tif(!$count = $res->numRows())\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t// get rows and object ids\n\t\t$rows = array();\n\t\twhile($r = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$rows[] = $r;\n\t\t\t$obj_ids[] = $r[\"obj_id\"];\n\t\t}\n\n\t\t// preload object translation information\n\t\tif ($this->__isMainTree() && $this->isCacheUsed() && is_object($ilObjDataCache) &&\n\t\t\tis_object($ilUser) && $this->lang_code == $ilUser->getLanguage() && !$this->oc_preloaded[$a_node_id])\n\t\t{\n//\t\t\t$ilObjDataCache->preloadTranslations($obj_ids, $this->lang_code);\n\t\t\t$ilObjDataCache->preloadObjectCache($obj_ids, $this->lang_code);\n\t\t\t$this->fetchTranslationFromObjectDataCache($obj_ids);\n\t\t\t$this->oc_preloaded[$a_node_id] = true;\n\t\t}\n\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$childs[] = $this->fetchNodeData($row);\n\n\t\t\t// Update cache of main tree\n\t\t\tif ($this->__isMainTree())\n\t\t\t{\n\t\t\t\t#$GLOBALS['ilLog']->write(__METHOD__.': Storing in tree cache '.$row['child'].' = true');\n\t\t\t\t$this->in_tree_cache[$row['child']] = $row['tree'] == 1;\n\t\t\t}\n\t\t}\n\t\t$childs[$count - 1][\"last\"] = true;\n\t\treturn $childs;\n\t}", "public function getChildPages(): array\n {\n return $this->childPages;\n }", "public function getChildren($folderId, $options = array ()) {\n\t\t$myURL = $this->getLink($folderId, self::LINK_DOWN);\n\t\t$myURL.= $this->GenURLQueryString($options);\n\t\t$ret = $this->doGet($myURL);\n\t\t$objs = $this->extractObjectFeed($ret->body);\n\t\t$this->cacheFeedInfo($objs);\n\t\treturn $objs;\n\t}", "public function children()\n {\n return $this->hasMany(static::class, 'parent_id')->orderBy('name', 'asc');\n }", "public function findArticles() : Collection\n {\n return $this->model->articles;\n }", "public function getChildren($idParent) {\r\n\t\t$entities = $this->find('all', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Entity.parent_id' => $idParent,\r\n\t\t\t\t'Entity.active' => 1\r\n\t\t\t\t),\r\n\t\t\t'order' => array('Entity.order' => 'ASC') \r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $entities ;\r\n\t}", "public function children($self = FALSE, $direction = 'ASC', $limit = FALSE)\n {\n return $this->descendants($self, $direction, TRUE, FALSE, $limit);\n }", "public function getArticles()\n\t{\n\t\treturn $this\n\t\t\t->hasMany(Article::className(), ['id'=>'article_id'])\n\t\t\t->viaTable('{{%article_article_category}}', ['article_category_id'=>'id']);\n\t}", "public function getListItems()\n {\n return $this->getArticles();\n }", "public function readChildAction()\r\n {\r\n $filterJson = $this->params()->fromQuery('filter');\r\n if (isset($filterJson)) {\r\n $filters = Json::decode($filterJson, Json::TYPE_ARRAY);\r\n } else {\r\n $filters = null;\r\n }\r\n $sortJson = $this->params()->fromQuery('sort');\r\n if (isset($sortJson)) {\r\n $sort = Json::decode($sortJson, Json::TYPE_ARRAY);\r\n } else {\r\n $sort = null;\r\n }\r\n $parentId = $this->params()->fromQuery('node', 'root');\r\n $mongoFilters = $this->_buildFilter($filters);\r\n $dataValues = $this->_dataService->readChild($parentId, $mongoFilters, $sort, false);\r\n $response = array();\r\n $response['children'] = array_values($dataValues);\r\n $response['total'] = count($response['children']);\r\n $response['success'] = TRUE;\r\n $response['message'] = 'OK';\r\n return $this->_returnJson($response);\r\n }", "function get_child_pages_by_parent_title($pageId,$limit)\n{\n // needed to use $post\n global $post;\n // used to store the result\n $pages = array();\n\n // What to select\n $args = array(\n 'post_type' => 'page',\n 'post_parent' => $pageId,\n 'posts_per_page' => $limit\n );\n $the_query = new WP_Query( $args );\n\n while ( $the_query->have_posts() ) {\n $the_query->the_post();\n $pages[] = $post;\n }\n wp_reset_postdata();\n return $pages;\n}", "public function articles()\n {\n return $this->morphedByMany('App\\Article', 'taggable');\n }", "public function children()\n {\n return $this->hasMany(Post::class, 'parent_id');\n }", "public function getRelatedArticles(ArticleInterface $article, $locale, $limit = 6);", "public function children()\n {\n return (array) $this->children;\n }", "function getDirectChildren($id) {\n\t\t\t$this->query(\"SELECT * FROM usecase WHERE parent={$id};\");\n\t\t\t$rs = $this->resultSet();\n\t\t\t$array = array();\n\t\t\tforeach($rs as $uc)\n\t\t\t\t$array[] = $uc;\n\t\t\treturn $array;\n\t\t}", "public function oldLimitedChapter(): array\n {\n $sql = \"\n SELECT posts.id,\n posts.title,\n posts.image_posts,\n posts.date_posts,\n posts.content,\n admins.name\n FROM posts\n JOIN admins\n WHERE posts.id=1\n AND posts.posted = 1\n \";\n\n $query = Database::getDb()->query($sql);\n $results = $query->fetchAll(PDO::FETCH_OBJ);\n return $results;\n }", "public function get()\n\t{\n\t\t$limit = 5;\n\t\t\n\t\t# type, limit, channel, isASubChannel, ignoreChannel, \n $articles = App::make('ArticleRepository')->getArticles( \n \t'featured', // type of articles to get\n \t$limit, // the number to return\n \tnull, // channel identifier\n \tfalse, // whether the channel is a sub channel\n \ttrue // whether to ignore the channel identifier (we do on the homepage as we want articles for all channels) \n );\n\n return App::make('ArticleTransformer')->transformCollection( $articles );\n\t}", "function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}", "public function articles() {\n //hasMany representa la relacion de un a muchos\n return $this->hasMany(\"App\\Article\");\n }", "function fetch_children($obj = null){\n\t$parent = ($obj == null) ? get_parent() : $obj;\n\t$id = ($parent->post_parent) ? $parent->post_parent : $parent->ID;\n\n\t// Fetch all child pages of the parent OR siblings:\n\treturn get_pages(\"hierarchical=0&parent=\".$id.\"&child_of=\".$id);\n}", "public function get_objects_as_options($options=array()){\n\t\t$objects = $this->get_objects($options);\n\t\t$opt = array();\n\t\tforeach($objects as $o){\n\t\t\tswitch(True){\n\t\t\t\tcase $this->options('use_title'):\n\t\t\t\t\t$opt[$o->post_title] = $o->ID;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$opt[$o->ID] = $o->ID;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $opt;\n\t}", "function get_data($deep_search = false)\n {\n $content = $this->get_content();\n\n // Get article links form the main website\n $links = $this->get_article_links($content, $deep_search);\n $articles_by_author = [];\n $ignore_list = ['directories'];\n\n foreach ($links as $link) {\n // Skip blog entries for now\n if (preg_match('/.*' . join('|', $ignore_list) . '.*/', $link)) {\n continue;\n }\n\n if (preg_match('/.*article.*/', $link)) {\n $article = $this->scrape_article($link);\n }\n if (preg_match('/.*blog.*/', $link)) {\n $article = $this->scrape_blog($link);\n }\n\n $author = $article['author']['name'];\n if (empty($author))\n continue;\n\n if (!array_key_exists($author, $articles_by_author))\n $articles_by_author[$author] = [];\n $articles_by_author[$author][] = $article;\n }\n\n return $articles_by_author;\n }", "public function getListeArticles()\n {\n $rowset = $this->tableGateway->select(array('type'=> 'article'));\n return $rowset;\n }", "public function getSectionArticles()\r\n {\r\n $config = $this->_helper->getSectionConfig($this->getSectionId(), 'section.json');\r\n\r\n return $config['articles'];\r\n }", "public function findAll()\r\n {\r\n $posts = [];\r\n $req = $this->connexion->connect()->prepare('SELECT id, title, content, DATE_FORMAT(dateposts, \\' % d /%m /%Y à % Hh % imin % ss\\') AS creation_date_fr FROM posts ORDER BY dateposts DESC LIMIT 0, 5');\r\n $req->execute();\r\n $datas = $req->fetchAll();\r\n foreach ($datas as $data) {\r\n $posts[] = new Article($data);\r\n }\r\n return $posts;\r\n\r\n }", "public function get_objects($options=array()){\n\n\t\t$defaults = array(\n\t\t\t'numberposts' => -1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t\t'post_type' => $this->options('name'),\n\t\t);\n\t\t$options = array_merge($defaults, $options);\n\t\t$objects = get_posts($options);\n\t\treturn $objects;\n\t}", "public function children() {\n\n if(isset($this->cache['children'])) return $this->cache['children'];\n\n $this->cache['children'] = new Children($this);\n\n $inventory = $this->inventory();\n\n // with page models\n if(!empty(static::$models)) {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n // let's create a model if one is defined\n if(isset(static::$models[$child->intendedTemplate()])) {\n $model = static::$models[$child->intendedTemplate()];\n $child = new $model($this, $dirname);\n }\n $this->cache['children']->data[$child->id()] = $child;\n }\n // without page models\n } else {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n $this->cache['children']->data[$child->id()] = $child;\n }\n }\n\n return $this->cache['children'];\n\n }", "public function get_children() : array\n {\n return $this->children;\n }", "public function findAllDesc()\n {\n $builder = $this->_em->createQueryBuilder();\n \n return $builder->select(['a'])\n ->from('Articles\\Entity\\Article', 'a')\n ->addOrderBy('a.published', 'DESC')\n ->addOrderBy('a.status', 'DESC')\n ->addOrderBy('a.id', 'DESC')\n ->getQuery()\n ->getResult();\n }", "public function children($id);", "public function children (){\n\t\treturn array();\n\t}", "public function articles()\n {\n return $this->hasMany('Article', 'category_id');\n }", "protected function get_descendents()\n\t{\n\t\t$descendents = array();\n\n\t\tforeach ($this->children as $nid => $child)\n\t\t{\n\t\t\t$descendents[$nid] = $child;\n\t\t\t$descendents += $child->descendents;\n\t\t}\n\n\t\treturn $descendents;\n\t}", "public function children()\n {\n return $this->hasMany(Category::class, 'parent_id', 'id');\n }", "public function articles()\n {\n return $this->hasMany(Article::class);\n }", "public function getMany($args = null);", "public function getChildren()\n {\n // Singleton: both getChild and getChildren are called\n // by the Sabre_DAV_Browser_Plugin\n if (empty($this->children)) {\n $storedFiles = $this->fileStorage->get_directory_files(\n $this->storedFile->get_contextid(),\n $this->storedFile->get_component(),\n $this->storedFile->get_filearea(),\n $this->itemId,\n $this->storedFile->get_filepath(),\n false, // recursive\n true, // includedirs\n 'filepath ASC, filename ASC' // sort\n );\n\n foreach ($storedFiles as $storedFile) {\n if ($storedFile->is_directory()) {\n $this->children[][] = new DAVRootPoolDirectory($storedFile);\n } else {\n $this->children[][] = new DAVRootPoolFile($storedFile);\n }\n }\n }\n\n return $this->children;\n }", "public function children()\n {\n return $this->hasMany(self::class, 'parent_id', 'id');\n }", "public function getChildrenQuery();", "public function getChildren($activeOnly = true, $pageNo = null, $pageSize = DaoQuery::DEFAUTL_PAGE_SIZE, $orderBy = array(), &$stats = array())\n {\n \treturn self::getAllByCriteria('position like ? and rootId = ?', array($this->getPosition() . '%', $this->getRoot()->getId()), $activeOnly, $pageNo, $pageSize, $orderBy, $stats);\n }", "public function childrens()\n {\n return $this->hasMany(self::class, 'parent_id');\n }", "public function getChildLinks()\n {\n return $this->child_links;\n }", "function get_children($id,$config,$lang=array())\r\n\t{\r\n\t\t$children = array();\r\n\t\t\r\n\t\t$query = \"SELECT menu_id,menu_title,menu_url,menu_desc,menu_icon,menu_target FROM \".$config['db']['pre'].\"amenu WHERE parent_id = '$id' ORDER BY sort_id,menu_id\";\r\n\t\t$result = $this->query($query);\r\n\t\t$count = 0;\r\n\t\twhile ($row = mysql_fetch_array($result))\t\r\n\t\t{\r\n\t\t\tif(isset($lang['PROVIDERU']))\r\n\t\t\t{\r\n\t\t\t\tif($row['menu_title'] == 'Buyers')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = $lang['BUYERU'].'s';\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Add Buyer')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Add '.$lang['BUYERU'];\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Search Buyer(s)')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Search '.$lang['BUYERU'].'(s)';\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Edit Buyer(s)')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Edit '.$lang['BUYERU'].'(s)';\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Providers')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = $lang['PROVIDERU'].'s';\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Add Provider')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Add '.$lang['PROVIDERU'];\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Search Provider(s)')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Search '.$lang['PROVIDERU'].'(s)';\r\n\t\t\t\t}\r\n\t\t\t\telseif($row['menu_title'] == 'Edit Provider(s)')\r\n\t\t\t\t{\r\n\t\t\t\t\t$row['menu_title'] = 'Edit '.$lang['PROVIDERU'].'(s)';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\t$children[$count]['id'] = $row['menu_id'];\t\r\n\t\t\t$children[$count]['title'] = $row['menu_title'];\t\r\n\t\t\t$children[$count]['url'] = $row['menu_url'];\t\r\n\t\t\t$children[$count]['desc'] = $row['menu_desc'];\t\r\n\t\t\t$children[$count]['icon'] = $row['menu_icon'];\t\r\n\t\t\t$children[$count]['target'] = $row['menu_target'];\t\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\treturn $children;\r\n\t}", "function get_children($left_id, $right_id, $level)\n\t{\n\t\tglobal $DBPrefix, $db;\n\t\t$query = \"SELECT * FROM \" . $DBPrefix . \"categories WHERE left_id > :left_id AND right_id < :right_id AND level = :level ORDER BY cat_name\";\n\t\t$params = array();\n\t\t$params[] = array(':left_id', $left_id, 'int');\n\t\t$params[] = array(':right_id', $right_id, 'int');\n\t\t$params[] = array(':level', ($level + 1), 'int');\n\t\t$db->query($query, $params);\n\t\t$children = array();\n\t\twhile($child = $db->fetch())\n\t\t{\n\t\t\t$children[] = $child;\n\t\t}\n\n\t\treturn $children;\n\t}", "function getChilds($id = NULL);", "public function findChildren($id_parent){\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.parent', $queryBuilder->createNamedParameter($id_parent))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.sys_language_uid', $queryBuilder->createNamedParameter($GLOBALS['TSFE']->sys_language_uid, \\PDO::PARAM_INT))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.deleted', $queryBuilder->createNamedParameter(0))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.hidden', $queryBuilder->createNamedParameter(0))\n )\n ->execute();\n $list_cat=[];\n while ($row = $statement->fetch()) {\n\n $list= array(\n 'uid' => $row['uid'],\n 'title' => $row['title'],\n 'parent' => $row['parent'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n );\n array_push($list_cat, $list);\n }\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.uid', $queryBuilder->createNamedParameter($id_parent))\n )\n \n ->execute();\n while ($row = $statement->fetch()) {\n $list=array(\n 'uid' =>$row['uid'],\n 'title' =>$row['title'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n 'children' => $list_cat);\n }\n return $list;\n }", "function children($parent_id): ?array {\n $list = @$this->children[$parent_id];\n return $list ? array_keys($list) : [];\n }", "protected function convertChildrenToArray()\n {\n $data = array();\n foreach ($this->getChildren() as $name => $child) {\n $data = array_merge($data, $this->convertChildToArray($name, $child));\n }\n return $data;\n }", "public function articles(){ //establece la relacion entre modelos, en este caso 1 a muchos\n return $this -> hasMany('App\\Article');\n }", "public function readAllArticles(): array\n {\n // On se connecte à la base de donnée\n $db = DbConnexion::openConnexion();\n\n // Après avoir tout sélectionné dans la table article\n // On le stoocke dans un tableau\n $articlesAllList = [];\n\n // On séléctionne tout dans la table article\n $request = \"SELECT * FROM article\" ;\n\n // On prépare et exécute la requête\n $stmt = $db->prepare($request);\n $stmt->execute();\n\n /*\n On crée une boucle tant que ...\n FETCH-ASSOC = mode de récupération de données qui retourne un tableau indéxé par colonne\n Ne permet pas d'appeler plusieurs colonnes du même nom\n */\n while ($articlesFromDb = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n // On instancie un nouvel article\n $articleAll = new Article($articlesFromDb['title'], $articlesFromDb['content'], $articlesFromDb['image'], $articlesFromDb['ref_page']);\n $articleAll->setId($articlesFromDb['id']);\n $articleAll->setCreationDate($articlesFromDb['creation_date']);\n $articleAll->setUpdateDate($articlesFromDb['update_date']);\n\n $articlesAllList [] = $articleAll;\n }\n\n $db = DbConnexion::closeConnexion();\n\n return $articlesAllList;\n }", "public function getList(){\r\n $listArticles =[]; ///on creer une liste vide ou ont mettra tous les articles\r\n\r\n\r\n //prepare une requete de type select\r\n $sql='SELECT * FROM articles';\r\n $req = $this->bdd->prepare($sql);\r\n\r\n//////execution de la requete avec attribution des valeurs\r\n$req->execute();\r\n\r\n/////on stocke les données obtenues dans un tableau\r\nwhile ($donnees = $req->fetch(PDO::FETCH_ASSOC)){///tant que il y a des article alors on boucle\r\n ////on cree des objets avec les données issue de la bdd\r\n $articles = new articles();\r\n $articles->hydrate($donnees);\r\n $listArticles[] = $articles;\r\n}\r\n///print_r2($listArticles)\r\nreturn $listArticles;\r\n\r\n}", "public function children(Model $Model, $id = null, $direct = false, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) {\n\t\tif (is_array($id)) {\n\t\t\textract(array_merge(array('id' => null), $id));\n\t\t}\n\t\t$overrideRecursive = $recursive;\n\n\t\tif ($id === null && $Model->id) {\n\t\t\t$id = $Model->id;\n\t\t} elseif (!$id) {\n\t\t\t$id = null;\n\t\t}\n\n\t\textract($this->settings[$Model->alias]);\n\n\t\tif ($overrideRecursive !== null) {\n\t\t\t$recursive = $overrideRecursive;\n\t\t}\n\t\tif (!$order) {\n\t\t\t$order = $Model->escapeField($left) . \" asc\";\n\t\t}\n\t\tif ($direct) {\n\t\t\t$conditions = array($scope, $Model->escapeField($parent) => $id);\n\t\t\treturn $Model->find('all', compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive'));\n\t\t}\n\n\t\tif (!$id) {\n\t\t\t$conditions = $scope;\n\t\t} else {\n\t\t\t$result = array_values((array)$Model->find('first', array(\n\t\t\t\t'conditions' => array($scope, $Model->escapeField() => $id),\n\t\t\t\t'fields' => array($left, $right),\n\t\t\t\t'recursive' => $recursive,\n\t\t\t\t'order' => false,\n\t\t\t)));\n\n\t\t\tif (empty($result) || !isset($result[0])) {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\t$conditions = array($scope,\n\t\t\t\t$Model->escapeField($right) . ' <' => $result[0][$right],\n\t\t\t\t$Model->escapeField($left) . ' >' => $result[0][$left]\n\t\t\t);\n\t\t}\n\t\treturn $Model->find('all', compact('conditions', 'fields', 'order', 'limit', 'page', 'recursive'));\n\t}", "public function getChild()\n {\n return $this->hasMany(Pages::className(), ['parent_id' => 'id']);\n }", "function _gatherChildren($nid) {\n\t$return = array();\n\t$node =& $this->_allNodes[$nid];\n\tif (is_array ($this->_allParent[$node->id])) {\n\t\tforeach ($this->_allParent[$node->id] as $nodeZ) {\n\t\t$z =& $this->_allNodes[$nodeZ];\n\t\t// We found a child\n\t\t$this->_nodeArrayizeData($z);\n\t\t// Check for references\n\t\t$this->_makeReferences($z);\n\t\t// Merge with the big array we're returning\n\t\t// The big array being all the data of the children of our parent node\n\t\t$return = $this->_array_kmerge($return,$z->data);\n\t\t}\n\t}\n\treturn $return;\n\t}", "private function get_children($parent, $level = 0) {\r\n \t\t$pages = ORM::factory('page')->where('parent_id', $parent)->orderby('display_order','asc')->find_all();\r\n\r\n \t\t// display each child\r\n \t\tforeach ($pages as $page) {\r\n \t\t// indent and display the title of this child\r\n \t\t$this->page_array[] = array($page,$level);\r\n \t\t$this->get_children($page->id, $level+1); \r\n \t\t}\r\n\t}", "private function getChildrenIds(){\n if ($this->myChildrenType===null) $this->myChildrenIds = null;\n else $this->myChildrenIds = $this->_db->getChildrenIds($this->myId);\n }", "protected function getResourceChildCollection($child_type, array $options = null)\n\t{\n\t\t$parent_id = $this->getId();\n\t\t$child_resource = $this->resource->$child_type;\n\n\t\treturn $child_resource->findAll($options, $parent_id);\n\t}", "public function children()\n {\n if (is_a($this->children, 'Kirby\\Cms\\Pages') === true) {\n return $this->children;\n }\n\n return $this->children = Pages::factory($this->inventory()['children'], $this);\n }", "public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }", "public function getPosts($value, Argument $args, \\ArrayObject $context, ResolveInfo $info)\n {\n $selectedFields = $info->getFieldSelection(2);\n $selectedFieldsPosts = $selectedFields['posts'];\n\n// dump($selectedFields);\n\n [\n 'fields' => $postFields,\n 'relations' => $postRelations\n ] = static::getLevelInfo($selectedFieldsPosts);\n\n $perPage = $args->offsetGet('perPage');\n $page = $args->offsetGet('page');\n $postsBeforePage = ($page - 1) * $perPage;\n $postsCurrentPageStart = $postsBeforePage + 1;\n $postsTotalCount = 227; // 100\n $pagesCount = ceil($postsTotalCount / $perPage);\n $posts = [];\n\n // генерирует посты текущей страницы\n for ($i = $postsCurrentPageStart; $i <= $postsBeforePage + $perPage && $i <= $postsTotalCount; ++$i) {\n $posts[] = static::fetchPost($i, $postFields, $postRelations, $selectedFieldsPosts);\n }\n\n $response = [\n 'posts' => $posts,\n ];\n\n if (isset($selectedFields['pageInfo'])) {\n $selectedFieldsPageInfo = $selectedFields['pageInfo'];\n\n $pageInfo = [];\n\n if (isset($selectedFieldsPageInfo['page'])) {\n $pageInfo['page'] = $page;\n }\n if (isset($selectedFieldsPageInfo['pagesCount'])) {\n $pageInfo['pagesCount'] = $pagesCount;\n }\n if (isset($selectedFieldsPageInfo['perPage'])) {\n $pageInfo['perPage'] = $perPage;\n }\n if (isset($selectedFieldsPageInfo['totalItems'])) {\n $pageInfo['totalItems'] = $postsTotalCount;\n }\n if (isset($selectedFieldsPageInfo['hasNextPage'])) {\n // или $page + 1 <= $pagesCount\n $pageInfo['hasNextPage'] = $pagesCount - $page >= 1;\n }\n\n $response['pageInfo'] = $pageInfo;\n }\n\n return $response;\n }", "public function children()\n {\n return $this->hasMany('App\\Models\\Category', 'parent_id', 'id');\n }", "public function child_acl_resource_collection(array $order_by=null, $offset=null, $limit=null) {\n $key = self::_limit_var_key('child_acl_resource_collection', $order_by, $offset, $limit);\n if (! array_key_exists($key, $this->_vars)) {\n $this->_vars[$key] = new \\neoform\\acl\\resource\\collection(\n entity::dao('acl\\resource')->by_parent($this->vars['id'], $order_by, $offset, $limit)\n );\n }\n return $this->_vars[$key];\n }", "public function getChildren(): array\n {\n return $this->children->toArray();\n }", "public function getChildren(): array;", "public function filters_get_parent($as_array = false) {\n parent::select_lang('name');\n $this->db\n ->select('id, field, link')\n ->from('site_catalog_filters')\n ->where('field <> \"\"')\n ->order_by('position', 'ASC')\n ;\n\n $parent = $this->db->get();\n if ($parent->num_rows() <= 0) return array();\n $parent = $parent->result_array();\n\n if ($as_array) {\n $temp = array();\n foreach ($parent as $one) array_push($temp, $one['field']);\n return $temp;\n }\n\n return $parent;\n }", "public static function getArticles()\n {\n // $url = \"https://n161.tech/api/dummyapi/post?page=1&limit=100\";\n // $curl = curl_init();\n // curl_setopt($curl, CURLOPT_URL, $url);\n // curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n // curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);\n // curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n // $response = curl_exec($curl);\n // $array_data = json_decode($response, true);\n // curl_close($curl);\n // return $array_data;\n return Article::orderBy('updated_at', 'desc')->paginate(5);\n }", "public function fetchOptions()\n\t{\n\t\t$result = $this->dibi->query(\"\n\t\t\tSELECT \n\t\t\t\tid, CONCAT_WS(' ',title, CONCAT_WS('/',year,volume)) AS journal\n\t\t\tFROM \n\t\t\t\tjournal\n\t\t\tORDER BY\n\t\t\t\tyear DESC, volume DESC\n\t\t\");\n\t\t\n\t\treturn $result->fetchPairs($key='id', $value='journal');\n\t}", "public function structure() {\n $list = $this->newQuery()->where('parent_id', 0)->orderBy('order_id', 'asc')->get();\n $list->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $children->transform(function (PageCategory $category) {\n $children = $category->newQuery()->where('parent_id', $category->getAttribute('id'))->orderBy('order_id', 'asc')->get();\n $category->setAttribute('children', $children);\n\n return $category;\n });\n $category->setAttribute('children', $children);\n\n return $category;\n });\n\n return $list->toArray();\n }" ]
[ "0.6124535", "0.6091557", "0.5915418", "0.5813516", "0.57794935", "0.57306206", "0.57271534", "0.5723596", "0.5715251", "0.56637853", "0.5648137", "0.5644236", "0.55979985", "0.5588315", "0.5571242", "0.55471987", "0.5525465", "0.550688", "0.55002904", "0.5482068", "0.54811704", "0.5474937", "0.5466528", "0.54607505", "0.54542166", "0.54430455", "0.542398", "0.5421271", "0.54209816", "0.5407148", "0.5404475", "0.5404399", "0.5397035", "0.53907233", "0.5377156", "0.5373583", "0.5346627", "0.53379107", "0.5301952", "0.529408", "0.5283958", "0.5281106", "0.5246718", "0.5236765", "0.5208408", "0.5208361", "0.52042764", "0.5199525", "0.5194633", "0.51922125", "0.5187635", "0.51846224", "0.518006", "0.51794076", "0.5176463", "0.5175246", "0.5163047", "0.5148878", "0.51314205", "0.51302016", "0.5127337", "0.5123523", "0.5119737", "0.5119528", "0.5115382", "0.5102247", "0.50929767", "0.5087777", "0.5087442", "0.50823694", "0.50800115", "0.5078778", "0.5074191", "0.5073902", "0.506879", "0.5066421", "0.5057123", "0.5051309", "0.50481087", "0.5043857", "0.50376767", "0.50346935", "0.503317", "0.503225", "0.5027422", "0.50216776", "0.50194216", "0.5011121", "0.5010955", "0.5010283", "0.50064254", "0.49920022", "0.49821675", "0.49796605", "0.49779248", "0.497593", "0.4974825", "0.49699163", "0.4964966", "0.49577868" ]
0.74796915
0
Returns all descendant childs Does not care about the order, just returns what it finds.
function descendants() { /* get all children of this article for each child, run the same query.. */ $childs = $this->children(); $subChilds = array(); foreach ($childs as $oneChild) { $subChilds = array_merge($subChilds, $oneChild->descendants()); } $childs = array_merge($childs, $subChilds); pb_pqp_log_speed("article descendants()"); return $childs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function children() {\n return $this->descendants(1);\n }", "public function children()\n\t{\n\t\treturn $this->descendants(1);\n\t}", "function descendants() {\n\t\t$out = array();\n\t\t$this->get_descendants($out);\n\t\treturn $out;\n\t}", "public function getDescendants();", "public function allChildrenElements() {\n\t\treturn $this->childrenElements()->with('allChildrenElements');\n\t}", "public function get_children();", "public function children()\n {\n $this->buildTree();\n return $this->childrenInternal();\n }", "public function getChilds()\n {\n return $this->childs;\n }", "public function childrenRecursive()\n\t\t{\n\t\t\treturn $this->children()->with('childrenRecursive');\n\t\t}", "public function getDescendants()\n {\n if (!isset($this->_objects['Descendants'])) {\n $this->_objects['Descendants'] = $this->_getRepository()->fetchDescendantsByParent($this->id);\n }\n\n return $this->_objects['Descendants'];\n }", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function getChilds() {\n return $this->__childs;\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}", "public function getAllChildNode()\r\n {\r\n return $this->_childNodes;\r\n }", "public function getChilds();", "function children() {\n\t\t$this->load_children();\n\t\treturn $this->_children;\n\t}", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function getChildren(): Collection\n {\n return $this->children;\n }", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function getChildNodesById()\n {\n if (! $this->_allChildrenKnown) {\n $this->loadChildNodes();\n }\n return $this->_childNodesById;\n }", "function _wswwpx_page_get_descendant_ids ( $parent = 0, $inclusive=true ) {\n \tif ( $parent && $inclusive ) $descendants[] = $parent;\n \tif ( $children = _wswwpx_page_get_child_ids ( $parent ) ) {\n \t\tforeach ( $children as $child ) {\n \t\t\t$descendants[] = $child;\n \t\t\t$grandchildren = _wswwpx_page_get_child_ids ( $child );\n \t\t}\n \t}\n \t//\n \treturn $descendants;\n }", "public function getChildren() {\n\t\t$placeRepository = t3lib_div::makeInstance('Tx_Wpj_Domain_Repository_PlaceRepository');\n\t\t$children = $placeRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function get_children() {\n\t\treturn $this->children;\n\t}", "public function getChildren($selector = 'all') {\r\n\t\tif ($selector == 'all') return $this->children;\r\n\t\t$rslt = array();\r\n\t\t$attrs = $this->parseSelector($selector);\r\n\t\tforeach($this->children as $child) {\r\n\t\t\tif ($child->matchAttrs($attrs)) {\r\n\t\t\t\t$rslt[] = $child;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $rslt;\r\n\t}", "public function getChildren() {\n $childNodes = $this->getNode()->getChildren();\n $children = array();\n foreach ($childNodes as $childNode) {\n $child = $childNode->getPage($this->getLang());\n if ($child) {\n $children[] = $child;\n }\n }\n return $children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildren()\n {\n return $this->children;\n }", "public function getChildElements() {}", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function getChildren() {\n\t\treturn $this->children;\n\t}", "public function getChildren()\n {\n return $this->children;\n }", "public function children ($selector = null) { \r\n\t\t\r\n\t\t$l = new XDTNodeList();\r\n\t\t\tforeach ($this as $node) \r\n\t\t\t\tforeach ($node->childNodes as $child) $l->add($child);\r\n\t\t\t\r\n\t\tif (!isset($selector)) return $l;\r\n\t\t\r\n\t\t$this->xml_query = $l;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "public function children()\r\n\t{\r\n\t\treturn $this->children;\r\n\t}", "public function getChildren()\n {\n return $this->_children;\n }", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getChildren()\n\t{\n\t\treturn $this->children;\n\t}", "public function getChildrenQuery();", "public function getChildren() {\n\t\treturn $this->_children;\n\t}", "public function getChildren()\n {\n return $this->inheritanceList;\n }", "public function getChildren() \n {\n return $this->children;\n }", "public function grandChildren() {\n return $this->children()->children();\n }", "public function grandChildren()\n {\n return $this->children()->children();\n }", "public function descendants($id);", "public function getChildren()\r\n\t{\r\n\t\treturn $this->childrenNodes;\r\n\t}", "public function getChildNodes();", "public function children($self = FALSE, $direction = 'ASC', $limit = FALSE)\n {\n return $this->descendants($self, $direction, TRUE, FALSE, $limit);\n }", "#[\\ReturnTypeWillChange]\n public function getChildren()\n {\n $element = $this->current();\n $childContext = $this->elementProcessor->processElementChildren(\n $element,\n $this->contexts[$this->contextMap[$this->key()]]\n );\n return new static($element->childNodes, $childContext, $this->elementProcessor);\n }", "public function children()\n {\n return $this->hasMany(static::class, 'parent_id')->orderBy('name', 'asc');\n }", "public function getDescendants($idEntry = 0);", "public function getChildren()\n {\n return $this\n ->hasMany(MenuItem::class, ['menuId' => 'id'])\n ->andWhere(['is', 'parentId', null])\n ->orderBy(['order' => SORT_ASC]);\n }", "public function getChildren(): array\n {\n return $this->children->toArray();\n }", "public function getChildNodes() : array {\n return $this->childNodes;\n }", "public function get_children() : array\n {\n return $this->children;\n }", "public function getChildren(): array {\n return iterator_to_array(clone $this->children);\n }", "public function getChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n $children = [];\n for ($i = 0; $i < $result->getRows(); ++$i) {\n $children[] = new self((int) $result->getValue('category_id'), $this->clang_id);\n $result->next();\n }\n return $children;\n }", "public function childrens()\n {\n return $this->hasMany(self::class, 'parent_id');\n }", "public function children()\n {\n $children = $this->getAttribute('children') ?: [];\n\n if ($children && ! is_array($children) && ! ($children instanceof Collection)) {\n return (array) $children;\n }\n\n return $children;\n }", "public function GetChildren() {\n\t\treturn $this->Children;\n\t}", "public function findChildren()\n {\n return self::where('code_parrent',$this->id)->get();\n }", "public function element_get_childs($id) {\n global $db;\n $child_nodes = $db->fetch_table(\"SELECT ID_KAT, KAT_TABLE FROM `\".$this->table.\"`\n WHERE ROOT=\".$this->root.\" AND PARENT=\".$id.\" ORDER BY ORDER_FIELD\");\n $childs = array();\n foreach ($child_nodes as $index => $data) {\n $childs[] = $this->element_read($data[\"ID_KAT\"]);\n }\n return $childs;\n }", "public function iterateChildren();", "public function getDescendants(BaseObject $node, $peer_method = 'doSelect', Criteria $c = null)\n {\n $descendants = array();\n\n if (!$node->isLeaf())\n {\n if(!$c)\n {\n $c = new Criteria();\n }\n $c->addAnd(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue(), Criteria::GREATER_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'right'), $node->getRightValue(), Criteria::LESS_THAN);\n $c->addAnd(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n $c->addAscendingOrderByColumn(self::getColumnConstant(get_class($node), 'left'));\n\n $descendants = call_user_func(array(get_class($node->getPeer()), $peer_method), $c);\n }\n\n /*\n * Set node levels to prevent further queries to database\n */\n $prev = array($node->getRightValue());\n $i = 0;\n if (count($descendants))\n {\n $initial_level = $descendants[0]->getLevel() - 1;\n }\n\n foreach ($descendants as $cur)\n {\n // get back to the parent\n while ($cur->getRightValue() > $prev[$i])\n {\n $i--;\n }\n\n $cur->setLevel(++$i + $initial_level);\n $prev[$i] = $cur->getRightValue();\n }\n\n return $descendants;\n }", "public function get_child_nodes_recursive() {\n\t\t$nodes = array();\n\n\t\tforeach ( $this->child_nodes as $node ) {\n\t\t\t$nodes[ $node->get_code() ] = $node;\n\n\t\t\t$nodes = array_merge( $nodes, $node->get_child_nodes_recursive() );\n\t\t}\n\n\t\treturn $nodes;\n\t}", "public function loadChildNodes()\n {\n $ids = $this->_cache->getBackend()->getChildNodeIds($this);\n return $this->setChildNodeIds($ids);\n }", "public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}", "protected function get_descendents()\n\t{\n\t\t$descendents = array();\n\n\t\tforeach ($this->children as $nid => $child)\n\t\t{\n\t\t\t$descendents[$nid] = $child;\n\t\t\t$descendents += $child->descendents;\n\t\t}\n\n\t\treturn $descendents;\n\t}", "private function getChildList(){\n\t\tif ($this->_childList == null) {\n\t\t\t$this->_childList = $this->getStructureNode()->getChildren();\n\t\t\t$this->_childList = $this->_childList->sort(array(\n\t\t\t\tnew SortRule($this->_childList->exprMember('title'))));\n\t\t}\n\t\treturn $this->_childList;\n\t}", "public function getChildrenQuery()\n {\n return null;\n }", "public function children()\n {\n return (array) $this->children;\n }", "public function findChildNodes($parentId)\n {\n return $this->findNodes($parentId);\n }", "function & getChilds() {\r\n // Load the data\r\n if (empty ($this->_childs)) {\r\n $database = $this->_db;\r\n /* retrieve values */\r\n $query = 'SELECT * FROM #__custom_properties_values' . ' WHERE parent_id = ' . $this->_id . ' ORDER BY ordering ';\r\n\r\n $database->setQuery($query);\r\n $this->_childs = $database->loadObjectList();\r\n }\r\n return $this->_childs;\r\n }", "public function Children()\n {\n return $this->Root->childrenOfSection($this->URLSegment);\n }", "public function testDescendantsWithMultiplePaths() {\n $this->savePage('Category:Grandparent', '');\n $this->savePage('Category:Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Category:Parent 2', '[[Category:Grandparent]]');\n $this->savePage('Parent 1', '[[Category:Grandparent]]');\n $this->savePage('Child 1', '[[Category:Parent 1]]');\n $this->savePage('Child 2', '[[Category:Parent 1]]');\n $this->savePage('Child 3', '[[Category:Parent 2]]');\n $decendants = $this->traverser->descendants('Category:Grandparent');\n $this->assertCount(4, $decendants);\n }", "public function getChildrenForArbo()\n {\n $filtreEnfant = ' and 1=1 ';\n $oUtilisateur = Utilisateur::getConnected();\n if ($oUtilisateur && ! $oUtilisateur->isRoot()) {\n if ((sizeof(self::getForbiddenID($this->mode)) > 0)) {\n $filtreEnfant .= \" and ID_PAGE not in (\" . implode(',', self::getForbiddenID($this->mode)) . \")\";\n }\n }\n\n return $this->getChildren($filtreEnfant);\n }", "function getChildNodes() ;", "public function &getChildren($id)\n {\n return $this->elts[$id]['children'];\n }", "public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }", "public function children()\n {\n return $this->hasMany(self::class, 'parent_id', 'id');\n }", "public function getChildren($idParent) {\r\n\t\t$entities = $this->find('all', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Entity.parent_id' => $idParent,\r\n\t\t\t\t'Entity.active' => 1\r\n\t\t\t\t),\r\n\t\t\t'order' => array('Entity.order' => 'ASC') \r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $entities ;\r\n\t}", "public function getChildren()\n {\n // Singleton: both getChild and getChildren are called\n // by the Sabre_DAV_Browser_Plugin\n if (empty($this->children)) {\n $storedFiles = $this->fileStorage->get_directory_files(\n $this->storedFile->get_contextid(),\n $this->storedFile->get_component(),\n $this->storedFile->get_filearea(),\n $this->itemId,\n $this->storedFile->get_filepath(),\n false, // recursive\n true, // includedirs\n 'filepath ASC, filename ASC' // sort\n );\n\n foreach ($storedFiles as $storedFile) {\n if ($storedFile->is_directory()) {\n $this->children[][] = new DAVRootPoolDirectory($storedFile);\n } else {\n $this->children[][] = new DAVRootPoolFile($storedFile);\n }\n }\n }\n\n return $this->children;\n }", "public function children (){\n\t\treturn array();\n\t}", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "public function getChildren($id){\n return $this->getTable()->where($this->treeParentRow,$id);\n }", "function getDirectChildren($id) {\n\t\t\t$this->query(\"SELECT * FROM usecase WHERE parent={$id};\");\n\t\t\t$rs = $this->resultSet();\n\t\t\t$array = array();\n\t\t\tforeach($rs as $uc)\n\t\t\t\t$array[] = $uc;\n\t\t\treturn $array;\n\t\t}", "final public function getChildren() {\n\t\treturn array();\n\t}", "public function getChildrenForIndependentMenu()\n {\n $IndependentMenu = Independent\\Handler::getMenu($this->getAttribute('menuId'));\n\n return $IndependentMenu->getChildren();\n }", "function getChildren() {\n foreach ( $this->parents as $parent ) {\n $this->children[$parent->name()]=array();\n foreach ( $this->items as $item ) {\n if ( $item->parent_id() == $parent->id() ) {\n $this->children[$parent->name()][]=$item;\n }\n }\n }\n }", "public function children() {\n\n if(isset($this->cache['children'])) return $this->cache['children'];\n\n $this->cache['children'] = new Children($this);\n\n $inventory = $this->inventory();\n\n // with page models\n if(!empty(static::$models)) {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n // let's create a model if one is defined\n if(isset(static::$models[$child->intendedTemplate()])) {\n $model = static::$models[$child->intendedTemplate()];\n $child = new $model($this, $dirname);\n }\n $this->cache['children']->data[$child->id()] = $child;\n }\n // without page models\n } else {\n foreach($inventory['children'] as $dirname) {\n $child = new Page($this, $dirname);\n $this->cache['children']->data[$child->id()] = $child;\n }\n }\n\n return $this->cache['children'];\n\n }", "public function getChildren() {}" ]
[ "0.77575153", "0.7755607", "0.767318", "0.7447568", "0.70213604", "0.7012333", "0.69341666", "0.69209504", "0.68890715", "0.682943", "0.6777655", "0.6777655", "0.67191947", "0.67118716", "0.6710817", "0.67061085", "0.668678", "0.6682959", "0.66527086", "0.6641762", "0.6640711", "0.6640711", "0.6628922", "0.66285354", "0.6621913", "0.6611289", "0.65894836", "0.65736526", "0.6569414", "0.65688646", "0.6566016", "0.6566016", "0.6566016", "0.6566016", "0.6566016", "0.6566016", "0.6566016", "0.6566016", "0.6558374", "0.6557555", "0.6557555", "0.65565056", "0.6542711", "0.6541072", "0.6539591", "0.65336007", "0.65336007", "0.65282047", "0.6527788", "0.65220374", "0.6502561", "0.6497358", "0.64906275", "0.6471413", "0.645552", "0.64532787", "0.64500856", "0.64403546", "0.6415636", "0.63535625", "0.6338724", "0.63347334", "0.6315947", "0.63017064", "0.62899643", "0.62509775", "0.62440425", "0.6239205", "0.622947", "0.62205464", "0.62165624", "0.6213074", "0.61951345", "0.6164325", "0.61359006", "0.6125171", "0.610621", "0.6103922", "0.6102797", "0.6099508", "0.6085734", "0.60845184", "0.6081647", "0.6072804", "0.60662204", "0.6063103", "0.6057416", "0.60546625", "0.60221136", "0.6008152", "0.6007604", "0.6007371", "0.5990406", "0.59793854", "0.597798", "0.59736717", "0.59638745", "0.5940058", "0.59364796", "0.59315985" ]
0.7932123
0
return the first child
function firstChild() { $children = $this->children(); if (sizeof($children>0)) { return $children[0]; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function &firstChild()\n {\n $ret = null;\n if (! count($this->_children)) {\n return $ret;\n }\n return $this->_children[0];\n }", "function &firstChild () {\r\n $ret = null;\r\n if (!count ($this->_children)) {\r\n return $ret;\r\n }\r\n return $this->_children[0];\r\n }", "public function getFirst()\n {\n return (\n is_null($this->parent) ?\n null :\n $this->parent->content[0]\n );\n }", "public function getFirstChild();", "public function getFirstChildByName($name) {\n foreach($this->__childs as $child) {\n if ($child->getName() == $name) {\n return $child;\n }\n }\n return null; \n }", "public function getFirstNode()\n {\n return $this->firstNode;\n }", "public function firstChild()\n {\n $node = $this->node->firstChild;\n\n if ($node === null) {\n return null;\n }\n\n return new Element($node);\n }", "public function first()\n {\n return count($this->nodes)?$this->nodes[0]:null;\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function FirstChildOf($item)\n {\n if ($item)\n {\n $sql = Access::SqlBuilder();\n $tbl = PageContent::Schema()->Table();\n $where = $sql->Equals($tbl->Field('Parent'), $sql->Value($item->GetID()))\n ->And_($sql->IsNull($tbl->Field('Previous')));\n \n return PageContent::Schema()->First($where);\n }\n else\n {\n return $this->TopMost();\n }\n }", "public function getFirstChildByType($type)\n {\n foreach ($this->children as $child) {\n if ($child->getType() === $type) {\n return $child;\n }\n }\n return false;\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 }", "public function isFirstChild(): bool\n {\n return $this->is_first_child;\n }", "public function first () { return new XDTNodeList($this[0]); }", "public function getFirst()\n\t{\t\treturn $this->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{\n\t\treturn parent::first();\n\t}", "final public function getFirst() {\n\t\treturn null;\n\t}", "function RedirectToFirstChild(){\n\t\tif($children = $this->Children()) {\n\t\t\tif($firstChild = $children->First()) {\n\t\t\t\tDirector::redirect($firstChild->Link());\n\t\t\t}\n\t\t}\n\t}", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "public function retrieveFirstChild(BaseObject $node)\n {\n $c = new Criteria();\n $c->add(self::getColumnConstant(get_class($node), 'left'), $node->getLeftValue() + 1, Criteria::EQUAL);\n $c->add(self::getColumnConstant(get_class($node), 'scope'), $node->getScopeIdValue(), Criteria::EQUAL);\n\n return call_user_func(array(get_class($node->getPeer()), 'doSelectOne'), $c);\n }", "public function FirstChildOf($item)\n {\n $sql = Access::SqlBuilder();\n if ($item)\n {\n $tblNavItem = NavigationItem::Schema()->Table();\n $where = $sql->IsNull($tblNavItem->Field('Previous'))\n ->And_($sql->Equals($tblNavItem->Field('Parent'), $sql->Value($item->GetID())));\n \n return NavigationItem::Schema()->First($where);\n }\n else\n {\n return $this->TopMost();\n }\n }", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function first()\n {\n return reset($this->_elements);\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public static function findFirstPedigree() {\n $pedigree = Pedigree::model()->find();\n return $pedigree;\n }", "function getFirstItem() { return $this->m_firstItem; }", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function getFirst()\n\t{\n\t\treturn $this;\n\t}", "public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function firstItem();", "public function getFirstRootNode()\n {\n $qb = $this->_qbFactory\n ->getRootNodeQueryBuilder()\n ->setMaxResults(1);\n try {\n return $qb->getQuery()->getSingleResult();\n } catch (NoResultsException $e) {\n return null;\n }\n }", "public function first(){\n return $this->find(1);\n }", "public function getFirstItem();", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "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()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first() {}", "public function getFirst();", "public function first() {\n if (count($this->items) > 0) {\n return $this->items[0];\n }\n else\n return null;\n }", "public function isFirst(): bool\n {\n $parent = $this->parent();\n $children = $parent ? $parent->children() : null;\n if ($children instanceof FlexCollectionInterface) {\n $children = $children->withKeyField();\n }\n\n return $children instanceof PageCollectionInterface ? $children->isFirst($this->getKey()) : true;\n }", "public static function first();", "public function first(): mixed;", "public function first(): mixed;", "public function first() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function getLowestTopChild()\n {\n $current = $this->getCurrent();\n while (!\\is_null($current)) {\n if ($current instanceof TopMenuItem) {\n return $current;\n }\n $current = $current->getParent();\n }\n\n return null;\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function getFirst()\n {\n $this->update();\n if (isset($this->data[0])) {\n return $this->updateValueIfNeeded($this->data, 0);\n }\n return null;\n }", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "public function first()\n {\n return (count($this->list) > 0 ?\n $this->list[0] : null\n );\n }", "public function getFirstItem() {}", "public function getFirstItem() {}", "public function first()\n {\n $data = parent::first();\n\n // For singletons, wrap them as a one-item array and then unwrap on return\n $data = $this->addRelations([$data]);\n\n return reset($data);\n }", "public function first()\n {\n return $this->results()[0];\n }" ]
[ "0.8024498", "0.8019949", "0.7682782", "0.76804227", "0.7392652", "0.723037", "0.7191516", "0.7118963", "0.69916147", "0.6914467", "0.687017", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68197674", "0.68043447", "0.6776273", "0.6758421", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.6747271", "0.67405117", "0.6708959", "0.668561", "0.6683403", "0.6678667", "0.66359717", "0.66319644", "0.6570592", "0.6570592", "0.65426946", "0.653042", "0.65079963", "0.65079033", "0.6490507", "0.64870566", "0.6485937", "0.64807963", "0.64520365", "0.6420345", "0.6415521", "0.641194", "0.641194", "0.641194", "0.641194", "0.641194", "0.641194", "0.641194", "0.641194", "0.6408987", "0.6389975", "0.63749003", "0.63733095", "0.63689804", "0.6367786", "0.6348551", "0.633672", "0.6318032", "0.6303236", "0.6303236", "0.6302804", "0.6274776", "0.6270663", "0.626628", "0.6257548", "0.6238396", "0.6236634", "0.62353987", "0.6232049", "0.62156016" ]
0.8780974
0
returns the url for this article
function href() { $usemodrewrite = polarbear_setting('usemodrewrite'); if ($usemodrewrite) { return $this->fullpath(); } else { return $this->templateToUse() . '?polarbear-page=' . $this->getId(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url(): string\n {\n return '/user/article/' . $this->slug . '/view';\n }", "public function get_url() {\r\n\t\treturn $this->feed->get_url().\"/\".$this->id.\"/\".urlencode(strtolower($this->title));\r\n\t}", "public function get_url();", "public function getUrl()\n {\n return Mage::getUrl('magna_news', array('news_id' => $this->getId(), '_secure' => true));\n }", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function getURL();", "public function getURL();", "public function get_url()\n {\n return $this->url;\n }", "public function getURL ();", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl() {\n return $this->get(self::URL);\n }", "public function getCleanURLArticleURL()\n {\n return static::CLEAN_URL_ARTICLE_URL;\n }", "public function getUrl()\n\t{\n\t\treturn rtrim(Mage::helper('wordpress')->getUrlWithFront($this->getId()), '/') . '/';\n\t}", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "function getUrl() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_URL);\n\t}", "function getUrl() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_URL);\n\t}", "function getUrl() {\n\t\treturn $this->getElementText(DOMIT_RSS_ELEMENT_URL);\n\t}", "public function url()\n\t{\n\t\treturn $this->url;\n\t}", "public function get_url()\n {\n return $this->_url;\n }", "public function get_url()\n {\n return $this->_url;\n }", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn '/images/blog/' . $this->name;\n\t}", "protected function _getUrl()\n {\n return Router::url([\n '_name' => 'wikiPages',\n 'id' => $this->id,\n 'slug' => Inflector::slug($this->title)\n ]);\n }", "public function url()\n {\n return $this->url;\n }", "public function url(): string\n {\n return $this->url;\n }", "public function url(): string\n {\n return $this->url;\n }", "protected function getUrl() {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->createUrl();\n }", "public abstract function getURL();", "protected function getUrl(): string\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl()\n {\n return $this->url;\n }", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function url() {\n return Url::to($this->slug);\n }", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function getUrl();", "public function GetUrl() {\n return $this->url;\n }", "public function getUrl()\n\t{\n\t\tif ($this->uri !== null)\n\t\t{\n\t\t\treturn UrlHelper::getSiteUrl($this->uri);\n\t\t}\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->_url;\n\t}", "function getURL()\n {\n if (!empty($this->url)) {\n return $this->url;\n }\n if (!empty($this->canonical)) {\n return $this->canonical;\n }\n if (!$this->getSlug() && ($this->getID())) {\n return \\Idno\\Core\\site()->config()->url . 'moves/' . $this->getID() . '/' . $this->getPrettyURLTitle();\n } else {\n return parent::getURL();\n }\n }", "public function url()\n\t{\n\t\tif( $this->modified === false ) return $this->url;\n\t\telse\n\t\t{\n\t\t\t$url = $this->generateString();\n\t\t\treturn htmlentities( $url );\n\t\t}\n\t}", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getUrl()\r\n {\r\n return $this->url;\r\n }", "public function getURL() {\n\t\treturn $this->url;\n\t}", "public function getUrl() : string\n {\n return $this->url;\n }", "public function getUrl() : string\n {\n return $this->url;\n }", "public function getUrl() {\n return $this->url;\n }", "public function get_url()\n {\n }", "public function getUrl(): string\n {\n return $this->url;\n }", "public function getUrl(): string\n {\n return $this->url;\n }", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getURL()\n {\n return $this->_url;\n }", "public function get_url(): string\n {\n return $this->get_url_internal();\n }", "protected function _getUrl(): string\n {\n property_exists_or_fail($this, ['id', 'album']);\n\n return Router::url(['_name' => 'photo', 'slug' => $this->get('album')->get('slug'), 'id' => (string)$this->get('id')], true);\n }" ]
[ "0.7915857", "0.78833735", "0.7612419", "0.7610853", "0.7561944", "0.754959", "0.754959", "0.75382996", "0.75382996", "0.7508947", "0.74917877", "0.74623054", "0.7462088", "0.74386436", "0.7437639", "0.7424443", "0.7409391", "0.73935175", "0.73935175", "0.73896044", "0.73895645", "0.73779446", "0.73779446", "0.73722255", "0.73722255", "0.73722255", "0.73722255", "0.73722255", "0.7371498", "0.7369612", "0.7363798", "0.7352098", "0.7352098", "0.733736", "0.7336672", "0.7327643", "0.7324997", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.7321859", "0.73181075", "0.73181075", "0.73181075", "0.73179924", "0.7312603", "0.7305641", "0.7305641", "0.7305641", "0.7305641", "0.7305641", "0.7305641", "0.7305641", "0.7305641", "0.72944725", "0.7289428", "0.72892034", "0.72883856", "0.7284472", "0.7282537", "0.7282537", "0.7282537", "0.72723895", "0.7269774", "0.7269774", "0.7266574", "0.7248647", "0.72409976", "0.72409976", "0.72380394", "0.7235304", "0.7235123", "0.7229017" ]
0.0
-1
get all existing field values for this article
function fieldValues() { if (isset($this->fieldValues)) { return $this->fieldValues; } // fieldvalues fanns inte. // kolla preload först och om inte där så ladda in $preloader = pb_query_preloader::getInstance(); $preloadRows = $preloader->getPreloadFieldsRows($this->id); if ($preloadRows === false) { #echo "<br>nah, no preload row for field, article: $this->id "; // no preload for this articles field, fetch them from db global $polarbear_db; $sql = " SELECT fv.fieldID, fv.articleID, fv.value, fv.numInSet, f.name as fieldName, f.type as fieldType FROM " . POLARBEAR_DB_PREFIX . "_fields_values as fv INNER JOIN " . POLARBEAR_DB_PREFIX . "_fields as f ON f.id = fv.fieldID WHERE articleID = '$this->id' ORDER BY fieldID ASC, numInSet ASC"; $rows = $polarbear_db->get_results($sql); } else { #echo "<br>got preload row for field, article: $this->id"; // horay! we got the field values preloaded $rows = $preloadRows; } $arrFieldValues = array(); $arrFieldCount = array(); if (is_array($rows)) { foreach ($rows as $oneRow) { if (!isset($arrFieldValues[$oneRow->fieldID])) { $arrFieldValues[$oneRow->fieldID] = array(); } /* todo: om det är en fil/bild ska det kanske finnas link, downloadLink, imageSrc osv. */ $arrFieldValues[$oneRow->fieldID][] = array( "fieldID" => $oneRow->fieldID, "articleID" => $oneRow->articleID, "value" => $oneRow->value, "numInSet" => $oneRow->numInSet, // and some useful "extras" too "valueEscaped" => htmlspecialchars ($oneRow->value, ENT_COMPAT, "UTF-8"), "valueNoTags" => strip_tags($oneRow->value), "fieldName" => $oneRow->fieldName, "fieldType" => $oneRow->fieldType ); if (!isset($arrFieldCount[$oneRow->fieldID])) { $arrFieldCount[$oneRow->fieldID]=0; } $arrFieldCount[$oneRow->fieldID]++; } } // update count foreach ($arrFieldCount as $fieldID => $fieldCount) { for ($i=0; $i<sizeof($arrFieldValues[$fieldID]); $i++) { $arrFieldValues[$fieldID][$i]["fieldSetCount"] = $fieldCount; } } #pb_pqp_log_speed("article fieldValues()"); $this->fieldValues = $arrFieldValues; return $this->fieldValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFieldValues()\n {\n if($this->isNewRecord){\n return []; //TODO: LOAD DEFAULT FIELDS OF TYPE\n }\n\n //pull meta values from DB\n $table = self::tablePrefix().'cms_post_field';\n $strSql = \"SELECT id, field_id, value \n\t\t\t\t\tFROM {$table}\n\t\t\t\t\tWHERE post_id = :pid\n\t\t\t\t \";\n $cmd = self::getDb()->createCommand($strSql);\n $cmd->bindValue(\":pid\",$this->id,\\PDO::PARAM_STR);\n $arrResults = $cmd->queryAll();\n\n return ArrayHelper::index($arrResults, 'id', 'field_id');\n }", "public function getCustomFields() {\n return Doctrine::getTable('ArticleCustomFieldValue')->getCustomFields($this);\n }", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getAllFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function fetchFields();", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public function getAllFields()\n {\n return $this->fields;\n }", "public function providerFieldValues()\n {\n return [\n ['non_existent_field', []],\n ['empty_field', []],\n ['empty_field_2', []],\n [\n 'acf_value_field',\n [\n ['test-1' => 'test 1'],\n ['test-1' => 'test 2'],\n ['test-1' => 'test 3'],\n ],\n ],\n [\n 'acf_option_field',\n [\n [\n 'label' => 'test 1',\n 'slug' => 'test-1',\n ],\n [\n 'label' => 'test 2',\n 'slug' => 'test-2',\n ],\n ],\n ],\n ];\n }", "abstract public function getFields();", "abstract public function getFields();", "function &getExtraFieldData() {\n\t\tif (!isset($this->extra_field_data)) {\n\t\t\t$this->extra_field_data = array();\n\t\t\t$res = db_query_params ('SELECT * FROM artifact_extra_field_data WHERE artifact_id=$1 ORDER BY extra_field_id',\n\t\t\t\t\t\tarray ($this->getID())) ;\n\t\t\t$ef = $this->ArtifactType->getExtraFields();\n\t\t\twhile ($arr = db_fetch_array($res)) {\n\t\t\t\t$type=$ef[$arr['extra_field_id']]['field_type'];\n\t\t\t\tif (($type == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) || ($type==ARTIFACT_EXTRAFIELDTYPE_MULTISELECT)) {\n\t\t\t\t\t//accumulate a sub-array of values in cases where you may have multiple rows\n\t\t\t\t\tif (!array_key_exists($arr['extra_field_id'], $this->extra_field_data) || !is_array($this->extra_field_data[$arr['extra_field_id']])) {\n\t\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']][]=$arr['field_data'];\n\t\t\t\t} else {\n\t\t\t\t\t$this->extra_field_data[$arr['extra_field_id']] = $arr['field_data'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->extra_field_data;\n\t}", "public function getFieldValues() {\n return array_values($this->_fields);\n }", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "public function get_values() {\n\t\t$values = [];\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$values[$field->name] = $field->get_value();\n\t\t}\n\n\t\treturn $values;\n\t}", "function getFields();", "public function fields(){\n\t\treturn array();\n\t}", "public function values($fields = array()) {\n $values = (array)$this->entry;\n\n foreach($fields as $fieldName => $field) {\n if(!isset($values[$fieldName])){\n $values[$fieldName] = '';\n }\n }\n\n $values['_modules'] = 'true';\n\n return $values;\n }", "public function getValues(ContentEntityInterface $entity, $field);", "abstract protected function getFields();", "public function fetch_fields() {}", "public function getFields()\n {\n return $this->content->getFields();\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "function field_data()\n\t{\n\t\t$retval = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$F\t\t\t\t= new stdClass();\n\t\t\t$F->name\t\t= $field->name;\n\t\t\t$F->type\t\t= $field->type;\n\t\t\t$F->default\t\t= $field->def;\n\t\t\t$F->max_length\t= $field->max_length;\n\t\t\t$F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;\n\n\t\t\t$retval[] = $F;\n\t\t}\n\n\t\treturn $retval;\n\t}", "public function &getFields() { return $this->fields; }", "public function getFields(): array;", "public function getFields(): array;", "public function getFields(): array;", "public function values(): array\n\t{\n\t\treturn $this->fields()->values()->all();\n\t}", "function getFieldValues()\n {\n $myvalues = $this->m_oPageHelper->getFieldValues($this->m_protocol_shortname);\n return $myvalues;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "function getExtraFieldDataText() {\n\t\t// First we get the list of extra fields and the data\n\t\t// associated to the fields\n\t\t$efs = $this->ArtifactType->getExtraFields();\n\t\t$efd = $this->getExtraFieldData();\n\n\t\t$return = array();\n\n\t\tforeach ($efs as $efid => $ef) {\n\t\t\t$name = $ef[\"field_name\"];\n\t\t\t$type = $ef[\"field_type\"];\n\n\t\t\t// Get the value according to the type\n\t\t\tswitch ($type) {\n\n\t\t\t\t// for these types, the associated value comes straight\n\t\t\t\tcase ARTIFACT_EXTRAFIELDTYPE_TEXT:\n\t\t\t\tcase ARTIFACT_EXTRAFIELDTYPE_TEXTAREA:\n\t\t\t\tcase ARTIFACT_EXTRAFIELDTYPE_RELATION:\n\t\t\t\tcase ARTIFACT_EXTRAFIELDTYPE_INTEGER:\n\t\t\t\t\tif (isset($efd[$efid])) {\n\t\t\t\t\t\t$value = $efd[$efid];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t// the other types have and ID or an array of IDs associated to them\n\t\t\t\tdefault:\n\t\t\t\t\tif (isset($efd[$efid])) {\n\t\t\t\t\t\t$value = $this->ArtifactType->getElementName($efd[$efid]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = 'None';\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t$return[$efid] = array(\"name\" => $name, \"value\" => $value, 'type' => $type);\n\t\t}\n\n\t\treturn $return;\n\t}", "public function fields()\n {\n $fields = array();\n\n foreach ($this->_data as $field => $row)\n {\n $fields[$field] = $row['value'];\n }\n\n return $fields;\n }", "public static function get_fields()\n {\n }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "abstract protected function _getFeedFields();", "function _get_fields()\n\t{\n\t\tglobal $DB;\n\t\n\t\tif ( ! isset($this->cache['fields']))\n\t\t{\n\t\t\t$this->cache['fields'] = array();\n\n\t\t\t$query = $DB->query('SELECT field_id FROM exp_weblog_fields\n\t\t\t WHERE field_type = \"ftype_id_'.$this->_fieldtype_id.'\"');\n\t\t\tif ($query->num_rows)\n\t\t\t{\n\t\t\t\tforeach($query->result as $row)\n\t\t\t\t{\n\t\t\t\t\t$this->cache['fields'][] = 'field_id_'.$row['field_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->cache['fields'];\n\t}", "public function getFields(){ return $this->field_map; }", "function getCustomFields( $entity, $id, $cache_values = true, $editable_by = '' )\n\t{\n\t\tTienda::load( 'TiendaModelEavAttributes', 'models.eavattributes' );\n\t\tTienda::load( 'TiendaHelperEav', 'helpers.eav' );\n\t\t\n\t\t$eavs = TiendaHelperEav::getAttributes( $entity, $id, false, $editable_by );\n\t\t\n\t\t$fields = array( );\n\t\tforeach ( @$eavs as $eav )\n\t\t{\n\t\t\t$key = $eav->eavattribute_alias;\n\n\t\t\t$value = TiendaHelperEav::getAttributeValue( $eav, $entity, $id, false, $cache_values );\n\t\t\t\n\t\t\t$fields[] = array(\n\t\t\t\t'attribute' => $eav, 'value' => $value\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.fields'\n );\n return $fullResult;\n }", "public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->Fields;\n }", "public function fields() {\n return $this->fields;\n }", "public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }", "public function get_fields() {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }", "public function all_fields() {\n\t\t$general_fields = $this->general_fields();\n\t\t$promo_fields = $this->promotional_fields();\n\t\t$script_fields = $this->scripts_fields();\n\t\t$all_fields = array_merge( $general_fields, $promo_fields, $script_fields );\n\t\treturn $all_fields;\n\t}", "public function getAllFields()\n {\n return array_merge($this->_fields, $this->_changedFields);\n }", "public function getFrontendFields();", "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "public function fields()\r\n {\r\n return $this->fields;\r\n }", "protected function getCompleteFieldInformation() {}", "function field_data()\n\t{\n\t\t$retval = array();\n\t\tforeach(sqlsrv_field_metadata($this->result_id) as $offset => $field)\n\t\t{\n\t\t\t$F \t\t\t\t= new stdClass();\n\t\t\t$F->name \t\t= $field['Name'];\n\t\t\t$F->type \t\t= $field['Type'];\n\t\t\t$F->max_length\t= $field['Size'];\n\t\t\t$F->primary_key = 0;\n\t\t\t$F->default\t\t= '';\n\t\t\t\n\t\t\t$retval[] = $F;\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFieldsList(){\n return $this->_get(1);\n }", "abstract public function getSettingsFields();", "public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }", "public function getFields() : FieldCollection;", "public function getFields(){\n return $this->dbFields;\n }", "public function getFields(){\n\t\treturn $this->Fields;\n\t}", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "protected function getFields()\n {\n $fields = parent::getFields();\n unset($fields['unread']);\n unset($fields['total']);\n unset($fields['outdated']);\n\n return $fields;\n }", "public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_PHRASE_ID,\n\t\t\tself::FIELD_LANGUAGE_ID,\n\t\t\tself::FIELD_TRANSLATION,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t\tself::FIELD_USER_ID,\n\t\t);\n\t}", "abstract public function getFields(): array;", "abstract public function fields();", "public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}", "public function fields()\n {\n return $this->fields;\n }", "public function fields()\n {\n return $this->fields;\n }", "protected function getFields() {\n return $this->getConfiguration()['settings']['fields'];\n }", "public function fields()\n {\n return [ \n ];\n }", "public function fields()\n {\n return [];\n }", "public function fields()\n {\n return [];\n }" ]
[ "0.7314031", "0.7274868", "0.7121122", "0.7076908", "0.69505864", "0.69505864", "0.69505864", "0.69505864", "0.69505864", "0.69505864", "0.6904826", "0.68770826", "0.68770826", "0.68770826", "0.68547803", "0.6823459", "0.68009424", "0.68009424", "0.6774086", "0.6738962", "0.67279035", "0.67213166", "0.6718337", "0.67092", "0.6692309", "0.6682933", "0.66720945", "0.6657459", "0.665312", "0.6635453", "0.6635453", "0.6635453", "0.6635453", "0.6635453", "0.6624478", "0.66145927", "0.6611767", "0.6611767", "0.6611767", "0.6606588", "0.6595701", "0.6575692", "0.6575692", "0.6553078", "0.6548958", "0.6543611", "0.6542244", "0.6535719", "0.6517636", "0.6509077", "0.65090597", "0.65044874", "0.64990073", "0.6497696", "0.6497696", "0.64913374", "0.648078", "0.6479082", "0.64734334", "0.64731574", "0.64731574", "0.6472284", "0.64717245", "0.64678985", "0.64678705", "0.646782", "0.6458459", "0.6435014", "0.64291376", "0.6425231", "0.64222527", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64112216", "0.64084256", "0.64070773", "0.6399819", "0.6398798", "0.6396285", "0.63943946", "0.6393243", "0.6391648", "0.6390739", "0.63902867", "0.63843393", "0.6382214", "0.6379812", "0.6379812", "0.63730955", "0.6361546", "0.63604826", "0.63604826" ]
0.76210403
0
Gets all fields that are connected to this article, and their values
function fieldsAndValues($forceReload = false) { if (isset($this->fieldsAndValues) && $forceReload==false) { return $this->fieldsAndValues; } $fieldValues = $this->fieldValues(); $fieldConnectorToUse = $this->fieldConnectorToUse(); $arrFields = polarbear_getFieldStructureForFieldConnector($fieldConnectorToUse); if (is_array($arrFields)) { foreach ($arrFields as $oneFieldConnector) { // i en connector har vi collections foreach ($oneFieldConnector['fieldCollections'] as $oneFieldCollection) { // i en collection har vi en eller flera fältsamlingar // fältsamlingen kan vara repeatable, så lagra värden i array $isRepeatable = $oneFieldCollection['repeatable']; foreach ($oneFieldCollection['fields'] as $oneField) { // find out max numInSet // xxx this...does not work.. i even dont know how i was thinking.. $maxNumInSet = null; if (isset($fieldValues[$oneField['id']]) && is_array($fieldValues[$oneField['id']])) { $maxNumInSet = sizeof($fieldValues[$oneField['id']]); /*foreach ($fieldValues[$oneField['id']] as $oneFieldValue) { if ($oneFieldValue['numInSet'] > $maxNumInSet) { $maxNumInSet = $oneFieldValue['numInSet']; } } $maxNumInSet++; */ } $arrFields[$oneFieldConnector['id']]['fieldCollections'][$oneFieldCollection['id']]['fields'][$oneField['id']]['totalNumInSet'] = (int) $maxNumInSet; if (isset($fieldValues[$oneField['id']])) { $arrFields[$oneFieldConnector['id']]['fieldCollections'][$oneFieldCollection['id']]['fields'][$oneField['id']]['values'] = $fieldValues[$oneField['id']]; } } } } } #pb_pqp_log_speed("article fieldsAndValues()"); $this->fieldsAndValues = $arrFields; return $this->fieldsAndValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.fields'\n );\n return $fullResult;\n }", "public function fields() : DeepList {\n return $this->_fields;\n }", "public function fetchFields();", "public function getFields()\n {\n return $this->content->getFields();\n }", "public function fields() {\n return $this->fields;\n }", "public function &getFields() { return $this->fields; }", "public function getAllFields()\n {\n return $this->fields;\n }", "public function fields()\r\n {\r\n return $this->fields;\r\n }", "public function fields()\n {\n return $this->fields;\n }", "public function fields()\n {\n return $this->fields;\n }", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public function fields()\n {\n return $this->hasManyThrough(Field::class, Section::class);\n }", "public function get_fields() {\n return $this->fields;\n }", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function fields();", "public function getCustomFields() {\n return Doctrine::getTable('ArticleCustomFieldValue')->getCustomFields($this);\n }", "function fieldValues() {\n\t\n\t\tif (isset($this->fieldValues)) {\n\t\t\treturn $this->fieldValues;\n\t\t}\n\n\t\t// fieldvalues fanns inte.\n\t\t// kolla preload först och om inte där så ladda in\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRows = $preloader->getPreloadFieldsRows($this->id);\n\t\tif ($preloadRows === false) {\n\t\t\t#echo \"<br>nah, no preload row for field, article: $this->id \";\n\t\t\t// no preload for this articles field, fetch them from db\n\t\t\tglobal $polarbear_db;\t\t\n\t\t\t$sql = \"\n\t\t\t\tSELECT \n\t\t\t\t\tfv.fieldID, fv.articleID, fv.value, fv.numInSet,\n\t\t\t\t\tf.name as fieldName, f.type as fieldType\n\t\t\t\tFROM \" . POLARBEAR_DB_PREFIX . \"_fields_values as fv\n\t\t\t\tINNER JOIN \" . POLARBEAR_DB_PREFIX . \"_fields as f ON f.id = fv.fieldID\n\t\t\t\tWHERE articleID = '$this->id' ORDER BY fieldID ASC, numInSet ASC\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t} else {\n\t\t\t#echo \"<br>got preload row for field, article: $this->id\";\n\t\t\t// horay! we got the field values preloaded\n\t\t\t$rows = $preloadRows;\n\t\t}\n\t\n\t\t$arrFieldValues = array();\n\t\t$arrFieldCount = array();\n\t\tif (is_array($rows)) {\n\t\t\tforeach ($rows as $oneRow) {\n\t\t\t\tif (!isset($arrFieldValues[$oneRow->fieldID])) {\n\t\t\t\t\t$arrFieldValues[$oneRow->fieldID] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t\ttodo: om det är en fil/bild ska det kanske finnas\n\t\t\t\t\tlink, downloadLink, imageSrc osv.\n\t\t\t\t*/\n\t\t\t\t$arrFieldValues[$oneRow->fieldID][] = array(\n\t\t\t\t\t\"fieldID\" => $oneRow->fieldID,\n\t\t\t\t\t\"articleID\" => $oneRow->articleID,\n\t\t\t\t\t\"value\" => $oneRow->value,\n\t\t\t\t\t\"numInSet\" => $oneRow->numInSet,\n\t\t\t\t\t// and some useful \"extras\" too\n\t\t\t\t\t\"valueEscaped\" => htmlspecialchars ($oneRow->value, ENT_COMPAT, \"UTF-8\"),\n\t\t\t\t\t\"valueNoTags\" => strip_tags($oneRow->value),\n\t\t\t\t\t\"fieldName\" => $oneRow->fieldName,\n\t\t\t\t\t\"fieldType\" => $oneRow->fieldType\n\t\t\t\t);\n\t\t\t\tif (!isset($arrFieldCount[$oneRow->fieldID])) {\n\t\t\t\t\t$arrFieldCount[$oneRow->fieldID]=0;\n\t\t\t\t}\n\t\t\t\t$arrFieldCount[$oneRow->fieldID]++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// update count\n\t\tforeach ($arrFieldCount as $fieldID => $fieldCount) {\n\t\t\tfor ($i=0; $i<sizeof($arrFieldValues[$fieldID]); $i++) {\n\t\t\t\t$arrFieldValues[$fieldID][$i][\"fieldSetCount\"] = $fieldCount;\n\t\t\t}\n\t\t}\n\t\t\n\t\t#pb_pqp_log_speed(\"article fieldValues()\");\n\t\t\n\t\t$this->fieldValues = $arrFieldValues;\n\t\treturn $this->fieldValues;\n\t}", "public function getFields()\r\n {\r\n return $this->fields;\r\n }", "public function fields()\n {\n return array_merge($this->relayFields(), $this->getConnections(), [\n 'id' => [\n 'type' => Type::nonNull(Type::id()),\n 'description' => 'ID of type.',\n 'resolve' => function ($obj) {\n return $this->encodeGlobalId(get_called_class(), $this->getIdentifier($obj));\n },\n ],\n ]);\n }", "public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}", "function fields()\n\t{\n\t\treturn $this->_fields;\n\t}", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "public function getFields()\n {\n return $this->fields;\n }", "abstract public function getFields();", "abstract public function getFields();", "public function getFields(){\n\t\treturn $this->Fields;\n\t}", "protected function getFields()\n {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "public function get_fields() {\n\t\treturn $this->fields;\n\t}", "protected function getFields()\n {\n return $this->Fields;\n }", "public function fields()\n {\n return $this->hasManyThrough(Field::class, FieldGroup::class, 'category_id', 'group_id');\n }", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "public function pubFields()\n {\n $fields = array();\n\n foreach ($this as $column => $value) {\n $fields[$column] = 'column';\n }\n\n // FIXME From Doctrine: prevent mapped Doctrine_Records from being displayed fully\n foreach ($this->_values as $key => $value) {\n $fields[$key] = 'value';\n }\n\n foreach ($this->_table->getRelations() as $key => $relation) {\n if (strpos($key, 'Clip_Model_Relation') !== 0) {\n $fields[$key] = 'relation';\n }\n }\n\n // reorder the fields conveniently\n $reorder = array(\n 'core_title' => 'map',\n 'core_uniqueid' => 'map',\n 'core_tid' => 'map',\n 'core_pid' => 'value',\n 'core_author' => 'value',\n 'core_creator' => 'map',\n 'core_approvalstate' => 'map'\n );\n $fields = array_merge($reorder, $fields);\n\n return $fields;\n }", "public function getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}", "public function getFields()\n {\n return $this->_fields;\n }", "public function getFields()\n {\n return $this->_fields;\n }", "function getFields();", "final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function fields(){\n\t\treturn array();\n\t}", "public static function getFields() {\n return self::$fields;\n }", "public static function getFields(){\n\t\treturn self::$fields;\n\t}", "public function & getFields() {\n\t\treturn $this->fields;\n\t}", "public function getFields()\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}", "public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }", "public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}", "public function fetch_fields() {}", "abstract protected function getFields();", "public function &getFields();", "public function fields() {\n // The fields are passed to the constructor for this plugin.\n return $this->fields;\n }", "public function getFields(){\n return $this->dbFields;\n }", "public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }", "public function fields()\n {\n\n return $this->hasMany('App\\TopicField', 'topic_id')->orderby('id', 'asc');\n }", "public function getTheirFields()\n {\n return $this->theirFields;\n }", "public function getFields()\n {\n return $this->getForm()->getFields();\n }", "public function getFrontendFields();", "protected function getFields() {\n return $this->getConfiguration()['settings']['fields'];\n }", "public static function get_fields()\n {\n }", "public function getFields() : array {\n\t\treturn $this->fields;\n\t}", "abstract public function fields();", "public function getFields(){ return $this->field_map; }", "public function getFields() : array\n {\n return get_object_vars($this);\n }", "function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}", "public function getFieldsList(){\n return $this->_get(1);\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getFields(): array\n {\n return $this->fields;\n }", "public function getAllFields() {\n return $this->allFieldsAlias;\n }", "public function get_fields()\n {\n $l_table = $this->m_cat_dao->get_table();\n $l_properties = $this->m_cat_dao->get_properties();\n\n return [\n $l_table . '__id' => 'ID',\n $l_table . '__key' => $l_properties['key'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__value' => $l_properties['value'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n $l_table . '__group' => $l_properties['group'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE],\n 'isys_catg_identifier_type__title' => $l_properties['type'][C__PROPERTY__INFO][C__PROPERTY__INFO__TITLE]\n ];\n }", "public function getListFields();", "public function fields()\n {\n return array_merge(\n parent::fields(),\n [\n 'storeId' => function ($model) {\n return (string)$model->storeId;\n },\n 'phone', 'badge', 'name', 'gender', 'birthday','channel','qrcodeUrl',\n 'isActivated' => function ($model) {\n $status = $model->isActivated ? 'ENABLE' : 'DISABLE';\n return $status;\n },\n 'accountId' => function ($model) {\n return (string) $model->accountId;\n },\n 'createdAt' => function ($model) {\n return MongodbUtil::MongoDate2String($model->createdAt, 'Y-m-d H:i:s');\n },\n ]\n );\n }", "public function fields()\n {\n return [ \n ];\n }", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }", "abstract protected function _getFeedFields();", "public function getContactDataFields();", "public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}" ]
[ "0.6912236", "0.689491", "0.689491", "0.689491", "0.689491", "0.689491", "0.689491", "0.6760395", "0.6759824", "0.6759008", "0.6749362", "0.674724", "0.6723529", "0.6711657", "0.6689871", "0.6647899", "0.6647899", "0.6644933", "0.6644933", "0.6644933", "0.6621822", "0.6609716", "0.6583558", "0.6583558", "0.6583558", "0.6583558", "0.6583558", "0.65677446", "0.6566893", "0.65616167", "0.654564", "0.6541461", "0.6535243", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.6531047", "0.65198356", "0.65198356", "0.65155655", "0.64950967", "0.64950967", "0.64862025", "0.6469019", "0.64531255", "0.6441922", "0.64397347", "0.64385664", "0.64385664", "0.6425991", "0.6425991", "0.6418005", "0.6418005", "0.6412429", "0.64086735", "0.64079934", "0.64079934", "0.6405256", "0.6389775", "0.63882047", "0.6370906", "0.6346379", "0.63377607", "0.6309668", "0.6306656", "0.6305251", "0.62958086", "0.6285945", "0.6284349", "0.6283789", "0.62808377", "0.62752", "0.62736297", "0.62691194", "0.62430805", "0.62415344", "0.6237811", "0.6229527", "0.62281466", "0.6217079", "0.6212946", "0.6210567", "0.6207491", "0.6207491", "0.61958975", "0.6194252", "0.6181957", "0.6166154", "0.6155468", "0.61527723", "0.6136797", "0.61182827", "0.61178905", "0.6111972" ]
0.0
-1
Prepare an article for copy unsets the id (so a the article will get a new id when saved) Does NOT change things like name or shortname for the article
function prepareForCopy() { $this->id = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCopyOfArticle() {\n\t\t$newArticle = new PolarBear_Article($this->id);\n\t\t$newArticle->prepareForCopy();\n\t\t$newArticle->save();\n\t\treturn $newArticle;\n\t}", "private function insertArticle()\n {\n $this->testArticleId = substr_replace( oxRegistry::getUtilsObject()->generateUId(), '_', 0, 1 );\n $this->testArticleParentId = substr_replace( oxRegistry::getUtilsObject()->generateUId(), '_', 0, 1 );\n\n //copy from original article parent and variant\n $articleParent = oxNew('oxarticle');\n $articleParent->disableLazyLoading();\n $articleParent->load(self::SOURCE_ARTICLE_PARENT_ID);\n $articleParent->setId($this->testArticleParentId);\n $articleParent->oxarticles__oxartnum = new oxField('666-T', oxField::T_RAW);\n $articleParent->save();\n\n $article = oxNew('oxarticle');\n $article->disableLazyLoading();\n $article->load(self::SOURCE_ARTICLE_ID);\n $article->setId($this->testArticleId);\n $article->oxarticles__oxparentid = new oxField($this->testArticleParentId, oxField::T_RAW);\n $article->oxarticles__oxprice = new oxField('10.0', oxField::T_RAW);\n $article->oxarticles__oxartnum = new oxField('666-T-V', oxField::T_RAW);\n $article->oxarticles__oxactive = new oxField('1', oxField::T_RAW);\n $article->save();\n\n }", "private function copyArticle(int|string $pageId, int|string $articleId): void\n {\n $copy = new ArticleModel();\n $articleModel = $this->repositoryManager->getRepository(ArticleModel::class)->find((int) $articleId);\n\n if ($articleModel) {\n $data = $articleModel->row();\n unset($data[ArticleModel::getPk()]);\n $copy->setRow($data);\n }\n\n $copy->pid = $pageId;\n $copy->languageMain = $articleId;\n $copy->tstamp = time();\n $this->repositoryManager->getRepository(ArticleModel::class)->save($copy);\n\n $contentElements = $this->repositoryManager->getRepository(ContentModel::class)->findBy(\n ['.pid=?', '( .ptable=? OR .ptable = \\'\\')'],\n [$articleId, ArticleModel::getTable()],\n );\n\n if (! $contentElements) {\n return;\n }\n\n foreach ($contentElements as $contentModel) {\n $contentCopy = new ContentModel();\n $data = $contentModel->row();\n unset($data[ContentModel::getPk()]);\n\n $contentCopy->setRow($data);\n $contentCopy->pid = $copy->id;\n $contentCopy->ptable = ArticleModel::getTable();\n $contentCopy->tstamp = time();\n\n $this->repositoryManager->getRepository(ContentModel::class)->save($contentCopy);\n }\n }", "public function testCopy1() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t);\n\n\t\t$result = $this->Article->copy(1);\n\t\t$this->assertTrue($result);\n\n\t\t$newId = $this->Article->id;\n\t\t$this->assertTrue(is_numeric($newId));\n\n\t\t// orig is unchanged\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => 1\n\t\t\t)\n\t\t));\n\t\t$expected = $this->expectedFromFixtures[0];\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// see how many records were created\n\t\t$this->assertEquals(\n\t\t\t$this->Article->find('count'),\n\t\t\t$initialCounts['Article'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->User->find('count'),\n\t\t\t$initialCounts['User']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Featured->find('count'),\n\t\t\t$initialCounts['Featured'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Comment->find('count'),\n\t\t\t$initialCounts['Comment'] + 4\n\t\t);\n\t\t// should not have made any more HABTM targets\n\t\t// should only have made more join records\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Tag->find('count'),\n\t\t\t$initialCounts['Tag']\n\t\t);\n\n\t\t// new record\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => $newId\n\t\t\t)\n\t\t));\n\t\t$this->_assertArticleAfterCopy($result, $expected);\n\t}", "function copy_article($newlyPlanId,$plan_id){\n \n {//Plan_Article Block\n \n $queryPlanArticle = \"SELECT * FROM plan_article WHERE status = 1 AND plan_id = '{$plan_id}' \" ;\n $resultPlanArticle = $this->execute_query($queryPlanArticle);\n \n if($this->num_rows($resultPlanArticle)!= 0)\n {\n while($row = $this->fetch_array($resultPlanArticle))\n { \n \n $insertArr = array(\n 'plan_id'=> $newlyPlanId,\n 'article_id' => $row['article_id'], \n 'creation_date' => date('Y-m-d H:i:s',time()), \n 'status'=> $row['status'] \n );\n \n $result = $this->insert('plan_article',$insertArr);\n \n }\n }\n }\n }", "private function prepForNewEntry()\n {\n $this->id = Helper::makeUuid();\n $locale = $this->request->input('locale');\n\n $this->content = Entry::create($this->slug)\n ->collection($this->collection)\n ->get();\n\n if ($locale !== default_locale()) {\n $this->content->set('title', $this->slug);\n $this->content->published(false);\n $this->content = $this->content->in($locale)->get();\n }\n\n $this->content->published($this->getSubmittedStatus());\n\n $this->content->order(\n $this->getSubmittedOrderKey() ?: $this->getNewEntryOrderKey()\n );\n }", "public function testCopy2() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t);\n\n\t\t$result = $this->Article->copy(2);\n\t\t$this->assertTrue($result);\n\n\t\t$newId = $this->Article->id;\n\t\t$this->assertTrue(is_numeric($newId));\n\n\t\t// orig is unchanged\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => 2\n\t\t\t)\n\t\t));\n\t\t$expected = $this->expectedFromFixtures[1];\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// see how many records were created\n\t\t$this->assertEquals(\n\t\t\t$this->Article->find('count'),\n\t\t\t$initialCounts['Article'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->User->find('count'),\n\t\t\t$initialCounts['User']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Featured->find('count'),\n\t\t\t$initialCounts['Featured'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Comment->find('count'),\n\t\t\t$initialCounts['Comment'] + 2\n\t\t);\n\t\t// should not have made any more HABTM targets\n\t\t// should only have made more join records\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Tag->find('count'),\n\t\t\t$initialCounts['Tag']\n\t\t);\n\n\t\t// new record\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => $newId\n\t\t\t)\n\t\t));\n\t\t$this->_assertArticleAfterCopy($result, $expected);\n\t}", "public function testCopy3() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t);\n\n\t\t$result = $this->Article->copy(3);\n\t\t$this->assertTrue($result);\n\n\t\t$newId = $this->Article->id;\n\t\t$this->assertTrue(is_numeric($newId));\n\n\t\t// orig is unchanged\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => 3\n\t\t\t)\n\t\t));\n\t\t$expected = $this->expectedFromFixtures[2];\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// see how many records were created\n\t\t$this->assertEquals(\n\t\t\t$this->Article->find('count'),\n\t\t\t$initialCounts['Article'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->User->find('count'),\n\t\t\t$initialCounts['User']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Featured->find('count'),\n\t\t\t$initialCounts['Featured']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Comment->find('count'),\n\t\t\t$initialCounts['Comment']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Tag->find('count'),\n\t\t\t$initialCounts['Tag']\n\t\t);\n\t\t$this->_assertArticleAfterCopy($result, $expected);\n\t}", "protected function prepare()\n {\n $this->slug = $this->getSubmittedSlug();\n\n if ($this->isNew()) {\n $this->prepForNewEntry();\n } else {\n $this->prepForExistingEntry();\n }\n\n // As part of the prep, we'll apply the date and slug. We'll remove them\n // from the fields array since we don't want it to be in the YAML.\n unset($this->fields['date'], $this->fields['slug']);\n\n $this->fieldset = $this->content->fieldset()->withTaxonomies();\n }", "public function testCopyWithInjectionData() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t);\n\n\t\t$customSettings = array(\n\t\t\t'merge' => array(\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'title' => 'INJECT changed this',\n\t\t\t\t\t'published' => 'X',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'insert' => array(\n\t\t\t\t'Comment.{n}.user_id' => 0,\n\t\t\t\t'Comment.{n}.comment' => 'INJECT changed via Hash::insert()',\n\t\t\t),\n\t\t);\n\t\t$result = $this->Article->copy(1, $customSettings);\n\t\t$this->assertTrue($result);\n\n\t\t$newId = $this->Article->id;\n\t\t$this->assertTrue(is_numeric($newId));\n\n\t\t// orig is unchanged\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => 1\n\t\t\t)\n\t\t));\n\n\t\t$expected = $this->expectedFromFixtures[0];\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// see how many records were created\n\t\t$this->assertEquals(\n\t\t\t$this->Article->find('count'),\n\t\t\t$initialCounts['Article'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->User->find('count'),\n\t\t\t$initialCounts['User']\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Featured->find('count'),\n\t\t\t$initialCounts['Featured'] + 1\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Comment->find('count'),\n\t\t\t$initialCounts['Comment'] + 4\n\t\t);\n\t\t// should not have made any more HABTM targets\n\t\t// should only have made more join records\n\t\t$this->assertEquals(\n\t\t\t$this->Article->Tag->find('count'),\n\t\t\t$initialCounts['Tag']\n\t\t);\n\n\t\t// new record\n\t\t$result = $this->Article->find('first', array(\n\t\t\t'contain' => $this->settings['containArticle'],\n\t\t\t'conditions' => array(\n\t\t\t\t'Article.id' => $newId\n\t\t\t)\n\t\t));\n\n\t\t// Inject changed expectations via Hash::merge()\n\t\t$expected['Article']['title'] = $customSettings['merge']['Article']['title'];\n\t\t$expected['Article']['published'] = $customSettings['merge']['Article']['published'];\n\t\t// Inject changed expectations via Hash::insert()\n\t\tforeach ($expected['Comment'] as $i => $data) {\n\t\t\t$expected['Comment'][$i]['user_id'] = $customSettings['insert']['Comment.{n}.user_id'];\n\t\t\t$expected['Comment'][$i]['comment'] = $customSettings['insert']['Comment.{n}.comment'];\n\t\t}\n\t\t$this->_assertArticleAfterCopy($result, $expected);\n\t}", "public function __clone()\n {\n $this->_id = null;\n }", "public function __clone()\n {\n // If the entity has an identity, proceed as normal.\n if ($this->id) {\n // unset identifiers\n $this->setId(0);\n \n // init validator\n $this->initValidator();\n \n // reset Workflow\n $this->resetWorkflow();\n \n $this->setCreatedDate(null);\n $this->setCreatedUserId(null);\n $this->setUpdatedDate(null);\n $this->setUpdatedUserId(null);\n \n \n }\n // otherwise do nothing, do NOT throw an exception!\n }", "function makeClone()\n {\n $this->id = 0;\n }", "public function setIdArticle($Id_article): self\n {\n $this->Id_article = $Id_article;\n\n return $this;\n }", "public function __clone()\n {\n // if the entity has no identity do nothing, do NOT throw an exception\n if (!$this->id) {\n return;\n }\n \n // otherwise proceed\n \n // unset identifier\n $this->setId(0);\n \n // reset workflow\n $this->setWorkflowState('initial');\n \n // reset upload fields\n $this->setAvatarUpload(null);\n \n $this->setCreatedBy(null);\n $this->setCreatedDate(null);\n $this->setUpdatedBy(null);\n $this->setUpdatedDate(null);\n \n \n // clone categories\n $categories = $this->categories;\n $this->categories = new ArrayCollection();\n foreach ($categories as $c) {\n $newCat = clone $c;\n $this->categories->add($newCat);\n $newCat->setEntity($this);\n }\n }", "private function prepForExistingEntry()\n {\n $this->id = $this->request->input('uuid');\n\n $this->content = Entry::find($this->id)->in($this->locale)->get();\n\n $this->content->published($this->getSubmittedStatus());\n\n // Only the default locale can have its order modified\n if (! $this->isLocalized()) {\n // If no order was submitted (in the case of numeric\n // entries), we want to get the existing order key.\n if (! $order = $this->getSubmittedOrderKey()) {\n $order = $this->content->order();\n }\n\n $this->content->order($order);\n }\n }", "public function testArticleClone()\n {\n $articlePath = realpath(__DIR__.'/../fixture/article.json');\n $articleData = json_decode(file_get_contents($articlePath), true);\n $article = Article::fromFile($articlePath);\n $clonedArticle = clone $article;\n $this->assertFalse($article === $clonedArticle);\n $this->assertFalse($article->getDocument() === $clonedArticle->getDocument());\n $this->assertEquals($article->toArray(), $clonedArticle->toArray());\n }", "public function __clone()\n {\n unset($this->id);\n }", "public function __clone()\n {\n // if the entity has no identity do nothing, do NOT throw an exception\n if (!($this->id)) {\n return;\n }\n \n // otherwise proceed\n \n // unset identifiers\n $this->setId(0);\n \n // reset workflow\n $this->resetWorkflow();\n \n $this->setCreatedBy(null);\n $this->setCreatedDate(null);\n $this->setUpdatedBy(null);\n $this->setUpdatedDate(null);\n \n \n // clone categories\n $categories = $this->categories;\n $this->categories = new ArrayCollection();\n foreach ($categories as $c) {\n $newCat = clone $c;\n $this->categories->add($newCat);\n $newCat->setEntity($this);\n }\n }", "public function creating(Knowledgebase $article)\n {\n $article->slug = slugify(strtolower($article->subject));\n }", "function init_article($title, $content,$views, $publish_date, $update_date, $author) {\n $article = ORM::for_table('pw_article')->create();\n $article->art_title = $title;\n $article->art_content= $content;\n $article->art_views = $views;\n $article->art_publish_date= $publish_date;\n $article->art_update_date =$update_date;\n $article->art_author=$author;\n $article->save();\n return $article;\n}", "public function __construct($article)\n {\n $this->article = $article;\n }", "public abstract function prepare_item($id, array $fields);", "public function __construct($file_name, $entity_id, $title,$content=\"No content in this post\",$extended_post_content='',$section_id=0,$car_id=0,$car_exporter_id=0)\r\n {\r\n parent::__construct();\r\n\r\n $this->insert_into(app::values()->draft_posts())->\r\n use_set_format()->\r\n set(Db::fields()->file_name()->toStringValue($file_name))->\r\n set(Db::fields()->entity_id()->toStringValue($entity_id))->\r\n set(Db::fields()->timestamp()->toCurrentTimestamp())->\r\n set(Db::fields()->title()->toStringValue($title))->\r\n set(Db::fields()->content()->toStringValue($content))->\r\n set(Db::fields()->extended_post_content()->toStringValue($extended_post_content))->\r\n set(Db::fields()->section_id()->toInt($section_id))->\r\n set(Db::fields()->car_id()->toInt($car_id))->\r\n set(Db::fields()->car_exporter_id()->toInt($car_exporter_id));\r\n ;\r\n\r\n //compute date values\r\n $this->addDateInformation();\r\n }", "public abstract function copy(EntityManager $em);", "public function __construct($article)\n {\n $this->article = $article;\n }", "public function __clone()\n {\n $this->_id = null;\n $this->_key = null;\n $this->_rev = null;\n // do not change the _changed flag here\n }", "function addArticle($object) {\n $object->Item->ShopId = 'yourReturnedArticleIdOnMarketplace_'.rand(1000, 9999); \n}", "function get_copy()\r\n\t{\r\n\t\t$copy = clone($this);\r\n\r\n\t\t$copy->id = NULL;\r\n\r\n\t\treturn $copy;\r\n\t}", "function copyObject($target_questionpool_id, $title = \"\")\n\t{\n\t\tif ($this->id <= 0)\n\t\t{\n\t\t\t// The question has not been saved. It cannot be duplicated\n\t\t\treturn;\n\t\t}\n\t\t// duplicate the question in database\n\t\t$clone = $this;\n\t\tinclude_once (\"./Modules/TestQuestionPool/classes/class.assQuestion.php\");\n\t\t$original_id = assQuestion::_getOriginalId($this->id);\n\t\t$clone->id = -1;\n\t\t$source_questionpool_id = $this->getObjId();\n\t\t$clone->setObjId($target_questionpool_id);\n\t\tif ($title)\n\t\t{\n\t\t\t$clone->setTitle($title);\n\t\t}\n\t\t$clone->saveToDb();\n\t\t// copy question page content\n\t\t$clone->copyPageOfQuestion($original_id);\n\t\t// copy XHTML media objects\n\t\t$clone->copyXHTMLMediaObjectsOfQuestion($original_id);\n\n\t\t$clone->onCopy($source_questionpool_id, $original_id, $clone->getObjId(), $clone->getId());\n\n\t\treturn $clone->id;\n\t}", "public function __construct($id = -1) {\n if ($id != -1) {\n $this->id = $id;\n $result = $this->list_data_id();\n// $article = mysqli_fetch_assoc($result);\n// $this->title = $article['title'];\n// $this->test = $article['test'];\n// $this->image = $article['image'];\n }\n }", "function setArticleId($articleId) {\r\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\r\n\t\treturn $this->setSubmissionId($articleId);\r\n\t}", "function id_article($id){\n return (int)cleanData($id);\n}", "function onPrepareContent(&$article){\n\t\t$doc =& JFactory::getDocument();\n\t\t$plugin = & JPluginHelper::getPlugin('content', 'autometadescription');\n\t\t// Load plugin params info\n\t\t$pluginParams = new JParameter($plugin->params);\n\t\t$blacklist = explode('|',$pluginParams->def('blacklist'));\n\n\t\t$shortintro = shortIntro($article->introtext,$blacklist);\n\t\tif($article->metadesc == ''){\n\t\t\t $doc->setDescription( $shortintro ); \t\n\t\t\t}\n\t\t}", "public function testCopyPrepareData1() {\n\t\t$data = $this->expectedFromFixtures[1];\n\t\t$result = $this->Article->copyPrepareData($data);\n\t\t$expected = array(\n\t\t\t'Article' => array(\n\t\t\t\t'user_id' => '3',\n\t\t\t\t'title' => 'Second Article',\n\t\t\t\t'body' => 'Second Article Body',\n\t\t\t\t'published' => 'Y',\n\t\t\t\t'updated' => '2007-03-18 10:43:31',\n\t\t\t),\n\t\t\t// strips User (belongsTo)\n\t\t\t'Featured' => array(\n\t\t\t\t'category_id' => '1',\n\t\t\t\t'published_date' => '2007-03-31 10:39:23',\n\t\t\t\t'end_date' => '2007-05-15 10:39:23',\n\t\t\t\t'updated' => '2007-03-18 10:41:31',\n\t\t\t\t// strips ArticleFeatured (belongsTo)\n\t\t\t),\n\t\t\t'Comment' => array(\n\t\t\t\t0 => array(\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'comment' => 'First Comment for Second Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'updated' => '2007-03-18 10:55:31',\n\t\t\t\t\t// strips User (belongsTo)\n\t\t\t\t),\n\t\t\t\t1 => array(\n\t\t\t\t\t'user_id' => '2',\n\t\t\t\t\t'comment' => 'Second Comment for Second Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'updated' => '2007-03-18 10:57:31',\n\t\t\t\t\t// strips User (belongsTo)\n\t\t\t\t),\n\t\t\t),\n\t\t\t// HABTM switched to just the primary keys for Joins\n\t\t\t'Tag' => array(\n\t\t\t\t'Tag' => array(\n\t\t\t\t\t0 => '1',\n\t\t\t\t\t1 => '3',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function setIdArticle($idArticle)\n {\n $this->idArticle = $idArticle;\n\n return $this;\n }", "public function duplicate($for_test = true, $title = \"\", $author = \"\", $owner = \"\", $a_test_obj_id = null)\n\t{\n\t\tif ($this->id <= 0)\n\t\t{\n\t\t\t// The question has not been saved. It cannot be duplicated\n\t\t\treturn;\n\t\t}\n\t\t// duplicate the question in database\n\t\t$this_id = $this->getId();\n $clone = $this;\n include_once (\"./Modules/TestQuestionPool/classes/class.assQuestion.php\");\n $original_id = assQuestion::_getOriginalId($this->id);\n $clone->id = -1;\n\t\tif ($title)\n\t\t{\n\t\t\t$clone->setTitle($title);\n\t\t}\n\n\t\tif ($author)\n\t\t{\n\t\t\t$clone->setAuthor($author);\n\t\t}\n\t\tif ($owner)\n\t\t{\n\t\t\t$clone->setOwner($owner);\n\t\t}\n\n\t\tif ($for_test)\n\t\t{\n\t\t\t$clone->saveToDb($original_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$clone->saveToDb();\n\t\t}\n\n // copy question page content\n $clone->copyPageOfQuestion($this_id);\n\n // copy XHTML media objects\n $clone->copyXHTMLMediaObjectsOfQuestion($this_id);\n\n $clone->onDuplicate($a_test_obj_id, $this_id, $clone->getObjId(), $clone->getId());\n\n\t\treturn $clone->id;\n\t}", "public function __clone()\n {\n $this->constructedObjectId = spl_object_hash($this);\n }", "public function handleCopy(CopyEvent $event)\n {\n $document = $event->getDocument();\n if (!$document instanceof ArticleDocument) {\n return;\n }\n\n $uuid = $event->getCopiedNode()->getIdentifier();\n $this->documents[$uuid] = [\n 'uuid' => $uuid,\n 'locale' => $document->getLocale(),\n ];\n }", "function copyObject($target_questionpool, $title = \"\")\n\t{\n\t\tif ($this->id <= 0)\n\t\t{\n\t\t\t// The question has not been saved. It cannot be duplicated\n\t\t\treturn;\n\t\t}\n\t\t// duplicate the question in database\n\t\t$clone = $this;\n\t\tinclude_once (\"./Modules/TestQuestionPool/classes/class.assQuestion.php\");\n\t\t$original_id = assQuestion::_getOriginalId($this->id);\n\t\t$clone->id = -1;\n\t\t$source_questionpool = $this->getObjId();\n\t\t$clone->setObjId($target_questionpool);\n\t\tif ($title)\n\t\t{\n\t\t\t$clone->setTitle($title);\n\t\t}\n\t\t$clone->saveToDb();\n\n\t\t// copy question page content\n\t\t$clone->copyPageOfQuestion($original_id);\n\t\t// copy XHTML media objects\n\t\t$clone->copyXHTMLMediaObjectsOfQuestion($original_id);\n\t\t// duplicate the generic feedback\n\t\t$clone->duplicateGenericFeedback($original_id);\n\n\t\treturn $clone->id;\n\t}", "public function prepareCreate($inputs){ \t\n\t\t$this->validation($inputs);\n\t\t$article=$this->one('title',$this->title); \n\t\t\n\t\tif ((($article['title'])===($this->title))&& ($this->title != null)){ \n\t\t\t$this->errors[]=\"Le titre de cet article existe déjà!\";\n\t\t};\n\n\t\tif (!empty($this->errors)){\n\t\t\t$this->saveInputs = $this->isErrors($inputs); \n\t\t\treturn false; \n\t\t};\n\n\t\t$fields = array(\n\t\t\t'title'=>($this->title), \n\t\t\t'description'=>($this->description),\n\t\t\t'content'=>($this->content),\n\t\t\t'publicated'=>($this->published),\n\t\t\t'date_publication'=>($this->publishedDate), \n\t\t\t'date_creation'=>($this->setDate()),\n\t\t\t'author_id'=>($this->authorId)\n\t\t);\n\t\treturn $this->recordValid('create', $fields);\n\t}", "public function setOriginalId($id);", "public function __construct($article) {\n parent::__construct($article);\n $this->fetchAllImages();\n }", "public function __clone()\n {\n $this->id = null;\n\n // Generate a new identifier\n $identifier = Uuid::uuid1()->toString();\n $this->identifier = $identifier;\n $this->uri = 'local:'.$this->identifier;\n\n // Set last change/update to now\n $this->updatedAt = new \\DateTimeImmutable();\n $this->changedAt = $this->updatedAt;\n }", "protected function prepareDeleteComment(){\n $this->deleteThisComment();\n $this->justOneArticle();\n }", "protected function pre_save()\n {\n $this->id = random_bytes(128);\n }", "public function editArticle(): void\n {\n $this->articleId = $_GET['editId'];\n $this->title = $_POST['titleArticle'];\n $this->content = $_POST['contentArticle'];\n $this->category = $_POST['categoryArticle'];\n $datetime = new DateTime();\n $this->editDate = $datetime->format('Y-m-d H:i:s');\n\n if ($this->image['tmp_name'] !== null) {\n $this->image = $_FILES['imageArticle'];\n $tmp_file = $this->image['tmp_name'];\n $type_file = $this->image['type'];\n\n $temp = explode(\".\", $this->image['name']);\n $name_file = round(microtime(true)) . '.' . end($temp);\n\n $destination = 'application/views/images/';\n\n if (!is_uploaded_file($tmp_file) === true) {\n exit(\"Le fichier est introuvable\");\n };\n if (!strstr($type_file, 'jpg') && !strstr($type_file, 'jpeg') && !strstr($type_file, 'bmp')) {\n exit(\"Le fichier n'est pas une image\");\n }\n if (preg_match('#[\\x00-\\x1F\\x7F-\\x9F/\\\\\\\\]#', $name_file)) {\n exit(\"Nom de fichier non valide\");\n } else if (!move_uploaded_file($tmp_file, $destination . $name_file)) {\n exit(\"Impossible de copier le fichier dans $destination\");\n } else {\n move_uploaded_file($tmp_file, $destination . $name_file);\n }\n $this->articleModel->editImageOfArticle($name_file, $this->articleId);\n }\n\n $this->articleModel->editArticle($this->articleId, $this->title, $this->content, $this->category, $this->editDate);\n\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "function &generateDummyFile(&$article) {\n\t\t$articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');\n\t\t$articleFile = new ArticleFile();\n\t\t$articleFile->setArticleId($article->getId());\n\t\t$articleFile->setFileName('temp');\n\t\t$articleFile->setOriginalFileName('temp');\n\t\t$articleFile->setFileType('temp');\n\t\t$articleFile->setFileSize(0);\n\t\t$articleFile->setFileStage(1);\n\t\t$articleFile->setDateUploaded(Core::getCurrentDate());\n\t\t$articleFile->setDateModified(Core::getCurrentDate());\n\t\t$articleFile->setRound(0);\n\t\t$articleFile->setRevision(1);\n\n\t\t$articleFile->setFileId($articleFileDao->insertArticleFile($articleFile));\n\n\t\treturn $articleFile;\n\t}", "public function prepareImportContent();", "public function modifyArticle(Article $article)\n\t{\n\t\t$req = $this->db->prepare('UPDATE articles SET article_number = :article_number, title = :title , content =:content WHERE id = :id ' );\n\n\t\t$modifiedArticle = $req->execute(array(\n\t\t\t\t'id'=>$article->getId(),\n\t\t\t\t'article_number'=>$article->getArticleNumber(),\n\t\t\t\t'title'=>$article->getTitle(),\n\t\t\t\t'content'=>$article->getContent()));\t\n\n\t\treturn $modifiedArticle;\n\n\n\t}", "protected function _constructFromId($id) {\n\t\t// HACK: This function relies on the return value of the get() function\n\t\t$this->_id = $id;\t\t// first overwrite the id\n\t\treturn $this->get();\t// then overwrite everything else\n\t}", "function admin_clone ($id = null) {\n\t\tif (!$id) {\n\t\t\t$this->Session->setFlash(__('Invalid id for deal', true));\n\t\t\t$this->redirect(array('action'=>'index'));\n\t\t}\n\t\telse{\n\t\t\t$this->Deal->recursive = -1;\n\t\t\t$this->Deal->Venue->recursive = -1;\n\t\t\t$dealToClone = $this->Deal->read(null, $id);\n\t\t\t//Clone venue first\n\t\t\t$venueToClone = $this->Deal->Venue->read(null, $dealToClone['Deal']['venue_id']);\n\t\t\tunset($venueToClone['Venue']['id']);\n\t\t\tunset($venueToClone['Venue']['created']);\n\t\t\t$venueToClone['Venue']['name'] = 'Clone of ' . $venueToClone['Venue']['name']; \n\t\t\t$this->Deal->Venue->create();\n\t\t if($this->Deal->Venue->save($venueToClone['Venue'])) {\n\n\t\t\t\t//Prepare deal for cloning\n\t\t\t\tunset($dealToClone['Deal']['id']);\n\t\t\t\tunset($dealToClone['Deal']['created']);\n\t\t\t\t$dealToClone['Deal']['venue_id'] = $this->Deal->Venue->getInsertID();\n\t\t\t\t$dealToClone['Deal']['name'] = 'Clone of ' . $dealToClone['Deal']['name'];\n\t\t\t\t$dealToClone['Deal']['title'] = 'Clone of ' . $dealToClone['Deal']['title'];\n\t\t\t\t$this->Deal->create();\n\n\t\t\t\tif($this->Deal->save($dealToClone['Deal'])) {\n\t\t\t\t\t$this->Session->setFlash(__('Deal cloned successfully', true));\n\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Session->setFlash(__('There was an issue cloning the deal', true));\n\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t$this->Session->setFlash(__('There was an issue cloning the venue. Pease ensure all details are filled in.', true));\n\t\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t\t}\n\t\t}\n\t\n\t}", "public function setEntityToId($id)\n {\n // try to get from cache\n if(\\Cache::has($id)){\n $entity = \\Cache::get($id);\n }else {\n $collection = new LaravelCollection($this->resourceService()->first('id',$id));\n\n if( !$collection->isEmpty() ){\n $entity = new $this($collection);\n }else{\n throw new \\App\\Exceptions\\EmptyException();\n }\n }\n\n if(isset($entity) && $entity->items !== NULL){\n //\n $this->items = $entity->items;\n $this->links = $entity->links;\n //#\n $this->relationships = $entity->relationships;\n }else{\n throw new \\App\\Exceptions\\EmptyException();\n }\n }", "public function createRawArticle($id){\n\t\tif(isset($_POST['data']) ==true)\n\t\t\techo json_encode(array(\"dataString\" => getRawArticle($id)));\n\t\telse return getRawArticle($id);\n\t}", "public function editRegularContentFromId() {}", "function acf_copy_postmeta($from_post_id = 0, $to_post_id = 0)\n{\n}", "public function testCopySaveAll() {\n\t\t$initialCounts = array(\n\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t);\n\t\t$before = $this->Article->copyFindData(1);\n\t\t$save = $before;\n\t\tunset($save['Tag']);\n\t\t$saved = $this->Article->copySaveAll($save);\n\t\t$this->assertTrue($saved);\n\n\t\t$id = $this->Article->id;\n\t\t$this->assertEquals($id, 1);\n\n\t\t$after = $this->Article->copyFindData(1);\n\t\t$this->assertEquals($before, $after);\n\n\t\t$this->assertEquals(\n\t\t\tarray(\n\t\t\t\t'Article' => $this->Article->find('count'),\n\t\t\t\t'User' => $this->Article->User->find('count'),\n\t\t\t\t'Featured' => $this->Article->Featured->find('count'),\n\t\t\t\t'Comment' => $this->Article->Comment->find('count'),\n\t\t\t\t'Tag' => $this->Article->Tag->find('count'),\n\t\t\t),\n\t\t\t$initialCounts\n\t\t);\n\t}", "public function createFromForm($data, $uid = null)\n {\n $hydrator = new ClassMethods(true);\n $article = new ArticleEntity();\n $hydrator->hydrate((array)$data, $article);\n\n $article->setParams(array(\n 'headTitle' => $data['headTitle'],\n 'metaKeywords' => $data['metaKeywords'],\n 'metaDescription' => $data['metaDescription']\n ));\n $article->setCreated(null);\n $article->setCreatedBy(0);\n $article->setModified(null);\n $article->setModifiedBy(0);\n $article->setOrdering(0);\n $article->setState(ArticleEntity::STATE_PUBLISHED);\n $article->setUid($uid ?: uniqid());\n $article->setRevision(0);\n $this->getEntityManager()->persist($article);\n $this->getEntityManager()->flush($article);\n\n return $article;\n }", "public function resetForClone()\n {\n // reset any fields for successful clone\n $this->id = null;\n return $this;\n }", "public function testCopyPrepareDataEmpties() {\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyPrepareData(array()),\n\t\t\tarray()\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyPrepareData(null),\n\t\t\tarray()\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyPrepareData(false),\n\t\t\tarray()\n\t\t);\n\t}", "public function createContentAndCopyDraftPage() {}", "function addArticleImage($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedArticlebildIdOnMarketplace_'.rand(1000, 9999); \n}", "private function fillAndSaveArticle(Article $article, Request $request) {\n\n $data = $request->all(); //ha un metodo interno all(), che ti torna in array associativo i dati inviati\n $article->title = $data['title'];\n $article->cover = $data['cover'];\n $article->author_id = $data['author_id'];//id Noemi id!remember always!\n $article->content = $data['content'];\n $article->save();// salva, il tuo articolo avrà id \n\n foreach($data['tags'] as $tagId) {\n $article->tag()->attach($tagId);\n }\n }", "public function init() {\n // Load article from db\n $article = ORM::forTable('articles')->findOne($this->id);\n\n // If article exists set variables using the db object\n if($article) {\n $this->alias = $article->get('alias');\n $this->preview = $article->get('preview');\n\n $this->month = $article->get('month');\n $this->year = $article->get('year');\n $this->publishing_date = $article->get('publishing_date');\n $this->published = $article->get('published');\n\n $this->load();\n }\n }", "function acf_copy_metadata($from_post_id = 0, $to_post_id = 0)\n{\n}", "function init_article_category($art_id,$cat_id) {\n $art_cat = ORM::for_table('pw_article_category')->create();\n $art_cat->artc_art_id = $art_id;\n $art_cat->artc_cat_id = $cat_id;\n $art_cat->save();\n return $art_cat;\n}", "public function restored(Article $article)\n {\n //\n }", "public function __construct(Article $article)\n {\n $this->article = $article;\n }", "public function __construct(Article $article)\n {\n $this->article = $article;\n }", "public function create() {\n $article = Article::where('url_key','po-umolchaniyu')->first();\n if(!$article) {\n $article = new Article;\n $article->title = 'По умолчанию';\n $article->url_key = 'po-umolchaniyu';\n $article->news = 0;\n $article->save();\n }\n return $article;\n }", "function author_article($author){\n return cleanData($author);\n}", "function addArticleAttribut($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedAttributIdOnMarketplace_'.rand(1000, 9999); \n}", "public function generateArticleFromDraft(ArticleInterface &$article, ArticleInterface $draft)\n {\n\n $this->loadArticle($article, $draft);\n\n $article\n ->setStatus( Article::STATUS_PUBLISHED )\n ->setParent(null);\n\n return $article;\n }", "function create_fake_article(array $attributeOverride = []): Article\n {\n $article = make_fake_article($attributeOverride);\n $article->save();\n\n return $article;\n }", "static function clone_in_catalog(string $newdocuid, string $olddocuid, string $catuid) {\n $contents = Yaml::parse(ydread($catuid));\n //print_r($contents);\n $title = $contents['contents'][$olddocuid]['title'];\n $contents['contents'][$newdocuid] = ['title'=> \"$title cloné $newdocuid\" ];\n ydwrite($catuid, Yaml::dump($contents, 999));\n }", "function article_id($article_id=null)\n {\n if (isset($article_id)) {\n $this->article_id = intval($article_id);\n }\n return $this->article_id;\n }", "public function prependCopy(self $originalItem, \\SetaPDF_Core_Document $document) {}", "function restoreArticle($accountId, $articleId)\n {\n // update the database\n mysql_query(\"UPDATE argus_saved_articles SET status='SAVED' WHERE account_id = '\".$accountId.\"' AND saved_article_id = '\".$articleId.\"'\") or die(mysql_error());\n \n return;\n }", "function &postCopy () {\n \t\t/* override to copy fields as necessary to complete the full copy. */\n \t\treturn $this;\n \t}", "public function insert($article);", "protected function prepareDeleteArticle(){\n $this->deleteComment();\n $this->deleteArticle();\n header('Location: index.php');\n }", "function __construct() {\r\n\t\tparent::__construct();\r\n\r\n\t\tif($content_id = JRequest::getVar('cid', null, '', 'array')){\r\n\t\t\t$this->setId((int) $content_id[0]);\r\n\t\t}\r\n\t\telseif($content_id = JRequest::getVar('id', null)){\r\n\t\t\t$this->setId($content_id);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$ce_name = JRequest::getVar('ce_name', null);\r\n\t\tif (!$content_element = getContentElementByName(\"$ce_name\")) {\r\n\t\t\t$content_element = getContentElementByName(\"content\");\r\n\t\t}\r\n\t\t$this->setContentElement($content_element);\r\n\t}", "function &copy( )\n {\n $new = $this;\n $new->unsetID();\n $new->store();\n\n return $new;\n }", "public function __construct() {\r\n\t\tparent::__construct();\r\n\r\n\t\t$this->id = $this->name;\r\n\t\t$this->viewSource = $this->view;\r\n\t\t$this->modelSource = $this->model;\r\n\r\n\t\tunset($this->view, $this->model);\r\n\t}", "function wp_set_unique_slug_on_create_template_part($post_id)\n {\n }", "public function supprArticle($id){\n $this->connect();\n $this->execute(\"SET NAMES UTF8\");\n $result=$this->execute(\"DELETE FROM articles WHERE id=$id\");\n return $result;\n }", "public function store($art)\n\t{\n\t\tstatic::globalXssClean();\n\t\t\n\t\t$input = Input::only('description');\n\t\t$validation = Validator::make($input, ['description' => 'alpha_num']);\n\n\t\t$crop = Input::get('coords');\n\t\t$file = (Input::get('dataUrl') == \"\")? file_get_contents(Input::get('srcUrl')): base64_decode(Input::get('dataUrl'));\n\n\t\tif ($validation->passes() && $crop != \"\" && $file != \"\")\n\t\t{\n\t\t\t$path = 'img/article/'.$art;\n\t\t\tif(!File::isDirectory($path)) File::makeDirectory($path);\n\n\t\t\t$crop = json_decode($crop, true);\t\n\n\t\t\t$orig = imagecreatefromstring($file);\n\t\t\t$big = ImageCreateTrueColor($crop['w'], $crop['h']);\n\t\t\t$new_thumbx=$crop['w'] * 0.4;\n\t\t\t$new_thumby=$crop['h'] * 0.4;\n\t\t\t$thumb = ImageCreateTrueColor($new_thumbx, $new_thumby);\n\n\t\t\t$b_path = $path.'/'.uniqid().'.jpg';\n\t\t\timagecopyresampled($big, $orig, 0, 0, $crop['x'], $crop['y'], $crop['w'], $crop['h'], $crop['w'], $crop['h']);\n\t\t\timagejpeg($big, $b_path, 80);\n\n\t\t\t$t_path = $path.'/'.uniqid().'.jpg';\n\t\t\timagecopyresampled($thumb, $big, 0, 0, 0, 0, $new_thumbx, $new_thumby, $crop['w'], $crop['h']);\n\t\t\timagejpeg($thumb, $t_path, 40);\n\n\t\t\timagedestroy($big); // release from memory\n\t\t\timagedestroy($thumb); // release from memory\n\n\t\t\t$img = new Image;\n\t\t\t$img->id = uniqid();\n\t\t\t$img->article_id = $art;\n\t\t\t$img->big = $b_path;\n\t\t\t$img->thumb = $t_path;\n\t\t\t$img[Config::get('app.locale')] = Input::get('description');\n\t\t\t$img->save();\n\n\t\t\treturn Redirect::route('articles.images.index', $art);\n\t\t}\n\n\t\treturn Redirect::route('articles.images.create', $art)\n\t\t\t->withInput()\n\t\t\t->withErrors($validation);\n\t}", "public function cloneTo(Entity $toEntity)\r\n {\r\n $thisData = $this->toArray();\r\n $thisData['id'] = null;\r\n $toEntity->fromArray($thisData);\r\n }", "public function creating(Article $article)\n {\n // assign default ordering\n //$article->{Orderable::$orderCol} = $article->maxOrder($article->parent_id) + 1;\n }", "private function __construct0() {\n\t\t\t$this->idea_uniqueId = $this->createUniqueId();\n\t\t}", "function beforeCreate(&$uri) {\n if( !is_null($uri->getVar('id')) ) {\n SEFTools::fixVariable($uri, 'id');\n $this->fixFeedId($uri, 'id');\n }\n if( !is_null($uri->getVar('catid')) ) SEFTools::fixVariable($uri, 'catid');\n\n return;\n }", "public function before_publish( $new_id ) {\n\n\t\tglobal $src_hash;\n\n\t\tif( ! $this->url ){\n\t\t\t$this->media_id = $this->fallback_id;\n\t\t\treturn;\n\t\t}\n\n\t\tif( array_key_exists( $this->url, $src_hash ) ){\n\t\t\t$this->media_id = $src_hash[ $this->url ];\n\t\t\treturn;\n\t\t}\n\n\t\t// Download image\n\t\t$tmp = download_url( $this->url );\n\t\t$file_array = array(\n\t\t 'name' => basename( $this->url ),\n\t\t 'tmp_name' => $tmp\n\t\t);\n\t\t\n\t\t// Check for download errors\n\t\tif ( is_wp_error( $tmp ) ) {\n\t\t @unlink( $file_array[ 'tmp_name' ] );\n\t\t $this->media_id = $this->fallback_id;\n\t\t\t$src_hash[ $this->url ] = $this->fallback_id;\n\t\t\treturn;\n\t\t}\n\n\t\t// Include caption if specified (WP stores this in the post_excerpt field)\n\t\t$post_data = array(\n\t\t\t'post_excerpt' => $this->caption,\n\t\t);\n\t\t\n\t\t// Create media post and attach to $new_id\n\t\t$media_id = media_handle_sideload( $file_array, $new_id, null, $post_data );\n\t\t\n\t\t// Check for handle sideload errors.\n\t\tif ( is_wp_error( $media_id ) ) {\n\t\t @unlink( $file_array['tmp_name'] );\n\t\t $this->media_id = $this->fallback_id;\n\t\t\t$src_hash[ $this->url ] = $this->fallback_id;\n\t\t\treturn;\n\t\t} else {\n\t\t\t$this->media_id = $media_id;\n\t\t\t$src_hash[ $this->url ] = $media_id;\n\t\t}\n\n\t\t// Add alt text if specified.\n\t\tif( $this->alt ) {\n\t\t\tupdate_post_meta( $media_id, '_wp_attachment_image_alt', $this->alt );\n\t\t}\n\n\t}", "public function __clone() {\n\t\t$this->document = clone $this->document;\n\t}", "public function testCopyFindData() {\n\t\t$this->assertEquals(\n\t\t\t$this->Article->copyFindData(1),\n\t\t\t$this->expectedFromFixtures[0]\n\t\t);\n\t}", "function __construct($id, $title, $description){\n $this -> id = $id;\n $this -> title = $title;\n $this -> description = $description;\n\n }", "public function __construct($references_article,$nom_article,$description_article,$prix_article){\n $this->references_article=$references_article;\n $this->nom_article=$nom_article;\n $this->description_article=$description_article;\n $this->prix_article=$prix_article;\n }", "public static function addArticle($article) {\n\t\t$query = \"INSERT INTO articles (editorID, articleTitle, pageText)\n\t\t VALUES(:editorID, :articleTitle, :pageText)\";\n\t\ttry {\n\t\t\tif (is_null ( $article ))\n\t\t\t\treturn $article;\n\t\t\t$db = Database::getDB ();\n\t\t\t$statement = $db->prepare ( $query );\n\t\t\t$statement->bindValue ( \":editorID\", $article->getEditorId () );\n\t\t\t$statement->bindValue ( \":articleTitle\", $article->getArticleTitle () );\n\t\t\t$statement->bindValue ( \":pageText\", $article->getPageText () );\n\t\t\t$statement->execute ();\n\t\t\t$statement->closeCursor ();\n\t\t\t$article->setArticleId ( $db->lastInsertId ( \"articleID\" ) );\n\t\t} catch ( Exception $e ) {\n\t\t\t// error\n\t\t}\n\t\treturn $article;\n\t}", "abstract protected function copy();", "public function __clone()\n {\n $this->init(clone $this->original, $this->encoding);\n }", "private function PostSaver(){\n if ($this->updateMode){\n $post = Post::find($this->postId);\n } else {\n $post = new Post();\n }\n $post->user_id = Auth::user()->id;\n $post->title = $this->title;\n $post->category_id = (int)$this->categories;\n $post->caption = $this->caption;\n $post->url = $this->imagePath;\n $post->save();\n $post->Tag()->sync($this->tags);\n }" ]
[ "0.6764416", "0.6296818", "0.62753564", "0.61698526", "0.61326146", "0.60261834", "0.59995013", "0.5937513", "0.5842961", "0.56870526", "0.5680319", "0.56412464", "0.5603456", "0.55781996", "0.55536", "0.5490646", "0.54789793", "0.54771256", "0.53824323", "0.52903867", "0.5281541", "0.5271643", "0.52619165", "0.52500874", "0.5242544", "0.5232786", "0.52307045", "0.52293676", "0.5225472", "0.5224265", "0.52122533", "0.51811", "0.5175268", "0.5173376", "0.5159898", "0.5159167", "0.51543224", "0.51473093", "0.51442677", "0.51135224", "0.51121473", "0.5110116", "0.51050925", "0.50911385", "0.50543", "0.5047325", "0.503545", "0.5030996", "0.5029183", "0.5024295", "0.5020832", "0.50190437", "0.50083554", "0.5004953", "0.49943927", "0.49881548", "0.49857682", "0.4975502", "0.49588597", "0.4958118", "0.4956967", "0.49520022", "0.49514064", "0.49460173", "0.49440852", "0.494232", "0.4940595", "0.49402282", "0.49402282", "0.4939981", "0.49389827", "0.4938041", "0.4929914", "0.49116418", "0.48933667", "0.48840058", "0.48794642", "0.48794508", "0.48790243", "0.4877848", "0.4874402", "0.48734435", "0.4865678", "0.48488536", "0.4846648", "0.48334283", "0.48312086", "0.48295617", "0.48290238", "0.4827048", "0.48190644", "0.48162448", "0.48131347", "0.4810228", "0.48054296", "0.48031077", "0.4799004", "0.47976655", "0.47971696", "0.47932795" ]
0.706167
0
return a copy of this article stuff that will get changed: id, shortname
function getCopyOfArticle() { $newArticle = new PolarBear_Article($this->id); $newArticle->prepareForCopy(); $newArticle->save(); return $newArticle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_copy()\r\n\t{\r\n\t\t$copy = clone($this);\r\n\r\n\t\t$copy->id = NULL;\r\n\r\n\t\treturn $copy;\r\n\t}", "public function __clone()\n {\n $this->_id = null;\n $this->_key = null;\n $this->_rev = null;\n // do not change the _changed flag here\n }", "public function copy()\n\t\t{\n\t\t\treturn unserialize(serialize($this)); \n\t\t}", "public function __clone()\n {\n unset($this->id);\n }", "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 getArrayCopy() {\r\n return array(\r\n 'id' => $this->_id,\r\n 'artist' => $this->_artist,\r\n 'title' => $this->_title);\r\n }", "public function __clone()\n {\n $this->id = null;\n\n // Generate a new identifier\n $identifier = Uuid::uuid1()->toString();\n $this->identifier = $identifier;\n $this->uri = 'local:'.$this->identifier;\n\n // Set last change/update to now\n $this->updatedAt = new \\DateTimeImmutable();\n $this->changedAt = $this->updatedAt;\n }", "public function __clone()\n {\n unset( $this->_original['_tapioca'] );\n }", "abstract protected function getOriginalContent();", "public function __clone()\n {\n $this->_id = null;\n }", "function copy(){ return $this->_copy(); }", "function &copy( )\n {\n $new = $this;\n $new->unsetID();\n $new->store();\n\n return $new;\n }", "protected function getOriginalAll()\n {\n return $this->original;\n }", "final public function __clone()\n {\n $this->aliased = false;\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 __clone()\n {\n $this->constructedObjectId = spl_object_hash($this);\n }", "public function __clone()\n {\n $this->description = $this->description . ' - склонирован';\n\n self::$instances ++;\n\n return $this;\n }", "function getOriginal()\n {\n }", "public function inOriginal();", "public function getCopy();", "public function getCopy();", "function get_clone()\r\n\t{\r\n\t\treturn clone($this);\r\n\t}", "public function modifyArticle(Article $article)\n\t{\n\t\t$req = $this->db->prepare('UPDATE articles SET article_number = :article_number, title = :title , content =:content WHERE id = :id ' );\n\n\t\t$modifiedArticle = $req->execute(array(\n\t\t\t\t'id'=>$article->getId(),\n\t\t\t\t'article_number'=>$article->getArticleNumber(),\n\t\t\t\t'title'=>$article->getTitle(),\n\t\t\t\t'content'=>$article->getContent()));\t\n\n\t\treturn $modifiedArticle;\n\n\n\t}", "public function __clone()\n\t{\n\t\t$this->_name = null;\n\t\tparent::__clone();\n\t}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "public function __clone()\n {\n foreach ($this as $key => $val)\n {\n if (is_object($val) || is_array($val))\n $this->{$key} = unserialize(serialize($val));\n }\n }", "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 model_article_getDetails($revisionId)\n{\n\t\t$articleResult = db_query(\"SELECT * FROM `article_revisions` WHERE `id`='$revisionId'\");\n\t\t$num_rows = mysql_num_rows($articleResult);\n\t\tif($num_rows)\n\t\t{\n\t\t\t$article = mysql_fetch_assoc($articleResult);\n\t\t\t$details['title'] = $article['title'];\n\t\t\t$details['content'] = $article['content'];\n\t\t\t$details['categoryId'] = $article['category_id'];\n\t\t\t// Get category name\n\t\t\t$categoryResult = db_query(\"SELECT * FROM `article_categories` WHERE `id`='\".$article['category_id'].\"'\");\n\t\t\tif($categoryResult)\n\t\t\t{\n\t\t\t\t$category = mysql_fetch_assoc($categoryResult);\n\t\t\t\t$details['category'] = $category['name'];\n\t\t\t}\n\t\t\t\n\t\t\t// Get tags\n\t\t\t$tagResult = db_query(\"SELECT * FROM `article_tags` WHERE `article_id`='\".$article['id'].\"'\");\n\t\t\tif($tagResult)\n\t\t\t{\n\t\t\t\t$tagList = \"\";\n\t\t\t\twhile($tags = mysql_fetch_assoc($tagResult))\n\t\t\t\t{\n\t\t\t\t\t$tagId = $tags['tag_id'];\n\t\t\t\t\t$tagNameResult = db_query(\"SELECT * FROM `tags` WHERE `id`='$tagId'\");\n\t\t\t\t\tif($tagNameResult)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tagName = mysql_fetch_assoc($tagNameResult);\n\t\t\t\t\t\t$tagList .= $tagName['name'].\", \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$details['tags'] = $tagList;\n\t\t\t\t$details['articleId'] = $article['article_id'];\n\t\t\t\t$details['date'] = $article['date'];\n\t\t\t}\n\t\t\treturn $details;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n}", "public function __clone()\n {\n $this->invalidateCache();\n }", "public function __clone() {\n $this->items = Arrays::copy($this->items);\n }", "public function __clone()\n {\n $this->data = clone $this->data;\n }", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif (is_object($v) || is_array($v))\n\t\t\t{\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "private function __clone(){ }", "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}", "protected function __clone(){}", "public function __clone()\n {\n $this->_objectTag = clone $this->_objectTag;\n }", "function extras_short_data($id) {\r\n\t\t\t\t$this->db->select('extras_title,extras_desc');\r\n\t\t\t\t$this->db->where('extras_id', $id);\r\n\t\t\t\treturn $this->db->get('pt_extras')->result();\r\n\t\t}", "public function _getArticleUniq()\n {\n return md5($this->_getTitle().'-'.$this->_getUrl());\n }", "function update( $new_instance, $old_instance ) \n {\n $instance = $old_instance;\n $instance['title'] = strip_tags( $new_instance['title'] );\n return $instance;\n }", "function update( $new_instance, $old_instance ) {\r\n\t$instance = $old_instance;\r\n\r\n\t$instance['title'] = strip_tags( $new_instance['title'] );\r\n\t$instance['subtitle'] = strip_tags( $new_instance['subtitle'] );\r\n\t$instance['code'] = stripslashes( $new_instance['code']);\r\n\r\n\treturn $instance;\r\n}", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function __clone()\n\t{\n\t\tforeach ($this as $k => $v)\n\t\t{\n\t\t\tif ((is_object($v)) || is_array($v)) {\n\t\t\t\t$this->{$k} = unserialize(serialize($v));\n\t\t\t}\n\t\t}\n\t}", "public function backupOriginalAttributes()\n {\n $this->backup_original = $this->getRawOriginal() ?: [];\n\n return $this->getOriginal();\n }", "function update( $new_instance, $old_instance ) {\n $instance = array();\n $instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\n $instance['orderby'] = ( ! empty( $new_instance['orderby'] ) ) ? strip_tags( $new_instance['orderby'] ) : '';\n return $instance;\n }", "public function getModified();", "function prepareForCopy() {\n\t\t$this->id = null;\n\t}", "public function syncOriginal()\n {\n $this->original = $this->toArray();\n\n return $this;\n }", "function dacig_modify_the_posts( $results ) {\n\t$num_posts = count( $results );\n\n\tfor ( $i = 0; $i < $num_posts; $i++ ) {\n\t\tif ( $results[$i]->post_content )\n\t\t\t$results[$i]->post_excerpt = $results[$i]->post_content;\n\t}\n\n\treturn $results;\n}", "public function getArrayCopy() {\n\t\treturn [\n\t\t\t'id' => $this->getId(),\n\t\t\t'name' => $this->getName(),\n\t\t];\n\t}", "public function __clone()\n {\n foreach ($this->data as $key => $value) {\n if ($value instanceof self) {\n $this[$key] = clone $value;\n }\n }\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$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}", "public function storeOriginals()\n {\n $this->originals = $this->toArray();\n }", "private function __clone(){\n\t}", "public function editRegularContentFromId() {}", "public function duplicate(){\n\t\treturn self::cloneObject($this);\n\t}", "function update($new_instance, $old_instance) {\n\t$instance = $old_instance;\n\t$instance['title'] = strip_tags( $new_instance['title'] );\n\t$instance['movie'] = strip_tags( $new_instance['movie'] );\n\t$instance['song'] = strip_tags( $new_instance['song'] );\n\treturn $instance;\n}", "private function __clone(){\n\t\t\n\t}", "public function __clone()\n {\n $this->section = clone $this->section;\n }", "function &copy () {\n \t\t$newObject =& $this->shallowCopy();\n \t\treturn $newObject->postCopy();\n \t}", "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 getClone(){\n\t\t\treturn clone($this);\n\t\t}", "function makeClone()\n {\n $this->id = 0;\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 __clone()\n {\n // if the entity has no identity do nothing, do NOT throw an exception\n if (!($this->id)) {\n return;\n }\n \n // otherwise proceed\n \n // unset identifiers\n $this->setId(0);\n \n // reset workflow\n $this->resetWorkflow();\n \n $this->setCreatedBy(null);\n $this->setCreatedDate(null);\n $this->setUpdatedBy(null);\n $this->setUpdatedDate(null);\n \n \n // clone categories\n $categories = $this->categories;\n $this->categories = new ArrayCollection();\n foreach ($categories as $c) {\n $newCat = clone $c;\n $this->categories->add($newCat);\n $newCat->setEntity($this);\n }\n }", "public function __clone() {\n $this->name = clone $this->name;\n $this->type = clone $this->type;\n $this->op = clone $this->op;\n\n $this->currentPeriod = clone $this->currentPeriod;\n $this->previousPeriod = clone $this->previousPeriod;\n\n $products = array();\n foreach ($this->products as $idx=>$product) {\n $products[] = clone $product;\n }\n $this->products = $products;\n }", "private function __clone(){\n\n }", "private function __clone(){\n }", "private function __clone(){\n }", "public function __clone()\n {\n $this->__vars = clone $this->vars();\n }", "public function __clone()\r\n {\r\n $this->_internalObject = clone $this->_internalObject;\r\n\t\t$a=serialize($this->_internalObject);\r\n\t\techo \"$a<br>\";\r\n }", "public function update( $new_instance, $old_instance ) {\n$instance = array();\n$instance['title'] = ( ! empty( $new_instance['title'] ) ) ? strip_tags( $new_instance['title'] ) : '';\nreturn $instance;\n}", "final private function __clone(){\n\t\t\n\t}", "public function getEntityClone()\n {\n return $this->entity;\n }", "function wp_revisions_to_keep($post)\n {\n }", "function resetCopyInfos()\n {\n $this->dn = 'new';\n foreach ($this->plugins as &$plugin) {\n $plugin->resetCopyInfos();\n }\n unset($plugin);\n }", "function &postCopy () {\n \t\t/* override to copy fields as necessary to complete the full copy. */\n \t\treturn $this;\n \t}", "function modified() { $this->_modified=1; }", "function modified() { $this->_modified=1; }", "public function changedData(){\n\t\t$res = array();\n\t\tforeach($this->data as $k=>$v){\n\t\t\t$add = false;\n\t\t\tif($k != $this->primaryKey){\n\t\t\t\t$add = true;\n\t\t\t\tif(array_key_exists($k,$this->orig)){//support for null values\n\t\t\t\t\tif($this->orig[$k] == $v){\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($add){\n\t\t\t\t\t$res[$k] = $v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}", "function copy ()\n {\n return clone $this;\n }", "public function description(){ return $this->name . \" [\" . $this->ID . \"]\"; }", "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\t\treturn $instance;\r\n\t}", "private function __clone () {}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}", "function __clone() { return $this;}" ]
[ "0.58104867", "0.56496257", "0.55739325", "0.54533535", "0.5445642", "0.54164535", "0.5380791", "0.5330271", "0.5280382", "0.5274447", "0.52600867", "0.52521074", "0.52153575", "0.5213415", "0.5211331", "0.5211261", "0.5202135", "0.5174316", "0.51621985", "0.5107293", "0.5107293", "0.50980276", "0.50849944", "0.50465405", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50418544", "0.50214374", "0.50016207", "0.49890336", "0.4984391", "0.49787378", "0.49758324", "0.49740756", "0.49648866", "0.49618798", "0.49618798", "0.49596408", "0.49521646", "0.4952057", "0.4951631", "0.4951305", "0.4947719", "0.49466765", "0.49466765", "0.4944738", "0.49441946", "0.49412695", "0.49410525", "0.4923583", "0.49234453", "0.49180752", "0.49155244", "0.49125817", "0.49118", "0.4910778", "0.49092102", "0.49071082", "0.4906909", "0.49061215", "0.4905083", "0.49036807", "0.48956195", "0.48921505", "0.48910695", "0.48900202", "0.48847935", "0.48836556", "0.48767495", "0.48760265", "0.4875767", "0.4875767", "0.4874993", "0.48726672", "0.48698184", "0.48632216", "0.48587182", "0.4858062", "0.48527658", "0.48507625", "0.48454928", "0.48454928", "0.48431984", "0.48412964", "0.48341745", "0.48325428", "0.4816892", "0.48168567", "0.48168567", "0.48168567", "0.48168567", "0.48168567" ]
0.6114413
0
Delete article Deletion is done immediately
function delete() { $this->status = "deleted"; $sql = "UPDATE " . POLARBEAR_DB_PREFIX . "_articles SET status = '$this->status' WHERE id = '$this->id'"; global $polarbear_db; $polarbear_db->query($sql); $args = array( "article" => $this, "objectName" => $this->getTitleArticle() ); pb_event_fire("pb_article_deleted", $args); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(Article $article)\n {\n //\n }", "public function deleteArticle(): void\n {\n $this->articleId = $_GET['deleteId'];\n\n $this->articleModel->deleteArticle($this->articleId);\n // Redirect to the articles list page\n Router::redirectTo('listArticles');\n exit();\n }", "public function deleteArticle(int $id);", "public function destroy(Article $article)\n {\n try{\n $article->delete();\n }catch(\\Exception $e){\n error_info($e->getMessage());\n }\n success_info();\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function destroy(Article $article)\n {\n //\n }", "public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}", "public function deleteMyPanier($article_id)\n\n { \n\n }", "public function delete() {\n $this->remove_content();\n\n parent::delete();\n }", "public function deleted(Article $article)\n {\n $article->articles()->detach();\n }", "public function remove(Article $article);", "public function forceDeleted(Article $article)\n {\n //\n }", "public function deleteAction()\n {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Get first parameter from URL as comment $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // Call static function from Model which return comment object or null.\n $article = Article::findById($id);\n\n if (!$article) {\n return redirect();\n }\n\n if (!$article->canDelete()) {\n return redirect('articles/details/' . $article->id);\n }\n\n $comments = $article->getComments();\n\n // Delete each comment in the loop\n foreach ($comments as $comment) {\n $comment->delete();\n }\n\n // Delete article on the end\n $article->delete();\n\n set_alert('info', '<b>Success!</b> Your article has been deleted!');\n\n return redirect('articles');\n }", "public function destroy(Article $article)\n {\n $article->delete();\n \n return redirect()->route('manage')\n ->with('success','Article deleted successfully');\n }", "public function delete_article()\n {\n if($this->categories->isEmpty()){\n return $this->delete();\n }\n else {\n /*\n * Deleting comments\n */\n $this->comments()->delete();\n\n if($this->categories()->detach()){\n $msg = new Article_Reject_Messages;\n if(!is_null($msg->all()->where('article_id', $this->id)->first())) $msg->all()->where('article_id', $this->id)->first()->delete();\n return $this->delete();\n }\n else return false;\n }\n }", "public function destroy(Article $article)\n {\n $article->delete();\n session()->flash('msg_success',__('messages.modelDeleted', ['modelname' => 'Article'] ));\n //$article->addToRecycleBin();\n\n return redirect()->action('ArticleController@index');\n }", "public function destroy(Article $article)\n {\n $response = Gate::inspect('delete', $article);\n if ($response->allowed()) {\n $contentImages = $this->findImageOfString($article->content);\n\n if(count($contentImages) > 0){\n foreach($contentImages as $img){\n $imagePath = public_path($img);\n if (file_exists($imagePath)) {\n unlink($imagePath);\n }\n }\n }\n\n if($article->image){\n $imagePath = public_path($article->image);\n if (file_exists($imagePath)) {\n unlink($imagePath);\n }\n }\n if($article->file){\n $filePath = public_path($article->file);\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }\n $article->delete();\n return redirect()->route('articles.index');\n\n }else{\n\n return redirect()->back()->withErrors(['error' => $response->message()]);\n\n }\n }", "public\n function destroy(Article $article)\n {\n $article->delete();\n Cache::forget('article:'.$article->id);\n Cache::forget('article:all');\n return redirect(route('article.index'));\n }", "public function deleteArticle($id){\n //TODO Verification du rôle (admin ou redacteut\n Blog::deleteArticle($id);\n header('Location: /Blog/index');\n\n }", "public function destroy(Article $article)\n {\n $tagsId = $this->extractIds($article->tags);\n //dd($tagsId);\n $article->tags()->detach($tagsId); // Rimuovo i record nella tabella article_tag inerenti all'articolo che sto per cancellare\n $article->delete(); // Cancello l'articolo dal database\n return redirect()->route('articles.index');\n }", "protected function prepareDeleteArticle(){\n $this->deleteComment();\n $this->deleteArticle();\n header('Location: index.php');\n }", "public function destroy( $article)\n {\n $articleDeleted = $this->repository->delete($article);\n\n if($articleDeleted){\n\n return $this->successResponse(null ,'article has been deleted successfully.');\n }\n\n return $this->failResponse( 'Error in deleting article.');\n }", "public function deleteAction($id){\n $article = Article::findFirst($id);\n if($article !== false){\n if($article->delete()){\n\n //let the user know the article was removed successfully\n $this->flashSession->message('message', 'The article has successfully been removed');\n\n //success, just redirect to the article overview\n $this->response->redirect(\"/article\");\n }else{\n //something went wrong\n }\n }\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 deleteArticle(Article $idArticle)\n {\n $deleteArticle= $this->getDoctrine()->getManager();\n $deleteArticle->remove($idArticle);\n $deleteArticle->flush();\n \n $this->addFlash('message','Article à bien été supprimé!');\n \n return $this->redirectToRoute('admin');\n }", "public final function delete() {\n }", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarticles();\n if (!empty($microarticles)) {\n foreach ($microarticles as $microarticle) {\n $microarticle->delete();\n }\n }\n\n // Deleting selfservices.\n $selfServices = $this->getSelfservices();\n if (!empty($selfServices)) {\n foreach ($selfServices as $selfService) {\n $selfService->delete();\n }\n }\n\n parent::delete();\n }", "public function AdminDeleteArticleProcess(Request $request) {\n\n $article = Article::find($request->article_id);\n $article->delete();\n return redirect()->route('admin-article');\n }", "public function delete($id){\n $this->db->where('id', $id);\n $this->db->delete('articles'); // Untuk mengeksekusi perintah delete data\n }", "public function destroy(Article $article)\n {\n $article->delete();\n }", "public function delete_article_by_article_id($id)\n {\n $sql = \"DELETE FROM {$this->db->GOSPEL_MAGAZINE} WHERE id={$id}\";\n $this->db->query($sql);\n }", "public function destroy(Article $article)\n {\n $article->delete();\n return redirect(route('article.index'));\n }", "protected function delete() {\n\t}", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public function destroy(Article $article)\n {\n $article->delete();\n return redirect()->route('article.index');\n }", "function delete_article(PDO $dbh, $article_id)\n{\n\n// On supprime d'abord les tags eventuellement associés à cet article\n$query1 = \"DELETE FROM article_has_tag\nWHERE article_has_tag.article_id = :id\";\n$request = $dbh->prepare($query1);\n$request->execute([\"id\" => $article_id]);\n\n// Puis on supprime l'article concerné\n$query2 = \"DELETE FROM article\nWHERE id = :id\";\n$request = $dbh->prepare($query2);\n$request->execute([\"id\" => $article_id]);\nreturn $request;\n}", "public function destroy($id)\n {\n $article = Article::where('id',$id)->firstOrFail();\n $title = $article->title;\n $article->delete(); \n return redirect()->route('articles.index')->with('success', \"L'article \".$title.\" a bien été supprimer\");\n }", "public function destroy($article)\n {\n $destroy = Article::find($article);\n\n $destroy->delete();\n return redirect()->back();\n }", "public function deleteAction($id)\n{\n $em=$this->getDoctrine()->getManager();\n $Articles_especes=$em->getRepository(Articles_especes::class)->find($id);\n //the remove() method notifies Doctrine that you'd like to remove the given object from the database\n $em->remove($Articles_especes);\n //The flush() method execute the DELETE query.\n $em->flush();\n //redirect our function to the read page to show our table\n return $this->redirectToRoute('articles_afficher');\n\n}", "public function delete()\n\t{\n\t\t$this->hard_delete();\n\t}", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function testDelete(): void\n {\n $this->createInstance();\n $this->createAndLogin();\n\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $res2 = $this->fConnector->getDiscussionManagement()->deleteTopic($res->id)->wait();\n $this->assertTrue($res2, 'Test delete of a topic');\n $res3 = $this->fConnector->getDiscussionManagement()->getDiscussions($this->configTest['testTagName'])->wait();\n $found = false;\n foreach($res3 as $discussion){\n if($discussion->id === $res->id){\n $found = true;\n break;\n }\n }\n $this->assertFalse($found, 'Test delete of a topic, search for deleted topic');\n\n }", "public function deleting(Knowledgebase $article)\n {\n $article->comments->each(\n function ($comment) {\n $comment->delete();\n }\n );\n $issue->detag();\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function destroy(Article $article)\n {\n $article->delete();\n return redirect('/articles');\n }", "public abstract function delete();", "public function delete_article($id) {\n if(!$id) {\n throw new Exception('id should not be empty');\n }\n $parameters = array();\n return $this->linkemperor_exec($parameters, 'DELETE', \"/api/v2/customers/articles/$id.json\");\n }", "function delete()\n {\n }", "public function destroy(Article $article)\n {\n $article->delete();\n return redirect('/articles')->with('status', 'Artikeln raderad!');\n }", "public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }", "public function delete(Request $request, $id)\n { //it was original Rest code for DELETE, built by default Laravel \n\t\t/*$article = WpressRest::findOrFail($id);\n $article->delete();\n return 204; */\n\t\t\n\t\t//Check if Article ID exists at all\n\t\tif (!WpressRest::where('wpBlog_id', $id)->exists()) {\n\t\t\t$responseX = array('status' => 'Fail', 'messageX'=> 'Article ID does not exist or it was already deleted' );\n\t\t\treturn $responseX;\n\t\t}\n\t\t\n\t\t\n $article = WpressRest::findOrFail($id); //u can use => WpressRest::firstOrFail($id); if add to model => protected $primaryKey = 'wpBlog_id'; \n \n\t\tif ($article->delete()){\n\t\t\t$responseX = array('status' => 'OK', 'messageX'=> 'Article ' . $id . ' was deleted' );\n\t\t\treturn $responseX;\n\t\t\t\n\t\t} else {\n\t\t\t$responseX = array('status' => 'Fail', 'messageX'=> 'Article ' . $id . ' failed to be deleted' );\n\t\t\treturn $responseX;\n\t\t}\n\n //return 204;\n }", "public function destroy(Article $article, Request $request)\n {\n \n if($this->checkImage($article->featured_image)){\n File::delete(storage_path('app/public/'.$article->featured_image));\n }\n if($this->checkThumbnail($article->thumbnail)){\n File::delete(storage_path('app/public/'.$article->thumbnail));\n }\n if($this->checkLogo($article->logo)){\n File::delete(storage_path('app/public/'.$article->logo));\n }\n $article->delete();\n\n return response()->json('Article successfully deleted!');\n }", "public function delete_jarticle_id($article_id){\n $sql48 =\"delete from articals where artical_id ='$article_id'\";\n $result48 = mysqli_query($this->db,$sql48);\n return $result48;\n }", "public static function delete() {\n\n\n\t\t}", "public function destroy(Article $article)\n {\n if(Auth::id() != $article->user_id){\n return abort(401);\n }\n $article->delete();\n return redirect()->back();\n\n }", "public function destroy($id)\n {\n \t$article = Article::findOrfail($id);\n \t$article->delete();\n return redirect('article')->with('mensaje', 'Noticia eliminada');\n }", "public function delete()\r\n\t{\r\n\t}", "public function destroy(Article $article)\n {\n $article->delete();\n\n return redirect('articles');\n }", "function deleteArticle($accountId, $articleId)\n {\n // update the database\n mysql_query(\"DELETE FROM argus_saved_articles WHERE account_id = '\".$accountId.\"' AND saved_article_id = '\".$articleId.\"'\") or die(mysql_error());\n \n return;\n }", "function delete(){\n\t\t$eventDet = $this->get_full_details();\n\t\t//print_r($eventDet);\n\t\t#unlink all images for the event\n\t\tif ($eventDet->news_image_logo) { \n\t\t\t//unlink($this->imgPath.$eventDet->news_image_logo);\n\t\t}\n\t\tif ($eventDet->news_photo1) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo1);\n\t\t}\n\t\tif ($eventDet->news_photo2) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo2);\n\t\t}\n\t\tif ($eventDet->news_photo3) { \n\t\t\tunlink($this->imgPath.$eventDet->news_photo3);\n\t\t}\t\t\t\t\t\t\n\t\t\n\t\t#remove event entry from the db\n\t\tglobal $db;\n\t\t$sQl = \"delete from cms_news where id = '\".$this->event_id.\"'\";\n\t\tif ($db->query($sQl)){\n\t\t\t$this->message = \"Event \".$eventDet->news_title.\" deleted successfully\";\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->error = \"Cannot delete Event \".$eventDet->news_title.\"\";\n\t\t\treturn false;\n\t\t}\n\t}", "public function destroy(Article $article)\n\t{\n\t\t$article->delete();\n\n\t\tflash()->success('O artigo foi deletado!');\n\t\t\n\t\treturn redirect('articles');\n\t}", "public function destroy($id)\n {\n try{\n $img_data = Image::where('article_id',$id)->get();\n if ($img_data != null) {\n foreach ($img_data as $img) {\n File::delete($img->image);\n }\n Image::where('article_id',$id)->delete();\n }\n\n Article::destroy($id);\n Session::flash(\"notice\",\"Article Deleted\");\n return redirect()->route('articles.index');\n }\n catch(\\Exception $e) {\n Session::flash(\"error\",\"Whoops something went wrong, failed to delete!!\");\n return redirect()->route('articles.index');\n }\n\n \n }", "public function delete() {\r\n }", "public function destroy(Article $article)\n {\n $article->delete();\n session()->flash('success', \"Article deleted successfully\");\n return redirect(route('articles.index'));\n }", "public function destroy(Article $article)\n {\n $article->delete();\n return response()->redirectToRoute('articles.index');\n }", "protected function _delete()\n\t{\n\t}", "public function destroy(Article $article)\n {\n $authCheck = Gate::allows('update-post', $article);\n\n if (!$authCheck) {\n return $this->failedAccessArticle();\n }\n\n $article->delete();\n return redirect()->route('article.index');\n }", "public function destroy($id)\n {\n \tArticle::find($id)->delete();\n \treturn redirect('article');\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public function delete($id)\n {\n $article = Article::find($id);\n\n // dd(DB::table('articles'));\n if ($article->user_id == Auth::id()) { //本人か確認\n Post::find($id)->delete();\n Article::find($id)->delete();\n }\n return back(); //直前のページにリダイレクト\n }", "public function delete()\n\t{\n\t}", "public function destroy(Article $article)\n {\n ArticleCategory::where('id_article', $article->id)->delete();\n \n // Se borra el articulo\n $article->delete();\n\n return redirect()->route('articles');\n }" ]
[ "0.7929366", "0.784173", "0.7653868", "0.75799847", "0.7364501", "0.7364501", "0.7364501", "0.7364501", "0.7364501", "0.7364501", "0.7364501", "0.72992045", "0.72479427", "0.7243703", "0.723947", "0.7214925", "0.7195531", "0.718397", "0.7131863", "0.71252745", "0.7087437", "0.7057505", "0.703888", "0.70128226", "0.69937354", "0.6987311", "0.6979453", "0.69633275", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6931839", "0.6917675", "0.6909441", "0.6858447", "0.68582547", "0.68582547", "0.6857968", "0.68521774", "0.68425405", "0.68323976", "0.6829988", "0.68299705", "0.6828785", "0.6823282", "0.6821712", "0.6814148", "0.67891693", "0.6787782", "0.6787415", "0.67831874", "0.6783005", "0.67829037", "0.6780002", "0.6780002", "0.6780002", "0.6780002", "0.6778638", "0.6778157", "0.6769666", "0.67683184", "0.6763642", "0.6754584", "0.6725904", "0.6721612", "0.6708044", "0.6686806", "0.6686592", "0.666979", "0.6660814", "0.66576", "0.66540515", "0.6653179", "0.66487813", "0.6642437", "0.66388077", "0.6623586", "0.6621775", "0.6616922", "0.6607216", "0.6602291", "0.6600869", "0.659989", "0.65977436", "0.6583216", "0.65770376", "0.65732366", "0.65709245", "0.65657616" ]
0.746753
4
get icon for article based on status
function statusIcon() { // published, draft // page_white_clock.png // page_white_edit.png switch ($this->status) { case 'published': // varit, eller ska bli, publicerad? // $datePublish $dateUnpublish if ($this->isPublished()) { return POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png'; } else { return POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_clock.png'; } break; case 'draft': return POLARBEAR_WEBPATH . 'images/silkicons/page_white_text_edit.png'; break; default: return POLARBEAR_WEBPATH . 'images/silkicons/page_white_text.png'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArticleListIcon();", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "function emc_get_content_icon() {\r\n\r\n\t$format = get_the_terms( get_the_ID(), 'emc_content_format' );\r\n\r\n\tif ( $format && ! is_wp_error( $format ) ) {\r\n\r\n\t\t$format = array_shift( $format );\r\n\t\t$url = get_template_directory_uri() . '/img/' . $format->slug . '.png';\r\n\t\t$title = sprintf( __( 'View all %s posts', 'emc' ), $format->name );\r\n\t\t$alt = sprintf( __( '%s icon', 'emc' ), $format->name );\r\n\t\t$html = sprintf( __( '<a href=\"%1$s\" title=\"%2$s\"><img class=\"emc-format-icon\" src=\"%3$s\" alt=\"%4$s\"/></a>', 'emc' ),\r\n\t\t\tesc_url( get_term_link( $format ) ),\r\n\t\t\tesc_attr( $title ),\r\n\t\t\tesc_url( $url ),\r\n\t\t\tesc_attr( $alt )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}", "public function get_icon()\n {\n return 'fa fa-image';\n }", "public function getIcon();", "public function getIcon();", "public function icon(): string;", "function getTopicStatusIcon($topicRead, $topicType, $topicStatus) {\n\t\t$topicStatusIcon = \"\";\n\t\t\n\t\t// What status icon should we use?\n\t\tif($_SESSION['username']) {\n\t\t\t// If we are logged in and the topic is new\n\t\t\tif(!$topicRead) {\n\t\t\t\t// New Posts\n\t\t\t\t$topicStatusIcon = ($topicStatus == TOPIC_LOCKED) ? \"images/board_icons/locked_new.jpg\" : \"images/board_icons/post_new.jpg\";\n\t\t\t\t$topicStatusIcon = ($topicType == POST_STICKY && $topicStatus != TOPIC_LOCKED) ? \"images/board_icons/sticky_new.jpg\" : $topicStatusIcon;\n\t\t\t\t$topicStatusIcon = (($topicType == POST_ANNOUNCE || $topicType == POST_GLOBAL_ANNOUNCE) && $topicStatus != TOPIC_LOCKED) ? \"images/board_icons/announcement_new.jpg\" : $topicStatusIcon;\n\t\t\t} \n\t\t\telse {\n\t\t\t\t// No new Posts\n\t\t\t\t$topicStatusIcon = ($topicStatus == TOPIC_LOCKED) ? \"images/board_icons/locked.jpg\" : \"images/board_icons/post.jpg\";\n\t\t\t\t$topicStatusIcon = ($topicType == POST_STICKY && $topic_status != TOPIC_LOCKED) ? \"images/board_icons/sticky.jpg\" : $topicStatusIcon;\n\t\t\t\t$topicStatusIcon = (($topicType == POST_ANNOUNCE || $topicType == POST_GLOBAL_ANNOUNCE) && $topicStatus != TOPIC_LOCKED) ? \"images/board_icons/announcement.jpg\" : $topicStatusIcon;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Guest is viewing the forum\n\t\t\t$topicStatusIcon = ($topicStatus == TOPIC_LOCKED) ? \"images/board_icons/locked.jpg\" : \"images/board_icons/post.jpg\";\n\t\t\t$topicStatusIcon = ($topicType == POST_STICKY && $topicStatus != TOPIC_LOCKED) ? \"images/board_icons/sticky.jpg\" : $topicStatusIcon;\n\t\t\t$topicStatusIcon = (($topicType == POST_ANNOUNCE || $topicType == POST_GLOBAL_ANNOUNCE) && $topicStatus != TOPIC_LOCKED) ? \"images/board_icons/announcement.jpg\" : $topicStatusIcon;\n\t\t}\n\t\t\n\t\treturn $topicStatusIcon;\n\t}", "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "public function getImageStatus()\n \t{\n \t\tswitch ($this->status) {\n \t\t\tcase self::STATUS_ACTIVE: \n \t\t\t\treturn Yii::app()->theme->baseUrl.'/images/enable.png';\n \t\t\t\tbreak;\n \t\t\tcase self::STATUS_PENDING:\n \t\t\t\treturn Yii::app()->theme->baseUrl.'/images/disable.png';\n \t\t\t\tbreak;\n \t\t}\t\n \t}", "public function getIcon() {}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function kind_icon_url ()\n {\n switch ($this->kind)\n {\n case History_item_deleted:\n return '{icons}indicators/deleted';\n case History_item_restored:\n return '{icons}indicators/restored';\n case History_item_hidden:\n return '{icons}indicators/hidden';\n case History_item_hidden_update:\n return '{icons}indicators/hidden_update';\n case History_item_locked:\n return '{icons}indicators/locked';\n default:\n return parent::kind_icon_url ();\n }\n }", "public function icon()\n {\n return $this->icon;\n }", "function menus_access_get_icon(ElggEntity $entity) {\n\t$access_id = $entity->access_id;\n\tswitch ($access_id) {\n\t\tcase ACCESS_FRIENDS :\n\t\t\t$icon = 'user';\n\t\t\tbreak;\n\t\tcase ACCESS_PUBLIC :\n\t\tcase ACCESS_LOGGED_IN :\n\t\t\t$icon = 'globe';\n\t\t\tbreak;\n\t\tcase ACCESS_PRIVATE :\n\t\t\t$icon = 'lock';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$collection = get_access_collection($access_id);\n\t\t\t$owner = get_entity($collection->owner_guid);\n\t\t\tif ($owner instanceof ElggGroup) {\n\t\t\t\t$icon = 'users';\n\t\t\t} else {\n\t\t\t\t$icon = 'cog';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\t$params = ['entity' => $entity];\n\treturn elgg_trigger_plugin_hook('access:icon', $entity->getType(), $params, $icon);\n}", "function get_topic_icon($topic) {\n $file = TOPIC_ICON_DIR . '/' . $topic['topic_icon'];\n if (file_exists($file) && !empty($topic['topic_icon'])) {\n return TOPIC_ICON_URL . '/' . $topic['topic_icon'];\n }else\n return TOPIC_ICON_URL . '/dot.gif';\n }", "function getPostIcon(){\n\t\t$postid = intval( $_GET['post_id'] );\n\t\t$icon_data['post_icon'] = get_post_meta( $postid, 'post_icon', true );\n\t\t$icon_data['post_icon_position'] = get_post_meta( $postid, 'post_icon_position', true );\n\t\techo json_encode( $icon_data );\n\t\twp_die();\n\t}", "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}", "public function getCategoryIcon();", "public function kind_icon_url ()\n {\n switch ($this->kind)\n {\n case History_item_published:\n return '{icons}indicators/released';\n case History_item_abandoned:\n return '{icons}buttons/abandon';\n case History_item_queued:\n return '{icons}buttons/queue';\n case History_item_unpublished:\n return '{icons}buttons/unpublish';\n default:\n return parent::kind_icon_url ();\n }\n }", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "protected function imageIcon(): string\n {\n $types = [\n 'image' => 'file-image',\n 'video' => 'file-video',\n 'document' => 'file-document',\n 'audio' => 'file-audio',\n 'code' => 'file-code',\n 'archive' => 'file-zip'\n ];\n\n $extensions = [\n 'xls' => 'file-spreadsheet',\n 'xlsx' => 'file-spreadsheet',\n 'csv' => 'file-spreadsheet',\n 'docx' => 'file-word',\n 'doc' => 'file-word',\n 'rtf' => 'file-word',\n 'mdown' => 'file-text',\n 'md' => 'file-text'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['color'];\n }", "public function get_icon()\n {\n return 'eicon-post-list';\n }", "function get_attachment_icon_src($id = 0, $fullsize = \\false)\n {\n }", "public function icon($icon);", "function get_icon_alert (string $type = 'info') {\n\n $icons = [\n \"success\" => \"nc-check-2\",\n \"danger\" => \"nc-alert-circle-i\",\n \"warning\" => \"nc-alert-circle-i\",\n \"info\" => \"nc-alert-circle-i\",\n ];\n\n return $icons[$type];\n }", "public function conditionIcon(): string\n {\n return $this->weather['condition']['icon'];\n }", "public function getIconForResourceWithCustomImageMimeTypeReturnsImageIcon() {}", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "public function getIcon()\n {\n }", "function get_course_visibility_icon($v)\r\n{\r\n\t$path = api_get_path(REL_CODE_PATH);\r\n\t$style = 'style=\"margin-bottom:-5px;margin-right:5px;\"';\r\n\tswitch($v)\r\n\t{\r\n\t\tcase 0:\r\n\t\t\treturn '<img src=\"'.$path.'img/bullet_red.gif\" title=\"'.get_lang('CourseVisibilityClosed').'\" '.$style.' />';\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\treturn '<img src=\"'.$path.'img/bullet_orange.gif\" title=\"'.get_lang('Private').'\" '.$style.' />';\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\treturn '<img src=\"'.$path.'img/bullet_green.gif\" title=\"'.get_lang('OpenToThePlatform').'\" '.$style.' />';\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\treturn '<img src=\"'.$path.'img/bullet_blue.gif\" title=\"'.get_lang('OpenToTheWorld').'\" '.$style.' />';\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn '';\r\n\t}\r\n}", "protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}", "public function getIcon() {\r\n \r\n $mime = explode(\"/\", $this->mime); \r\n \r\n switch ($mime[0]) {\r\n case \"video\" : \r\n return [\r\n \"label\" => \"Video\",\r\n \"icon\" => '<i class=\"fa fa-file-video-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"image\" : \r\n return [\r\n \"label\" => \"Image\",\r\n \"icon\" => '<i class=\"fa fa-file-image-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n switch ($this->mime) {\r\n case \"application/msword\":\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return [ \r\n \"label\" => \"Microsoft Word\",\r\n \"icon\" => '<i class=\"fa fa-file-word-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/vnd.ms-excel\":\r\n case \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":\r\n return [ \r\n \"label\" => \"Microsoft Excel\",\r\n \"icon\" => '<i class=\"fa fa-file-excel-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n case \"application/pdf\":\r\n case \"application/x-pdf\":\r\n return [ \r\n \"label\" => \"PDF\",\r\n \"icon\" => '<i class=\"fa fa-file-pdf-o\"></i>'\r\n ];\r\n \r\n break;\r\n \r\n }\r\n \r\n return [\r\n \"label\" => \"Unknown\",\r\n \"icon\" => '<i class=\"fa fa-file-o\"></i>'\r\n ];\r\n \r\n }", "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "function get_attachment_icon($id = 0, $fullsize = \\false, $max_dims = \\false)\n {\n }", "public function get_icon() {\n return 'fas fa-comments';\n }", "function block_core_social_link_get_icon($service)\n {\n }", "public function get_icon()\n {\n return 'fa fa-filter';\n }", "function image() {\n return data_field_admin::field_icon($this);\n }", "function emc_get_cpt_icon() {\r\n\r\n\t$cpt = get_post_type();\r\n\r\n\tswitch ( $cpt ) {\r\n\t\tcase 'emc_big_idea':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Big Ideas', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_content_focus':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Foundational Math Concepts', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_common_core':\r\n\t\t\t$icon = 'star';\r\n\t\t\t$alt = __( 'Star icon for Common Core Alignment', 'emc' );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t$url = get_template_directory_uri() . '/img/' . $icon . '.png';\r\n\t$html = sprintf( '<div class=\"emc-format\"><img class=\"emc-format-icon\" src=\"%1$s\" alt=\"%2$s\"/></div><!-- .emc-format -->',\r\n\t\tesc_url( $url ),\r\n\t\tesc_attr( $alt )\r\n\t);\r\n\r\n\treturn $html;\r\n\r\n}", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->_icon;\n }", "function translate_status_into_img($status, $type, $size = 16)\r\n\t{\r\n\t\t$statut_str = '';\r\n\t\t$statut = Sql::get_row_from_query(sprintf(\"SELECT name, icon FROM \" . TABLES__STATUTS . \" WHERE statut = '%d' AND type = '%s'\", $status, $type));\r\n\t\tif (!empty($statut))\r\n\t\t{\r\n\t\t\t$statut_str = '<img src=\"' . ROOT_PATH . 'core/images/icons/' . $statut['icon'] . '_' . $size . 'x' . $size . '.png\" alt=\"' . $statut['name'] . '\" title=\"' . $statut['name'] . '\" style=\"vertical-align:middle;\" />';\r\n\t\t}\r\n\t\treturn $statut_str;\r\n\t}", "function get_screen_icon()\n {\n }", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getItemIcon()\n {\n return $this->stripTags($this->getEntity()->getData('list_item_icon'));\n }", "public function getIcon() {\n return $this->icon;\n }", "public function getIcon() {\n return $this->icon;\n }", "function getFlagIcon ($aFlags, $icon_theme_path) {\n /**\n * 0 = unseen\n * 1 = seen\n * 2 = deleted\n * 3 = deleted seen\n * 4 = answered\n * 5 = answered seen\n * 6 = answered deleted\n * 7 = answered deleted seen\n * 8 = flagged\n * 9 = flagged seen\n * 10 = flagged deleted\n * 11 = flagged deleted seen\n * 12 = flagged answered\n * 13 = flagged aswered seen\n * 14 = flagged answered deleted\n * 15 = flagged anserwed deleted seen\n * ...\n * 32 = forwarded\n * 33 = forwarded seen\n * 34 = forwarded deleted\n * 35 = forwarded deleted seen\n * ...\n * 41 = flagged forwarded seen\n * 42 = flagged forwarded deleted\n * 43 = flagged forwarded deleted seen\n */\n\n /**\n * Use static vars to avoid initialisation of the array on each displayed row\n */\n global $nbsp;\n static $flag_icons, $flag_values;\n if (!isset($flag_icons)) {\n // This is by no means complete...\n $flag_icons = array ( \n // Image icon name Text Icon Alt/Title Text\n // --------------- --------- --------------\n array ('msg_new.png', $nbsp, '('._(\"New\").')') ,\n array ('msg_read.png', $nbsp, '('._(\"Read\").')'),\n // i18n: \"D\" is short for \"Deleted\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_deleted.png', _(\"D\"), '('._(\"Deleted\").')'),\n array ('msg_read_deleted.png', _(\"D\"), '('._(\"Deleted\").')'),\n // i18n: \"A\" is short for \"Answered\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_reply.png', _(\"A\"), '('._(\"Answered\").')'),\n array ('msg_read_reply.png', _(\"A\"), '('._(\"Answered\").')'),\n array ('msg_new_deleted_reply.png', _(\"D\"), '('._(\"Answered\").')'),\n array ('msg_read_deleted_reply.png', _(\"D\"), '('._(\"Answered\").')'),\n // i18n: \"F\" is short for \"Flagged\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n // i18n: \"O\" is short for \"Forwarded\". Make sure that two icon strings aren't translated to the same character (only in 1.5).\n array ('msg_new_forwarded.png', _(\"O\"), '('._(\"Forwarded\").')'),\n array ('msg_read_forwarded.png', _(\"O\"), '('._(\"Forwarded\").')'),\n array ('msg_new_deleted_forwarded.png', _(\"D\"), '('._(\"Forwarded\").')'),\n array ('msg_read_deleted_forwarded.png', _(\"D\"), '('._(\"Forwarded\").')'),\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n FALSE,\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n array ('flagged.png', _(\"F\"), '('._(\"Flagged\").')'),\n );\n \n $flag_values = array('seen' => 1,\n 'deleted' => 2,\n 'answered' => 4,\n 'flagged' => 8,\n 'draft' => 16,\n 'forwarded' => 32);\n }\n\n /**\n * The flags entry contain all items displayed in the flag column.\n */\n $icon = '';\n\n $index = 0;\n foreach ($aFlags as $flag => $flagvalue) {\n switch ($flag) {\n case 'deleted':\n case 'answered':\n case 'forwarded':\n case 'seen':\n case 'flagged': if ($flagvalue) $index += $flag_values[$flag]; break;\n default: break;\n }\n }\n \n if (!empty($flag_icons[$index])) {\n $data = $flag_icons[$index];\n } else {\n//FIXME: previously this default was set to the last value of the $flag_icons array (when it was index 15 - flagged anserwed deleted seen) but I don't understand why... am changing it to flagged (index 15 just shows (only) the flag icon anyway)\n $data = $flag_icons[8]; // default to just flagged\n }\n\n $icon = getIcon($icon_theme_path, $data[0], $data[1], $data[2]);\n return $icon;\n}", "function translate_status_into_img_and_text($status, $type, $size = 16)\r\n\t{\r\n\t\t$statut_str = '';\r\n\t\t$statut = Sql::get_row_from_query(sprintf(\"SELECT name, icon FROM \" . TABLES__STATUTS . \" \r\n\t\tWHERE statut = '%d' AND type = '%s'\", $status, $type));\r\n\t\tif (!empty($statut))\r\n\t\t{\r\n\t\t\t$statut_str = '<img src=\"' . ROOT_PATH . 'core/images/icons/' . $statut['icon'] . '_' . $size . 'x' . $size . '.png\" title=\"' . $statut['name'] . '\" align=\"left\" style=\"margin-right:5px;\" /> '.$statut['name'];\r\n\t\t}\r\n\t\treturn $statut_str;\r\n\t}", "function atom_site_icon()\n {\n }", "public static function getFactoryIconUseIt() {\n }", "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "public function get_icon() {\n\t\tglobal $wc_authorize_sim;\n\n\t\t$icon = '';\n\n\t\t$icon = '<img src=\"' . esc_url( $wc_authorize_sim->force_ssl( $wc_authorize_sim->plugins_url('assets/images/authorize-net-co.png') ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\n\n\t\treturn apply_filters( 'woocommerce_authorize_sim_icon', $icon, $this->id );\n\t}", "public function getIcon() {\n if($this->items!==false)\n return @current($this->items)->user->profile_image_url;\n return false;\n }", "function getStatusImage(){\r\n\t\t$retval=\"gray.gif\";\r\n\t\tswitch ($this->status) {\r\n\t\t\tcase 0: $retval = \"black.gif\";break;\r\n\t\t\tcase 1: $retval = \"red.gif\";break;\r\n\t\t\tcase 2: $retval = \"orange.gif\";break;\r\n\t\t\tcase 3: $retval = \"yellow.gif\";break;\r\n\t\t\tcase 4: $retval = \"lila.gif\";break;\r\n\t\t\tcase 5: $retval = \"green.gif\";break;\r\n\t\t\tdefault: $retval=\"gray.gif\";\r\n\t\t}\r\n\t\treturn $retval;\r\n\t}", "function rss2_site_icon()\n {\n }", "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "public static function type_return_icon($type_id)\n {\n switch($type_id):\n case '101';\n return \"<i class=\\\"fa fa-beer fa-1x\\\"></i>\";\n break;\n case '102';\n return \"<i class=\\\"fa fa-thumbs-o-up fa-1x\\\"></i>\";\n break;\n case '103';\n break;\n case '200';\n return \"<i class=\\\"fa fa-picture-o fa-1x\\\"></i>\";\n break;\n case '300';\n return \"<i class=\\\"fa fa-map-marker fa-1x\\\"></i>\";\n break;\n endswitch;\n }", "public static function getTypeIcon($type_id)\n {\n $db = JFactory::getDbo();\n $db->setQuery(\"Select type_icon from #__osrs_types where id = '$type_id'\");\n $type_icon = $db->loadResult();\n if($type_icon == \"\"){\n $type_icon = \"1.png\";\n }\n return $type_icon;\n }", "public function iconoEstadoActual(){\n //pendiente -> preparando ->preparado ->entregada->finalizada\n switch ($this->codEstado) {\n\n case 1: //estado pendiente\n return 'fas fa-clock';\n break;\n case 2: //estado pendiente\n return 'fas fa-fire';\n break; \n case 3: //estado preparando\n return 'fas fa-check';\n break; \n case 4: //estado preparado\n return 'fas fa-check-double'; \n break; \n case 5: //estado entregado\n # code...\n break; \n \n\n default:\n # code...\n break;\n }\n\n\n }", "public function iconUrl(): string\n {\n return $this->pluck('trophyTitleIconUrl');\n }", "public function getIconForResourceWithOpenFolderReturnsOpenFolderIcon() {}", "public function getIcon()\n {\n return $this->Icon;\n }", "public function get_icon()\n {\n return 'fa fa-heading';\n }", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function get_icon()\n {\n return 'eicon-posts-ticker';\n }", "public function get_icon()\n {\n return 'eicon-posts-ticker';\n }", "public function getSvgIcon();", "public function getIconForRecordWithMockRecordReturnsNormalIcon() {}", "function get_text_icon($page_id)\n {\n $this->db->select(array(\n 'id',\n 'page_id',\n 'icon',\n 'title',\n 'icon_shape',\n 'sort_order',\n 'status'\n ));\n \n $this->db->where(array(\n 'page_id' => $page_id,\n 'is_deleted' => 0\n ));\n \n $this->db->order_by('id', 'desc');\n $query = $this->db->get($this->table_name);\n $records = array();\n if ($query->num_rows() > 0):\n $records = $query->result();\n endif;\n return $records;\n }", "function emc_get_tax_icon( $taxonomy ) {\r\n\r\n\tif ( isset( $taxonomy ) ){\r\n\t\t$tax_slug = $taxonomy;\r\n\t} else {\r\n\t\tglobal $wp_query;\r\n\t\t$tax = $wp_query->get_queried_object();\r\n\t\t$tax_slug = $tax->taxonomy;\r\n\t}\r\n\r\n\tswitch ( $tax_slug ) {\r\n\t\tcase 'emc_big_idea':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Big Ideas', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_tax_found':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Foundational Math Concepts', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_tax_common_core':\r\n\t\t\t$icon = 'star';\r\n\t\t\t$alt = __( 'Star icon for Common Core Alignment', 'emc' );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t$url = get_template_directory_uri() . '/img/' . $icon . '.png';\r\n\t$html = sprintf( '<div class=\"emc-format\"><img class=\"emc-format-icon\" src=\"%1$s\" alt=\"%2$s\"/></div><!-- .emc-format -->',\r\n\t\tesc_url( $url ),\r\n\t\tesc_attr( $alt )\r\n\t);\r\n\r\n\treturn $html;\r\n\r\n}", "function amap_ma_get_entity_icon($u) {\n if (elgg_instanceof($u, 'user')) {\n $user_icon = amap_ma_get_marker_icon('membersmap');\n if ($user_icon == 'user_icon_tiny.png') {\n $entity_icon = $u->getIconURL('tiny');\n } \n else if ($user_icon == 'user_icon_small.png') {\n $entity_icon = $u->getIconURL('small');\n } \n else {\n $entity_icon = elgg_get_simplecache_url('membersmap/icon/' . amap_ma_get_marker_icon('membersmap'));\n// $entity_icon = elgg_get_site_url() . \"mod/membersmap/graphics/{$user_icon}\";\n }\n } else if (elgg_instanceof($u, 'group')) {\n $entity_icon = elgg_get_simplecache_url('groupsmap/icon/' . amap_ma_get_marker_icon('groupsmap'));\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $adicon = amap_ma_get_marker_icon('agora');\n if ($adicon == 'ad_image.png') {\n $entity_icon = $u->getIconURL('tiny');\n } else {\n $entity_icon = elgg_get_site_url() . 'mod/agora/graphics/' . amap_ma_get_marker_icon('agora');\n }\n }\n else if (elgg_instanceof($u, 'object', 'lcourt')) {\n $entity_icon = elgg_get_simplecache_url('leaguemanager/icon/icons/stadium.png');\n } \n else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = elgg_get_simplecache_url('pagesmap/icon/' . amap_ma_get_marker_icon('pagesmap'));\n }\n else if (elgg_instanceof($u, 'object', 'image')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = $u->getIconURL('tiny');\n $entity_icon = elgg_get_simplecache_url('photosmap/icon/photography.png');\n }\n \n return $entity_icon;\n}", "function VM_statusIcons($param)\n{\n\t//Exit the function if the client has nox VMs\n\tif ($param['vmRole'] == VM_ROLE_NONE)\n\t\treturn(\"\");\n\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t$html = \"\";\n\n\t//Array with status icon and description for the virtualsiation soulutions on host and guest.\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][0] = \"vm-server-vbox-mini.png\";\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][1] = $I18N_VMServerVBox;\n\t$imgA['VM_ROLE_HOST']['VM_SW_VBOX'][2] = \"index.php?page=clientsoverview&vmRunOnHost=$param[id]\";\n\n//\t$imgA['VM_ROLE_HOST']['VM_SW_KVM'][0] = \"vm-server-mini.png\";\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][0] = \"vm-client-vbox-mini.png\";\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][1] = $I18N_VMClientVBox;\n\t$imgA['VM_ROLE_GUEST']['VM_SW_VBOX'][2] = \"index.php?page=clientdetails&client=$param[client]&id=$param[id]#virtualisation\";\n\n\t//Run thru all known roles\n\tforeach (array_keys($imgA) as $role)\n\t{\n\t\t//Check if the client is in a special role\n\t\tif (($param['vmRole'] & $role) == $role)\n\t\t\t//Check if the client uses a special virtualisation software in this rule\n\t\t\tforeach (array_keys($imgA[$role]) as $vmSW)\n\t\t\t\t//Choose the icon and title by role and virtualisation software\n\t\t\t\tif (($param['vmSoftware'] & $vmSW) == $vmSW)\n\t\t\t\t\t$html .= '<a href=\"'.$imgA[$role][$vmSW][2].'\"><img src=\"/gfx/'.$imgA[$role][$vmSW][0].'\" title=\"'.$imgA[$role][$vmSW][1].'\" border=0></a> ';\n\t}\n\treturn($html);\n}", "function thememount_entry_icon( $echo = false ) {\n\t$postFormat = get_post_format();\n\tif( is_sticky() ){ $postFormat = 'sticky'; }\n\t$icon = 'pencil';\n\tswitch($postFormat){\n\t\tcase 'sticky':\n\t\t\t$icon = 'thumb-tack';\n\t\t\tbreak;\n\t\tcase 'aside':\n\t\t\t$icon = 'thumb-tack';\n\t\t\tbreak;\n\t\tcase 'audio':\n\t\t\t$icon = 'music';\n\t\t\tbreak;\n\t\tcase 'chat':\n\t\t\t$icon = 'comments';\n\t\t\tbreak;\n\t\tcase 'gallery':\n\t\t\t$icon = 'files-o';\n\t\t\tbreak;\n\t\tcase 'image':\n\t\t\t$icon = 'photo';\n\t\t\tbreak;\n\t\tcase 'link':\n\t\t\t$icon = 'link';\n\t\t\tbreak;\n\t\tcase 'quote':\n\t\t\t$icon = 'quote-left';\n\t\t\tbreak;\n\t\tcase 'status':\n\t\t\t$icon = 'envelope-o';\n\t\t\tbreak;\n\t\tcase 'video':\n\t\t\t$icon = 'film';\n\t\t\tbreak;\n\t}\n\t\n\t$iconCode = '<div class=\"thememount-post-icon-wrapper\">';\n\t\t$iconCode .= '<i class=\"tmicon-fa-'.$icon.'\"></i>';\n\t$iconCode .= '</div>';\n\t\n\t\n\t\n\t\n\t\n\tif ( $echo ){\n\t\techo $iconCode;\n\t} else {\n\t\treturn $iconCode;\n\t}\n}", "public function get_icon()\r\n {\r\n return 'eicon-posts-justified';\r\n }", "public static function iconPath()\n {\n return Craft::getAlias('@seibertio/elasticsearch/icon.svg');\n }", "public function getIconForResourceWithPngFileReturnsIcon() {}", "public function getCardIcon($type) {\n return $this->iconsProvider->getIcons()[$type];\n }", "public function getIcon()\n {\n return empty($this->model->icon) ? 'globe' : $this->model->icon;\n }", "public function status_cls($status){\n\t\tif($status == '1'){\n\t\t $stat = 'img/active.png';\n\t\t}else{\t\n\t\t $stat = 'img/inactive.png';\t\n\t\t}\n\t\treturn $stat;\n\t}", "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "public function getIconMimeType() {}", "public function get_icon() {\n\t\treturn 'fa fa-cloud';\n\t}" ]
[ "0.7374917", "0.67964995", "0.66391575", "0.65576637", "0.6516822", "0.6516822", "0.65031403", "0.6498261", "0.6487382", "0.64755684", "0.6431907", "0.64089066", "0.64089066", "0.6342391", "0.6330536", "0.6273505", "0.61845374", "0.6167147", "0.6146151", "0.6144702", "0.6135867", "0.6128883", "0.61263996", "0.6116791", "0.6111441", "0.60695696", "0.60587627", "0.6055736", "0.6050765", "0.6043041", "0.6026926", "0.6014439", "0.6014439", "0.5999722", "0.59939563", "0.59861153", "0.5985076", "0.59770244", "0.59575146", "0.59514713", "0.5935699", "0.5931747", "0.59271425", "0.592251", "0.5920249", "0.59201336", "0.5916612", "0.5913438", "0.5913438", "0.5913438", "0.5913438", "0.5913438", "0.5913438", "0.5913438", "0.58960456", "0.58781546", "0.58678216", "0.58654815", "0.58654815", "0.58646756", "0.58646756", "0.58622426", "0.58610016", "0.58610016", "0.5859399", "0.58582896", "0.58502024", "0.58393246", "0.5837112", "0.5836337", "0.58334774", "0.5827679", "0.58268887", "0.58119637", "0.58074844", "0.57888997", "0.5782962", "0.5782182", "0.5776653", "0.5759645", "0.5758879", "0.5746233", "0.57442015", "0.57442015", "0.57404107", "0.57390606", "0.5736792", "0.5734921", "0.5720374", "0.57192653", "0.5714967", "0.5707016", "0.5688383", "0.5687986", "0.5663939", "0.5657327", "0.5652008", "0.5645137", "0.56354356", "0.56323403" ]
0.69422144
1
Check if article is published published = status = published and datePublish >= now and dateUnpublish == null or now < dateUnpublish
function isPublished() { if ($this->status == 'published') { $now = time(); if ($this->datePublish <= $now) { if ($this->dateUnpublish > $now || $this->dateUnpublish == null) { return true; } else { return false; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPublished()\n {\n # code...\n return !is_null($this->published_at) && $this->published_at < today();\n }", "public function isPublished()\n {\n return $this->published_at->lte(Carbon::now());\n }", "public function publishedStatus()\n {\n if ( !$this->owner->getScheduledStatus() && !$this->owner->getExpiredStatus() ) {\n return true;\n }\n\n return false;\n }", "protected function _publish_status()\n\t{\n\t\t//$fields = $this->fields();\n\t\t$fields = $fields = array_keys($this->table_info()); // used to prevent an additional query that the fields() method would create\n\n\t\tif (in_array('published', $fields))\n\t\t{\n\t\t\tif (in_array('published', $this->boolean_fields))\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.published' => 1));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.published' => 'yes'));\n\t\t\t}\n\t\t}\n\n\t\tif (in_array('active', $fields))\n\t\t{\n\t\t\tif (in_array('active', $this->boolean_fields))\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.active' => 1));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->where(array($this->table_name.'.active' => 'yes'));\n\t\t\t}\n\t\t}\n\n\t\tif (in_array('publish_date', $fields))\n\t\t{\n\t\t\t$this->db->where(array($this->table_name.'.publish_date <=' => datetime_now()));\n\t\t}\n\t}", "public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }", "public function isPublished()\n\t{\n\t\tif (!$this->arrData['published'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif ($this->arrData['start'] > 0 && $this->arrData['start'] > time())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telseif ($this->arrData['stop'] > 0 && $this->arrData['stop'] < time())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function isPublished()\n {\n return $this->postID > 0;\n }", "public function isPublished()\n {\n if (\n $this->getStatus() === PageStatus::PUBLISHED ||\n ($this->getStatus() === PageStatus::SCHEDULED &&\n $this->getPublishedAt() < new \\DateTime())\n ) {\n return true;\n } else {\n return false;\n }\n }", "function isPublished(){\n\t\tif($this->isPublished == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isPublished()\n {\n if ($this->getStatus() === self::PUBLISHED) {\n return true;\n }\n\n if ($this->getStatus() === self::SCHEDULED) {\n return $this->getPublishedAt() <= new \\DateTime();\n }\n\n return false;\n }", "public function isPublished()\n {\n return $this->publish_status == Status::PUBLISHED;\n }", "function exa_is_published_today( $post ) {\n\t$post = get_post($post);\n\t$postTime = get_post_time('U',true);\n\t$today = strtotime('midnight',current_time('timestamp'));\n\treturn ($postTime >= $today);\n}", "public function isPublished(): bool\n {\n $publishedStatus = ['publish'];\n\n return in_array($this->status, $publishedStatus);\n }", "public function isPublished()\n {\n return ($this->published == 1);\n }", "public function isPublished()\n {\n return $this->status == static::PUBLISHED;\n }", "public function hasPublished() {\n return $this->_has(6);\n }", "public function justPublished()\n {\n\n return $this->created_at->gt(Carbon::now()->subMinute());\n }", "public function hasPublished() {\n return $this->_has(14);\n }", "public function getIsUnPublishScheduled()\n {\n /** @var DBDatetime $unpublish */\n $unpublish = $this->owner->dbObject('UnPublishOnDate');\n\n if ($unpublish->InFuture()) {\n return true;\n }\n\n if ((int) $this->owner->UnPublishJobID !== 0) {\n return true;\n }\n\n return false;\n }", "public function isPublishedField()\n {\n return $this->get('check_publish') == 1;\n }", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished();", "public function isPublished()\n {\n return $this->attribute('state') == self::STATUS_PUBLISHED;\n }", "function is_published($arr = '')\n\t{\n\t\tif ( !is_array($arr) )\n\t\t{\n\t\t\techo \"You must send is_published() an array\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$publish_test = $this->get_pages(array('published'=>true,'fields'=>'published_datetime', 'id'=>$arr['page_id'],'skip_content'=>true,'limit'=>1));\n\n\t\t//if this comes back false, then we know it's not published\n\t\tif ( !$publish_test )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//if we get this far, we found a page\n\t\treturn $publish_test[0]['published_datetime'];\t\t\n\t}", "public function isPublished()\n\t{\n\t\treturn ($this->get('published') == self::STATE_PUBLISHED);\n\t}", "function block_core_calendar_update_has_published_posts()\n {\n }", "public function getIsPublishScheduled()\n {\n /** @var DBDatetime $publishTime */\n $publishTime = $this->owner->dbObject('PublishOnDate');\n\n if ($publishTime->InFuture()) {\n return true;\n }\n\n if ((int) $this->owner->PublishJobID !== 0) {\n return true;\n }\n\n return false;\n }", "public function hasPubDate(): bool\n {\n return null !== $this->pubDate;\n }", "public function testPublished()\n {\n $feed = $this->eventFeed;\n\n // Assert that all entry's have an Atom Published object\n foreach ($feed as $entry) {\n $this->assertTrue($entry->getPublished() instanceof Zend_Gdata_App_Extension_Published);\n }\n\n // Assert one of the entry's Published dates\n $entry = $feed[2];\n $this->verifyProperty2($entry, \"published\", \"text\", \"2007-05-09T16:44:38.000Z\");\n }", "function block_core_calendar_has_published_posts()\n {\n }", "function published_is_latest($published_datetime,$page_id)\n\t{\n\t\t//$publish_results = $this->get_pages(array('published'=>true,'fields'=>'published_datetime','id'=>$arr['page_id'],'skip_content'=>true,'order_by'=>'published_datetime DESC','limit'=>1));\n\t\t$edit_results = $this->get_pages(array('fields'=>'edited_datetime','id'=>$page_id,'skip_content'=>true,'limit'=>1));\n\t\t\n\t\t$return_array = array();\n\t\t\n\t\t//echo \"<BR>\".$page_id.' - '.$published_datetime.' - '.$edit_results[0]['edited_datetime'].\"<BR>\";\n\t\t\n\t\tif ( strtotime($published_datetime) > strtotime($edit_results[0]['edited_datetime']) )\n\t\t{\n\t\t\t$return_array['result'] = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return_array['result'] = false;\n\t\t}\n\n\t\t$return_array['last_publish_date'] = $published_datetime;\n\t\t\n\t\treturn $return_array;\n\t}", "public function check() {\n\n // Set name\n $this->title = htmlspecialchars_decode($this->title, ENT_QUOTES);\n\n // Set alias\n $this->alias = JApplication::stringURLSafe($this->alias);\n if (empty($this->alias)) {\n $this->alias = JApplication::stringURLSafe($this->title);\n }\n\n // Check the publish down date is not earlier than publish up.\n if ($this->publish_down > $this->_db->getNullDate() && $this->publish_down < $this->publish_up) {\n $this->setError(JText::_('JGLOBAL_START_PUBLISH_AFTER_FINISH'));\n return false;\n }\n\n return true;\n }", "public function isPubliclyAvailable() {\n $id = $this->getID();\n $the_post = $this->find('first', array(\n 'conditions' => array(\n 'Post.id' => $id,\n ),\n 'fields' => array(\n 'Post.enabled',\n 'Post.published',\n ),\n 'recursive' => -1,\n 'callbacks' => false,\n ));\n\n $invalid_post = empty($the_post);\n\n// Don't try to process any more logic unless we know the Post even exists.\n if ($invalid_post) {\n return false;\n }\n\n $disabled_post = $the_post['Post']['enabled'] === false;\n $unpublished_post = new DateTime($the_post['Post']['published']) > new DateTime();\n\n if ($disabled_post || $unpublished_post) {\n return false;\n }\n else {\n return true;\n }\n }", "protected function isPublished()\n\t{\n\t\tif($this->blnIsPublished !== null)\n\t\t{\n\t\t\treturn $this->blnIsPublished;\n\t\t}\n\t\t\n\t\tif($this->blnParentView)\n\t\t{\n\t\t\t$strQuery = 'SELECT published FROM ' . $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . ' WHERE id=' . $this->intId;\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$strQuery \t= 'SELECT published FROM ' . $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] \n\t\t\t\t\t\t. ' WHERE id=(SELECT pid FROM ' . $this->strTable . ' WHERE id=' . $this->intId . ')';\n\t\t}\n\n\t\t$this->blnIsPublished = (bool) $this->Database->query($strQuery)->published;\n\t\treturn $this->blnIsPublished;\n\t}", "protected function hasAccessOnPublished()\n\t{\n\t\treturn $this->User->hasAccess($GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . '::published', 'alexf');\t\t\n\t}", "function publish() {\n\t\tif (! $this->id) {\n\t\t\treturn false;\n\t\t}\n\t\t/* This method formerly updated the published_date, but that was removed in \n\t\t * favor of giving manual control of the published_date to the author\n\t\t * $this->saveField('published_date', date('Y-m-d', time()).' 00:00:00') */\n\t\treturn $this->saveField('is_published', 1);\n\t}", "public function testIsUnPublishScheduled()\n {\n $page = SiteTree::create();\n $page->Title = 'My page';\n $page->PublishOnDate = '2010-01-01 00:00:00';\n $page->AllowEmbargoedEditing = false;\n $page->write();\n\n $this->assertFalse($page->getIsUnPublishScheduled());\n\n $page->UnPublishOnDate = '2016-02-01 00:00:00';\n DBDatetime::set_mock_now('2016-01-16 00:00:00');\n $this->assertTrue($page->getIsUnPublishScheduled());\n\n DBDatetime::set_mock_now('2016-02-16 00:00:00');\n $this->assertFalse($page->getIsUnPublishScheduled());\n }", "public function hasPublishedTag() {\n return $this->_has(1);\n }", "function unpublish() {\n\t\tif (! $this->id) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->saveField('is_published', 0);\n\t}", "public function has_published_pages()\n {\n }", "public function products_could_be_queried_with_published_status()\n {\n $publishedProductQty = random_int(1, 10);\n factory(Product::class, $publishedProductQty)\n ->states('published')\n ->create();\n\n $unpublishedProductQty = random_int(1, 10);\n factory(Product::class, $unpublishedProductQty)\n ->states('unpublished')\n ->create();\n\n //status\n //act + assert\n $queryResult = $this->productFilter->getList(['published' => true]);\n $this->assertCount($publishedProductQty, $queryResult);\n\n //act + assert\n $queryResult = $this->productFilter->getList(['published' => false]);\n $this->assertCount($unpublishedProductQty, $queryResult);\n }", "function check_and_publish_future_post($post)\n {\n }", "public function testIsPublishing()\n {\n $this->assertFalse(LivePubHelper::is_publishing());\n\n LivePubHelper::init_pub();\n $this->assertTrue(LivePubHelper::is_publishing());\n\n LivePubHelper::stop_pub();\n $this->assertFalse(LivePubHelper::is_publishing());\n }", "function block_core_calendar_update_has_published_posts() {\n\tglobal $wpdb;\n\t$has_published_posts = (bool) $wpdb->get_var( \"SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1\" );\n\tupdate_option( 'wp_calendar_block_has_published_posts', $has_published_posts );\n\treturn $has_published_posts;\n}", "function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) {\n\t$post_type_obj = get_post_type_object( $post->post_type );\n\tif ( ! $post_type_obj || ! $post_type_obj->public ) {\n\t\treturn;\n\t}\n\n\tif ( 'publish' != $new_status && 'publish' != $old_status ) {\n\t\treturn;\n\t}\n\n\t// Post was freshly published, published post was saved, or published post was unpublished.\n\n\twpmu_update_blogs_date();\n}", "function _update_blog_date_on_post_publish($new_status, $old_status, $post)\n {\n }", "function exa_is_published_this_year( $post ) {\n\t$post = get_post($post);\n\t$postTime = strtotime($post->post_date);\n\t$firstDayOfYear = strtotime(date('Y-01-01'));\n\treturn ($postTime >= $firstDayOfYear);\n}", "protected function hasPublishedVersion(): bool {\n $revision = $this->getCurrentRevision();\n if (NULL === $revision) {\n return FALSE;\n }\n\n return $revision->isPublished();\n }", "public function shouldBePublished()\n {\n return $this->publish;\n }", "private function publishUnpublishSchedule($status, $date_published)\n {\n if(isset($_POST[\"selection\"]) && !empty($_POST[\"selection\"]))\n {\n //if user wants to schedule, get date\n if($date_published==Story::STATUS_SCHEDULE)\n {\n $date_published=$_POST[\"Story\"][\"date_published\"];\n if(empty($date_published))\n {\n Yii::$app->session->setFlash('danger', Yii::t('app', 'Select the date'));\n return $this->goBack();\n }\n\n }\n\n $selection=$_POST[\"selection\"]; //it is checkbox array and value is \"id\" in Story\n foreach ($selection as $key=>$IDstory)\n {\n $story=Story::findOne($IDstory);\n if($date_published==NULL)//unpublish story but leave last date_published\n $date_published=$story->date_published;\n\n $story->status = $status;\n $story->date_published = $date_published;\n $story->date_modified = date(\"Y-m-d H:i:s\"); //this is necesary because of cache dependancy so cache can change\n $story->save(false, ['status', 'date_published', 'date_modified']);\n }\n Yii::$app->session->setFlash('success', Yii::t('app', 'Everything went fine'));\n }\n else\n Yii::$app->session->setFlash('danger', Yii::t('app', 'Something was wrong'));\n\n return $this->goBack();\n }", "function checkPublish(){\n\t\trequire('variables.php');\t\t\n\t\t// check the number of results\n\t\t$numResults = $this->getResults(\"count\");\n\t\t// check the number of questions\n\t\t$numQuestions = $this->getQuestions(\"count\");\n\t\t// check the number of options\n\t\t$listQuestion = explode(',', $this->getQuestions());\n\t\t\n\t\tif($numQuestions != 0){\n\t\t\t$questionState = true;\n\t\t\t$optionState = true;\n\t\t\tforeach($listQuestion as $question){\n\t\t\t\t// check the number of options for this question\n\t\t\t\t$numOptions = $this->getOptions($question, \"count\");\n\t\t\t\tif($numOptions < $VAR_QUIZ_MIN_OPTIONS){\n\t\t\t\t\t$optionState = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$questionState = false;\n\t\t\t$optionState = false;\n\t\t}\n\t\t// run through the checks, return false if failed\n\t\tif($numResults < $VAR_QUIZ_MIN_RESULT || $numQuestions < $VAR_QUIZ_MIN_QUESTIONS || !$optionState){\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "private function requested_post_is_valid(){\n return (get_post_type((int) $_GET['post_id']) === $this->post_type && get_post_status((int) $_GET['post_id']) === 'publish');\n }", "public function testIsPublishScheduled()\n {\n $page = SiteTree::create();\n $page->Title = 'My page';\n $page->PublishOnDate = '2010-01-01 00:00:00';\n $page->AllowEmbargoedEditing = false;\n $page->write();\n\n $this->assertFalse($page->getIsPublishScheduled());\n\n $page->PublishOnDate = '2016-02-01 00:00:00';\n DBDatetime::set_mock_now('2016-01-16 00:00:00');\n $this->assertTrue($page->getIsPublishScheduled());\n\n DBDatetime::set_mock_now('2016-02-16 00:00:00');\n $this->assertFalse($page->getIsPublishScheduled());\n }", "private function usort_published ( $a, $b ) {\n\t\treturn $a->post_date < $b->post_date;\n\t}", "function timeSincePublish($pub_date){\r\n\t\t\t$now_date = date('U');\r\n\t\t\t$since_date = $now_date - $pub_date;\r\n\t\t\t$since_hours = floor($since_date / 60 / 60);\r\n\t\t\t$since_days = floor($since_hours / 24);\r\n\t\t\r\n\t\t\t?><span style=\"display:none;\"><?php echo $pub_date; ?></span><?php\r\n\t\t\r\n\t\t\tif($since_hours<1 && $since_days<1){\r\n\t\t\t?><em>recently</em><?php\r\n\t\t\t}elseif($since_hours>=1 && $since_days<1){\r\n\t\t\t?><em><?=$since_hours?> hour<?= ($since_hours>1 ? 's':''); ?> ago</em><?php\r\n\t\t\t}elseif($since_hours>1 && $since_days>=1){\r\n\t\t\t?><em><?= ($since_days==1 ? 'yesterday':$since_days.' days ago'); ?></em><?php\r\n\t\t\t}\r\n\t\t}", "public function scopePublished($query){ \n \t$query->where('published_at','<=',Carbon::now());\n }", "function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {\n\t\tif ( $new_status === $old_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'post' !== get_post_type( $post ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'publish' !== $new_status && 'publish' !== $old_status ) {\n\t\t\treturn;\n\t\t}\n\n\t\tblock_core_calendar_update_has_published_posts();\n\t}", "public function isActive()\n {\n return $this->isPublished();\n }", "public function is_container_viewable( $args ) {\n\n\t\t\t// Published, all can see.\n\t\t\tif ( 'published' === $args['status'] || '' === $args['status'] ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// If is author, can also see.\n\t\t\tif ( is_user_logged_in() && current_user_can( 'publish_posts' ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Set to hide.\n\t\t\tif ( 'draft' === $args['status'] ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Set to show until or after.\n\t\t\t$time_check = strtotime( $args['publish_date'] );\n\t\t\t$wp_local_time = current_time( 'timestamp' );\n\t\t\tif ( '' !== $args['publish_date'] && $time_check ) {\n\t\t\t\tif ( 'published_until' === $args['status'] ) {\n\t\t\t\t\treturn $wp_local_time < $time_check;\n\t\t\t\t}\n\t\t\t\tif ( 'publish_after' === $args['status'] ) {\n\t\t\t\t\treturn $wp_local_time > $time_check;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Any incorrect set-up default to show.\n\t\t\treturn true;\n\t\t}", "public function getPublishStatusAttribute()\n {\n $value = $this->content->publish_status;\n $publish_date = date('Y-m-d H:i:s', strtotime($this->content->publish_date));\n\n if ($value === Status::PUBLISHED && $publish_date > Carbon::now()) {\n return Status::SCHEDULED;\n }\n return $value;\n }", "function is_publishable($product_id){\n $by = json_decode($this->db->get_where('product',array('product_id'=>$product_id))->row()->added_by,true);\n if($by['type'] == 'admin'){\n return true;\n } else if($by['type'] == 'vendor'){\n $vendor_status = $this->db->get_where('vendor',array('vendor_id'=>$by['id']))->row()->status;\n if ($vendor_status == 'approved') {\n return true;\n } else {\n return false;\n }\n }\n }", "private function updateUnPublishOnDate()\n {\n $this->owner->UnPublishOnDate = $this->owner->DesiredUnPublishDate;\n // Remove the DesiredUnPublishDate.\n $this->owner->DesiredUnPublishDate = null;\n }", "protected function _filter_on_published($on = TRUE, $lang = NULL)\n\t{\n\t\tif ($on === TRUE)\n\t\t{\n\t\t\t$this->{$this->db_group}->join(\n\t\t\t\t'article_lang',\n\t\t\t\t'article_lang.id_article = article.id_article',\n\t\t\t\t'left'\n\t\t\t);\n\n\t\t\tif ( ! is_null($lang))\n\t\t\t\t$this->{$this->db_group}->where('article_lang.lang', $lang);\n\n\t\t\t$this->{$this->db_group}->where('page_article.online', '1');\n\n\t\t\tif ($lang !== NULL && count(Settings::get_online_languages()) > 1)\n\t\t\t\t$this->{$this->db_group}->where('article_lang.online', '1');\n\n\t\t\t$this->{$this->db_group}->where('((article.publish_off > ', 'now()', FALSE);\n\t\t\t$this->{$this->db_group}->or_where('article.publish_off = ', '0)' , FALSE);\n\n\t\t\t$this->{$this->db_group}->where('(article.publish_on < ', 'now()', FALSE);\n\t\t\t$this->{$this->db_group}->or_where('article.publish_on = ', '0))' , FALSE);\n\t\t}\n\t}", "function block_core_calendar_update_has_published_post_on_transition_post_status($new_status, $old_status, $post)\n {\n }", "function documentIsPublished($iDocumentID) {\n\t\tglobal $default;\n\t\t$sQuery = \"SELECT id FROM $default->web_documents_table WHERE document_id = ? AND status_id = 2\";/*ok*/\n $aParams = array($iDocumentID);\n\t\t$sql = $default->db;\n\t\t$sql->query(array($sQuery, $aParams));\n\t\tif ($sql->next_record()) {\n\t\t\treturn true;;\n\t\t}\n\t\treturn false;\n\t}", "public function isArchived()\n {\n return $this->publish_status == Status::ARCHIVED;\n }", "public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }", "public function _common_query($display_unpublished_if_logged_in = NULL)\n\t{\n\t\tif (!isset($display_unpublished_if_logged_in))\n\t\t{\n\t\t\t$display_unpublished_if_logged_in = $this->display_unpublished_if_logged_in;\n\t\t}\n\t\t\n\t\tif ((!defined('FUEL_ADMIN') AND $display_unpublished_if_logged_in === FALSE) OR ($display_unpublished_if_logged_in AND !is_fuelified()))\n\t\t{\n\t\t\t$this->_publish_status();\n\t\t}\n\t}", "protected function doTestPublishedStatus() {\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n\n // Unpublish translations.\n foreach ($this->langcodes as $index => $langcode) {\n if ($index > 0) {\n $url = $entity->toUrl('edit-form', ['language' => ConfigurableLanguage::load($langcode)]);\n $edit = ['content_translation[status]' => FALSE];\n $this->drupalGet($url);\n $this->submitForm($edit, $this->getFormSubmitAction($entity, $langcode));\n $storage = $this->container->get('entity_type.manager')\n ->getStorage($this->entityTypeId);\n $storage->resetCache([$this->entityId]);\n $entity = $storage->load($this->entityId);\n $this->assertFalse($this->manager->getTranslationMetadata($entity->getTranslation($langcode))->isPublished(), 'The translation has been correctly unpublished.');\n }\n }\n\n // Check that the last published translation cannot be unpublished.\n $this->drupalGet($entity->toUrl('edit-form'));\n $this->assertSession()->fieldDisabled('content_translation[status]');\n $this->assertSession()->fieldValueEquals('content_translation[status]', TRUE);\n }", "function isPublished($row) {\n\t$checked = \"\";\n\tif($row[\"isPublished\"] >0 ) {\n\t\t$checked = \"checked\";\n\t} else {\n\t\t$checked = $checked;\n\t}\n}", "function exa_is_published_yesterday( $post ) {\n\t$post = get_post($post);\n\t$postTime = get_post_time('U',true);\n\t$firstDayOfYear = strtotime('yesterday',current_time('timestamp'));\n\treturn ($postTime >= $firstDayOfYear);\n}", "protected function shouldNotify(NewsItem $news_item)\n {\n return (\n $news_item->published_at\n && $news_item->published_at instanceof Carbon\n && $news_item->published_at->greaterThanOrEqualTo(now()->subMinute())\n );\n }", "public function checkPublishIdea($idea_id,$verion_id)\r\n {\r\n $model = new Ynidea_Model_DbTable_Ideas;\r\n $select = $model -> select()\r\n ->where('idea_id=?',$idea_id)\r\n ->where('version_id=?',$verion_id)\r\n ->where('publish_status=?','publish'); \r\n $row = $model->fetchRow($select); \r\n \r\n if($row)\r\n return true;\r\n else\r\n return false; \r\n }", "public function pages_awaiting_publishing()\n {\n if(isset($this->pages_awaiting_publishing)) return $this->pages_awaiting_publishing;\n $this->pages_awaiting_publishing = 0;\n \n $events_to_publish = array();\n $result = $this->mysqli_slave->query(\"SELECT he.resource_id, max(he.id) max FROM harvest_events he GROUP BY he.resource_id\");\n while($result && $row=$result->fetch_assoc())\n {\n $harvest_event = new HarvestEvent($row['max']);\n if(!$harvest_event->published_at) $events_to_publish[] = $harvest_event->id;\n }\n \n $result = $this->mysqli_slave->query(\"SELECT COUNT(DISTINCT(tc.id)) count FROM harvest_events_hierarchy_entries hehe JOIN hierarchy_entries he ON (hehe.hierarchy_entry_id=he.id) JOIN taxon_concepts tc ON (he.taxon_concept_id=tc.id) WHERE hehe.harvest_event_id IN (\".implode($events_to_publish, \",\").\") AND tc.published=0 AND tc.vetted_id=\". Vetted::find(\"trusted\"));\n if($result && $row=$result->fetch_assoc()) $this->pages_awaiting_publishing = $row['count'];\n return $this->pages_awaiting_publishing;\n }", "function documentIsPendingWebPublishing($iDocumentID) {\n\t\tglobal $default;\n\t\t$sQuery = \"SELECT id FROM $default->web_documents_table WHERE document_id = ? AND status_id = 1\";/*ok*/\n $aParams = array($iDocumentID);\n\t\t$sql = $default->db;\n\t\t$sql->query(array($sQuery, $aParams));\n\t\tif ($sql->next_record()) {\n\t\t\treturn true;;\n\t\t}\n\t\treturn false;\n\t}", "public function isActive()\n {\n return $this->is_published;\n }", "function block_core_calendar_has_published_posts() {\n\t// Multisite already has an option that stores the count of the published posts.\n\t// Let's use that for multisites.\n\tif ( is_multisite() ) {\n\t\treturn 0 < (int) get_option( 'post_count' );\n\t}\n\n\t// On single sites we try our own cached option first.\n\t$has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );\n\tif ( null !== $has_published_posts ) {\n\t\treturn (bool) $has_published_posts;\n\t}\n\n\t// No cache hit, let's update the cache and return the cached value.\n\treturn block_core_calendar_update_has_published_posts();\n}", "protected function canBeRepublished(): bool {\n $revision = $this->nodeRevisionManager->loadLatestPublishedRevision($this->node());\n if (NULL === $revision) {\n return FALSE;\n }\n\n return !$this->node()->isPublished();\n }", "public function check() {\n\t\t$result = true;\n\t\t\n\t\tif(empty($this->user_id)) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_USER_ID'));\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\tif(empty($this->akeebasubs_level_id)) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_LEVEL_ID'));\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\tif(empty($this->publish_up)) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PUBLISH_UP'));\n\t\t\t$result = false;\n\t\t} else {\n\t\t\tJLoader::import('joomla.utilities.date');\n\t\t\t$regex = '/^\\d{1,4}(\\/|-)\\d{1,2}(\\/|-)\\d{2,4}[[:space:]]{0,}(\\d{1,2}:\\d{1,2}(:\\d{1,2}){0,1}){0,1}$/';\n\t\t\tif(!preg_match($regex, $this->publish_up)) {\n\t\t\t\t$this->publish_up = '2000-01-01';\n\t\t\t}\n\t\t\t$test = new JDate($this->publish_up);\n\t\t\tif($test->toSql() == '0000-00-00 00:00:00') {\n\t\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PUBLISH_UP'));\n\t\t\t\t$result = false;\n\t\t\t} else {\n\t\t\t\t$this->publish_up = $test->toSql();\n\t\t\t}\n\t\t}\n\n\t\tif(empty($this->publish_down)) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PUBLISH_DOWN'));\n\t\t\t$result = false;\n\t\t} else {\n\t\t\tJLoader::import('joomla.utilities.date');\n\t\t\t$regex = '/^\\d{1,4}(\\/|-)\\d{1,2}(\\/|-)\\d{2,4}[[:space:]]{0,}(\\d{1,2}:\\d{1,2}(:\\d{1,2}){0,1}){0,1}$/';\n\t\t\tif(!preg_match($regex, $this->publish_down)) {\n\t\t\t\t$this->publish_down = '2038-01-01';\n\t\t\t}\n\t\t\t$test = new JDate($this->publish_down);\n\t\t\tif($test->toSql() == '0000-00-00 00:00:00') {\n\t\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PUBLISH_DOWN'));\n\t\t\t\t$result = false;\n\t\t\t} else {\n\t\t\t\t$this->publish_down = $test->toSql();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If the current date is outside the publish_up / publish_down range\n\t\t// then disable the subscription. Otherwise make sure it's enabled.\n\t\tJLoader::import('joomla.utilities.date');\n\t\t$jNow = new JDate();\n\t\t$uNow = $jNow->toUnix();\n\t\t$jDown = new JDate($this->publish_down);\n\t\t$jUp = new JDate($this->publish_up);\n\t\t\n\t\tif( ($uNow >= $jDown->toUnix()) ) {\n\t\t\t$this->enabled = 0;\n\t\t} elseif( ($uNow >= $jUp->toUnix()) && ($uNow < $jDown->toUnix())) {\n\t\t\t$this->enabled = ($this->state == 'C') ? 1 : 0;\n\t\t} else {\n\t\t\t$this->enabled = 0;\n\t\t}\n\t\t\n\t\tif(is_array($this->params)) {\n\t\t\tif(!empty($this->params)) {\n\t\t\t\t$this->params = json_encode($this->params);\n\t\t\t}\n\t\t}\n\t\tif(is_null($this->params) || empty($this->params)) {\n\t\t\t$this->params = '';\n\t\t}\n\t\t\n\t\tif(empty($this->processor)) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PROCESSOR'));\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\tif(empty($this->processor_key) && !$this->_dontCheckPaymentID) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_PROCESSOR_KEY'));\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\tif(!in_array($this->state, array('N','P','C','X'))) {\n\t\t\t$this->setError(JText::_('COM_AKEEBASUBS_SUBSCRIPTION_ERR_STATE'));\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function check_upcoming_is_post_upcoming(){\n $this->loop_through_upcoming_posts(array($this, 'is_post_upcoming'));\n }", "public function prepareUpdatePublished($inputs){\n\t\tif ((!isset ($inputs['published']))|| (!isset ($this->id))){\n\t\t\t$this->errors[]=\"Erreur lors de l'enregistrement\";\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\t$validationInput['isBool']['published']=$inputs['published']; \n\t\t$this->validation($validationInput, 'getValidatorUpdate'); \n\n\t\tif (!empty($this->errors)){\n\t\t\treturn false;\n\t\t};\n\t\t$fields=array(\n\t\t\t'publicated'=>$this->published,\n\t\t\t'date_publication'=>$this->publishedDate\n\t\t);\n\t\treturn $this->recordValid('update', $fields);\n\t}", "public function scopePublished($query){\n $query->where('RDate','<=',Carbon::now()->format('Y-m-d'))->where('EXDate','>=',Carbon::now()->format('Y-m-d'));\n }", "public function getIsPublished()\n\t{\n\t\treturn $this->is_published;\n\t}", "private function updatePublishOnDate()\n {\n $this->owner->PublishOnDate = $this->owner->DesiredPublishDate;\n // Remove the DesiredPublishDate.\n $this->owner->DesiredPublishDate = null;\n }", "function xgb_check_post_count($post_id) {\n\tglobal $wpdb;\n\t\n\t$post = get_post($post_id);\n\t$author_id = $post->post_author;\n\t$user_info = get_userdata(get_current_user_id());\n\t\n\t\t$published_post_count = $wpdb->get_var(\"SELECT COUNT(ID) FROM wp_posts WHERE post_status='publish' AND post_type='post' AND post_author=$author_id\");\n\t\tif($published_post_count > $GLOBALS['live_article_limit'] ) {\n\t\t\t$wpdb->query(\"UPDATE wp_posts SET post_status='pending' WHERE ID=$post_id\");\n\t\t\t// Set the transient for admin notice\n\t\t\tset_transient( get_current_user_id().'publisherror', $GLOBALS['live_article_limit'] ); \n\t\t}\n}", "public function is_post_upcoming($post_id = false) {\n $post_id = (!empty($post_id)) ? $post_id : get_the_ID();\n //In order to do this check we need both a post, and an archive date field\n if (empty($post_id) || empty($this->dates['archive'])) {\n return;\n }\n //Get the archived date\n $archive_date = get_post_meta($post_id, $this->dates['archive']);\n \n //Get todays date to compare against\n $today = date('Ymd');\n \n //If we do not have an info in the archive_date post meta, stop\n if (empty($archive_date)) {\n return;\n }\n \n //Update the archive based on the inequalitys\n $post_meta_value = (intval($today) < intval($archive_date[0])) ? \"Upcoming\" : \"Past\";\n update_post_meta($post_id, '_is_upcoming', intval($today) < intval($archive_date[0]));\n //This post meta field is specifically for facets.\n //TODO: Could just be the only one?\n update_post_meta($post_id, '_event_upcoming_label', $post_meta_value);\n }", "public function scopeIsPublished($query, $is_published) {\n if ($is_published) {\n return $query->where('events.published_at', '<>', 'NULL');\n } else {\n return $query->where('events.published_at', '=', NULL);\n }\n }", "function check_permission_public_status($public_status) {\n if($this->base->operator()->is_administrator() == FALSE && ($public_status == 'before_published' || $public_status == 'expired' || $public_status == 'all')) {\n $this->set_message('check_permission_public_status', '編集者のみが発行前と失効後のニュースを閲覧できます。');\n return FALSE;\n }\n\n return TRUE;\n }", "function post_exists($title, $content = '', $date = '', $type = '', $status = '')\n {\n }" ]
[ "0.72871494", "0.6852336", "0.68515754", "0.67675704", "0.67496514", "0.6695189", "0.6644615", "0.66375685", "0.6616027", "0.6586621", "0.657681", "0.6572092", "0.65583825", "0.65570426", "0.6537006", "0.6526984", "0.65138197", "0.64944124", "0.6441735", "0.6437291", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.64034754", "0.62994576", "0.6284186", "0.6261689", "0.6238451", "0.6212811", "0.6192954", "0.6153375", "0.61464626", "0.61125284", "0.6093529", "0.6066287", "0.6065625", "0.6056361", "0.60258186", "0.6013496", "0.60131395", "0.59077525", "0.5904579", "0.5891973", "0.588942", "0.5880998", "0.5867889", "0.5862735", "0.5847857", "0.5847341", "0.58403563", "0.58360577", "0.5813148", "0.5804492", "0.57684344", "0.5765786", "0.57423306", "0.57124573", "0.5697698", "0.56884825", "0.56872493", "0.56720716", "0.5670449", "0.56572133", "0.564127", "0.56154394", "0.56017804", "0.5601392", "0.5600409", "0.5591785", "0.5579051", "0.5571401", "0.55533856", "0.5532343", "0.55294544", "0.5514704", "0.5481938", "0.54772776", "0.54759216", "0.5468226", "0.5443392", "0.54422635", "0.5422435", "0.5422014", "0.5416611", "0.54125583", "0.5408486", "0.54050124", "0.5376393", "0.5372652", "0.53691685", "0.53596306" ]
0.76929957
0
returns a full page title path i.e. the titles of this article + all parent articles (except the top level one)
function fullPageTitle() { $title = htmlspecialchars($this->getTitlePage(), ENT_COMPAT, "UTF-8"); $separator = ' | '; $parents = $this->parents(); for ($i=0; $i<sizeof($parents)-1; $i++) { $oneParent = $parents[$i]; $title .= $separator; $title .= htmlspecialchars($oneParent->getTitlePage(), ENT_COMPAT, "UTF-8"); } return $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutv_get_parent_title( $page = null ) {\n global $post;\n\n if ( ! $page ) {\n $page = $post->ID;\n }\n\n\n if ( empty( $post->post_parent ) ) { // if there is no parent...\n return get_the_title( $post->ID ); // return the current page's title\n } else { // if there is a parent...\n return get_the_title( $post->post_parent ); // return the parent's title\n }\n}", "public function generateContent()\n {\n parent::generateContent();\n $pathArray = $this->currentPageStrategy->getCurrentPagePath();\n $titleString = '';\n foreach ($pathArray as $page) {\n /** @var $page Page */\n\n $titleString .= ' - ' . (($t = $page->getTitle()) == '_404' ? 'Siden blev ikke fundet' : $t);\n }\n\n return $titleString;\n }", "public function get_page_title() {\n\t\t\treturn __( 'Relations', 'jet-engine' );\n\t\t}", "public function getPath() {\n $path = '';\n try {\n $path = $this->getParent()->getPath();\n } catch (PageException $e) {}\n return $path . '/' . $this->getSlug();\n }", "function getHtmlTitle()\n\t{\n\t\t// set up the page title\n\t\tif ($this->isContentPage) {\n\t\t\t\n\t\t\tif (isset($this->map[$this->area]['show'][$this->page]) &&\n\t\t\t\t$this->map[$this->area]['show'][$this->page] != $this->page) {\n\t\t\t\t// use the 'show' text\n\t\t\t\t$htmlTitle = $this->map[$this->area]['show'][$this->page];\n\t\t\t} else {\n\t\t\t\t// if the nav title and the page name are the same,\n\t\t\t\t// show a hierarchy instead.\n\t\t\t\t// for content pages, the name is based on the\n\t\t\t\t// area and page-path\n\t\t\t\t$htmlTitle = $this->area;\n\t\t\t\t\n\t\t\t\tif (count($this->path)) {\n\t\t\t\t\t$htmlTitle .= ' -- ' .\n\t\t\t\t\timplode(' : ', $this->path);\n\t\t\t\t} else {\n\t\t\t\t\t$htmlTitle .= ' : ' . $this->page;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t// for non-content (administrative) pages, the\n\t\t\t// name is based on the script name.\n\t\t\t$htmlTitle = basename(strip_tags($_SERVER['SCRIPT_NAME']));\n\t\t\t$htmlTitle = str_replace('.php', '', $htmlTitle);\n\t\t\t$htmlTitle = str_replace('_', ' ', $htmlTitle);\n\t\t\t$htmlTitle = ucwords($htmlTitle);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $htmlTitle;\n\t}", "public function getParentTitle()\n {\n if ($parent = $this->Parent()) {\n return $parent->Title ?: ($parent->ClassName . ' #' . $parent->ID);\n }\n }", "function get_parent_post_rel_link($title = '%title')\n {\n }", "private function retrieve_parent_title() {\n\t\t$replacement = null;\n\n\t\tif ( ! isset( $replacement ) && ( ( is_singular() || is_admin() ) && isset( $GLOBALS['post'] ) ) ) {\n\t\t\tif ( isset( $GLOBALS['post']->post_parent ) && 0 !== $GLOBALS['post']->post_parent ) {\n\t\t\t\t$replacement = get_the_title( $GLOBALS['post']->post_parent );\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function getTitle()\n {\n $list = $this->getPages();\n\n return isset($list[$this->page])\n ? $list[$this->page]\n : '';\n }", "public function getTitle()\n {\n if ($this->getPost() && $this->getPost()->hasChildren()) {\n return $this->getPost()->getPostTitle();\n }\n\n return parent::getTitle();\n }", "public function getTitle() {\n return (isset($this->titlePage)) ? $this->titlePage.' - '.Params::param('metainfo-titlePage') : Params::param('metainfo-titlePage');\n }", "public function getTitle()\n {\n return P4Cms_Navigation::expandMacros(parent::getTitle(), $this);\n }", "public function drawParent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = (SELECT parent FROM pages where guid = '{$this->guid}')\"); \n\t\t\treturn $data;\n\t\t}", "public function getTitle(): string\n {\n return I18N_PAGES;\n }", "protected function page_title() {\n return get_string('topicoutline');\n }", "public function slug()\n\t{\n\t\t$explode = explode('/', $this->getField('key'));\n\n\t\t// Check if the page have a parent.\n\t\tif(!empty($explode[1])) {\n\t\t\treturn $explode[1];\n\t\t}\n\n\t\treturn $explode[0];\n\t}", "public function getTitle( $path = null ) {\n\t\t$this->_getSiteStruture();\n\t\tif ( is_null( $path ) ) $path = $this->getPath();\n\t\tzc_log( \"Titles ($path) \". print_r( $this->current_titles, true ) );\n\t\treturn isset( $this->current_titles[ $path ] )\n\t\t\t? $this->current_titles[ $path ]\n\t\t\t: $path\n\t\t;\n\t}", "function get_page_title()\n {\n return $this->object->name;\n }", "public function getPageTitle(): string;", "public function getPagename(): string {\n return strtolower($this->uriParts['pagename']) ?? '';\n }", "public function currentPageTitle()\n {\n return $this->pageGuide->getTitle($this->currentPage);\n }", "public function title() {\n\t\tif ( ! is_object( $this->object ) ) {\n\t\t\treturn esc_html__( 'Page not found', 'nhg-seo' );\n\t\t}\n\n\t\t$title = Strategy::get_from_meta( 'post', $this->object->ID, $this->object, 'title' );\n\t\tif ( \\is_string( $title ) && '' !== $title ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\treturn Strategy::get_title( 'post', $this->object->post_type, $this->object );\n\t}", "function getTopParentPostTitle($myid){\n\t$mypage = get_page($myid);\n\tif ($mypage->post_parent == 0){\n\t\treturn $mypage->post_title;\n\t}\n\telse{\n\t\treturn getTopParentPostTitle($mypage->post_parent);\n\t}\n}", "public function get_page_title() {\n return $this->get_string('page_title');\n }", "function parent_post_rel_link($title = '%title')\n {\n }", "public function getPageTitle()\n {\n return parent::getPageTitle() ?:\n (\n isset($this->get['pages']) ? $this->tableAdmin->translate('Pages') :\n (\n isset($this->get['products']) ? $this->tableAdmin->translate('Products') :\n (\n isset($this->get['urls']) ? $this->tableAdmin->translate('URL') :\n ''\n )\n )\n );\n }", "public function _GetPageTitle() {\n\t\t$page_title = 'Shirtswithstamps: T-Shirts with stamps for every ocassion';\n\t\t\n\t\tif (isset($_GET['DepartmentId']) && isset($_GET['CategoryId'])) {\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' &raquo; '.Catalog::GetCategoryName($_GET['CategoryId']).' - Shirts With Stamps';\n\t\t\t\n\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' &raquo; '.Catalog::GetCategoryName($_GET['CategoryId']).' - Page '.((int)$_GET['Page']).' - Shirtswithstamps';\t\n\t\t}\n\t\t\n\t\telseif (isset($_GET['DepartmentId'])) {\n\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' - Shirts With Stamps';\n\t\t\t\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t\t$page_title = Catalog::GetDepartmentName($_GET['DepartmentId']).' - Page '.((int)$_GET['Page']).' - Shirts With Stamps';\n\t\t}\n\t\t\n\t\telseif (isset($_GET['ProductId'])) {\n\t\t\t$page_title = Catalog::GetProductName($_GET['ProductId']).' - Shirts With Stamps';\n\t\t}\n\t\t\n\t\telseif (isset($_GET['SearchResults'])) {\n\t\t\t$page_title = '';\n\t\t\t\n\t\t\t// Display the search string\n\t\t\t$page_title = trim(str_replace('-', ' ', $_GET['SearchString'])).' (';\n\t\t\t\n\t\t\t// Display 'all-words' search or 'any-words' search\n\t\t\t$all_words = isset($_GET['AllWords']) ? $_GET['AllWords'] : 'off';\n\t\t\t\n\t\t\t$page_title .= (($all_words == 'on') ? 'all' : 'any').'-words search';\n\t\t\t\n\t\t\t// Display the page number\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page'] < 1))\n\t\t\t\t$page_title .= ', page '.((int)$_GET['Page']);\n\t\t\t\t\n\t\t\t$page_title .= ')';\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (isset($_GET['Page']) && ((int)$_GET['Page']) > 1)\n\t\t\t\t$page_title .= ' - Page '.((int)$_GET['Page']);\n\t\t}\n\t\t\n\t\treturn $page_title;\n\t}", "protected function getPageTitle() {\r\n\t\treturn $this->pageTitle;\r\n\t}", "public function getTitle()\n {\n return \"\"; // Should be updated by children classes\n }", "abstract protected function getPageTitle(): string;", "public function get_page_title() {\n\t\treturn __( 'Events Import', 'the-events-calendar' );\n\t}", "public function getArticleTitle() {\n return $this->article_title;\n }", "protected function renderPageTitle() {}", "function article_title() {\n return Registry::prop('article', 'title');\n}", "public function getTitle() {\n return \\Drupal::config('taxonomy_facets.settings')->get('page_title');\n }", "public function get_title();", "private function getPageTitle() {\n return $this->pageTitle;\n }", "static public function getTitle() {\n\t\treturn self::$page_title;\n\t}", "public function getUrl()\n {\n // looping through parents to create ancestors array..\n\n $parentPages = [];\n $current = $this;\n while ($current->parent)\n {\n $parentPages[] = $current->parent;\n $current = $current->parent;\n }\n\n $parentPages = array_reverse($parentPages);\n\n $paths = [];\n\n foreach ($parentPages as $pp) {\n if ($pp->path != 'ROOT') {\n $paths[] = $pp->path;\n }\n }\n\n if (count($paths) > 0) {\n $root = implode('/', $paths);\n return '/' . $root . '/' . $this->path;\n } else {\n if ($this->path == 'ROOT') {\n return '/';\n }\n return '/' . $this->path;\n }\n }", "public function getTitle()\n {\n return addslashes(trim(join($this->__titleDelimiter, $this->__titleParts)));\n }", "public static function get_page_title() {\n\t\t// Set the current page of the WP query since it's used by SEO plugins.\n\t\tglobal $wp_query, $page;\n\t\t$oldPage = $wp_query->get( 'page' );\n\t\tif ( $page > 1 ) {\n\t\t\t$wp_query->set( 'page', $page );\n\t\t} else {\n\t\t\t$wp_query->set( 'page', null );\n\t\t}\n\n\t\t// Get the title.\n\t\t$title = self::get_page_titleHelper();\n\t\t$title = html_entity_decode( $title, ENT_QUOTES, 'UTF-8' );\n\n\t\t// Set back the current page.\n\t\t$wp_query->set( 'page', $oldPage );\n\n\t\t// Return the title.\n\t\treturn $title;\n\t}", "function getTitleArticle() {\n\t\treturn $this->titleArticle;\n\t}", "protected function getTitle() {\r\n\t\treturn $this->newsItem->getTitle();\r\n\t}", "public function getPageTitleInfo()\n {\n static $pageTitleInfo = null;\n\n if ( $pageTitleInfo ) {\n return $pageTitleInfo;\n }\n $translator = $this->view->translator;\n $input = $this->view->input;\n \n $pageConfig = $this->view->pageConfig;\n $titleChunks = array();\n\n if ($pageConfig->useTitlePrefix() ) {\n $titleChunks[] = $translator ? $translator->_($pageConfig->getTitlePrefix()) : $pageConfig->getTitlePrefix();\n }\n\n $name = $pageConfig->getTitle(); \n $titleChunks[] = $translator ? $translator->_($name) : $name;\n\n $titleChunks = array_reverse($titleChunks);\n $pageTitleInfo = join( $titleChunks, $pageConfig->getTitlePrefixDelimiter() );\n return $pageTitleInfo;\n }", "public function getPageTitle() {\n return $this->configuration['page_title'];\n }", "function page_title( $path )\n\t{\n\t\t$page = $this->page($path);\n\n\t\tif( isset($page->meta['title']) )\n\t\t\treturn $page->meta['title'][0];\n\n\t\t// get cache file or parse page titles\n\t\t$content = $page['content'];\n\t\tif( !$content ) {\n\t\t\t$content = $this->parse_headers($page['raw_content']);\n\t\t}\n\t\t// find, memorize and return\n\t\tif( false !== ($a = strpos($content, '<h1>'))\n\t\t && false !== ($b = strpos($content, '</h1>', $a+1)) )\n\t\t{\n\t\t\t$title = substr($content, $a+4, $b - ($a+4));\n\t\t\t$this->pages[$path]['meta']['title'][0] = $title;\n\t\t\t$this->pages[$path]['meta']['title'][1] = false;\n\t\t\treturn $title;\n\t\t}\n\t\t// nothing found\n\t\treturn $this->page_name($path);\n\t}", "function getTitle() {\n\t\tif($this->title) {\n\t\t\treturn $this->title;\n\t\t}\n\t\telse if(Session::getValue(\"nav_sindex\")) {\n\t\t\t$query = new Query();\n\t\t\tif($query->sql(\"SELECT name FROM \".UT_NAV.\" WHERE sindex = '\".Session::getValue(\"sindex\").\"'\")) {\n\t\t\t\treturn $query->getQueryResult(0, \"name\");\n\t\t\t}\n\t\t}\n\t\treturn SITE_NAME;\n\t}", "public function getTitle() \n {\n return 'Internal article';\n }", "protected function getBreadCrumbPath()\n {\n $titleArray = [];\n $breadCrumbs = $this->catalogHelper->getBreadcrumbPath();\n\n foreach ($breadCrumbs as $breadCrumb) {\n $titleArray[] = $breadCrumb['label'];\n }\n\n return $titleArray;\n }", "public function getPageTitle() {\n\t\treturn $this->pageTitle;\n\t}", "function GetTitle() {\r\n global $PageTitle;\r\n if (isset($PageTitle)){echo $PageTitle;}else{echo 'BHM Accessories';}\r\n }", "public function get_page_title() {\n\n\t\tob_start();\n\n\t\t$this->output_page_title();\n\t\t$this->output_vendor_info();\n\n\t\treturn ob_get_clean();\n\t}", "public function getPageTitle()\n {\n return $this->page_title;\n }", "public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}", "public function getPageTitle() {\r\n\t\t$config = $this->getConfig();\r\n return $config[\"title\"];\r\n }", "private static function get_page_titleHelper() {\n\t\tglobal $wpseo_front;\n\t\tif (\n\t\t\tisset( $wpseo_front ) &&\n\t\t\tmethod_exists( $wpseo_front, 'title' )\n\t\t) {\n\t\t\treturn $wpseo_front->title( '', false );\n\t\t}\n\n\t\t// If the SEO Ultimate plugin is active and compatible.\n\t\tglobal $seo_ultimate;\n\t\tif (\n\t\t\tisset( $seo_ultimate ) &&\n\t\t\tproperty_exists( $seo_ultimate, 'modules' ) &&\n\t\t\tisset( $seo_ultimate->modules['titles'] ) &&\n\t\t\tmethod_exists( $seo_ultimate->modules['titles'], 'get_title' )\n\t\t) {\n\t\t\t@$title = $seo_ultimate->modules['titles']->get_title();\n\n\t\t\treturn $title;\n\t\t}\n\n\t\t// If all else fails, return the standard WordPress title. Unfortunately, most theme hard-code their <title> tag.\n\t\treturn wp_title( '', false );\n\t}", "public function show_path()\n\t{\n\t\treturn url::site($this->id . '/' . $this->title);\n\t}", "public function getPageTitle()\n {\n return 'Links to Scanned Page - ' . $this->page->uri;\n }", "private function basePath()\n {\n return $this->allDescendants()\n ? $this->parentName\n : $this->childPath($this->parentName, $this->query['from'][0]['collectionId']);\n }", "function getPageTitle() {\n\t\tglobal $current_page_title;\n\t\t\n\t\treturn $current_page_title;\n\t}", "function get_admin_page_title()\n {\n }", "public function Title()\n {\n if (!$this->Title) {\n if ($this->getContextObject()) {\n if ($workflow = $this->contextObj->getWorkflowInstance()) {\n $this->Title = $workflow->currentAction()->BaseAction()->PageTitle\n ? $workflow->currentAction()->BaseAction()->PageTitle\n : $workflow->currentAction()->Title;\n }\n }\n }\n return $this->Title;\n }", "public function get_title() {\n\t\treturn __( 'Main Gallery', 'elementor-main-gallery' );\n\t}", "public function page_title_should_return_the_base_title_if_the_title_is_empty()\n {\n $this->assertEquals('Laracarte - List of artisans', page_title(''));\n }", "public function getTitle()\n {\n $title = $this->getShortTitle();\n $subtitle = $this->getSubtitle();\n $titleSection = $this->getTitleSection();\n if (!empty($subtitle)) {\n if ($title != '') {\n $separator = preg_match(\"/^[\\\\s=]+/\", $subtitle) ? \" \" : \" : \";\n $title .= $separator;\n }\n $title .= $subtitle;\n }\n if (!empty($titleSection)) {\n if ($title != '') {\n $title .= ' / ';\n }\n $title .= $titleSection;\n }\n return $title;\n }", "public function drawGrandparent() {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = {$this->getGrandparent()}'\"); \n\t\t\treturn $data;\n\t\t}", "public function getPath()\n {\n \treturn implode(' / ', array_map(create_function('$a', 'return trim($a->getName());'), $this->getParents()));\n }", "function getPageTitle() {\n return $this->title;\n }", "public function getPrefixTitle ();", "function page_title($title = ''){\r\n\tglobal $eqdkp, $user;\r\n\t$pt_prefix\t\t= (defined('IN_ADMIN')) ? $user->lang['admin_title_prefix'] : $user->lang['title_prefix'];\r\n\t$main_title\t\t= sprintf($pt_prefix, $eqdkp->config['guildtag'], $eqdkp->config['dkp_name']);\r\n\treturn sanitize((( $title != '' ) ? $title.' - ' : '').$main_title, TAG);\r\n}", "public function getTitle() {\n\t\treturn '';\n\t}", "public function get_title() {\n\t\tif ( ! is_null( $this->title ) ) {\n\t\t\treturn $this->title;\n\t\t}\n\n\t\t/**\n\t\t * Allow changing the title.\n\t\t *\n\t\t * @param string $title The page title being put out.\n\t\t */\n\t\t$this->title = $this->do_filter( 'frontend/title', $this->paper->title() );\n\n\t\t// Early Bail!!\n\t\tif ( '' === $this->title ) {\n\t\t\treturn $this->title;\n\t\t}\n\n\t\t// Remove excess whitespace.\n\t\t$this->title = preg_replace( '[\\s\\s+]', ' ', $this->title );\n\n\t\t// Capitalize Titles.\n\t\tif ( Helper::get_settings( 'titles.capitalize_titles' ) ) {\n\t\t\t$this->title = ucwords( $this->title );\n\t\t}\n\n\t\t$this->title = wp_strip_all_tags( stripslashes( $this->title ), true );\n\t\t$this->title = esc_html( $this->title );\n\t\t$this->title = convert_smilies( $this->title );\n\n\t\treturn $this->title;\n\t}", "function finalPageName()\n{\n\t$urlname = $_SERVER[\"REQUEST_URI\"]; //to get complete url //\n\t$urlurl = explode(\"/\",$urlname); // to explode based on '/' to get array of folders //\n\t$cnturl = count($urlurl); // count all folders in array //\n\t$finalpagename_q = $urlurl[$cnturl-1]; // to get last page of url //\n\t$arr_of_qs = explode(\"?\",$finalpagename_q); // to remove query string from last page //\n\t$finalpagename = $arr_of_qs[0]; // to get final page name //\n\treturn $finalpagename;\n}", "public function getPageTitle()\n {\n $element = $this->query('title')->first();\n if ($element) {\n return $element->text();\n }\n\n return '';\n }", "function get_page_heading()\n {\n return $this->object->get_page_title();\n }", "public function getDefaultTitle()\n {\n return __('Pages');\n }", "public function getPagePath();", "public function get_title()\n {\n return __('Primary Menu', 'akash-hp');\n }", "function get_my_title_tag() {\n\t\n\tglobal $post;\n\t\n\tif ( is_front_page()) {\n\t\tbloginfo('description');\n\t}\n\t\n\telseif ( is_page() || is_single()) { // pages and postings\n\t\tthe_title();\t\n\t}\n\t\t\n\t//elseif ( is_404() || is_search()) { // pages and postings\n\t\t//echo 'Sorry this page has no content!';\t\n\t//}\t\n\t\n\t\n\telse {\n\t\t\n\t\tbloginfo('description');\n\t}\n\t\t\n\t\tif ($post->post_parent ) {\n\t\t\techo ' | ';\n\t\t\techo get_the_title($post->post_parent);\n\t}\n\t\t\n\t\techo ' | ';\n\t\tbloginfo('name');\n\t\techo ' | ';\n\t\techo 'Worldwide';\t\n\n\t}", "public function lineTitle()\n {\n if (!$this->subtitle()->empty()) {\n $lineTitle = $this->subtitle();\n } else {\n $lineTitle = page('companies/'.$this->company())->title();\n };\n\n return $lineTitle;\n }", "public function getActiveFolderTitle()\r\n {\r\n $titleField = $this->getActiveFolderField('title');\r\n return $titleField['config']['field'];\r\n }", "function get_title() {\n\t\treturn $this->get_mapped_property('title');\n }", "function MyApp_Interface_HEAD_Title()\n {\n $comps=preg_split('/::/',parent::MyApp_Interface_HEAD_Title());\n $keys=array(\"Initials\",\"Name\",\"Title\");\n \n $unit=$this->Unit();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($unit,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n \n $event=$this->Event();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($event,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n\n return join(\"::\",array_reverse($comps)); \n }", "public function customPageTitle() {\n return $this->metadata('page_title');\n }", "public abstract function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();" ]
[ "0.6721224", "0.65438515", "0.6430834", "0.63664746", "0.6299323", "0.6295497", "0.6161307", "0.61497414", "0.61475784", "0.6107044", "0.609558", "0.60802835", "0.60536236", "0.6053193", "0.6049531", "0.60419965", "0.5995228", "0.5940695", "0.59007347", "0.5899143", "0.58844453", "0.5872203", "0.5868817", "0.586506", "0.58423126", "0.5838751", "0.58308834", "0.58190835", "0.58074456", "0.5776002", "0.57632935", "0.57629323", "0.5751112", "0.5748311", "0.5740823", "0.5724986", "0.5720423", "0.5713828", "0.5710988", "0.5707245", "0.5705195", "0.5704848", "0.5697032", "0.5689758", "0.5686615", "0.5685646", "0.56792", "0.56784946", "0.5676472", "0.56749576", "0.56660795", "0.56520915", "0.5651399", "0.5643248", "0.5641875", "0.5633008", "0.56253856", "0.56231964", "0.56203955", "0.56182873", "0.5608656", "0.5607832", "0.5603613", "0.56026", "0.5602017", "0.5597357", "0.55908936", "0.55865115", "0.5580249", "0.55784", "0.55757546", "0.555982", "0.554582", "0.5545031", "0.554369", "0.553957", "0.5522742", "0.55220675", "0.5517354", "0.55117464", "0.5511168", "0.5503367", "0.5502432", "0.55013126", "0.54926753", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855", "0.5483855" ]
0.7655751
0
Does this article have a teaser? Somthing must be written i the teaser for it to be considered as not empyu So for example a teaser with only an empty paragraph is considered empty
function hasTeaser() { $teaser = strip_tags($this->teaser, "<img><a>"); $teaser = trim($teaser); if (empty($teaser)) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_article();", "protected function content_handle_no_teaser_block( $content ) {\n\t\tif ( (strpos($content, 'noTeaser:true') !== false || strpos($content, '\"noTeaser\":true') !== false) && strpos($content, '<!-- /wp:more -->') !== false) {\n\t\t\t$arr = explode('<!-- /wp:more -->', $content);\n\t\t\treturn trim($arr[1]);\n\t\t}\n\t\treturn $content;\n\t}", "public abstract function isTextPart();", "public function hasInfluencedContent();", "public function isViewModeTeaser() {\n return $this->isViewMode(CoreEntityManager::VIEW_MODE_NODE_TEASER);\n }", "public function isEssential();", "public function isRTE() {}", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "public function isText() {}", "public function hasText()\n {\n return $this->text != null;\n }", "public function getTeaser()\n {\n return $this->teaser;\n }", "function ep_get_teaser_or_body() {\n\n\t$content = ep_get_the_content(\"teaser\");\n\tif (empty($content)) {\n\t\t$content = ep_get_the_content(\"body\");\n\t}\n\treturn $content;\n}", "public function hasExplicitText(): bool\n {\n return isset($this->text);\n }", "abstract public function isItalic();", "public function hasContent(){ return !empty($this->content); }", "protected function isContentCorrect() {}", "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 contentNotGiven()\n {\n return empty($this->content);\n }", "public function hasText()\n {\n if ($this->_text) {\n return true;\n } else {\n return false;\n }\n }", "function ci_e_content($more_link_text = null, $stripteaser = false)\n{\n\tglobal $post, $ci;\n\tif (is_single() or is_page())\n\t\tthe_content(); \n\telse\n\t{\n\t\tif(ci_setting('preview_content')=='enabled')\n\t\t{\n\t\t\tthe_content($more_link_text, $stripteaser);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthe_excerpt();\n\t\t}\n\t}\n}", "public function isEmbargoed();", "function indieweb_publisher_show_excerpt() {\n\t\t/* Only show excerpts for Standard post format OR Chat format,\n\t\t * when this is not both the very first standard post and also a Sticky post AND\n\t\t * when excerpts enabled or One-Sentence Excerpts enabled AND\n\t\t * this is not the very first standard post when Show Full Content First Post enabled\n\t\t */\n\t\tif ( ( !get_post_format() || 'chat' === get_post_format() ) ) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function voyage_mikado_post_has_title() {\n return get_the_title() !== '';\n }", "abstract public function hasContent();", "public function isPageHomonymie(): bool\n {\n return false !== stristr($this->getText() ?? '', '{{homonymie');\n }", "public function hasContent()\n {\n return false;\n }", "public function isTextExtractionError()\r\n {\r\n return $this->_isTextExtractionError;\r\n }", "public function isText(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_TEXT );\n\t}", "public function isItalic() {}", "public function isItalic() {}", "public function isItalic() {}", "public function isItalic() {}", "public function isItalic() {}", "public function hasContent() {}", "function tidy_is_xhtml(tidy $object) {}", "public function thereIsAnArticle(PyStringNode $string) {\n module_load_include('inc', 'elife_services', 'resources/article');\n\n _elife_services_article_create($string->getRaw());\n\n _elife_article_prepare_main_text();\n }", "public static function hasContent(): bool\n {\n return true;\n }", "public function hasText() {\n return !empty($this->text[\\App::getLocale()]);\n }", "function markdown_post_typo($texte){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t$texte = echappe_retour($texte,\"md\");\n\t}\n\treturn $texte;\n}", "public function isText()\n {\n return $this->isBinary() === false;\n }", "private function _isTodo()\n {\n $string = '';\n\n // Check to see if Todo points are present\n if (!empty($this->view->todo)) {\n $string = '<pre>' . $this->view->todo . '</pre><hr />';\n }\n\n return $string;\n }", "public function isText()\n {\n return $this->getName() === 'text';\n }", "public function hasHandleArticle(){\n return $this->_has(3);\n }", "function has_readmore()\n{\n\tglobal $post;\n\tif(strpos(get_the_content(), \"#more-\")===FALSE)\n\t\treturn FALSE;\n\telse\n\t\treturn TRUE;\n}", "public function has_subtitle() {\n\t\treturn ! empty( $this->subtitle );\n\t}", "public function introduction(){\n\t\tif($this->introduction == 0){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasStory(){\n return $this->_has(4);\n }", "public function has_PLAIN_not_HTML()\n\t{\n\t\treturn $this->PLAIN != '' && $this->HTML == '';\n\t}", "function hasDescription()\n {\n return !empty($this->description);\n }", "function kouka_has_table_of_contents() {\n\tif ( is_singular( 'blog' ) ) {\n\t\treturn true;\n\t}\n\n\tif ( is_single() ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function hasRemark(){\n return $this->_has(4);\n }", "public function hasDescription()\n {\n return !empty($this->description);\n }", "public function has_description(){\n\t\treturn 0 < strlen($this->_description);\n\t}", "public function isTextNode(): bool\n {\n return $this->currentNode->nodeType == XML_TEXT_NODE;\n }", "public function hasNoContent()\n {\n return $this->properties['content'] === null;\n }", "public function alternativeExists()\n {\n return !empty($this->AltBody);\n }", "public function isEditorial()\n {\n return $this->getData('isEditorial', false) === true;\n }", "public function isHtml(): bool;", "public function isVariableTexto(){ return false; }", "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 hasContent(): bool\n {\n return (empty($this->content) === false);\n }", "function the_content($more_link_text = \\null, $strip_teaser = \\false)\n {\n }", "function voyage_mikado_post_has_read_more() {\n global $post;\n\n return strpos($post->post_content, '<!--more-->');\n }", "function kusurinotakagi_has_table_of_contents() {\n//\tif ( is_singular( 'blog' ) ) {\n//\t\treturn true;\n//\t}\n//\tif ( is_single() ) {\n//\t\treturn true;\n//\t}\n\n\treturn false;\n}", "public function hasTitle(){\n return $this->_has(37);\n }", "public static function hasTitles(): bool\n {\n return true;\n }", "function get_teaser() \t{\n \t\treturn $this->teaser;\n \t}", "function hook_teaser_types() {\n return array(\n 'teaser' => 1,\n );\n}", "function has_wysiwyg($item) {\n\t\treturn $item['type'] == 'textarea' && isset($item['wysiwyg']) && $item['wysiwyg'] == true;\n\t}", "public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }", "public function hasTags()\n {\n return 0 < count($this->getTags());\n }", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "public function hasContent(){\n return $this->_has(4);\n }", "public function hasMarkDown(): bool\n {\n return $this->markDown;\n }", "function is_entity_breaker($entity) { // &#8216;&#8217;??\n return !(stripos('&#8216;&#8217;&apos;&quot;&#039;&#39;&rsquo;&lsquo;&rdquo;&ldquo;', $entity) !== FALSE);\n }", "public function isMeaningless()\n {\n return $this->meaningless;\n }", "public function hasTags()\n {\n return 0 < count($this->tags);\n }", "public function hiding_excerpts() {\n\t\treturn ! $this->showing_excerpts();\n\t}", "public function handles( DOMElement $element )\n {\n return ( $element->namespaceURI === ezcDocumentOdt::NS_ODT_TEXT\n && $element->localName === 'p' );\n }", "function isNoScriptDescription($text)\n{\n $allowed = array('.','=','-','+', '_',' ','\"',\"'\",'[','(',']',')','$',':','%','!','/','?','*','&','@','|'); // you can add here more value, you want to allow.\n if($text == \"\")\n\t{\n\t\t return TRUE;\n\t}\n\telseif(ctype_alnum(str_replace($allowed,'', $text ))) {\n \treturn TRUE;\n } else {\n\t\treturn FALSE;\n }\n}", "public function hasTips(){\n return $this->_has(19);\n }", "public function isToBeMarked();", "public function is_met();", "function verify_content($content) // Colorize: green\n { // Colorize: green\n return isset($content) // Colorize: green\n && // Colorize: green\n is_string($content) // Colorize: green\n && // Colorize: green\n $content != \"\"; // Colorize: green\n }", "function medigroup_mikado_post_has_title() {\n return get_the_title() !== '';\n }", "private function term_empty() {\n\n $line = $this->_lines->cur();\n if (empty($line)) {\n // just skip empty lines\n $this->_lines->move();\n return '';\n } else {\n return false;\n }\n }", "function kstHelpWordpressBlogPosts_excerptsAndMoreTeasers() {\n ?>\n <p>\n Your theme uses the excerpt field as well as the &lt;--more--&gt; tag giving\n you many options for formatting your blog index. Many themes use either the\n excerpt or the &lt;--more--&gt; tag to control what content appears on your\n blog index.\n </p>\n <p>\n Posts are displayed on the index in one of these formats (and order shown):\n </p>\n <ol>\n <li>Title and excerpt (if you type anything in the excerpt field)</li>\n <li>Title and the post up to the &lt;--more--&gt; (if you insert &lt;--more--&gt; in the post)</li>\n <li>Title and the entire post (if you do not enter an excerpt or the &lt;--more--&gt; tag)</li>\n </ol>\n <p><em>i.e. If you enter an excerpt and include a &lt;--more--&gt; tag only the excerpt will display</em></p>\n <p>\n <strong>How to use the \"more\" tag:</strong>\n </p>\n <p>\n In \"Visual\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Click the button above the post editor that looks like\n a rectangle cut in two pieces (a small rectangle on top and a longer rectangle on the button).\n A line that says \"more\" will appear.\n </p>\n <p>\n In \"html\" mode:<br />\n Place the cursor <em>after</em> the content you would like to appear on the blog index for that post.\n Type &lt;--more--&gt; on it's own line.\n </p>\n <p>\n Note: You may also customize the \"more\" link text that is shown per post (only possible using \"html\" mode).<br />\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Simply type the text to use after \"more\" e.g. &lt;--more But wait, there's more! --&gt;\n </p>\n <?php\n}", "function gotravel_mikado_get_text_decorations($first_empty = false) {\n\t\t$text_decorations = array(\n\t\t\t'none' => 'none',\n\t\t\t'underline' => 'underline'\n\t\t);\n\n\t\treturn $first_empty ? array_merge(array('' => ''), $text_decorations) : $text_decorations;\n\t}", "public static function doIt(&$content = null) : bool\n\t{\n\t\tif (trim($content) === '') {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Try to find the tag : %TOC_9% (where 9 is the deepest\n\t\t// level to mention in the table of content (so, for headings\n\t\t// 1 -> 4, mention %TOC_4%)\n\n\t\tif (preg_match(\"/%TOC_(\\\\d)%/m\", $content, $match)) {\n\t\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\n\t\t\t// Get the deepest level\n\t\t\t$deepestLevel = (int)$match[1];\n\n\t\t\t// Retrieve every h2 till the lowest level (f.i. 4)\n\t\t\t$pattern = '/<h([2-'.$deepestLevel.']){1} *(id=\"(.*)\")?[^>]*>(.*)<\\/h[2-'.$deepestLevel.']>/i';\n\n\t\t\tif (preg_match_all($pattern, $content, $matches)) {\n\t\t\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t\t\t$aeFunctions = \\MarkNotes\\Functions::getInstance();\n\n\t\t\t\tlist($tags, $level, $id, $slug, $title) = $matches;\n\n\t\t\t\t// Retrieve the title for the section, from\n\t\t\t\t// settings.json\n\t\t\t\t$text = trim(self::getOptions('text', '**Table of content**'));\n\n\t\t\t\t// $text is probably written in the markdown language,\n\t\t\t\t// get html version\n\t\t\t\t$file=$aeSettings->getFolderLibs().\"erusev/parsedown/Parsedown.php\";\n\n\t\t\t\tif ($aeFiles->exists($file)) {\n\t\t\t\t\tinclude_once $aeSettings->getFolderLibs().\"erusev/parsedown/Parsedown.php\";\n\t\t\t\t\t$parsedown = new \\Parsedown();\n\t\t\t\t\t$text=$parsedown->text(trim($text));\n\t\t\t\t}\n\n\t\t\t\t// Just add a carriage return after each entries\n\t\t\t\t$heads = implode(\"\\n\", $matches[0]);\n\n\t\t\t\t$j = count($matches[0]);\n\n\t\t\t\t// Process every entries in the table of content\n\t\t\t\tfor ($i = 0; $i < $j; $i++) {\n\t\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t\t// When the developper mode is enabled in\n\t\t\t\t\t// settings.json, the INCLUDE plugin will add a\n\t\t\t\t\t// sentence like\n\t\t\t\t\t//\n\t\t\t\t\t//\t###### DEV_MODE_PREFIX INCLUDE FILE\n\t\t\t\t\t// filename {.devmode}\n\t\t\t\t\t//\n\t\t\t\t\t// (DEV_MODE_PREFIX is a prefiw defined in\n\t\t\t\t\t// includes/constants.php)\n\t\t\t\t\t//\n\t\t\t\t\t// So, here in the Table of Content plugin, we\n\t\t\t\t\t// should ignore headings when the title starts\n\t\t\t\t\t// with the DEV_MODE_PREFIX and don't put them\n\t\t\t\t\t// in the table of content.\n\n\t\t\t\t\tif ($aeFunctions::startsWith($title[$i], DEV_MODE_PREFIX)) {\n\t\t\t\t\t\t$heads = str_replace($matches[0][$i], '', $heads);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t/*<!-- endbuild -->*/\n\n\t\t\t\t\t$entry = '<li class=\"toc'.$level[$i].'\"><a href=\"#'.$slug[$i].'\">'.$title[$i].'</a></li>';\n\n\t\t\t\t\t// Replace the header by the entry\n\t\t\t\t\t$heads = str_replace($matches[0][$i], $entry, $heads);\n\t\t\t\t}\n\n\t\t\t\t// Put everything in a navigation element\n\t\t\t\t$heads = \"<nav role='navigation' id='toc'><ul>\\n\".$heads.\"\\n</ul></nav>\";\n\n\t\t\t\t// Does we only display the title of the TOC\n\t\t\t\t// in a accordion ?\n\t\t\t\t$collapse = boolval(self::getOptions('collapse', 0));\n\n\t\t\t\tif ($collapse) {\n\t\t\t\t\t$text =\n\t\t\t\t\t\"<details>\".\n\t\t\t\t\t\t\"<summary>\".trim(strip_tags($text), ' ,;:').\"</summary>\".\n\t\t\t\t\t\t$heads.\n\t\t\t\t\t\"</details>\";\n\t\t\t\t} else {\n\t\t\t\t\t$text .= \"\\n\".$heads;\n\t\t\t\t}\n\t\t\t\t// And replace the tag (%TOC_3% f.i.) by the\n\t\t\t\t// table of content\n\t\t\t\t//$text = sprintf($text, $heads);\n\t\t\t\t$content = str_replace($match[0], $text, $content);\n\t\t\t} // if (preg_match_all($pattern\n\t\t} // if (preg_match(\"/%TOC_(\\\\d)%/\"\n\n\t\treturn true;\n\t}", "private function isPageEditedAfterGetText(): bool\n {\n $updatedPage = $this->wiki->newPageGetter()->getFromTitle($this->title);\n $updatedLastRevision = $updatedPage->getRevisions()->getLatest();\n // Non-strict object equality comparison\n /** @noinspection PhpNonStrictObjectEqualityInspection */\n return !($updatedLastRevision && $updatedLastRevision == $this->lastTextRevision);\n }", "public function isForcedSubtitle() {\n return (bool) $this->forced_subtitle;\n }", "function medigroup_mikado_post_has_read_more() {\n global $post;\n\n return strpos($post->post_content, '<!--more-->');\n }", "function is_good_tweet($tweet_text) {\n\t\t$subject = $tweet_text;\n\t\t$good_pattern = '/good|best|great|happy|cool|awesome|sweet/';\n\t\t\n\t\tif(preg_match($good_pattern, $subject)) return true;\n\t\telse return false;\n\t}", "public function beforeRender($teaserContent) {\n\t\treturn $teaserContent;\n\t}", "public function isEtat(): bool\n {\n return $this->etat;\n }", "function improved_trim_excerpt($text) { // Fakes an excerpt if needed\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n \n\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t$text = preg_replace('@<style[^>]*?>.*?</style>@si', '', $text);\n\t$text = preg_replace('@<p class=\"wp-caption-text\"[^>]*?>.*?</p>@si', '', $text);\t\n $text = str_replace('\\]\\]\\>', ']]&gt;', $text);\n $text = strip_tags($text, '<p><i><em><b><a><strong>');\n $excerpt_length = 140;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '... <a href=\"'.get_permalink($post->ID).'\">'.'Read More &raquo;'.'</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}", "public function hasTag(){\n return $this->_has(1);\n }", "public function hasNature() {\n return $this->_has(13);\n }", "private function is_unformatted($tag_check)\n { if (!in_array($tag_check, $this->options['unformatted'])) {\n return false;\n }\n\n if (strtolower($tag_check) !== 'a' || !in_array('a', $this->options['unformatted'])) {\n return true;\n }\n\n //at this point we have an tag; is its first child something we want to remain unformatted?\n $next_tag = $this->get_tag(true /* peek. */ );\n\n // test next_tag to see if it is just html tag (no external content)\n $matches = array();\n preg_match('/^\\s*<\\s*\\/?([a-z]*)\\s*[^>]*>\\s*$/', ($next_tag ? $next_tag : \"\"), $matches);\n $tag = $matches ? $matches : null;\n\n // if next_tag comes back but is not an isolated tag, then\n // let's treat the 'a' tag as having content\n // and respect the unformatted option\n if (!$tag || in_array($tag, $this->options['unformatted'])) {\n return true;\n } else {\n return false;\n }\n }", "function wpfme_writing_encouragement( $content ) {\n global $post_type;\n if($post_type == \"post\"){\n $encArray = array(\n // Placeholders for the posts editor\n \"Test post message one.\",\n \"Test post message two.\",\n \"<h1>Test post heading!</h1>\"\n );\n return $encArray[array_rand($encArray)];\n }\n else{ $encArray = array(\n // Placeholders for the pages editor\n \"Test page message one.\",\n \"Test page message two.\",\n \"<h1>Test Page Heading</h1>\"\n );\n return $encArray[array_rand($encArray)];\n }\n}" ]
[ "0.6659093", "0.62476754", "0.60756284", "0.6055573", "0.5985787", "0.5923568", "0.5847395", "0.57268655", "0.5688894", "0.5685316", "0.5622512", "0.56215763", "0.5612918", "0.55845845", "0.5546626", "0.5534685", "0.5532762", "0.5517347", "0.5474935", "0.54425466", "0.5441382", "0.54324305", "0.54280394", "0.5403264", "0.5375094", "0.5355305", "0.535193", "0.5345886", "0.53455234", "0.5344702", "0.5344702", "0.5344702", "0.5344702", "0.53236735", "0.5313041", "0.5312306", "0.5298827", "0.52952987", "0.5272813", "0.5272524", "0.52721894", "0.52090544", "0.52073586", "0.51852214", "0.51713115", "0.51699305", "0.51461023", "0.5119361", "0.5117307", "0.5113569", "0.5112181", "0.511178", "0.5109062", "0.51082385", "0.51053137", "0.51042295", "0.51005626", "0.50898314", "0.5085696", "0.50791794", "0.5077644", "0.5054333", "0.5053485", "0.50506794", "0.50426185", "0.50291014", "0.50283283", "0.5025919", "0.5025498", "0.50197864", "0.5011525", "0.5006298", "0.5006162", "0.50050753", "0.50014037", "0.49945647", "0.4992465", "0.49896365", "0.49860805", "0.49849716", "0.49772322", "0.49672547", "0.49665928", "0.49625197", "0.49524027", "0.4944909", "0.49300444", "0.49297613", "0.49181974", "0.491736", "0.4914856", "0.49140972", "0.48995158", "0.48939645", "0.4882648", "0.4882423", "0.48822817", "0.4875235", "0.48735517", "0.48645976" ]
0.8046954
0
Does this article have a body? Somthing must be written i the teaser for it to be considered as not empty So for example a teaser with only an empty paragraph is considered empty
function hasBody() { $body = strip_tags($this->body, "<img><a>"); $body = trim($body); if (empty($body)) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasTeaser() {\n\t\t$teaser = strip_tags($this->teaser, \"<img><a>\");\n\t\t$teaser = trim($teaser);\n\t\tif (empty($teaser)) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function hasContent(){ return !empty($this->content); }", "public function contentNotGiven()\n {\n return empty($this->content);\n }", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "public function hasContent(): bool\n {\n return (empty($this->content) === false);\n }", "public function hasContent()\n {\n return false;\n }", "abstract public function hasContent();", "public function hasNoContent()\n {\n return $this->properties['content'] === null;\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }", "public function hasContent() {}", "public function is_article();", "private function hasHTMLTags()\n {\n return !(strcmp($this->content, strip_tags($this->content)) == 0);\n }", "public function is_true_body_empty()\n {\n return $this->get_true_body() === '' || $this->get_true_body() === null;\n }", "public function hasBodyLines()\n {\n return count($this->getBodyLines()) > 0;\n }", "public function hasInfluencedContent();", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public function getBodyIsText()\n {\n return $this->bodyIsText;\n }", "public static function hasContent(): bool\n {\n return true;\n }", "public function hasText()\n {\n return $this->text != null;\n }", "public function hasContent(){\n return $this->_has(4);\n }", "public abstract function isTextPart();", "public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }", "public function isEmpty()\n\t{\n\t\treturn (empty($this->title)\n\t\t\t\t&& empty($this->body)\n\t\t\t\t&& is_null($this->sub_alert));\n\t}", "public function hasContent(){\n return $this->_has(6);\n }", "public function hasDescription()\n {\n return !empty($this->description);\n }", "function ep_get_teaser_or_body() {\n\n\t$content = ep_get_the_content(\"teaser\");\n\tif (empty($content)) {\n\t\t$content = ep_get_the_content(\"body\");\n\t}\n\treturn $content;\n}", "private function hasContent( $node ) {\n return $node->count() > 0 ? true : false;\n }", "function hasDescription()\n {\n return !empty($this->description);\n }", "public function isText() {}", "public function noteBody(string $body):bool\n {\n $bool = null;\n if (isset($body)) {\n if(strlen($body) < 1000) {\n $bool = true;\n } else {\n $bool = false;\n }\n }\n return $bool;\n }", "public function hasText()\n {\n return !is_null($this->update->message) &&\n !empty($this->update->message->text);\n }", "protected function isContentCorrect() {}", "public function has_PLAIN_not_HTML()\n\t{\n\t\treturn $this->PLAIN != '' && $this->HTML == '';\n\t}", "public function isRTE() {}", "public function hasContentElement(): bool\n {\n return $this->isChildElementSet(1);\n }", "public function hasText()\n {\n if ($this->_text) {\n return true;\n } else {\n return false;\n }\n }", "public function alternativeExists()\n {\n return !empty($this->AltBody);\n }", "public function isEmpty() {\n return $this->getLength() == 0;\n }", "public function hasContent()\n {\n return isset($this->content);\n }", "private function hasContent($node)\n {\n return $node->count() > 0 ? true : false;\n }", "public function hasText() {\n return !empty($this->text[\\App::getLocale()]);\n }", "public function canHaveBody() {\n return ( $this->status < 100 || $this->status >= 200 ) &&\n (!in_array($this->status, array(201, 204, 304)));\n }", "public function shouldAddBody()\n\t{\n\t\t// done? definitely don't add the body\n\t\tif ($this->done)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// eval'd and false? don't show the body\n\t\tif ($this->last_could_eval == TRUE && $this->last_result == FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function has_description(){\n\t\treturn 0 < strlen($this->_description);\n\t}", "public function isEmpty($element = null)\n {\n if (is_null($element)) {\n $element = $this->htmlBody;\n }\n return parent::isEmpty($element);\n }", "public function hasExplicitBodyData()\n {\n return $this->explicit_body_data !== null;\n }", "public function is_empty() {\n\t\treturn (\n\t\t\t! isset( $this->root )\n\t\t\t|| ! $this->root->hasChildNodes()\n\t\t);\n\t}", "public function isEmbargoed();", "function ois_empty_paragraph_fix($content)\r\n{\r\n $content = force_balance_tags($content);\r\n return preg_replace('#<p>\\s*+(<br\\s*/*>)?\\s*</p>#i', '', $content);\r\n}", "public function isText()\n {\n return $this->isBinary() === false;\n }", "private function term_empty() {\n\n $line = $this->_lines->cur();\n if (empty($line)) {\n // just skip empty lines\n $this->_lines->move();\n return '';\n } else {\n return false;\n }\n }", "public function isHtml(): bool;", "public function ensureContent();", "public function isText(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_TEXT );\n\t}", "function tidy_is_xhtml(tidy $object) {}", "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}", "public function hasContent()\n {\n return ($this->contentStream !== null);\n }", "protected function content_handle_no_teaser_block( $content ) {\n\t\tif ( (strpos($content, 'noTeaser:true') !== false || strpos($content, '\"noTeaser\":true') !== false) && strpos($content, '<!-- /wp:more -->') !== false) {\n\t\t\t$arr = explode('<!-- /wp:more -->', $content);\n\t\t\treturn trim($arr[1]);\n\t\t}\n\t\treturn $content;\n\t}", "public function is_empty() {\n global $PAGE;\n\n if (!$PAGE->user_is_editing()) {//if editing - show block\n return true;\n } else {//if not editing - don't show\n return false;\n }\n }", "public function hasRemark(){\n return $this->_has(4);\n }", "public function has_subtitle() {\n\t\treturn ! empty( $this->subtitle );\n\t}", "function kouka_has_table_of_contents() {\n\tif ( is_singular( 'blog' ) ) {\n\t\treturn true;\n\t}\n\n\tif ( is_single() ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function hasExplicitText(): bool\n {\n return isset($this->text);\n }", "function voyage_mikado_post_has_title() {\n return get_the_title() !== '';\n }", "public function noContent()\n {\n return $this->factory->noContent();\n }", "public function isTextNode(): bool\n {\n return $this->currentNode->nodeType == XML_TEXT_NODE;\n }", "public function isAfterBody()\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function isPageHomonymie(): bool\n {\n return false !== stristr($this->getText() ?? '', '{{homonymie');\n }", "public function isEmpty()\n {\n return !$this->elements;\n }", "public function isEmpty()\r\n {\r\n return count($this->childs) > 0 ? false : true;\r\n }", "static public function isHTML() {\n\t\treturn (self::$page_type === 0);\n\t}", "function kusurinotakagi_has_table_of_contents() {\n//\tif ( is_singular( 'blog' ) ) {\n//\t\treturn true;\n//\t}\n//\tif ( is_single() ) {\n//\t\treturn true;\n//\t}\n\n\treturn false;\n}", "public function hasTags()\n {\n return 0 < count($this->tags);\n }", "public function hasTags()\n {\n return 0 < count($this->getTags());\n }", "public function isText()\n {\n return $this->getName() === 'text';\n }", "public function isExpectingDocument();", "public function isPlain()\n\t{\n\t\treturn Str::contains($this->getHeaderLine('Content-Type'), '/plain');\n\t}", "public function hasDescription($item)\n {\n return trim($item->getDescription()) != '';\n }", "function has_wysiwyg($item) {\n\t\treturn $item['type'] == 'textarea' && isset($item['wysiwyg']) && $item['wysiwyg'] == true;\n\t}", "public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }", "function has_summary() {\n return (strlen(get_field('summering')) > 0);\n}", "public function is_empty()\n\t\t{\n\t\t\tif ($this->is_cached()) {\n\t\t\t\treturn !is_null($this->content);\n\t\t\t}\n\n\t\t\tif ($this->exists() || $this->saved) {\n\t\t\t\treturn $this->size() <= 0;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "public function hasPublishedTag() {\n return $this->_has(1);\n }", "public function isEmpty() {\n return $this->is(new NotPossible('is empty'));\n }", "function toBoolean() {\n return $this->content != false;\n }", "function domTreeIsEmpty() {\n global $dom;\n $root = $dom->documentElement;\n $isEmpty = !($root->hasChildNodes());\n return $isEmpty;\n}", "public function isHtml()\n\t{\n\t\treturn stripos($this->getContentType(), 'html') !== false;\n\t}", "public function isEmpty()\n {\n return ! $this->_elements;\n }", "function verify_content($content) // Colorize: green\n { // Colorize: green\n return isset($content) // Colorize: green\n && // Colorize: green\n is_string($content) // Colorize: green\n && // Colorize: green\n $content != \"\"; // Colorize: green\n }", "public function isHtml() {}", "function has_readmore()\n{\n\tglobal $post;\n\tif(strpos(get_the_content(), \"#more-\")===FALSE)\n\t\treturn FALSE;\n\telse\n\t\treturn TRUE;\n}", "public function getBodyText();", "public function check()\n {\n return count($this->simpleXML->xpath('//ro:description')) > 0;\n }", "public function isEmpty() {}", "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 hasDescription(){\n return $this->_has(1);\n }", "public function hasObjectAttributeContent( $contentObjectAttribute )\n {\n return trim( $contentObjectAttribute->attribute( 'data_text' ) ) != '';\n }", "public function ensureContent() {}", "public function isText() {\n\t\treturn MimeType::isText($this);\n\t}" ]
[ "0.69119656", "0.6849419", "0.6744094", "0.65199625", "0.6468172", "0.64234823", "0.6380174", "0.63600844", "0.63541216", "0.63541216", "0.6353376", "0.6344033", "0.62879217", "0.6286339", "0.6269117", "0.6261149", "0.6260428", "0.6260428", "0.6248781", "0.6110059", "0.6107866", "0.6099751", "0.6038108", "0.6022457", "0.5984111", "0.5952234", "0.593413", "0.58990604", "0.58973956", "0.5880217", "0.58767366", "0.5834584", "0.5833041", "0.57973516", "0.57966185", "0.57704973", "0.5769321", "0.57676095", "0.57306665", "0.57224303", "0.57047004", "0.56938994", "0.5690097", "0.56784034", "0.56328994", "0.56153125", "0.5610955", "0.56059474", "0.56003016", "0.5592862", "0.55784965", "0.556587", "0.5544356", "0.55437315", "0.5534716", "0.5533194", "0.5532344", "0.5528334", "0.5518474", "0.55122524", "0.5500612", "0.5466974", "0.5461147", "0.54607", "0.5460156", "0.5439443", "0.54187614", "0.54182065", "0.5417137", "0.5386244", "0.5384941", "0.53825873", "0.53802156", "0.53758246", "0.5373269", "0.5357229", "0.5356933", "0.5353502", "0.5346299", "0.5342673", "0.5339632", "0.533654", "0.53334486", "0.53305423", "0.5319247", "0.53120315", "0.5311774", "0.5304065", "0.5290383", "0.5272096", "0.52675617", "0.5264972", "0.52634394", "0.526078", "0.5249472", "0.5247344", "0.524618", "0.5234274", "0.5232816", "0.5228953" ]
0.7467016
0
check if this article is a direct child or a subchild of the article $refArticle
function isChildOrSubChildOf($refArticle) { if (is_numeric($refArticle)) { $refArticle = polarbear_article::getInstance($refArticle); } $isChild = false; // loop our way up until we reach the top article or refArticle // $refArticle $doLoop = true; $tmpA = $this; while ($doLoop) { // get parent article $tmpA = $tmpA->parent(); if ($tmpA == null) { return false; } #echo "<br><br>tmpA:".$tmpA->getTitleArticle(); #echo "<br> refArticle->getId():" . $refArticle->getId(); #echo "<br> tmpA->getId():" . $tmpA->getId(); #echo "<br> tmpA->getParentId():"; var_dump($tmpA->getParentId()); // check if the parent article is the refArticle. if it is, that means that $this is a child of $refArticle if ($tmpA->getId() == $refArticle->getId()) { return true; } // if parent is null = is at top level if ($tmpA->getParentId()==null) { return false; } } pb_pqp_log_speed("article isChildOrSubChildOf()"); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isChild()\n {\n return $this->parentId != null;\n }", "public function isChild() {\n\t\treturn $this->_parent !== null;\n\t}", "public function isChild()\n {\n if (false === $this->parent_category) {\n return false;\n }\n\n return true;\n\n }", "public function isChildOnly();", "function is_child($parent) {\n\tglobal $wp_query;\n\tif ($wp_query->post->post_parent == $parent) { $return = true; } else { $return = false; }\n\treturn $return;\n}", "public function isChild(): bool\n {\n return false;\n }", "public function isChild(): bool;", "function custom_is_child($pid)\n{\n global $post; // load details about this page\n $anc = get_post_ancestors($post->ID);\n foreach ($anc as $ancestor) {\n if (is_page() && $ancestor == $pid) {\n return true;\n }\n }\n return false; // we're elsewhere\n}", "function is_child($pageID) { \n\tglobal $post; \n\tif( is_page() && ($post->post_parent==$pageID) ) {\n return true;\n\t} else { \n return false; \n\t}\n}", "public function hasChild()\n {\n return count($this->_children) > 0;\n }", "function ep_is_child_of($page_id) {\n\tglobal $post;\n\t$is_child = false;\n\t$parents = get_post_ancestors($post);\n\tif ($parents) {\n\t\tforeach ($parents as $one_parent_id) {\n\t\t\tif ($one_parent_id == $page_id) {\n\t\t\t\t$is_child = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn $is_child;\n}", "function has_child () {\n\t\treturn sizeof($this->children) ? true : false;\n\t}", "function isChildren()\n {\n return count($this->children)>0;\n }", "function is_child_of($theparentid){\n\t$childpages = get_pages('child_of='.$theparentid);\n\tforeach($childpages as $thepage){ \n\t\tif( is_page($thepage->ID)){\n\t\t\treturn true;\n\t\t}\n\t\n\t} // end for each \n\treturn false;\n}", "public function HasChild()\n\t{\n\t\treturn ($this->Child()->count()) ? true : false;\n\t}", "public function isDescendantOf(Doctrine_Record $subj);", "public function isChildOf($node)\n\t{\n\t\treturn $this->getLevel()>$node->getLevel();\n\t}", "static function cws_has_children() {\n\t\tglobal $post;\n\n\t\t$children = get_pages( array( 'child_of' => $post->ID ) );\n\n\t\tif ( count( $children ) == 0 ) {\n\n\t\t\treturn false;\n\n\t\t} else {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "final public function hasChild(CtkBuildable $node) {\n\t\treturn false;\n\t}", "function isChild($input) {\n\t if (exist(\"pages\", \"id\", $input)) {\t\t\t\t\t\t\n\t\t $childCheck = query(\"SELECT * FROM `pages` WHERE `id` = '{$input}'\");\n\t\t \n\t\t if ($childCheck['id'] == $_GET['id']) {\n\t\t\t return true;\n\t\t } else {\n\t\t\t return isChild($childCheck['parentPage']);\n\t\t }\n\t }\n }", "abstract public function hasItemChild($itemName, $childName);", "function has_children(){\n\t\tglobal $post;\n\t\t$pages = get_pages('child_of='.$post->ID);\n\t\treturn count($pages);\n\t}", "public function getHasChild()\n {\n $sql = \"SELECT * FROM \" . TB_USAGE . \" WHERE parent_id = \" . $this->db->sqltext($this->mix_id);\n $this->db->query($sql);\n if ($this->db->num_rows() > 0) {\n $this->hasChild = true;\n } else {\n $this->hasChild = false;\n }\n\n return $this->hasChild;\n }", "function has_child($id){\n\t\t$rs = $this->db->query('select count(*) from c_dokumen_informasi where parent_id='.$id.'')->result_array();\n\t\t$row = $rs;\n\t\treturn $row[0] > 0 ? true : false;\n\t}", "public function hasChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_machinery_categories '\n .'WHERE parent_category_id = '. $this->category_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n\n if ($result->getRows() > 0) {\n return true;\n }\n\n return false;\n\n }", "function is_tree($pid)\n\t\t{\n\t\t global $post;\n\t\t $ancestors = get_post_ancestors($post->$pid);\n\t\t $root = count($ancestors) - 1;\n\t\t $parent = $ancestors[$root];\n\t\t if(is_page() && (is_page($pid) || $post->post_parent == $pid || in_array($pid, $ancestors)))\n\t\t {\n\t\t return true;\n\t\t }\n\t\t else\n\t\t {\n\t\t return false;\n\t\t }\n\t\t}", "public function is_child( $page_id ){\n\t\tglobal $post;\n\t\tif( is_page() && ( $post->post_parent == $page_id ) ){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function hasChildren();", "public function hasChildren();", "public function hasChildren();", "public function hasChildren();", "function is_tree($pid) {\n\tglobal $post; // load details about this page\n\tif(is_page()&&($post->post_parent==$pid||is_page($pid))) \n return true; // we're at the page or at a sub page\n\telse \n return false; // we're elsewhere\n}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "public function hasChildren() {}", "function is_tree($pid) { // $pid = The ID of the page we're looking for pages underneath\n\tglobal $post; // load details about this page\n\tif(is_page()&&($post->post_parent==$pid||is_page($pid)))\n return true; // we're at the page or at a sub page\n\telse\n return false; // we're elsewhere\n}", "public function isDescendantOf($subj)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$result=($owner->{$this->leftAttribute}>$subj->{$this->leftAttribute})\n\t\t\t&& ($owner->{$this->rightAttribute}<$subj->{$this->rightAttribute});\n\n\t\tif($this->hasManyRoots)\n\t\t\t$result=$result && ($owner->{$this->rootAttribute}===$subj->{$this->rootAttribute});\n\n\t\treturn $result;\n\t}", "public function isOnlyChild(): bool\n {\n if ($this->isFirstChild() === true && $this->isLastChild() === true) {\n return true;\n } else {\n return false;\n }\n }", "function is_tree( $pid ) {\n\tglobal $post; // load details about this page\n\tif ( is_page() && ( $post->post_parent == $pid || is_page( $pid ) ) ) {\n\t\treturn true;\n\t} // we're at the page or at a sub page\n\telse {\n\t\treturn false;\n\t} // we're elsewhere\n}", "private function hasChilds(): bool\n {\n return (bool)$this->treePathModelClass::find()\n ->byParentId($this->owner->id)\n ->byChildId($this->owner->getAttribute($this->ownerParentIdAttribute))\n ->count();\n }", "function is_child_category($thecategory ){\n\t$params = array('type' => 'post',\n 'child_of' => $thecategory,\n 'hierarchical' => 0, );\n\t$cats = get_categories($params);\n\n\tforeach ($cats as $cat) {\n\t\tif ( is_category($cat->cat_ID) ){\n\t\t\treturn true;\n\t\t}\n \t} // end for children\n\treturn false;\n}", "function gemini_migrate_d5_menu_item_has_children($mid) {\n $result = gemini_migrate_d5_get_menu('D5');\n $menu = gemini_migrate_d5_menu_flat($result);\n\n foreach($menu as $m) {\n if($m['pid'] == $mid) {\n return TRUE;\n }\n }\n\n return FALSE;\n}", "public function hasChildren(): bool;", "function has_children(){\n\tglobal $post;\n\t$pages = get_pages('child_of=' . $post->ID);\n\treturn count($pages);\n}", "public static function isChild( $rootNode, $node )\n {\n $db = eZDB::instance();\n $nodeId = $node->attribute( 'node_id' );\n $nodePath = $rootNode->attribute( 'path_string' );\n\n $pathString = \"path_string like '$nodePath%' and \";\n\n $query = \"SELECT ezcontentobject_tree.*\n FROM ezcontentobject_tree,\n ezcontentobject,\n ezcontentclass\n WHERE $pathString\n node_id = $nodeId AND\n ezcontentclass.version=0 AND\n ezcontentobject_tree.contentobject_id = ezcontentobject.id AND\n ezcontentclass.id = ezcontentobject.contentclass_id\";\n\n $nodeListArray = $db->arrayQuery( $query );\n\n return isset( $nodeListArray[0] ) ? true : false;\n }", "public function hasChilds() {\n if(is_bool($this->hasChilds)){\n if(($this->hasChilds and empty($this->childs)) or (!$this->hasChilds and !empty($this->childs))){\n return $this->getResource()->hasChilds();\n } else {\n return $this->hasChilds;\n }\n }\n return $this->getResource()->hasChilds();\n }", "function has_children(){\n global $post;\n\n $pages = get_pages('child_of= '. $post->ID);\n return count($pages);\n}", "public function hasChildDocuments() {}", "function has_children() {\n global $post;\n\n $pages = get_pages('child_of=' . $post->ID);\n return count($pages);\n}", "public function isDescendantOf($subj) {\n $result = ($this->{$this->leftAttribute} > $subj->{$this->leftAttribute})\n && ($this->{$this->rightAttribute} < $subj->{$this->rightAttribute});\n\n if ($this->hasManyRoots)\n $result = $result && ($this->{$this->rootAttribute} === $subj->{$this->rootAttribute});\n\n return $result;\n }", "public function hasChildren() \n {\n return count($this->children) > 0;\n }", "public function hasRightChild()\n\t{\n\t\treturn isset($this->rightChild);\n\t}", "public function isDescendantOf($post): bool\n {\n $givenPost = $post instanceof static ? $post->wpPost() : get_post($post);\n $myAncestors = $this->ancestors;\n $isDescendant = $myAncestors->search(function (Post $myAncestor) use ($givenPost) {\n return $givenPost->ID === $myAncestor->id;\n });\n\n return $isDescendant !== false;\n }", "function has_children() {\n \n global $post;\n\n $pages = get_pages('child_of=' . $post->ID);\n \n return count($pages);\n}", "public function getIsChildAttribute(){\n return $this->parent_id != NULL;\n }", "private function has_children() {\n return !empty($this->menuitems);\n }", "public function hasChildren()\n {\n }", "public function hasChildren()\n {\n }", "function category_has_children() {\n global $wpdb;\n $term = get_queried_object();\n $category_children_check = $wpdb->get_results(\" SELECT * FROM wp_term_taxonomy WHERE parent = '$term->term_id' \");\n if ($category_children_check) {\n return true;\n } else {\n return false;\n }\n}", "public function hasChildren(BaseObject $node)\n {\n return (bool)($node->getRightValue() - $node->getLeftValue() > 1);\n }", "function has_children(){\n global $post;\n\n $pages = get_pages( 'child_of=' . $post->ID );\n return count($pages);\n}", "public function has_children($nid)\n\t{\n\t\treturn !empty($this->children[$nid]);\n\t}", "public function isChildOf($page) {\n if(!is_a($page, 'Page')) $page = page($page);\n\n return $this->is($page) ? false : $this->parent->is($page);\n }", "public function hasChildren()\n {\n return $this->myChildren()->exists();\n }", "private function _check_page_is($child_id = 0)\n\t{\n\t\t$descendent_id\t= $this->attribute('descendent');\n\t\t$parent_id\t\t= $this->attribute('parent');\n\n\t\tif ($child_id && $descendent_id)\n\t\t{\n\t\t\tif ( ! is_numeric($child_id))\n\t\t\t{\n\t\t\t\t$child_id = ($child = $this->pages_m->get_by(array('slug' => $child_id))) ? $child->id: 0;\n\t\t\t}\n\n\t\t\tif ( ! is_numeric($descendent_id))\n\t\t\t{\n\t\t\t\t$descendent_id = ($descendent = $this->pages_m->get_by(array('slug' => $descendent_id))) ? $descendent->id: 0;\n\t\t\t}\n\n\t\t\tif ( ! ($child_id && $descendent_id))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t$descendent_ids\t= $this->pages_m->get_descendant_ids($descendent_id);\n\n\t\t\treturn in_array($child_id, $descendent_ids);\n\t\t}\n\n\t\tif ($child_id && $parent_id)\n\t\t{\n\t\t\tif ( ! is_numeric($child_id))\n\t\t\t{\n\t\t\t\t$parent_id = ($parent = $this->pages_m->get_by(array('slug' => $parent_id))) ? $parent->id: 0;\n\t\t\t}\n\n\t\t\treturn $parent_id ? (int) $this->pages_m->count_by(array(\n\t\t\t\t(is_numeric($child) ? 'id' : 'slug') => $child,\n\t\t\t\t'parent_id'\t=> $parent_id\n\t\t\t)) > 0: FALSE;\n\t\t}\n\t}", "public function canHaveChildren() {}", "public function hasChildren( $permissionCheck='view', $member=NULL, $subnodes=TRUE, $_where=array() )\n\t{\n\t\treturn ( $this->childrenCount( $permissionCheck, $member, $subnodes, $_where ) > 0 );\n\t}", "final public function hasChildren(): bool\n {\n return $this->valid() && $this->current()->hasPages();\n }", "public function hasLeftChild()\n\t{\n\t\treturn isset($this->leftChild);\n\t}", "public function isChildSupported();", "private function is_parent()\n\t{\n\t\treturn is_null($this->category_id);\n\t}", "public function element_is_child($id_child, $id_parent) {\n $parent = $this->element_read($id_parent);\n $child = $this->element_read($id_child);\n if (($child[\"LFT\"] > $parent[\"LFT\"]) && ($child[\"RGT\"] < $parent[\"RGT\"]))\n return true;\n return false;\n }", "public function hasChildren()\n {\n return count($this->children) > 0 ? true : false;\n }", "public function isCurrentChild(): bool;", "public function hasChildren()\n {\n return $this->childContainer->hasItem();\n }", "public function hasChild($itemID){\n foreach ($this->children as $node){\n if($node->itemID === $itemID){\n return true;\n }\n\n }\n return false;\n }", "public function isParent();", "public function hasChildren()\n {\n return $this->children->count() == 0 ? false : true;\n }", "public function childExists($id) {\n\t\treturn ($this->getChild($id) !== null);\n\t}", "function hasChildren( &$childrenCount, $id = \"this\" )\r\n {\r\n $ret = false;\r\n\r\n if ( $id == \"this\" )\r\n {\r\n $id = $this->ID;\r\n }\r\n\r\n if ( is_numeric( $id ) )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $company_type_array = array();\r\n $db->array_query( $company_type_array, \"SELECT ParentID FROM eZContact_CompanyType WHERE ParentID='$id'\" );\r\n $childrenCount = count( $company_type_array );\r\n\r\n if ( $childrenCount != 0 )\r\n {\r\n $ret = true;\r\n }\r\n }\r\n\r\n return $ret;\r\n }", "public function hasChildren() {\n\t\treturn $this->children()->count() > 0;\n\t}", "function is_post_type_hierarchical($post_type)\n {\n }", "public function hasChildren () {\n return ($this->current () instanceof self);\n }", "protected function isChildTrigger($arg){\n return in_array($arg,$this->trigger_childes);\n }", "public function element_has_childs($id) {\n global $db;\n if ($db->fetch_atom(\"SELECT count(*) FROM `\".$this->table.\"` WHERE ROOT=\".$this->root.\" AND PARENT=\".$id) > 0)\n return true;\n return false;\n }", "public function hasChildFolders()\n {\n return $this->ChildFolders()->exists();\n }", "public function hasChildren()\n\t{\n\t\treturn ! $this->current()->isLeaf();\n\t}", "public function hasChild($name)\n\t{\n\t\treturn $this->_auth->hasItemChild($this->_calendarId,$this->_name,$name);\n\t}", "function is_parent()\n{ \n global $post;\n\n if ( is_page() && $post->post_parent ) {\n // This is a subpage\n return;\n\n } else {\n // This is not a subpage\n return true;\n }\n \n}", "public function hasChildren()\n {\n return !empty($this->children);\n }", "public function isGrandChild($a_startnode_id,$a_querynode_id)\n\t{\n\t\treturn $this->getRelation($a_startnode_id, $a_querynode_id) == self::RELATION_PARENT;\n\t}", "public function hasChildren()\n\t{\n\t\treturn !empty($this->children);\n\t}", "public function hasChildren(): bool\n {\n return $this->children()->count() > 0;\n }", "public function hasParent();", "public function hasParent();", "public function hasParent();", "public static function isChildNamespaceOf(string $parent, string $sub): bool {\n $result = true;\n $subPieces = explode('\\\\', trim($sub, '\\\\'));\n $parentPieces = explode('\\\\', trim($parent, '\\\\'));\n // echo \"\\nsub:\\t\" . count($subPieces);\n // echo \"\\nparent:\\t\" . count($parentPieces);\n //var_dump(count($subPieces) < count($parentPieces));\n if (count($subPieces) < count($parentPieces)) {\n $result = false;\n } else {\n foreach ($parentPieces as $id => $parentPiece) {\n if ($subPieces[$id] !== $parentPiece) {\n $result = false;\n break;\n }\n }\n }\n return $result;\n }", "function has_post_parent($post = \\null)\n {\n }" ]
[ "0.6815142", "0.6668545", "0.6608818", "0.659937", "0.65369827", "0.64985424", "0.64686435", "0.6459183", "0.635483", "0.62968016", "0.6184997", "0.6153859", "0.61355823", "0.61238194", "0.6113297", "0.61029553", "0.6039569", "0.6037054", "0.6002086", "0.5970923", "0.5962534", "0.59467745", "0.59446025", "0.5937139", "0.59334695", "0.5924717", "0.5923341", "0.59108025", "0.59108025", "0.59108025", "0.59108025", "0.59082806", "0.590281", "0.59023505", "0.59023505", "0.59023505", "0.59023505", "0.5892192", "0.5889908", "0.5889066", "0.5881319", "0.58487594", "0.5825722", "0.5814891", "0.5802954", "0.5801616", "0.5787486", "0.5782999", "0.5780752", "0.57756346", "0.57700783", "0.57694125", "0.5766202", "0.57613903", "0.5754046", "0.5746816", "0.5739194", "0.57382953", "0.57373184", "0.57373184", "0.57244986", "0.5714573", "0.57137877", "0.5703779", "0.5701307", "0.56963825", "0.5686253", "0.567791", "0.5666287", "0.56630605", "0.56615394", "0.56565714", "0.56535083", "0.56488115", "0.5645702", "0.5635597", "0.5635322", "0.56226605", "0.5621824", "0.5620292", "0.5594099", "0.55823773", "0.55791205", "0.55779755", "0.55758446", "0.55735636", "0.5571794", "0.55702436", "0.556905", "0.5555338", "0.55518633", "0.55498904", "0.5549619", "0.55374753", "0.55360377", "0.5519155", "0.5519155", "0.5519155", "0.5511882", "0.5503271" ]
0.861463
0
returns output this article according to the templateformat in $template if the article is not published, an empty string will be returned
function output($template) { global $polarbear_u, $polarbear_a; $isOk = false; if ($this->isPublished()) { $isOk = true; } else if ($this->getStatus()=="preview" && is_object($polarbear_u) && $polarbear_u->isAdmin()) { $isOk = true; } if ($isOk == false) { return ''; } $dwoo = new Dwoo(); $dwoo->setCompileDir(POLARBEAR_STORAGEPATH . 'dwoo'); $data = new Dwoo_Data(); $tpl = new Dwoo_Template_String($template); // add variables $data->assign('id', $this->getId()); $data->assign('titleArticle', htmlspecialchars($this->getTitleArticle(), ENT_COMPAT, "UTF-8")); $data->assign('titleArticleRaw', $this->getTitleArticle()); $data->assign('titlePage', htmlspecialchars($this->getTitlePage(), ENT_COMPAT, "UTF-8")); $data->assign('titleNav', htmlspecialchars($this->getTitleNav(), ENT_COMPAT, "UTF-8")); $data->assign('href', $this->href()); $data->assign('hrefFull', $this->hrefFull()); $data->assign('fullPageTitle', $this->fullPageTitle()); $data->assign('teaser', $this->getTeaser()); $data->assign('teaserNoTags', strip_tags($this->getTeaser())); $data->assign('hasTeaser', $this->hasTeaser()); $data->assign('body', $this->getBody()); $data->assign('bodyNoTags', strip_tags($this->getBody())); $data->assign('hasBody', $this->hasBody()); $data->assign('datePublish', $this->getDatePublish()); $data->assign('dateChanged', $this->getDateChanged()); $data->assign('metaDescription', trim($this->getMetaDescription())); $data->assign('metaKeywords', trim($this->getMetaKeywords())); if ($this->getStatus()=="preview") { // no edit icons in preview mode } else { $data->assign('edit', $this->getEditString()); $data->assign('editPrio', $this->getEditPrioString()); $data->assign('editAdd', $this->getEditAddString()); $data->assign('editAddChild', $this->getEditAddChildString()); } $SEOMetaTags = ""; if (trim($this->getMetaDescription())) { $SEOMetaTags .= '<meta name="description" content="' . htmlspecialchars(trim($this->getMetaDescription()), ENT_COMPAT, "UTF-8") . '" />'; } if (trim($this->getMetaKeywords())) { $SEOMetaTags .= '<meta name="keywords" content="' . htmlspecialchars(trim($this->getMetaKeywords()), ENT_COMPAT, "UTF-8") . '" />'; } $data->assign('SEOMetaTags', $SEOMetaTags); // $isCurrentArticle, good for using i lists $isCurrentArticle = false; if ($polarbear_a && $polarbear_a->getId() == $this->getId()) { $isCurrentArticle = true; } $data->assign('isCurrentArticle', $isCurrentArticle); // fetch parent so vi easily can check if current article is child of some article // todo: since these are the same as for the current article maybe we could make a wrapper for it.. somehow $parentA = PolarBear_Article::getInstance($this->parentID); $data->assign('parentId', $parentA->getId()); $data->assign('parentTitleArticle', htmlspecialchars($parentA->getTitleArticle(), ENT_COMPAT, "UTF-8")); $data->assign('parentTitlePage', htmlspecialchars($parentA->getTitlePage(), ENT_COMPAT, "UTF-8")); $data->assign('parentTitleNav', htmlspecialchars($parentA->getTitleNav(), ENT_COMPAT, "UTF-8")); $data->assign('parentHref', $parentA->href()); $data->assign('parentHrefFull', $parentA->href()); $data->assign('parentFullPageTitle', $parentA->fullPageTitle()); $data->assign('parentTeaser', $parentA->getTeaser()); $data->assign('parentHasTeaser', $parentA->hasTeaser()); $data->assign('parentBody', $parentA->getBody()); $data->assign('parentHasBody', $parentA->hasBody()); $data->assign('parentDatePublish', $parentA->getDatePublish()); $data->assign('parentDateChanged', $parentA->getDateChanged()); $data->assign('parentMetaDescription', $parentA->getMetaDescription()); $data->assign('parentMetaKeywords', $parentA->getMetaKeywords()); $fieldValues = $this->fieldValues(); $data->assign('fields', $fieldValues); $out = $dwoo->get($tpl, $data); $out = pb_event_fire("article_output", array("article" => $this, "output" => $out)); $out = $out["output"]; #pb_pqp_log_speed("article output()"); return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function templateToUse() {\n\t\t// loop until templateType = name | custom\n\t\t$templateType = $this->getTemplateType();\n\t\t$templateCustom = $this->getTemplateCustom();\n\t\t$templateName = $this->getTemplateName();\n\t\t$articleName = $this->getTitleArticle();\n\t\t$articleId = $this->getId();\n\t\t$parent = $this->parent();\n\t\t\n\t\t$i = 0;\n\t\twhile ($templateType != 'name' && $templateType != 'custom' && $parent !== null) {\n\t\t\t$templateType = $parent->getTemplateType();\n\t\t\t$templateCustom = $parent->getTemplateCustom();\n\t\t\t$templateName = $parent->getTemplateName();\n\t\t\t$articleName = $parent->getTitleArticle();\n\t\t\t$articleId = $parent->getId();\n\t\t\t$parent = $parent->parent();\n\t\t}\n\t\t\n\t\t/*\n\t\techo \"<br><br>templateType: \" . $templateType;\n\t\techo \"<br>templateCustom: \" . $templateCustom;\n\t\techo \"<br>templateName: \" . $templateName;\n\t\techo \"<br>articleName: \" . $articleName;\n\t\techo \"<br>articleID: $articleId\";\n\t\t// */\n\t\t\n\t\t$templates = polarbear_getTemplates();\n\t\t\n\t\tpb_pqp_log_speed(\"article templateToUse\");\n\t\t\n\t\tif ($templateType == 'custom') {\n\t\t\treturn $templateCustom;\n\t\t} else if (isset($templates[$templateName])) {\n\t\t\treturn $templates[$templateName]['file'];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "function useTemplate()\r\n { \t\r\n \t$objDef = self::definition();\r\n \t \t\r\n \t$db = eZDB::instance();\r\n \t$rows = $db->arrayQuery('\r\n \t\tSelect IF( T1.use_template_title IS NULL, FALSE, T1.use_template_title ) as title,\r\n \t\t\t IF( T1.use_template_description IS NULL, FALSE, T1.use_template_description ) as description\r\n \t\tFrom '. $objDef['name']. ' as T0 \r\n \t\tLeft Join opsarss_export_item_template as T1\r\n \t\tOn T0.id = T1.ezrss_export_item_id\r\n \t\tWhere T0.id = '. $this->ID.'\r\n \t');\r\n \t\r\n \treturn $rows[0];\r\n }", "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '### NEWS LIST ###';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=modules&act=edit&id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n $this->news_archives = $this->sortOutProtected(deserialize($this->news_archives, true));\n\n // Return if there are no archives\n if (!is_array($this->news_archives) || count($this->news_archives) < 1)\n {\n return '';\n }\n\n return parent::generate();\n }", "abstract public function getTemplate();", "public function template();", "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### NOOBSLIDE FROM ARTICLE ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\t\t// Return no alias has been set\n\t\tif ($this->nSarticleAlias < 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn parent::generate();\n\t}", "protected function get_entry_template() {\n if ($this->_entrytemplate === null) {\n $this->_entrytemplate = '';\n if ($this->param2) {\n // Apply text filters to template.\n $formatoptions = array(\n 'para' => false,\n 'allowid' => true,\n 'trusted' => true,\n 'noclean' => true\n );\n $this->_entrytemplate = format_text($this->param2, FORMAT_HTML, $formatoptions);\n }\n }\n return $this->_entrytemplate;\n }", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function getTemplate(): string;", "public function apply($template_resource) {\r\n \t\r\n \tswitch ($this->current_page['view']['main']) {\r\n \t\t\r\n \t\tcase SITE_VIEW_HOME:\r\n\t $articles_on_start = PecArticle::load('onstart', 1, '', true);\r\n\t \r\n\t if (count($articles_on_start) > 0) {\r\n\t \t$template = $articles_on_start[0]->get_template();\r\n\t \t\r\n\t\t $template_resource->set('template', $template);\r\n\t \t$template_resource->set('articles', $articles_on_start);\r\n\t }\r\n\t else {\r\n\t \t$template_resource->set('articles', array());\r\n\t }\r\n\t \r\n\t break;\r\n \t\t\r\n\t \r\n \t\tcase SITE_VIEW_ARTICLE:\r\n\t $by = $this->settings->get_load_by();\r\n\t \r\n\t // check if it exists\r\n\t if (PecArticle::exists($by, $this->current_page['target']['data'])) {\r\n\t $article = PecArticle::load($by, $this->current_page['target']['data']);\r\n\t \r\n\t \t$template = $article->get_template();\r\n\t \t\r\n\t \t$template_resource->set('template', $template);\r\n\t \t$template_resource->set('article', $article);\r\n\t }\r\n\t else {\r\n\t $this->is_404 = true;\r\n\t }\r\n\t break;\r\n\t \r\n\t \r\n \t\tcase SITE_VIEW_SEARCH:\r\n\t $search = new PecSearch($this->current_page['view']['data']);\r\n\t $search->do_search();\r\n\t $article = $search->get(); \r\n\t \r\n\t $template_resource->set('article', $article);\r\n\t break;\r\n\t \r\n \t}\r\n \t\r\n \t#return $template_resource;\r\n }", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function render($template_set = '') {\r\n\r\n if (!intval(t3lib_div::_GP(tx_newspaper::GET_article()))) {\r\n $this->prepare_render();\r\n $this->smarty->assign('GET', $_GET);\r\n return $this->smarty->fetch('error_article_on_section_page.tmpl');\r\n }\r\n\r\n /// find current section's default article and read its template set\r\n $default_article = $this->getPageZone()->getParentPage()->getParentSection()->getDefaultArticle();\r\n if ($default_article instanceof tx_newspaper_article && $default_article->getAttribute('template_set')) {\r\n $template_set = $default_article->getAttribute('template_set');\r\n }\r\n try {\r\n $article = new tx_newspaper_article(t3lib_div::_GP(tx_newspaper::GET_article()));\r\n return $article->render($template_set);\r\n } catch (tx_newspaper_Exception $e) {\r\n throw new tx_newspaper_ObjectNotFoundException('tx_newspaper_Article', t3lib_div::_GP(tx_newspaper::GET_article()));\r\n }\r\n }", "public function getTemplate() {}", "function shell_post_format_singular_template( $template ){\r\n\r\n\t/* get queried object */\r\n\t$post = get_queried_object();\r\n\r\n\t/* check supported post type */\r\n\tif ( post_type_supports( $post->post_type, 'post-formats' ) ) {\r\n\r\n\t\t/* get post format of current object */\r\n\t\t$format = get_post_format( get_queried_object_id() );\r\n\r\n\t\t/* template */\r\n\t\t$templates = array(\r\n\t\t\t\"{$post->post_type}-{$post->post_name}.php\",\r\n\t\t\t\"{$post->post_type}-{$post->ID}.php\",\r\n\t\t\t\"{$post->post_type}-format-{$format}.php\"\r\n\t\t);\r\n\r\n\t\t/* locate template */\r\n\t\t$has_template = locate_template( $templates );\r\n\r\n\t\tif ( $has_template )\r\n\t\t\t$template = $has_template;\r\n\t}\r\n\r\n\treturn $template;\r\n}", "public function getTemplate()\n {\n return isset($this->parseTemplate)?$this->parseTemplate:false;\n }", "public function getWikiOutput() {\n\t\t// Template variable not set, use dummy return values\n\t\tif ( $this->today == '{{{date}}}' ) {\n\t\t\t$pw = \"TemplatePathway\";\n\t\t\t$date = \"TemplateDate\";\n\t\t} else {\n\t\t\t$pw = $this->todaysPathway();\n\t\t\t$name = $pw->name();\n\t\t\t$species = $pw->species();\n\t\t\t$article = $pw->getTitleObject()->getFullText();\n\t\t\t$image = $pw->getImageTitle()->getFullText();\n\t\t\t$date = $this->today;\n\t\t}\n\t\treturn \"{{Template:TodaysPathway|pwName=$name|pwSpecies=$species|article=$article\"\n\t\t\t. \"|image=$image|date=$date}}\";\n\t}", "protected function template() {\n\t\treturn '';\n\t}", "function getTemplate();", "function get_template()\n {\n }", "public function view_course_template( $template ) {\n\t\t// Return the search template if we're searching (instead of the template for the first result)\n\t\tif ( is_search() ) {\n\t\t\treturn $template;\n\t\t}\n\t\t\n\t\t// Get global post\n\t\tglobal $post;\n\t\t// Return template if post is empty\n\t\tif ( ! $post ) {\n\t\t\treturn $template;\n\t\t}\n\t\t// Return default template if we don't have a custom one defined\n\t\tif ( ! isset( $this->templates[get_post_meta( \n\t\t\t$post->ID, '_wp_page_template', true \n\t\t)] ) ) {\n\t\t\treturn $template;\n\t\t} \n\t\t$file = plugin_dir_path( __FILE__ ). 'page-templates/' . get_post_meta( \n\t\t\t$post->ID, '_wp_page_template', true\n\t\t);\n\t\t// Just to be safe, we check if the file exist first\n\t\tif ( file_exists( $file ) ) {\n\t\t\treturn $file;\n\t\t} else {\n\t\t\techo $file;\n\t\t}\n\t\t// Return template\n\t\treturn $template;\n\t}", "abstract protected function template(): string;", "public function get_template()\n {\n }", "public function get_template()\n {\n }", "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "public function view_pxp_template( $template ) \n\t{\n\t\tglobal $post, $pxp_products;\n\t\t\n\t\tif( !$post )\n\t\t{\n\t\t\treturn $template;\n\t\t}\n\t\t\n\t\t// Return archive template for 'pxp_products'\n\t\tif( is_post_type_archive( 'pxp_products' ) )\n\t\t{\n\t\t\t$file = plugin_dir_path(__FILE__). '/products/archive-pxp-products.php';\n\t\t\t\n\t\t\treturn $file;\n\t\t}\n\t\t\n\t\t// Return single template for 'pxp_products'\n\t\tif( is_singular( 'pxp_products' ) )\n\t\t{\n\t\t\t$file = plugin_dir_path(__FILE__). '/products/single-pxp-product.php';\n\t\t\t\n\t\t\treturn $file;\n\t\t}\n\t\t\n\t\tif( !isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) \n\t\t{\n\t\t\t\treturn $template;\t\n\t\t} \n\t\t\n\t\t$file = plugin_dir_path(__FILE__). get_post_meta( $post->ID, '_wp_page_template', true );\n\t\t\n\t\t// Just to be safe, we check if the file exist first\n\t\tif( file_exists( $file ) ) \n\t\t{\n\t\t\t\treturn $file;\n\t\t}\n\t\telse \n\t\t{ \n\t\t\techo $file; \n\t\t}\n\t\t\n\t\treturn $template;\n\t}", "function emc_get_the_format() {\r\n\r\n\t$format = get_the_terms( get_the_ID(), 'emc_content_format' );\r\n\r\n\tif ( $format && ! is_wp_error( $format ) ) {\r\n\r\n\t\t$format = array_shift( $format );\r\n\t\t$html = sprintf( __( '<a href=\"%1$s\" title=\"%2$s\">%3$s</a>', 'emc' ),\r\n\t\t\tesc_url( get_term_link( $format ) ),\r\n\t\t\tsprintf( __( 'View all %s posts', 'emc' ), esc_attr( $format->name ) ),\r\n\t\t\tesc_html( $format->name )\r\n\t\t);\r\n\t\treturn $html;\r\n\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "protected function getDocumentTemplate() {}", "public function fetch_template($template)\n\t{\n\t\t$this->EE->load->library('template_helper');\n\t\treturn $this->EE->template_helper->fetch_template($template); \n\t}", "final public function getTemplate() {\n\t\treturn '';\n\t}", "protected function content_template() {}", "protected function content_template() {}", "public function intendedTemplate() {\n if(isset($this->cache['intendedTemplate'])) return $this->cache['intendedTemplate'];\n return $this->cache['intendedTemplate'] = $this->content()->exists() ? $this->content()->name() : 'default';\n }", "public function fetch($template) {\r\n\t\t\tif(!strpos($template, '.'))\r\n\t\t\t\t$template = \"$template.$this->defaultSuffix\";\r\n\t\t\treturn $this->twig->render($template, $this->templateVariables);\r\n\t\t}", "function render_template($template, $settings) {\n $text = file_get_contents($template); \n $text = transform_text($text, $settings);\n return $text;\n }", "public function representation($template = null) {\n if(!$template) $template = $this->template();\n $cacheKey = 'representation.' . $template;\n\n // check for a cached representation\n if(isset($this->cache[$cacheKey])) return $this->cache[$cacheKey];\n\n // check for a representation from the URL\n if($this->site->representation && $this->kirby->registry->get('template', $template . '.' . $this->site->representation)) {\n return $this->cache[$cacheKey] = $this->site->representation;\n }\n\n // try to get a representation from the Accept header\n // this feature is disabled by default because some browsers\n // have strange Accept headers (e.g. WebKit)\n if($this->kirby->option('representations.accept')) {\n // manually add the normal template to the mix as HTML representation\n $representations = ['__default' => visitor::acceptance('text/html')];\n\n // add each other available representation\n foreach($this->kirby->registry->get('template', $template, true) as $representation) {\n $representation = f::extension($representation);\n $mime = f::extensionToMime($representation);\n\n $representations[$representation] = visitor::acceptance($mime);\n }\n\n // return the highest accepted representation\n if(!empty($representations) && ($max = max($representations)) > 0) {\n $representation = array_search($max, $representations);\n if($representation === '__default') $representation = false;\n return $this->cache[$cacheKey] = $representation;\n }\n }\n\n return $this->cache[$cacheKey] = false;\n }", "private function _getCurrentTemplateContent() {\n $page = Application_Model_Mappers_PageMapper::getInstance()->find($this->_toasterData['id']);\n $tempate = Application_Model_Mappers_TemplateMapper::getInstance()->find($page->getTemplateId());\n if(!$tempate instanceof Application_Model_Models_Template) {\n return false;\n }\n return $tempate->getContent();\n }", "function getTemplate()\r\n\t{\r\n\t\tglobal $config;\r\n\t\tglobal $section;\r\n\t\t\r\n\t\t$style = $_REQUEST[\"_style\"];\r\n\t\t$site = $this->Site();\r\n\t\tif(!$site) Site::getSite();\r\n\t\t\r\n\t\t$templateFile = \"\";\r\n\t\t\r\n\t\tswitch($style)\r\n\t\t{\r\n\t\tcase 'print':\r\n\t\t\t$templateFile = $site->print_template;\r\n\t\t\tbreak;\r\n\r\n\t\tcase 'popup':\r\n\t\t\t$templateFile = $site->popup_template;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 'mobile':\r\n\t\t\t$templateFile = $site->mobile_template;\r\n\t\t\t\r\n\t\tcase 'nude':\r\n\t\t\treturn \"{description}\";\r\n\t\t}\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\tif (!$templateFile) $templateFile = $section->getTemplateFile($this->identifier);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif (!$templateFile) $templateFile = $this->template;\r\n\t\tif (!$templateFile) $templateFile = $site->default_template;\r\n\t\t\r\n\t\t$templateFile = ComponentManager::fireEvent(\"OverrideTemplate\", $templateFile);\r\n\t\t\r\n\t\t$template = file_get_contents(\"{$config['homedir']}/templates/{$templateFile}\");\r\n\r\n\t\treturn $template;\r\n\t}", "public function getGathercontentTemplate();", "public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }", "public function processaTemplate() {\n return $this->fetch('partita_'.$this->_layout.'.tpl');\n }", "public function single( $template )\n {\n // Get the current post ID\n $post_id = get_the_ID();\n\n // Get the post type\n $type = get_post_type($post_id);\n\n // Check for template that matches post type\n if( $type && $found = locate_template( 'templates/single/' . $type . '.php' ) )\n {\n return $found;\n }\n\n // Check for single post template\n if( $found = locate_template('templates/single.php') )\n {\n return $found;\n }\n\n return $template;\n }", "public function view_project_template( $template ) {\n\n global $post;\n\n if ( !isset( $post ) ) return $template;\n\n if ( ! isset( $this->templates[ get_post_meta( $post->ID, '_wp_page_template', true ) ] ) ) {\n return $template;\n } // end if\n\n $template_loader = new Uou_Atmf_Load_Template();\n\n if( is_page_template( 'atmf-search.php' ) ){\n $file = $template_loader->locate_template( 'atmf-search.php' );\n }\n\n\n // $file = plugin_dir_path( __FILE__ ) . 'templates/' . get_post_meta( $post->ID, '_wp_page_template', true );\n\n if( file_exists( $file ) ) {\n return $file;\n } // end if\n\n return $template;\n\n }", "abstract public function getTemplate($tpl);", "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "public function renderTemplate();", "public function template() {\n\n // check for a cached template name\n if(isset($this->cache['template'])) return $this->cache['template'];\n\n // get the template name\n $templateName = $this->intendedTemplate();\n\n if($this->kirby->registry->get('template', $templateName)) {\n return $this->cache['template'] = $templateName; \n } else {\n return $this->cache['template'] = 'default';\n }\n\n }", "protected function getOutTemplate($template = 'default') {\n\t\t// check for current locale\n\t\tif ($this->locale != '') {\n\t\t\t$templatefile = $this->templatespath.'/'.$this->locale.'/'.$this->outtemplateprefix.$template.'.htm';\n\t\t\t\n\t\t\tif (file_exists($templatefile)) {\n\t\t\t\treturn $this->locale.'/'.$this->outtemplateprefix.$template;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if not found, check for default locale\n\t\tif ($this->deflocale != '') {\n\t\t\t$templatefile = $this->templatespath.'/'.$this->deflocale.'/'.$this->outtemplateprefix.$template.'.htm';\n\t\t\t\n\t\t\tif (file_exists($templatefile)) {\n\t\t\t\treturn $this->deflocale.'/'.$this->outtemplateprefix.$template;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// if not found then check in root\n\t\t$templatefile = $this->templatespath.'/'.$this->outtemplateprefix.$template.'.htm';\n\t\t\t\n\t\tif (file_exists($templatefile)) {\n\t\t\treturn $this->outtemplateprefix.$template;\n\t\t}\n\t\t\n\t\t// out template not found\n\t\treturn null;\n\t}", "public function get_template($template) {\n $theme = $this->get_working_theme();\n $template = empty($theme) ? $template : $theme['Template'];\n\n return $template;\n }", "public function forTemplate()\n {\n return $this->RAW();\n }", "public function view_project_template($template) {\n\n // Get global post\n global $post;\n\n // Return template if post is empty\n if (!$post) {\n return $template;\n }\n\n // Return default template if we don't have a custom one defined\n if (!isset($this->templates[get_post_meta(\n $post->ID, '_wp_page_template', true\n )])) {\n return $template;\n }\n\n $file = plugin_dir_path(__FILE__) . get_post_meta(\n $post->ID, '_wp_page_template', true\n );\n\n // Just to be safe, we check if the file exist first\n if (file_exists($file)) {\n return $file;\n } else {\n echo $file;\n }\n\n // Return template\n return $template;\n }", "public function returnTemplate() {\n\t\treturn $this->template;\n\t}", "public function fetchTemplate($template,$data = array(),$outtemplate = null) {\n\t\t// template is required\n\t\tif (trim($template) == '') {\n\t\t\tthrow new \\Exception('No template to format email');\n\t\t}\n\t\t\n\t\t$templatedata = $this->getTemplateData($template);\n\t\t\n\t\t// use default out template if is not provided\n\t\tif ($outtemplate === null) {\n\t\t\t$outtemplate = 'default';\n\t\t}\n\t\t\n\t\t// template is not found in any locale\n\t\tif (!is_array($templatedata)) {\n\t\t\tthrow new \\Exception(sprintf('Email template %s not found',$template));\n\t\t}\n\t\t\n\t\t// if email template provided.\n\t\tif ($outtemplate != '') {\n\t\t\t$outtemplate_real = $this->getOutTemplate($outtemplate);\n\t\t\t\n\t\t\tif (!$outtemplate_real) {\n\t\t\t\tthrow new \\Exception(sprintf('Email template %s not found',$outtemplate));\n\t\t\t}\n\t\t\t\n\t\t\t$outtemplate = $outtemplate_real;\n\t\t}\n\t\t\n\t\t// create template processor object\n\t\t$class = $this->templateprocessorclass;\n\t\t$templating = new $class();\n\t\t\n\t\t// init template processor\n\t\t$templating->init($this->tepmlateprocessorinitoptions);\n\n\t\tif (is_object($this->options['application'])) {\n\t\t\t$templating->setApplication($this->options['application']);\n\t\t}\n\t\t\n\t\t// check if template processor can access a template\n\t\tif (!$templating->checkTemplateExists($templatedata['file'])) {\n\t\t\tthrow new \\Exception(sprintf('Email template %s not found',$template));\n\t\t}\n\t\t\n\t\t// set data to fetch with the template\n\t\t$templating->setVars($data);\n\t\t\n\t\t// fetch subject template (it also can contains some wildcards)\n\t\t$subject = $templating->fetchString($templatedata['subject']);\n\t\t\n\t\t$templating->setTemplate($templatedata['file']);\n\t\t\n\t\t// generate email body\n\t\t$emailhtml = $templating->fetchTemplate();\n\t\t\n\t\t// insert a body to a common outer template\n\t\tif ($outtemplate != '') {\n\t\t\t$templating->setVar('EMAILCONTENT',$emailhtml);\n\t\t\t\n\t\t\t$templating->setTemplate($outtemplate);\n\t\t\t\n\t\t\t$emailhtml = $templating->fetchTemplate();\n\t\t}\n\t\t\n\t\t// return body and subject\n\t\treturn array('body'=>$emailhtml,'subject'=>$subject);\n\t}", "function Get($template)\r\n\t{\r\n\t\t$this->template = $template;\r\n\t\t$this->out = \"\";\r\n\t\tif (!file_exists($template)) { trigger_error(\"Template not found (\" . $template . \")\", E_USER_ERROR); return NULL; }\r\n\t\t$parser = xml_parser_create_ns();\r\n\t\t$data = array();\r\n\t\t$index = array();\r\n\t\txml_set_object($parser, $this);\r\n\t\txml_set_element_handler($parser, \"Start_Tag\", \"End_Tag\");\r\n\t\txml_set_character_data_handler($parser, \"CData\");\r\n \t\txml_set_default_handler($parser, \"CData\");\r\n \t\txml_set_processing_instruction_handler($parser, \"Process\");\r\n\r\n\t\t$lines = file($template);\r\n\t\tforeach ($lines as $line)\r\n\t\t{\r\n\t\t\tif (!xml_parse($parser, $line))\r\n\t\t\t{\r\n\t\t\t\techo \"XML Error: \" . xml_error_string(xml_get_error_code($parser)) .\r\n\t\t\t\t\" on line \" . xml_get_current_line_number($parser) .\r\n\t\t\t\t\" of file \" . $template . \"<br/>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\txml_parser_free($parser);\r\n\t\treturn preg_replace_callback(\"/\\{{([^}]+)\\}}/\", array($this, \"parse_vars\"), $this->out);\r\n\t}", "public function getContent()\r\n {\r\n return $this->template;\r\n }", "public function getMessageTemplate($template)\n {\n $templateContent = Mage::getStoreConfig('smsnotifier/templates/status_'.$template);\n\n if (Mage::getStoreConfig('smsnotifier/templates/status_'. $template .'_active') && !empty($templateContent))\n return $templateContent;\n\n }", "public function fetch_builder_template()\n\t\t{\n\t\t $error = false;\n $name = isset($_POST['templateName']) ? $_POST['templateName'] : false;\n if(empty($name)) \n $error = true;\n \n $key = $this->generate_key($name);\n $template = $this->get_meta_values($key);\n \n if(empty($template)) $error = true;\n \n \n if($error)\n {\n echo \"avia_fetching_error\";\n }\n else\n {\n $text = str_replace('{{{'.$name.'}}}','',$template[0]);\n $return = $this->builder->text_to_interface($text);\n \n echo $return;\n }\n \n die();\n\t\t}", "public function getInstanceView($template = '') {\n return implode('/', [$this->api->instance_parameter, $template]);\n }", "public function getHtmlTemplate() {}", "function rc_tc_template_chooser( $template ) {\r\n \r\n // Post ID\r\n $post_id = get_the_ID();\r\n $post_type = get_post_type( $post_id );\r\n echo ('<!-- Have Post Type ' . __( $post_type, 'nmmc' ) . '-->' );\r\n // For all other CPT\r\n if ( $post_type != 'nsbr' && $post_type !='ydd' ) {\r\n echo ('<!-- Unknown Type returning ' . __( $template, 'nmmc' ) . '-->' );\r\n return $template;\r\n }\r\n \r\n // Else use custom template\r\n if ( is_single() ) {\r\n echo ('<!-- Is Single returning ' . __( 'single-'.$post_type, 'nmmc' ) . '-->' );\r\n return rc_tc_get_template_hierarchy( 'single-'.$post_type);\r\n }else{\r\n return rc_tc_get_template_hierarchy( 'category-'.$post_type);\r\n }\r\n echo ('<!-- Returning nothing -->' );\r\n return $template;\r\n}", "protected function get_template() {\n\t\treturn 'post';\n\t}", "public function getOutput()\n {\n if ($this->output_is_cached) {\n return $this->output_cache;\n }\n $result = $this->getResult();\n if ($result === false) {\n return false;\n }\n $meta = $this->getResultMeta();\n if (isset($meta['disabled']) && $meta['disabled']) {\n return false;\n }\n\n $tpl = $this->getTemplate();\n if (!$tpl) {\n return '';\n }\n $tpl_params = $this->getPropInherited('visual.template_visual');\n if (!is_array($tpl_params)) {\n $tpl_params = array();\n }\n\n // @todo: what if the result is object?\n if (is_array($result)) {\n $tpl_params = array_merge($tpl_params, $result);\n }\n $tpl_params['infoblock'] = $this;\n $is_admin = fx::isAdmin();\n \n try {\n $this->output_cache = $tpl->render($tpl_params);\n } catch (\\Exception $e) {\n fx::log('error while rendering...', $e->getMessage());\n $this->output_cache = $is_admin ? 'Error, see logs' : '';\n }\n if ($is_admin) {\n $this->infoblock_meta['template_params'] = $tpl->getRegisteredParams();\n }\n $this->output_is_subroot = $tpl->is_subroot;\n $this->output_is_cached = true;\n return $this->output_cache;\n }", "public function view_project_template($template) {\r\n global $post;\r\n \r\n if( !isset($post->ID) \r\n\t\t\t|| !isset($this->templates[get_post_meta($post->ID, '_wp_page_template', TRUE)]) )\r\n return $template;\r\n \r\n $file = plugin_dir_path(__FILE__) . get_post_meta($post->ID, '_wp_page_template', TRUE);\r\n \r\n // Just to be safe, we check if the file exist first\r\n if (file_exists($file))\r\n return $file;\r\n else\r\n echo $file;\r\n \r\n return $template;\r\n }", "public function getTemplateAttribute(): string\n {\n return $this->meta->_wp_page_template ?: '';\n ;\n }", "function pulcherrimum_front_page_template($template)\n {\n return is_home() ? '' : $template;\n }", "public function get_template( string $template, $args = array() ) {\r\n if ( ! empty( $args ) ) {\r\n extract( $args );\r\n }\r\n\r\n ob_start();\r\n\r\n include $this->get_dir() . \"/templates/{$template}.html.php\";\r\n\r\n return ob_get_clean();\r\n }", "public function get_publish( $template = 'publish' )\n\t{\n\t\t$extract = $this->handler_vars->filter_keys( 'id', 'content_type_name' );\n\t\tforeach ( $extract as $key => $value ) {\n\t\t\t$$key = $value;\n\t\t}\n\t\t$content_type = Post::type($content_type_name);\n\n\t\t// 0 is what's assigned to new posts\n\t\tif ( isset( $id ) && ( $id != 0 ) ) {\n\t\t\t$post = Post::get( array( 'id' => $id, 'status' => Post::status( 'any' ) ) );\n\t\t\tPlugins::act('admin_publish_post', $post);\n\t\t\tif ( !$post ) {\n\t\t\t\tSession::error( _t( \"You don't have permission to edit that post\" ) );\n\t\t\t\t$this->get_blank();\n\t\t\t}\n\t\t\tif ( ! ACL::access_check( $post->get_access(), 'edit' ) ) {\n\t\t\t\tSession::error( _t( \"You don't have permission to edit that post\" ) );\n\t\t\t\t$this->get_blank();\n\t\t\t}\n\t\t\t$this->theme->post = $post;\n\t\t}\n\t\telse {\n\t\t\t$post = new Post();\n\t\t\tPlugins::act('admin_publish_post', $post);\n\t\t\t$this->theme->post = $post;\n\t\t\t$post->content_type = Post::type( ( isset( $content_type ) ) ? $content_type : 'entry' );\n\n\t\t\t// check the user can create new posts of the set type.\n\t\t\t$user = User::identify();\n\t\t\t$type = 'post_' . Post::type_name( $post->content_type );\n\t\t\tif ( ACL::user_cannot( $user, $type ) || ( ! ACL::user_can( $user, 'post_any', 'create' ) && ! ACL::user_can( $user, $type, 'create' ) ) ) {\n\t\t\t\tSession::error( _t( 'Access to create posts of type %s is denied', array( Post::type_name( $post->content_type ) ) ) );\n\t\t\t\t$this->get_blank();\n\t\t\t}\n\t\t}\n\n\t\t$this->theme->admin_page = _t( 'Publish %s', array( Plugins::filter( 'post_type_display', Post::type_name( $post->content_type ), 'singular' ) ) );\n\t\t$this->theme->admin_title = _t( 'Publish %s', array( Plugins::filter( 'post_type_display', Post::type_name( $post->content_type ), 'singular' ) ) );\n\n\t\t$statuses = Post::list_post_statuses( false );\n\t\t$this->theme->statuses = $statuses;\n\n\t\t$form = $post->get_form( 'admin' );\n\n\t\t$this->theme->form = $form;\n\n\t\t$this->theme->wsse = Utils::WSSE();\n\t\t$this->display( $template );\n\t}", "function template($template=\"simple\"){\n\n\t\t// THE PHYSICAL TEMPLATE SHOULD BE IN THE RESPECTIVE \n\t\t// TEMPLATE/TYPE/$template.php\n\t\t$this->template = $template;\n\t}", "function portfolio_page_template( $template ) {\n $post_id = get_the_ID();\n if ( get_post_type( $post_id ) == 'actividad' && is_single() ) {\n $new_template = dirname( __FILE__ ) . '/includes/templates/single.php';\n if ( $new_template != '' ) {\n return $new_template ;\n }\n }\n return $template;\n}", "public function getTemplateContent($model){\n\t\t$templateContent = '';\n\t\t//$io->streamClose();\n\t\t\n\t\t$fields = $this->getModel('MGS\\Acm\\Model\\Field')\n\t\t\t->getCollection()\n\t\t\t->addFieldToFilter('acm_type_id', $model->getId())\t\n\t\t\t->addFieldToFilter('type', ['nin'=>['store', 'image', 'file']])\n\t\t\t->setOrder('position', 'ASC');\n\t\t\t\n\t\t$content = '';\n\t\tif(count($fields)>0){\n\t\t\tforeach($fields as $field){\n\t\t\t\t$templateContent .= '<p>{{trans \"'.$field->getTitle().': %'.$field->getIdentifier().'\" '.$field->getIdentifier().'=$data.'.$field->getIdentifier().'}}</p>'.\"\\n\";\n\t\t\t}\n\t\t}\n\t\t//$templateContent = str_replace('{{template_email_content}}', $content, $templateContent);\n\t\treturn $templateContent;\n\t}", "protected function getCurrentParsedTemplate() {}", "function ydgdict_entry_archive_template( $template ) \n{\n if ( ! is_tax( 'word_type' ) ) return $template;\n \n return locate_template( \"taxonomy-word_type\" );\n}", "function edd_pup_template(){\r\n\r\n\t$template = edd_get_option( 'edd_pup_template' );\r\n\r\n\tif ( ! isset( $template ) ) {\r\n\t\t$template = 'default';\r\n\t}\r\n\r\n\tif ( $template == 'inherit' ) {\r\n\t\treturn edd_get_option( 'email_template' );\r\n\t} else {\r\n\t\treturn $template;\r\n\t}\r\n}", "protected function template($template) {\n if(is_string($template)){\n $template = AppTemplate::load($template);\n }\n return parent::template($template);\n }", "protected function _content_template() {\n \n }", "static function include_new_template($template){\n\t\t\n\t\tif(strstr($_SERVER[\"REQUEST_URI\"], 'query-results') && isset($_GET['pt'])){\n\t\t\t$template = self::get_query_resulsts_template();\n\t\t}\n\t\t\n\t\treturn $template;\n\t}", "public function generate()\n {\n if (TL_MODE == 'BE') {\n\n $objTemplate = new BackendTemplate('be_wildcard');\n\n $objTemplate->wildcard = '##' . $GLOBALS['TL_LANG']['FMD']['simplejobslist'][0] . '##';\n $objTemplate->title = $this->headline;\n $objTemplate->id = $this->id;\n $objTemplate->link = $this->name;\n $objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n return $objTemplate->parse();\n }\n\n\t\t$this->simplejobs_organisations = \\StringUtil::deserialize($this->simplejobs_organisations);\n\n\t\t// Return if there are no organisations\n\t\tif (empty($this->simplejobs_organisations) || !\\is_array($this->simplejobs_organisations))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n return parent::generate();\n }", "public function render($template)\n {\n $charset = $this->getCharset();\n $contentType = $this->getContentType();\n\n header('Content-Type: '.$contentType.'; charset='.$charset);\n\n // first see if what we've been given is a file\n $templateFile = $this->getViewDir().'/'.$template.'.php';\n\n // run through our properties and filter\n foreach ($this->_properties as $index => $value) {\n $this->_properties[$index] = $this->filter->filter($index,$value);\n }\n\n if (is_file($templateFile)) {\n\n // scope in the tempate extraction\n $result = function($file,array $data=array()) {\n ob_start();\n extract($data, EXTR_SKIP);\n try {\n include $file;\n } catch(\\Exception $e) {\n ob_end_clean();\n throw $e;\n }\n return ob_get_clean();\n };\n\n return $result($templateFile, $this->_properties);\n\n } else {\n // it's just a string! fall back on str_replace\n foreach ($this->_properties as $name => $value) {\n $template = str_replace('['.$name.']', $value, $template);\n }\n\n // replace any leftovers\n $template = preg_replace('#\\[.*?\\]#', '', $template);\n return $template;\n }\n }", "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "function mpfy_filter_single_template($template) {\n\tglobal $post;\n\t\n\tif ($post->post_type == 'map-location') {\n\t\treturn MAPIFY_PLUGIN_DIR . '/templates/single-map-location.php';\n\t}\n\n\tif (MPFY_IS_AJAX && in_array($post->post_type, mpfy_get_supported_post_types())) {\n\t\t$map_location = new Mpfy_Map_Location($post->ID);\n\t\tif ($map_location->get_maps()) {\n\t\t\treturn MAPIFY_PLUGIN_DIR . '/templates/single-map-location.php';\n\t\t}\n\t}\n\n\treturn $template;\n}", "function archive_template( $template ) {\n if ( is_post_type_archive('ccms-version') ) {\n $theme_files = array('archive-ccms-version.php');\n $exists_in_theme = locate_template($theme_files, false);\n if ( $exists_in_theme != '' ) {\n return $exists_in_theme;\n } else {\n return plugin_dir_path(__FILE__) . 'archive-ccms-version.php';\n }\n }\n return $template;\n }", "public function getTemplate () {\r\n\t\treturn $this->_template;\r\n\t}", "protected function _content_template()\n {\n\n }", "public function getTemplate(): TemplateInterface;", "protected function content_template() {\n\t}", "private function getPublishedDate(): string\n {\n if ($this->context->get('is_term')) {\n return '';\n }\n\n if (!$this->context->get('date')) {\n return '';\n }\n\n return $this->formatIso8601($this->augmented($this->context->get('date')), false);\n }" ]
[ "0.67228913", "0.65464205", "0.6375591", "0.63364995", "0.63085055", "0.6292047", "0.6279865", "0.62637776", "0.62637776", "0.62637776", "0.62637776", "0.62585753", "0.6203743", "0.6203743", "0.6203743", "0.6203743", "0.6203743", "0.6203743", "0.61924964", "0.61860967", "0.6135799", "0.61171186", "0.61146826", "0.60769933", "0.60717475", "0.6047358", "0.60264444", "0.60236186", "0.6000662", "0.6000114", "0.5955728", "0.5951057", "0.59333724", "0.5926914", "0.5926914", "0.59261644", "0.5925542", "0.5925542", "0.5925542", "0.5925542", "0.5925519", "0.5925519", "0.59216714", "0.58590287", "0.5857343", "0.5857343", "0.5833804", "0.583271", "0.5822374", "0.58200204", "0.5801984", "0.57870233", "0.57847005", "0.5781483", "0.5779935", "0.5762175", "0.5759513", "0.57396084", "0.5711459", "0.5700628", "0.5692846", "0.5689505", "0.5688599", "0.5669396", "0.56641376", "0.564749", "0.56463885", "0.56102484", "0.5602529", "0.5601224", "0.559506", "0.55917174", "0.55897", "0.558606", "0.55814177", "0.5578061", "0.5572961", "0.556739", "0.556732", "0.55670154", "0.5559888", "0.5548712", "0.5544502", "0.5544", "0.5540455", "0.5538586", "0.55354613", "0.5532202", "0.5521507", "0.5521069", "0.5517625", "0.5515507", "0.55147076", "0.55098826", "0.55072147", "0.5499143", "0.54986566", "0.54967046", "0.54947096", "0.54876405" ]
0.6668079
1
not sure this one is in use. idea that never went anywhere
function fieldValuesSimplified() { $arrFieldValuesSimplified = array(); $fieldValues = $this->fieldValues(); foreach ($fieldValues as $fieldID => $fieldVal) { if (!isset($arrFieldValuesSimplified[$fieldID])) { $arrFieldValuesSimplified[$fieldID] = array(); } foreach ($fieldVal as $fieldSubVal) { $arrFieldValuesSimplified[$fieldID][] = $fieldSubVal['value']; } } return $arrFieldValuesSimplified; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixSelf() {}", "protected function fixSelf() {}", "private function __() {\n }", "private function __construct()\t{}", "private function _i() {\n }", "protected function __init__() { }", "final private function __construct(){\r\r\n\t}", "private function init()\n\t{\n\t\treturn;\n\t}", "protected function _refine() {\n\n\t}", "public function helper()\n\t{\n\t\n\t}", "final private function __construct() {}", "final private function __construct() {}", "abstract protected function _preProcess();", "protected function init() {return;}", "private function __construct() {\r\n\t\t\r\n\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "protected function init()\n\t{\n\t\t\n\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct () {}", "private function __construct( )\n {\n\t}", "protected function _init()\r\n\t{\r\n\t}", "protected final function __construct() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "private final function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "private function __construct()\n\t{\n\t\t\n\t}", "function __construct()\r\n\t{\t\t//Yeah bro! Freaking PhP yo..\r\n\t}", "final private function __construct()\n\t{\n\t}", "final private function __construct() {\n\t\t\t}" ]
[ "0.6103791", "0.6103791", "0.59956455", "0.5953056", "0.59226346", "0.58344084", "0.5787308", "0.5776321", "0.5769375", "0.5753654", "0.570444", "0.570444", "0.5653907", "0.56375355", "0.56098443", "0.56067383", "0.56067383", "0.56067383", "0.55705833", "0.55588156", "0.5556128", "0.55437815", "0.5540416", "0.5534901", "0.5529849", "0.5529849", "0.5529849", "0.5529849", "0.5529849", "0.5529849", "0.55291486", "0.55291486", "0.5528847", "0.5528847", "0.5528847", "0.5528847", "0.55095994", "0.5507452", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.5506855", "0.55043674", "0.55043674", "0.54903924", "0.54888296", "0.5473669", "0.5465676", "0.5450072" ]
0.0
-1
Get all tags this article is tagged with
function tags() { $preloader = pb_query_preloader::getInstance(); $preloadRow = $preloader->getPreloadArticleTag($this->id); if ($preloadRow) { $rows = $preloadRow; } else { global $polarbear_db; $sql = "SELECT tagID FROM " . POLARBEAR_DB_PREFIX . "_article_tag_relation WHERE articleID = '$this->id'"; $rows = $polarbear_db->get_results($sql); } $arrTags = array(); if ($rows) { foreach ($rows as $row) { $arrTags[] = polarbear_tag::getInstance($row->tagID); } } pb_pqp_log_speed("article tags()"); return $arrTags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags() {}", "public function tags() {\n\t\treturn $this->get_tags();\n\t}", "public function tags()\n {\n $new = $this->postterms->filter(function($term)\n {\n return $term->termtaxonomy->taxonomy == 'post_tag';\n });\n\n return $new->map(function($term)\n {\n return $term->termtaxonomy->term; \n });\n }", "public function findAll()\n {\n return $this->tagRepository->findAllTags();\n }", "public function getTags()\n {\n $resultArray = [];\n $tagConnects = TagConnect::photo($this->id);\n if($tagConnects->isEmpty()) {return [];}\n foreach($tagConnects as $tagConnect) {\n $idsArray[] = $tagConnect->id;\n }\n $tags = Tag::whereIn('id', $idsArray)->get();\n foreach($tags as $tag) {\n $resultArray[] = $tag->word;\n }\n return $resultArray;\n }", "public function getTags(): Collection;", "public function getTags(): array\n {\n return $this->tags;\n }", "public function getTags(): array\n {\n return $this->tags;\n }", "public function getList()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t$tags = parent::getList();\r\n\t\t} else {\r\n\t\t\t$tags = $this->getGroupTagsList() +\r\n\t\t\t\t$this->getMembersTagsList() +\r\n\t\t\t\t$this->getDocumentsTagsList() +\r\n\t\t\t\t$this->getEventsTagsList() +\r\n\t\t\t\t$this->getPhotosTagsList() +\r\n\t\t\t\t$this->getListsTagsList();\r\n\t\t}\r\n return $tags;\r\n }", "public function tags(): array\n {\n return $this->tags;\n }", "public function showAllTag()\n {\n $tags = $this->repository->allTag();\n return $tags;\n }", "public function getTags() {\r\n\t\tif (!isset($this->tags)) {\r\n\t\t\t$this->tags = $this->tagRepository->getAllTags();\r\n\t\t}\r\n\t\treturn $this->tags;\r\n\t}", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "public function getTags()\n {\n return $this->tags;\n }", "protected function getTags()\n {\n $tags = array_merge(\n $this->options['append_tags'],\n $this->getSubTagValues('tags', array())\n );\n\n return array_unique($tags);\n }", "public function getAllTags()\n {\n\n $sql = \"\n\t\t\tSELECT * FROM tags\n\t\t\tORDER BY name ASC\n\t\t\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n $result = $query->fetchAll();\n\n foreach ($result as $tag) {\n\n $this->tags[$tag['id']] = $tag['name'];\n\n }\n\n return $this->tags;\n }", "public static function get_tags() {\n return Tag::distinct()->orderBy('name', 'asc')->get();\n }", "public function getTagList();", "public function getTags()\n {\n $this->tags = $this->tags ?: new ArrayCollection();\n return $this->tags;\n }", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}", "public function getTags()\n {\n return $this->_tags;\n }", "public function getTags()\n\t{\n\t\treturn $this->tags;\n\t}", "public function getTags() {\n\t\t$sql = \"SELECT tags FROM question\";\n\t\t$this->db->execute($sql);\n\t\treturn $this->db->fetchAll();\n\t}", "public function getTags():array;", "public function getTags() {\n\t\t$tags = array();\n\t\tforeach ($this->photo->tags->tag as $tag) {\n\t\t\t$tags[] = (string) $tag;\n\t\t}\n\t\t\n\t\treturn $tags;\n\t}", "public function findAll() {\n $sql = \"select * from tags\";\n $results = $this->getDb()->fetchAll($sql);\n\n $tags = array();\n\n foreach ($results as $row) {\n $tags[] = $this->buildDomainObject($row);\n }\n return $tags;\n }", "public function getTags()\n {\n return $this->_tags;\n }", "public function getTags() {\n return $this->tags;\n }", "public function getTags()\n {\n $this->tags = $this->tags ?: new ArrayCollection();\n\n return $this->tags;\n }", "public function getTags()\n {\n return $this->Tags;\n }", "public function getTags()\n {\n if (!is_array($this->tags)) {\n return array();\n }\n return $this->tags;\n }", "public function getAll() {\n $select = $this->select();\n $tags = $this->fetchAll($select);\n return $tags;\n }", "public function tags()\n {\n return $this->morphedByMany(Tag::class, 'bundleable');\n }", "public function tagNames()\n\t{\n\t\treturn $this->tags()->get()->lists('tag');\n\t}", "public function getTags()\n {\n try {\n $statement = $this->database->prepare('SELECT name FROM tags ORDER BY name');\n $statement->execute();\n $tags = array_map(function($t) { return $t['name'];}, $statement->fetchAll());\n } catch (Exception $e) {\n $e->getMessage();\n }\n \n return $tags;\n }", "public function get_tags()\r\n\t{\r\n\t\t$xml = $this->call(PicasaAPI::$QUERY_URLS['picasa'] . \"?kind=tag\");\r\n\t\treturn $xml;\r\n\t}", "public static function get_tags() {\n global $wpdb;\n $query = \"SELECT * FROM XTB_TAGS\";\n return $wpdb->get_results($query);\n }", "public function tags(){\n return $this->tags;\n }", "public function tags();", "public function getTags(): Collection\n {\n return $this->tags;\n }", "public function GetTags() {\n\t\treturn $this->_tags;\n\t}", "public function getAll(): Collection\n {\n return $this->tagRepository->getAll();\n }", "public function getTags(): TagsCollection\n {\n return $this->tags;\n }", "function get_tags() {\n return $this->tags;\n }", "public function get_tags(){\n\t \n\t return $this->tags;\n\t}", "public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}", "public function all_tags()\n {\n $out = [];\n $out = array_merge($out, $this->extraTags('CATEGORY'));\n\n foreach ($this->tags->find_all() as $tag) {\n $out[] = $tag;\n }\n\n return array_unique($out);\n\n }", "public function getTags()\n {\n return $this->tags = get_the_tags($this->id);\n }", "public function getTags(): array\n {\n return $this->inlineTags;\n }", "public function getListTags()\n {\n return ArrayHelper::map(QuestionTag::find()->all(), 'id', 'name');\n }", "public function tagIDs()\n {\n return $this->tags()->pluck('tag_id');\n }", "public function getTags()\n {\n return $this->data['fields']['tags'];\n }", "public static function getTags(): array\n {\n return static::$tags;\n }", "public function tags()\n\t{\n\t\treturn $this->morphMany(MELON_MODEL_TAG, 'tagable');\n\t}", "public function articles()\n {\n return $this->morphedByMany('App\\Article', 'taggable');\n }", "public function articles()\n\t{\n\t\treturn $this->morphedByMany(Article::class, 'taggable');\n\t}", "function get_tags(){\n global $DB;\n\n $collection = $DB->get_record('tag_coll',['name' => PLUGINNAME]);\n if (!$collection->id) {\n throw new moodle_exception('pluginname', 'local_tematica');\n }\n $tags = $DB->get_records('tag', ['tagcollid' => $collection->id]);\n return $tags;\n}", "public function getTags(){\n\t\tif (!is_array($this->_known_tags)){\n\t\t\t$desc = $this->getDescription();\n\t\t}\n\t\treturn $this->_known_tags;\n\t}", "public function tags()\n {\n return $this->hasMany('arts\\Tag', 'post_id', 'post_id');\n }", "protected function getTags(){\n $tags = Tag::all();\n foreach ($tags as $tag){\n $this->tags[$tag->id] = $tag->tag;\n }\n }", "function getTags() {\n\t\t$db = Database::getInstance();\n\t\t$mysqli = $db->getConnection();\n\t\t\n\t\t$tagsArray = array();\n\t\t\t$sql_query = \"select tagnaam,tagid from tag where status=6\";\n\t\t\t$result = $mysqli->query($sql_query);\n\t\t\t\n\t\t\twhile ( $row = $result->fetch_object () ) {\n\t\t\t\t$Tag = new Tag();\n\t\t\t\t$Tag->tagId = $row->tagid;\n\t\t\t\t$Tag->tagName = $row->tagnaam;\n\t\t\t\tarray_push($tagsArray, $Tag);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$result->close();\n\t\t\treturn $tagsArray;\n\t}", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable')->withPivot('notes');\n }", "public function tags()\n {\n return $this->_refs('tags');\n }", "public function tags() {\n // refer to tag class and the taggable ID\n return $this->morphToMany('App\\Tag', 'taggable');\n\n }", "public static function usedTags()\n {\n $allTags = static::all()->sortBy('name', SORT_NATURAL|SORT_FLAG_CASE);\n // Get all tag_ids from Taggables\n $attached = \\App\\Taggable::all()->pluck('tag_id');\n // Cast to array\n $uTags = array_unique($attached->toArray());\n\n return $allTags->whereIn('id', $uTags);\n }", "function tc_get_the_tags() {\r\n return the_tags();\r\n}", "public function getAllMetaTags()\n {\n return htcms_get_all_meta_tags();\n }", "public function tagged($tag)\n {\n $results = [];\n if (isset($this->tags[$tag])) {\n foreach ($this->tags[$tag] as $abstract) {\n $results[] = $this->make($abstract);\n }\n }\n return $results;\n }", "public function tags()\n\t{\n\t\treturn $this->morphToMany('App\\Modules\\Tag\\Tag', 'taggable');\n\t}", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'taggable')->withTimestamps();\n }", "public function getTagIds()\n {\n return $this->tags->lists('id')->toArray();\n }", "public function tags()\n {\n return $this->morphToMany('App\\Model\\Tag', 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany('App\\Tag', 'taggable');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'tag_able');\n }", "public function tags()\n {\n return $this->morphToMany(Tag::class, 'tagable');\n }" ]
[ "0.79333645", "0.79333645", "0.79333645", "0.79333645", "0.79333645", "0.77106255", "0.75645006", "0.749101", "0.74824804", "0.74465036", "0.74197316", "0.74194056", "0.74194056", "0.7393746", "0.7388916", "0.7387862", "0.73850256", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.73035234", "0.7293943", "0.7285288", "0.7274314", "0.726746", "0.7264934", "0.7261935", "0.7261935", "0.7252102", "0.7235956", "0.7223393", "0.72231483", "0.7221987", "0.7216703", "0.7213377", "0.7210171", "0.7196126", "0.718257", "0.7178973", "0.71608317", "0.7147462", "0.71399605", "0.7123632", "0.7121931", "0.7121036", "0.71136576", "0.71034527", "0.7098103", "0.7079222", "0.70645267", "0.7064519", "0.70509285", "0.7043059", "0.7015285", "0.6993422", "0.6985045", "0.69704205", "0.6962869", "0.69323516", "0.68903357", "0.6885832", "0.6876447", "0.68668354", "0.68658376", "0.6862777", "0.6807565", "0.6803089", "0.6799895", "0.67766887", "0.6737626", "0.6737626", "0.6737626", "0.6737626", "0.6737626", "0.6737626", "0.67355394", "0.6727079", "0.6718795", "0.67164093", "0.6714536", "0.67125773", "0.6697609", "0.668899", "0.66786546", "0.66735375", "0.6660282", "0.6652516", "0.66464925", "0.6645201" ]
0.76261646
6
Get all tags that are child of tag with ID parentID and selected for the article
function tagsSelectedChildren($parentID) { $arr = array(); $arrTags = $this->tags(); foreach ($arrTags as $oneTag) { if ($oneTag->parentID==$parentID) { $arr[] = $oneTag; } } return $arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findAllWithParent() { \n return $this->createQueryBuilder('a')\n ->leftJoin('a.parent', 'p')\n ->getQuery()\n ->getResult();\n }", "public function getChildren($idParent) {\r\n\t\t$entities = $this->find('all', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Entity.parent_id' => $idParent,\r\n\t\t\t\t'Entity.active' => 1\r\n\t\t\t\t),\r\n\t\t\t'order' => array('Entity.order' => 'ASC') \r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $entities ;\r\n\t}", "function getAllActiveChildCategoriesForSearch($parent_id )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE sub_cate_status = 1 AND \tparent_id = \".$parent_id.\" ORDER BY \tsub_cate_title ASC\";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getParents($idParent = null){\r\n\t\tif ($idParent){\r\n\t\t\t$entities = $this->find('all', array(\r\n\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t'Entity.id' => $idParent,\r\n\t\t\t\t\t'Entity.parent_id' => 1,\r\n\t\t\t\t\t'Entity.active' => 1\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\telse {\r\n\t\t\t$entities = $this->find('all', array(\r\n\t\t\t\t'conditions' => array(\r\n\t\t\t\t\t'Entity.parent_id' => 1,\r\n\t\t\t\t\t'Entity.active' => 1\r\n\t\t\t\t\t),\r\n\t\t\t\t'order' => array('Entity.order' => 'ASC') \r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn $entities;\r\n\t}", "public function getParents()\n {\n \t$currentPos = trim($this->getPosition());\n \tif($currentPos === '' || $currentPos === '1')\n \t\treturn array($this);\n \t\n \t$posArray = array();\n \t$length = strlen($currentPos);\n \tfor($i = 0; $i < ($length - 1) / self::POS_LENGTH_PER_LEVEL ; $i++)\n \t{\n \t\t$posArray[] = trim(substr($currentPos, 0, ($i * self::POS_LENGTH_PER_LEVEL) + 1));\n \t}\n \treturn self::getAllByCriteria('rootId = ? and position in (' . implode(',', array_fill(0, count($posArray), '?')) . ')', array_merge(array($this->getRoot()->getId()), $posArray), false, null, DaoQuery::DEFAUTL_PAGE_SIZE, array('position' => 'asc'));\n }", "function searchChildren($parentIds, $params) {\n $where = \" i.parent_id in (\".implode(',', $parentIds).\")\";\n return $this->_searchWithCurrentVersion($where, '', '', array(), $params);\n }", "function getSelectableParents()\n {\n $roles = $this->all();\n $tree = $this->findChildren($roles, 0, 1);\n\n //recursively go trough the array and delete....\n\n $trimmed_tree = $this->removeTreeNode($tree, $this->id);\n return $trimmed_tree;\n\n\n\n\n }", "public function findChildren($id_parent){\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.parent', $queryBuilder->createNamedParameter($id_parent))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.sys_language_uid', $queryBuilder->createNamedParameter($GLOBALS['TSFE']->sys_language_uid, \\PDO::PARAM_INT))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.deleted', $queryBuilder->createNamedParameter(0))\n )\n ->andWhere(\n $queryBuilder->expr()->eq('sys_category.hidden', $queryBuilder->createNamedParameter(0))\n )\n ->execute();\n $list_cat=[];\n while ($row = $statement->fetch()) {\n\n $list= array(\n 'uid' => $row['uid'],\n 'title' => $row['title'],\n 'parent' => $row['parent'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n );\n array_push($list_cat, $list);\n }\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_category');\n $statement = $queryBuilder\n ->select('sys_category.*')\n ->from('sys_category')\n \n ->where(\n $queryBuilder->expr()->eq('sys_category.uid', $queryBuilder->createNamedParameter($id_parent))\n )\n \n ->execute();\n while ($row = $statement->fetch()) {\n $list=array(\n 'uid' =>$row['uid'],\n 'title' =>$row['title'],\n 'icon' => $row['icon'],\n 'icong' => $row['icong'],\n 'children' => $list_cat);\n }\n return $list;\n }", "function GetObjectList($parent) {\r\n $ids = IPS_GetChildrenIDs($parent);\r\n foreach($ids as $id)\r\n {\r\n $ids = array_merge($ids, GetObjectList($id));\r\n }\r\n return $ids;\r\n}", "public function getChildrenQuery();", "private function queryForChildrenOf($parentID)\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(Utility::dataTable);\n $queryResults = $queryBuilder->select('*')\n ->from(Utility::dataTable)\n ->where($queryBuilder->expr()->eq('parent', $queryBuilder->quote($parentID)))\n ->orderBy('notation', 'ASC')\n ->execute();\n\n return $queryResults;\n }", "function _wswwpx_page_get_child_ids ( $parent = 0 ) {\n\tglobal $wpdb;\n\tif ( $parent > 0 ) {\n\t\t// Get the ID of the parent.\n\n\t\t$results = $wpdb->get_results(\"\n\t \t\t\t\t\t\t\tSELECT ID\n\t \t\t\t\t\t\t\t\t FROM $wpdb->posts\n\t \t\t\t\t\t\t\t\t WHERE post_parent = $parent\", ARRAY_N );\n \t\tif ($results) {\n\t\t\tforeach ($results AS $r) {\n\t\t\t \tforeach ($r AS $v) {\n\t\t\t \t\t$result[] = $v;\n\t\t\t \t}\n\t\t\t }\n\t\t} else {\n\t\t\t$result = false;\n\t\t}\n\t} else {\n\t\t// ... or set a zero result.\n\t\t$pages = get_pages();\n\t\tforeach ($pages AS $page) {\n\t\t\t$result[]=$page->ID;\n\t\t}\n//\t\t$result = 0;\n\t}\n\t//\n\treturn $result;\n}", "public function getParents() {}", "function getFilteredTestCasesInsideCategory($parentCategoryID, $idsToSearch){\n\n\tglobal $clientID,$categoriesItemTypeID,$categoryParentPropertyID,$testcasesItemTypeID,$testCasesCategoryPropertyID,$testcasesNamePropertyID,$testcasesOrderPropertyID,$inDebug;\n\n\t// build return properties array\n\t$returnProperties = array();\n\t$returnProperties[] = array('ID' => $testcasesNamePropertyID, 'name' => 'testcaseName');\n\t$returnProperties[] = array('ID' => $testCasesCategoryPropertyID, 'name' => 'testCategoryParentID');\n\t$returnProperties[] = array('ID' => $testcasesOrderPropertyID, 'name' => 'order');\n\n\t//build the filter\n\t$filters = array();\n\t$filters[] = array('ID' => $testCasesCategoryPropertyID, 'value' => $parentCategoryID);\n\n\t$testCases = getFilteredItemsIDs($testcasesItemTypeID, $clientID, $filters, $returnProperties);\n\n\t//Next, save only the test cases that are inside the relation\n\t$resultTC = array();\n\tfor ($i=0;$i<count($testCases);$i++){\n\t\tforeach ($idsToSearch as $rel){\n\t\t\tif ($testCases[$i]['ID']==$rel){\n\t\t\t\t//test found in relation, add to returning array\n\t\t\t\t$resultTC[]=$testCases[$i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t//And return the testCases\n\treturn($resultTC);\n}", "private function getParentFilter() {\n if($this->parent_filter === false) {\n $project_objects = DB::execute(\"SELECT id, LOWER(type) AS 'type' FROM \" . TABLE_PREFIX . \"project_objects WHERE project_id = ?\", $this->object->getId());\n if($project_objects) {\n $parents_by_type = array();\n \n foreach($project_objects as $project_object) {\n $type = $project_object['type'];\n \n if(isset($parents_by_type[$type])) {\n $parents_by_type[$type][] = $project_object['id'];\n } else {\n $parents_by_type[$type] = array($project_object['id']);\n } // if\n } // foreach\n \n foreach($parents_by_type as $type => $ids) {\n $parents_by_type[$type] = DB::prepare('(parent_type = ? AND parent_id IN (?))', $type, $ids);\n } // foreach\n \n $subtasks = DB::execute(\"SELECT id, LOWER(type) AS 'type' FROM \" . TABLE_PREFIX . 'subtasks WHERE ' . implode(' OR ', $parents_by_type));\n if($subtasks) {\n foreach($subtasks as $subtask) {\n $type = $subtask['type'];\n\n if(isset($parents_by_type[$type])) {\n $parents_by_type[$type][] = $subtask['id'];\n } else {\n $parents_by_type[$type] = array($subtask['id']);\n } // if\n } // foreach\n \n foreach($parents_by_type as $type => $ids) {\n if(is_array($ids)) {\n $parents_by_type[$type] = DB::prepare('(parent_type = ? AND parent_id IN (?))', $type, $ids);\n } // if\n } // foreach\n } // if\n \n $this->parent_filter = implode(' OR ', $parents_by_type);\n } else {\n $this->parent_filter = '';\n } // if\n } // if\n \n return $this->parent_filter;\n }", "public function getParents()\n {\n return $this->Parents_->filter(function ($persona) {\n return $persona->approved;\n })->pluckNamed('Parent');\n }", "public function getParents();", "function _filter($el, $eq=false) {\n if($el instanceof self) $o = $el;\n $el = $this->_doc_ids($el);\n $ret = self::$_ar_;\n\n $lb = $le = -1; // last parent\n $ie = reset($el); // current child\n $ib = key($el);\n foreach($this->ids as $b => $e) {\n while($ib < $b || !$eq && $ib == $b) {\n $ie = next($el);\n if($ie === false) { $ib = -1; break 2; }\n $ib = key($el);\n }\n // $b < $ib\n while($ib < $e) {\n $ret[$ib] = $ie;\n $ie = next($el);\n if($ie === false) { $ib = -1; break 2; }\n $ib = key($el);\n }\n }\n if(!empty($o)) {\n $o = clone $o;\n $o->ids = $ret;\n $ret = $o;\n }\n return $ret;\n }", "public function getListByParentId($parent_id = 0) {\n return $this->where(['parent_id' => $parent_id])->select();\n }", "public function getChildren($id){\n return $this->getTable()->where($this->treeParentRow,$id);\n }", "public function findAllByParent($parent)\n {\n }", "function children($options = null) {\n\t\t\n\t\t$defaults = array(\n\t\t\t'sort' => 'prio',\n\t\t\t'sortDirection' => 'desc',\n\t\t\t'limitStart' => 0,\n\t\t\t'limitCount' => null,\n\t\t\t'includeUnpublished' => false,\n\t\t\t'tagsMustInclude' => null, // comma seperated?\n\t\t\t'tagsMustNotInclude' => null\n\t\t);\n\t\t\n\t\t$options = polarbear_extend($defaults, $options);\n\t\tif ($options['limitCount'] === null) {\n\t\t\t// To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter.\n\t\t\t$limitCount = 2147483647;\n\t\t} else {\n\t\t\t$limitCount = $options['limitCount'];\n\t\t}\n\n\t\t// done with options, check cache\n\t\t$optionsQuery = http_build_query($options);\n\t\tif (isset($this->childrenCache[$optionsQuery])) {\n\t\t\treturn $this->childrenCache[$optionsQuery];\n\t\t}\n\n\t\t// not in cache, go on and query\n\t\t$sql = \"SELECT id FROM \" . POLARBEAR_DB_PREFIX . \"_articles \";\n\t\t$sql .= \"WHERE (parentID = '$this->id' AND status <> 'deleted' AND status <> 'revision' ) \";\n\t\t\n\t\tif ($options[\"includeUnpublished\"]) {\n\t\t\t// include unpublished articles\n\t\t} else {\n\t\t\t// don't include unpublished, remove'em\n\t\t\t$sql .= \" AND status = 'published' AND datePublish < now() AND (dateUnpublish > now() OR dateUnpublish IS NULL) \";\n\t\t}\n\t\t\n\t\t// tags\n\t\tif ($options[\"tagsMustInclude\"]) {\n\t\t\t$tagsMustInclude = explode(\",\", $options[\"tagsMustInclude\"]);\n\t\t\t$strTagArticleIds = \"\";\n\t\t\tforeach($tagsMustInclude as $oneTagID) {\n\t\t\t\t$oneTag = polarbear_tag::getInstance($oneTagID);\n\t\t\t\t// fetch articles for this tag\n\t\t\t\t$tagArticles = $oneTag->articles();\n\t\t\t\tforeach ($tagArticles as $oneA) {\n\t\t\t\t\t$strTagArticleIds .= $oneA->getId() . \",\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$strTagArticleIds = preg_replace(\"/,$/\", \"\", $strTagArticleIds);\n\t\t\tif (!empty($strTagArticleIds)) {\n\t\t\t\t$strTagArticleIds = \" AND id IN ($strTagArticleIds) \";\n\t\t\t}\n\t\t\t$sql .= $strTagArticleIds;\n\t\t}\n\t\t\n\t\t$sql .= \"ORDER BY $options[sort] $options[sortDirection] \";\n\t\t$sql .= \"LIMIT $options[limitStart], $limitCount\";\n\t\t// children = all articles that have current article as parentID\n\t\tglobal $polarbear_db;\n\t\t$childrenArr = array();\n\t\tif ($r = $polarbear_db->get_results($sql)) {\n\n\t\t\t$preloader = pb_query_preloader::getInstance();\n\t\t\t$strArticleIDs = \"\";\n\t\t\tforeach ($r as $row) {\t\t\n\t\t\t\t// in med hittade id:n i preloadern\n\t\t\t\t$strArticleIDs .= \",\".$row->id;\n\t\t\t}\n\t\t\t$preloader->addArticle($strArticleIDs);\n\t\t\t$preloader->update();\n\n\t\t\tforeach ($r as $row) {\t\t\n\t\t\t\t$childrenArr[] = PolarBear_Article::getInstance($row->id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tpb_pqp_log_speed(\"article children()\");\n\t\t\n\t\t$this->childrenCache[$optionsQuery] = $childrenArr;\n\t\treturn $this->childrenCache[$optionsQuery];\n\t}", "function & get_parents($id, $add_sql = array())\r\n\t{\r\n\t\tif (!($child = $this->get_node($id)))\r\n\t\t{\r\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\r\n\t\t$sql = sprintf('SELECT %s %s FROM %s %s\r\n WHERE %s.root_id=%s AND %s.level < %s AND %s.l < %s AND %s.r > %s %s\r\n ORDER BY %s.level ASC',\r\n\t\t\t\t\t\t\t\t\t\t$this->_get_select_fields(),\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'columns'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'join'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table, $child['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table, $child['level'],\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table, $child['l'],\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table, $child['r'],\r\n\t\t\t\t\t\t\t\t\t\t$this->_add_sql($add_sql, 'append'),\r\n\t\t\t\t\t\t\t\t\t\t$this->_node_table);\r\n\n\t\t$node_set =& $this->_get_result_set($sql);\r\n\r\n\t\treturn $node_set;\r\n\t}", "function cl_woo_get_cat_filter_children( $parent_term_id = null ) {\n\n\t$output = array();\n\t$child_terms = null;\n\n\t//Get children of this term\n\t$child_terms = Prso_Woocom::get_product_terms(\n\t\tarray(\n\t\t\t'parent' => $parent_term_id,\n\t\t)\n\t);\n\n\tif ( isset( $child_terms->terms ) && ! empty( $child_terms->terms ) ) {\n\n\t\tforeach ( $child_terms->terms as $key => $grandchild_term ) {\n\n\t\t\t$child_terms->terms[ $key ]->children = cl_woo_get_cat_filter_children( $grandchild_term->term_id );\n\n\t\t}\n\n\t\t$output = $child_terms->terms;\n\n\t}\n\n\treturn $output;\n}", "public function getChildrenConditions(int $parentId): iterable\n {\n return $this->model->getChildrenConditions($parentId);\n }", "public function parents ($selector = null) { \r\n\t\t\r\n\t\t$list = new XDTNodeList();\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\twhile (!$node->isSameNode($node->ownerDocument)) {\r\n\t\t\t\t$node = $node->parentNode;\r\n\t\t\t\t\r\n\t\t\t\tif (!($node instanceof DOMElement)) continue;\r\n\t\t\t\t\r\n\t\t\t\t$list->add($node);\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif (!isset($selector)) return $list;\r\n\t\t\r\n\t\t$this->xml_query = $list;\r\n\t\treturn $this->select($selector, null, XDT::SELECT_FILTER);\r\n\t}", "private function node_create_nestedset_cached($id_parent) {\n global $db;\n\n $nestedset = array();\n $childs = $this->element_get_childs_cached($id_parent);\n\n $childs_order = array(\n \t\"id\" => array(),\n \t\"title\" => array(),\n \t\"order\" => array()\n );\n\n foreach ($childs as $i=>$element) {\n $id_kat = $element[\"ID_KAT\"];\n $node = $this->element_read($id_kat);\n $title = strtoupper($node[\"V1\"]);\n $childs_order[\"id\"][] = $id_kat;\n $childs_order[\"title\"][] = $title;\n $childs_order[\"order\"][] = $node[\"ORDER_FIELD\"];\n }\n\t array_multisort($childs_order[\"order\"], $childs_order[\"title\"], $childs_order[\"id\"]);\n\n $nestedset = array();\n\t foreach ($childs_order[\"id\"] as $index => $id_kat) {\n $nestedset[] = array(\n \t\"id\"\t\t=> $id_kat,\n \t\"order\" => $childs_order[\"order\"][$index],\n \t\"title\"\t\t=> $childs_order[\"title\"][$index],\n \t\"childs\"\t=> $this->node_create_nestedset_cached($id_kat)\n );\n\t }\n return $nestedset;\n }", "public function get_children();", "public function childrenElements() {\n\t\treturn $this->hasMany('\\App\\Hierarchy', 'parent_id', 'id');\n\t}", "public function get_child_ids($parent = 0)\n\t{\n\t\t// First we get all the categories and store it.\n\t\tif (empty($this->_all_cats))\n\t\t{\n\t\t\t$this->_ci->db->select('cat_id,cat_parent')\n\t\t\t\t\t\t->from('categories')\n\t\t\t\t\t\t->where('cat_display', 'yes');\n\t\t\t$query = $this->_ci->db->get();\n\n\t\t\tif ($query->num_rows() == 0) \n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t} \n\n\t\t\t$this->_all_cats = $query->result_array();\n\t\t}\n\t\t\n\t\tforeach ($this->_all_cats as $row)\n\t\t{\n\t\t\t// This assigns all the fields to the array.\n\t\t\tforeach ($row AS $key => $val)\n\t\t\t{\n\t\t\t\t$arr[$key] = $val;\n\t\t\t}\n\t\t\t\n\t\t\t$menu_array[$row['cat_id']] = $arr;\n\t\t}\n\t\t\n\t\tunset($arr);\n\t\t\n\t\tforeach($menu_array as $key => $val)\n\t\t{\n\t\t\t// Now add any children.\n\t\t\tif ($parent == $val['cat_parent'] OR $parent == $val['cat_id'])\n\t\t\t{\n\t\t\t\t$depth = 0;\n\t\t\t\tif ( ! in_array($val['cat_id'], $this->_cat_ids, TRUE)) \n\t\t\t\t{\n\t\t\t\t\t$this->_cat_ids = array_merge(array($val['cat_id']),$this->_cat_ids);\n\t\t\t\t\t$this->_child_subtree($key, $menu_array, $depth);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function myChildren()\n {\n return File::get()->filter(\"ParentID\", $this->ID);\n }", "protected function _findRelatedProductTags($productId) {\n $productRelation = Mage::getResourceModel('catalog/product_relation');\n $writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n $childIds = array($productId);\n $tags = array(Brim_PageCache_Model_Engine::FPC_TAG . '_PRODUCT_' . $productId);\n do {\n // following product relations up the chain.\n $select = $writeConnection->select()\n ->from($productRelation->getMainTable(), array('parent_id'))\n ->where(\"child_id IN (?)\", $childIds);\n ;\n if (($childIds = $select->query()->fetchAll(Zend_Db::FETCH_COLUMN, 0))) {\n foreach ($childIds as $id) {\n $tags[] = Brim_PageCache_Model_Engine::FPC_TAG . '_PRODUCT_' . $id;\n }\n }\n } while($childIds != null);\n\n return $tags;\n }", "public function parentsOptions($language = null) {\n $conditions = !empty($language) ? ['status' => 1, 'type' => 'help', 'parent_id IS NULL', 'language' => $language] : ['status' => 1, 'type' => 'help', 'parent_id IS NULL'];\n $options = $this->find('list', ['keyField' => 'id', 'valueField' => 'title'])\n ->where($conditions)\n ->order(['lft'=>' DESC', 'rght'=>' ASC'])\n ->toArray();\n return $options;\n }", "function getChilds($id = NULL);", "public function all_parent()\r\n\t{\r\n\t\t$query = $this->db->select('*')->get('menu')->result_array(); \r\n\t \treturn $query;\r\n\t}", "function getParentCategories(){\n\t\t$categoryId = JRequest::getInt('category_id', 0);\n\t\t$parents = array();\t\t\n\t\twhile ( true ){\n\t\t\t$sql = \"SELECT id, name, parent FROM #__eb_categories WHERE id = \".$categoryId.\" AND published=1\";\n\t\t\t$this->_db->setQuery( $sql );\n\t\t\t$row = $this->_db->loadObject();\n\t\t\tif ($row){\n\t\t\t\t$sql = 'SELECT COUNT(*) FROM #__eb_categories WHERE parent='.$row->id.' AND published = 1 ';\n\t\t\t\t$this->_db->setQuery($sql) ;\n\t\t\t\t$total = $this->_db->loadResult();\n\t\t\t\t$row->total_children = $total ;\t\t\t\t\n\t\t\t\t$parents[] = $row ;\n\t\t\t\t$categoryId = $row->parent ;\t\t\t\t\n\t\t\t} else {\t\t\t\t\t\t\t\n\t\t\t \tbreak;\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $parents ;\t\n\t}", "public function findChildren()\n {\n return self::where('code_parrent',$this->id)->get();\n }", "function get_all_menu_selected_by_parent($params) {\n $sql = \"SELECT a.*, b.role_id, b.role_tp\n FROM com_menu a\n LEFT JOIN (SELECT * FROM com_role_menu WHERE role_id = ?) b ON a.nav_id = b.nav_id\n WHERE portal_id = ? AND parent_id = ?\n ORDER BY nav_no ASC\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "private function parents() {\n return array_map(array($this, 'page_info_from_id'), $this->parent_ids());\n }", "public function getDescendants();", "function get_tags_in($rel_id, $rel_type)\n{\n $CI =& get_instance();\n $CI->db->where('rel_id', $rel_id);\n $CI->db->where('rel_type', $rel_type);\n $CI->db->order_by('tag_order', 'ASC');\n $tags = $CI->db->get('tbltags_in')->result_array();\n\n $tag_names = array();\n foreach ($tags as $tag) {\n $CI->db->where('id', $tag['tag_id']);\n $tag_row = $CI->db->get('tbltags')->row();\n if ($tag_row) {\n array_push($tag_names, $tag_row->name);\n }\n }\n\n return $tag_names;\n}", "private static function getParentChildren():array\n {\n $parentChildren = [];\n $categories = self::select('*')->get()->toArray();\n\n foreach ($categories as $id){\n $children = [];\n foreach ($categories as $row){\n if ($id['id'] == $row['parent_id']){\n $children[] = $row['id'];\n }\n }\n $parentChildren[$id['id']] = $children;\n }\n\n return $parentChildren;\n\n }", "public function get_selected_entities(ComplexContentObjectPathNode $node);", "function get_hierarchy_filter($setting,$optparent=null,$branchparent=0,$published=null,$maxlevel=9999)\n {\n $data=$this->_prepareData(null,$optparent,$published) ;\n $children=$this->_make_relation($data) ;\n // echo \"<br>---list Child----<br>\"; print_r($children);\n $list = $this->_filter_recurse($branchparent, $children, '', $maxlevel,0,'',$setting);\n //echo \"<br>---list ----<br>\"; print_r($list);\n return $list;\n }", "function generateallActiveTree(&$tree, $parentid = 0) {\n $this->db->select('id,name,shortdesc,status,parentid,page_uri,orderr');\n $this->db->where ('parentid',$parentid);\n $this->db->where ('status','active');\n $this->db->order_by('orderr asc, parentid asc');\n $res = $this->db->get('adminmenu');\n if ($res->num_rows() > 0) {\n foreach ($res->result_array() as $r) {\n\n // push found result onto existing tree\n $tree[$r['id']] = $r;\n // create placeholder for children\n $tree[$r['id']]['children'] = array();\n // find any children of currently found child\n $this->generateallActiveTree($tree[$r['id']]['children'],$r['id']);\n }\n }\n }", "public function SearchTree($id)\n {\n GLOBAL $tree;\n $tree[] = $id;\n $list = $this->user_model->fetch('use_id', 'parent_id IN(' . $id . ')');\n if (! empty($list)) {\n foreach ($list as $key => $value) {\n $this->SearchTree($value->use_id);\n }\n } else {\n return;\n }\n return $tree;\n }", "public function getChildrenIterative(): array\n {\n //not using $this->getTopLevelParents, it would be concerns violation\n $topLevelParents = $this->categoryRepository->getTopLevelParents();\n\n $results[0] = $topLevelParents;\n $parents = $topLevelParents;\n\n $results = $this->iterate($results);\n\n return $results;\n }", "public function findAll()\n {\n $sql = \"SELECT * FROM parent\";\n $res = $this->getDb()->fetchAll($sql);\n\n $parents = array();\n foreach($res as $row)\n {\n $id_parent = $row['id_parent'];\n $parents[$id_parent] = $this->buildDomainObject($row);\n }\n\n return $parents;\n }", "function getParentIDs( $id = false, $ids = false )\n\t{\n\t\tif ( !$id )\n\t\t\treturn false;\n\t\t\t\n\t\tif ( $parent_id = $this -> getOne('Parent_ID', \"`ID` = '{$id}'\", 'categories') )\n\t\t{\n\t\t\t$ids[] = $parent_id;\n\t\t\treturn $this -> getParentIDs($parent_id, $ids);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $ids;\n\t\t}\n\t}", "private function getChildrenIds(){\n if ($this->myChildrenType===null) $this->myChildrenIds = null;\n else $this->myChildrenIds = $this->_db->getChildrenIds($this->myId);\n }", "function get_child_pages_by_parent_title($pageId,$limit)\n{\n // needed to use $post\n global $post;\n // used to store the result\n $pages = array();\n\n // What to select\n $args = array(\n 'post_type' => 'page',\n 'post_parent' => $pageId,\n 'posts_per_page' => $limit\n );\n $the_query = new WP_Query( $args );\n\n while ( $the_query->have_posts() ) {\n $the_query->the_post();\n $pages[] = $post;\n }\n wp_reset_postdata();\n return $pages;\n}", "function iter_all_tags() {\n \n $sql = '\n SELECT \n id\n FROM\n tags';\n \n return self::iter_results($this->prep_and_exec($sql));\n }", "function getPageChildren($parentId)\n{\n return $GLOBALS['conn']->query(\"SELECT * FROM `subjects` WHERE parent='$parentId'\");\n}", "public function element_get_childs($id) {\n global $db;\n $child_nodes = $db->fetch_table(\"SELECT ID_KAT, KAT_TABLE FROM `\".$this->table.\"`\n WHERE ROOT=\".$this->root.\" AND PARENT=\".$id.\" ORDER BY ORDER_FIELD\");\n $childs = array();\n foreach ($child_nodes as $index => $data) {\n $childs[] = $this->element_read($data[\"ID_KAT\"]);\n }\n return $childs;\n }", "private function getImmediateChilds($parent_identifier_field_value, $extra_condition=\"\", $order_by_phrase=\"\") {\n $sql=\"SELECT * FROM `\".$this->db_table.\"` WHERE `\".$this->parent_identifier_field_name.\"`='\".$parent_identifier_field_value.\"' \".$extra_condition.\" \".$order_by_phrase;\n \n $res=mysql_query($sql);\n $childs=array();\n while($val=mysql_fetch_assoc($res)) {\n array_push($childs,$val);\n }\n return $childs;\t\n }", "function getAllTags($pid){\n\t \n\t $sql = \"SELECT * FROM tag_vc JOIN tag_name ON tag_name.t_id=tag_vc.tagv_id WHERE tag_vc.pof_id='\".$pid.\"';\";\n\t \t\n\t $q = $this->db->query($sql);\n\t\tif($q->num_rows() > 0)\n\t\t{\n\t\t\tforeach($q->result() as $row)\n\t\t\t{\n\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t}", "private function scan_level_item($id,$is_parent) \n\t\t{\n\t\t\t//==================================================================\n\t\t\t// Recover all level children's with id parent = $id\n\t\t\t// Means recover all items on current level\n\t\t\t//==================================================================\n\t\t\t$query = \"\tSELECT\n\t\t\t\t\t\t\tMTN.`id` \t\t\tAS 'id',\n\t\t\t\t\t\t\tMTN.`parent` \t\tAS 'parent',\n\t\t\t\t\t\t\tMTN.`order`\t\t\tAS 'order',\n\t\t\t\t\t\t\tMTC.`title`\t\t\tAS 'value',\n\t\t\t\t\t\t\tCONCAT('\".$this->internal_id.\"',MTN.`id`) AS 'MyTreeItem'\n\t\t\t \t\t\tFROM\n\t\t\t \t\t\t\t`\".$this->tree_node.\"` MTN,\n\t\t\t \t\t\t\t`\".$this->tree_caption.\"` MTC\n\t\t\t \t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND MTN.`id` = MTC.`id`\n\t\t\t\t\t\t\tAND MTN.`application_release` = MTC.`application_release`\n\t\t\t\t \t\t\tAND MTN.`application_release` = '\".$this->application_release.\"'\n\t\t\t \t\t\t\tAND MTC.`language` = '\".$this->language.\"'\n\t\t\t \t\t\t\tAND MTN.`parent` = \".$id.\" \n\t\t\t \t\t\t\tORDER BY MTN.`order` ASC\n\t\t\t \t\t\";\n\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t//==================================================================\n\n\t\t\t//==================================================================\n\t\t\t// Scan all item in current level\n\t\t\t//==================================================================\n\t\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC)) \n\t\t\t{\n\t\t\t\t$this->listinvolved[$row['id']] = true; // Record id in array\n\t\t\t\t$this->sqllistinvolved = $this->sqllistinvolved.\"'\".$row['id'].\"',\";\n\t\t\t\tif($this->get_any_child($row['id']))\n\t\t\t\t{\n\t\t\t\t\t// More deeper in tree\n\t\t\t\t\t$this->scan_level_item($row['id'], true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t}", "public function children($id);", "public function findChildNodes($parentId)\n {\n return $this->findNodes($parentId);\n }", "public function getChildren($parentID)\n {\n $tmp = [];\n foreach($this->categoryList as $key => $item){\n if($item->parentID == $parentID) {\n $tmp[] = $item;\n }\n }\n\n return $tmp;\n }", "public function getAllTopLevelCat($cat_id, $needle) {\n// echo $cat_id;\n// echo \"\\ngetAllTopLevelCat 1 \";\n// echo $needle;\n// \n// echo \"\\ngetAllTopLevelCat 2 \";\n\n $basesql = \"SELECT c.category_id AS itemid, c.image AS imageurl, cd.NAME AS itemheading, cd.description AS itemdesc, c.parent_id, cd.icomoon AS icomoon_code\n\t\t\t\t\tFROM oc_category c \n\t\t\t\t\tLEFT JOIN oc_category_description cd ON c.category_id=cd.category_id \n\t\t\t\t\tWHERE c.category_id='\" . $cat_id . \"'\";\n\n $catdata = $this->queryRun($basesql, 'select');\n\n\n\n if (!empty($catdata)) {\n if ($catdata['parent_id'] == $needle) {\n// echo \"\\nin here\";\n// echo $catdata['parent_id'];\n// var_dump($catdata);\n\n return $catdata;\n } else {\n// echo \"\\nin else\";\n// echo $catdata['parent_id'];\n if ($catdata['parent_id'] != 0)\n $this->getAllTopLevelCat($catdata['parent_id'], $needle);\n }\n }\n }", "public function getChildIds($a_node)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$query = 'SELECT * FROM tree '.\n\t\t\t\t'WHERE parent = '.$ilDB->quote($a_node,'integer').' '.\n\t\t\t\t'AND tree > '.$ilDB->quote(0,'integer');\n\t\t$res = $ilDB->query($query);\n\t\t\n\t\t$childs = array();\n\t\twhile($row = $res->fetchRow(DB_FETCHMODE_OBJECT))\n\t\t{\n\t\t\t$childs[] = $row->child;\n\t\t}\n\t\treturn $childs;\n\t}", "private function templateDivChildren($parent_id)\n\t{\n\t\t$stmt = $this->stmtTemplate();\n\t\t$stmt->bindValue(':site_id', $this->site_id, PDO::PARAM_INT);\n\t\t$stmt->bindValue(':template_id', $this->template_id, PDO::PARAM_INT);\n\t\t$stmt->bindValue(':parent_id', $parent_id, PDO::PARAM_INT);\n\t\t$stmt->execute();\n\n\t\t$result = $stmt->fetchAll();\n\n\t\t$children = array();\n\n\t\tif(count($result) > 0) {\n\t\t\tforeach($result as $row) {\n\t\t\t\t$div = array('id'=>$row['id'],\n\t\t\t\t\t'sizes'=>array('width'=>$row['width'],\n\t\t\t\t\t\t'height'=>$row['height'],\n\t\t\t\t\t\t'design_height'=>$row['design_height'],\n\t\t\t\t\t\t'fixed'=>$row['fixed']));\n\n\t\t\t\t$div['children'] = $this->templateDivChildren($row['id']);\n\n\t\t\t\t$children[] = $div;\n\t\t\t}\n\t\t}\n\n\t\treturn $children;\n\t}", "function tags() {\n\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRow = $preloader->getPreloadArticleTag($this->id);\n\n\t\tif ($preloadRow) {\n\t\t\t$rows = $preloadRow;\n\t\t} else {\n\t\t\tglobal $polarbear_db;\n\t\t\t$sql = \"SELECT tagID FROM \" . POLARBEAR_DB_PREFIX . \"_article_tag_relation WHERE articleID = '$this->id'\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t}\n\n\t\t$arrTags = array();\n\t\tif ($rows) {\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$arrTags[] = polarbear_tag::getInstance($row->tagID);\n\t\t\t}\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article tags()\");\n\n\t\treturn $arrTags;\n\t}", "function _syndication_server_taxonomy_get_trees($vid, $parent = 0, $max_depth = NULL) {\n\n $trees = array();\n\n foreach($vid as $k => $id) {\n $trees[$id] = taxonomy_get_tree($id, $parent, $max_depth);\n }\n\n return $trees;\n}", "function hierarchize_get_childs($brainstormid, $userid=null, $groupid=0, $excludemyself=false, $fatherid=0){\r\n global $CFG;\r\n\r\n $accessClause = brainstorm_get_accessclauses($userid, $groupid, $excludemyself);\r\n\r\n $fatherClause = ($fatherid != 0) ? \" AND od.itemdest = $fatherid \" : ' AND (od.itemdest IS NULL OR od.itemdest = 0) ';\r\n\r\n $sql = \"\r\n SELECT\r\n r.id,\r\n r.response,\r\n od.itemdest,\r\n od.intvalue,\r\n od.userid,\r\n od.groupid,\r\n od.id as odid\r\n FROM\r\n {$CFG->prefix}brainstorm_responses as r,\r\n {$CFG->prefix}brainstorm_operatordata as od\r\n WHERE\r\n r.id = od.itemsource AND\r\n operatorid = 'hierarchize' AND\r\n r.brainstormid = {$brainstormid}\r\n {$accessClause}\r\n {$fatherClause}\r\n ORDER BY\r\n od.intvalue,\r\n od.userid\r\n \";\r\n // echo $sql;\r\n if (!$records = get_records_sql($sql)){\r\n return array();\r\n }\r\n return $records;\r\n}", "function children($parent_id): ?array {\n $list = @$this->children[$parent_id];\n return $list ? array_keys($list) : [];\n }", "public function getAllMattersParentChildrenListTrimmed()\n {\n $matters = self::getAllMatters();\n $clean_matters = [];\n foreach ($matters as $matter) {\n $clean_matters[] = [\n 'id' => $matter['MatterID'], \n 'text' => $matter['MatterName'], \n 'ParentId' => $matter['ParentId'], \n 'ParentName' => $matter['ParentName'],\n 'MatterName' => $matter['MatterName'],\n 'MatterID' => $matter['MatterID'],\n 'Tag' => $matter['Tag'],\n\n ];\n }\n $matters = self::array_sort( $clean_matters, 'MatterName', SORT_ASC ); \n $output = self::buildTree($matters, 50) ;\n return $output;\n }", "private function getSelectedTagIDs($id) {\n $this->db->select(\"idTag\")\n ->from('tag2question')\n ->where(\"idQuestion = ?\")\n ->execute([$id]);\n $tagIDlist = $this->db->fetchAll();\n\n return $tagIDlist;\n }", "function &sql_fetch_children( $inQueryString, $rootNode, $idField = \"id\", $parentField = \"parent\") {\n\tsql_connect();\n\tglobal $defaultdb;\n\t$return = $defaultdb->fetch_children($inQueryString,$rootNode,$idField,$parentField);\n\treturn $return;\n}", "function getListFromParent($parentId, $order = \"\")\n {\n if ($parentId > 0 && !empty($this->parentAttrib)) {\n $sql = \"select * from \" . $this->table;\n /*\n * Preparation du where\n */\n if (strlen(preg_replace(\"#[^A-Z]+#\", \"\", $this->parentAttrib)) > 0) {\n $cle = $this->quoteIdentifier . $this->parentAttrib . $this->quoteIdentifier;\n } else {\n $cle = $this->parentAttrib;\n }\n $sql .= \" where \" . $cle . \" = :parentId\";\n $data[\"parentId\"] = $parentId;\n if (strlen($order) > 0) {\n $sql .= \" order by :order\";\n $data[\"order\"] = $order;\n }\n return $this->getListeParamAsPrepared($sql, $data);\n } else {\n return null;\n }\n }", "public function getAncestors();", "function galleryParentSelectList( &$row ) {\r\n $database =& JFactory::getDBO();\r\n\r\n $id = '';\r\n if ( $row->id ) {\r\n $id = \" AND id != $row->id\";\r\n }\r\n\r\n // get a list of the menu items\r\n // excluding the current menu item and its child elements\r\n $query = \"SELECT *\"\r\n . \" FROM #__rsgallery2_galleries\"\r\n . \" WHERE published != -2\"\r\n . $id\r\n . \" ORDER BY parent, ordering\"\r\n ;\r\n $database->setQuery( $query );\r\n \r\n $mitems = $database->loadObjectList();\r\n\r\n // establish the hierarchy of the menu\r\n $children = array();\r\n\r\n if ( $mitems ) {\r\n // first pass - collect children\r\n foreach ( $mitems as $v ) {\r\n $pt = $v->parent;\r\n $list = @$children[$pt] ? $children[$pt] : array();\r\n array_push( $list, $v );\r\n $children[$pt] = $list;\r\n }\r\n }\r\n\r\n // second pass - get an indent list of the items\r\n $list = JHTML::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0 );\r\n\r\n // assemble menu items to the array\r\n $mitems = array();\r\n $mitems[] = JHTMLSelect::option( '0', JText::_('Top Gallery') );\r\n\r\n foreach ( $list as $item ) {\r\n $mitems[] = JHTMLSelect::option( $item->id, '&nbsp;&nbsp;&nbsp;'. $item->treename );\r\n }\r\n\r\n $output = JHTML::_(\"select.genericlist\", $mitems, 'parent', 'class=\"inputbox\" size=\"10\"', 'value', 'text', $row->parent );\r\n\r\n return $output;\r\n}", "public function ancestorsGetDescendants($exclude_this=true)\r\n {\r\n $model = (new static)->setState('filter.path_begins_with', $this->path);\r\n if ($exclude_this) {\r\n \t$model->setState('filter.ids_excluded', array( $this->id ));\r\n } \r\n $items = $model->getItems();\r\n\r\n return $items;\r\n }", "function cognitivefactory_get_subtree_list($table, $id) {\n global $DB;\n \n $res = $DB->get_records_menu($table, array('fatherid' => $id));\n $ids = array();\n if (is_array($res)) {\n foreach (array_keys($res) as $aSub) {\n $ids[] = $aSub;\n $subs = cognitivefactory_get_subtree_list($table, $aSub);\n if (!empty($subs)) $ids[] = $subs;\n }\n }\n return(implode(',', $ids));\n}", "public function all_child_individual()\n\t{\n\t\t$this->db->where('individual_status = 1 AND individual_parent > 0');\n\t\t$this->db->order_by('individual_name', 'ASC');\n\t\t$query = $this->db->get('individual');\n\t\t\n\t\treturn $query;\n\t}", "public function build_category_tree($output, $preselected, $parent=0, $indent=''){\t\n $this->db->select('category_id,category_name,parentid');\n $this->db->where('parentid',$parent); \n $sql = $this->db->get('category'); \n \n foreach ($sql->result_array() as $c)\n {\n $selected = ($c[\"category_id\"] == $preselected) ? \"selected=\\\"selected\\\"\" : \"\";\n $output .= \"<option value=\\\"\" . $c[\"category_id\"] . \"\\\" \" . $selected . \">\" . $indent . $c[\"category_name\"] . \"</option>\";\n if($c[\"category_id\"] != $parent){\n $this->crud_model->build_category_tree($output, $preselected, $c[\"category_id\"], $indent . \"&nbsp;&nbsp;\");\n } \n }\n return $sql->result_array();\n}", "protected function getChildK2Categories()\n {\n $db = $this->db;\n $query = $db->getQuery(true);\n $query->select($db->quoteName(array('id', 'parent')));\n $query->from($db->quoteName('#__k2_categories'));\n $query->where($db->quoteName('published') . ' = 1');\n $query->where($db->quoteName('parent') . ' != 0');\n $db->setQuery($query);\n return $db->loadObjectList('id');\n }", "public function getChildProducts(Product $parent);", "public function findChild(array $comments, $parent_id)\n {\n $selected_comments = array();\n \n Foreach ($comments as $comment)\n {\n if ($parent_id == $comment->getParent())\n { \n $selected_comments[] = $comment;\n } \n }\n return $selected_comments;\n \n }", "public function ancestors()\r\n {\r\n $return = array();\r\n \r\n $item = $this;\r\n while (!empty($item->parent))\r\n {\r\n $clone = (new static())->load(array(\r\n '_id' => new \\MongoId((string) $item->parent)\r\n ));\r\n unset($item);\r\n if (!empty($clone->id))\r\n {\r\n array_unshift($return, $clone);\r\n if (!empty($clone->parent))\r\n {\r\n $item = $clone;\r\n }\r\n }\r\n }\r\n \r\n return $return;\r\n }", "function get_parent_categories()\n \t{\n \t\treturn $this->conn_db->get_parent_categories($this->uid);\t\n \t\t\n \t}", "function getDirectChildren($id) {\n\t\t\t$this->query(\"SELECT * FROM usecase WHERE parent={$id};\");\n\t\t\t$rs = $this->resultSet();\n\t\t\t$array = array();\n\t\t\tforeach($rs as $uc)\n\t\t\t\t$array[] = $uc;\n\t\t\treturn $array;\n\t\t}", "function children_of_parent_page($parent_title){\n $my_wp_query = new WP_Query();\n $all_wp_pages = $my_wp_query->query(array('post_type' => 'page', 'order' => 'ASC', 'orderby' => 'menu_order', 'posts_per_page' => -1));\n $parent_page = get_page_by_title($parent_title);\n $page_children = get_page_children($parent_page->ID, $all_wp_pages);\n return $page_children; //outputs an array of child page objects\n}", "public function testFindTaggedWithConditions() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'Second %')));\n\t\t$this->assertEqual(count($result), 0);\n\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'First %')));\n\t\t$this->assertEqual(count($result), 1);\n\t\t$this->assertEqual($result[0]['Article']['id'], 'article-1');\n\t}", "protected function getTreePathParents(): array\n {\n $primaryKey = $this->owner->getAttribute($this->ownerParentIdAttribute);\n if ($primaryKey === null) {\n return [];\n }\n\n return $this->treePathModelClass::find()\n ->byChildId($primaryKey)\n ->orderBy('child_level')\n ->all();\n }", "public function get_inner_pages($parent_id){\n\n\t\t\t\t$selectissue=\"SELECT * FROM `pages` WHERE `page_parent_id`='$parent_id'\";\n\t\t\t\t$issueresult = mysqli_query($this->db,$selectissue) or die(mysqli_connect_errno().\"Data cannot inserted\");\n \t\treturn $issueresult;\n\t\t}", "private function GetNodesByParentId($db,$parent_id){\n $tree = array();\n try {\n if (intval($parent_id)>0) {\n $result = $db->query('SELECT * FROM tree WHERE DELETE_AT IS NULL AND PARENT_ID=' . $parent_id);\n if (!is_bool($result)) {\n while ($row = $result->fetchArray()) {\n $nodes = $this->GetNodesByParentId($db,$row[\"ID\"]);\n $tree[] = array(\"ID\" => $row[\"ID\"], \"NAME\" => $row[\"NAME\"], \"NODES\" => $nodes);\n }\n }\n }\n } catch (Exception $ex) {\n echo \"Exception in Tree->GetAllNodes: \" . $ex->getMessage() . \"<br/>\";\n }\n return $tree;\n }", "function getTree( $parentID=0, $level=0 )\r\n {\r\n $category = new eZImageCategory( $parentID );\r\n\r\n $categoryList = $category->getByParent( $category );\r\n\r\n $tree = array();\r\n $level++;\r\n foreach ( $categoryList as $category )\r\n {\r\n array_push( $tree, array( $return_array[] = new eZImageCategory( $category->id() ), $level ) );\r\n\r\n if ( $category != 0 )\r\n {\r\n $tree = array_merge( $tree, $this->getTree( $category->id(), $level ) );\r\n }\r\n }\r\n\r\n return $tree;\r\n }", "public function getAllParentsIds()\n\t{\n\t\t$parentsIds = array();\n\t\tif ($this->getParentId()){\n\t\t\t$parentsIds[] = $this->getParentId();\n\t\t\t$parentsIds = array_merge($parentsIds, $this->getParentCategory()->getAllParentsIds());\n\t\t}\n\n\t\treturn $parentsIds;\n\t}", "function showParentCategoriesForSearch( )\n\t{\n\t\t$q = \"SELECT * FROM title_dev_categories WHERE status = 1 AND category_type = 0 order by \tcategory_title asc \";\n\t\t$r = $this -> db -> getMultipleRecords( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "public function getAllDescentIds($idParent){\r\n\t\t$tree = $this->generateTreeList();\r\n\t\t$cant_parent = 0;\r\n\t\t$find = false;\r\n\t\t$arr = array( );\r\n\t\tforeach ($tree as $key => $node) {\r\n\t\t\tif ($find){\r\n\t\t\t\t$cant = substr_count($node, '_');\r\n\t\t\t\tif ($cant > $cant_parent){\r\n\t\t\t\t\t$arr[] = $key;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($key == $idParent){\r\n\t\t\t\t$find = true;\r\n\t\t\t\t$cant_parent = substr_count($node, '_');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $arr;\r\n\t}", "function opensky_get_searchable_subcollections ($pid) {\n $descendants = opensky_get_subcollections_recursive($pid);\n $tree = array();\n foreach($descendants as $child) {\n if (!opensky_has_subcollections($child)) {\n $tree[] = $child;\n }\n }\n return $tree;\n}", "public function getDescendants($idEntry = 0);", "public function getChildrenQuery()\n {\n return null;\n }", "public function getParentCategories() {\n $select = $this->select()\n ->from($this->info('name'), array(\"category_id\", \"category_name\"))\n ->where(\"cat_dependency = 0 AND subcat_dependency = 0\");\n\n return $this->fetchAll($select);\n }", "public function get_parents(){\n\t\treturn $this->master->parent_list_construct();\n\t}", "public function getChildrenConditions(?int $parentId): iterable\n {\n return $this->conditions\n ->filter(function (Condition $condition) use ($parentId) {\n return $condition->parent_id === $parentId && $condition->isActive();\n })\n ->sortBy('priority')\n ->map(function (Condition $condition) {\n return $condition->toCondition();\n })\n ->values();\n }", "private function parent_dd_child_chk($cid,$ind,$selected_id = '') {\n\t\t\tglobal $dbh;\n\t\t\t\n\t\t$parent_drop_down = '';\n\t\t\t\n\t\t$sql_query = \"SELECT\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tcategory_name,\n\t\t\t\t\t\tparent_category_id\n\t\t\t\t\t FROM\n\t\t\t\t\t\tcategories\n\t\t\t\t\t WHERE\n\t\t\t\t\t\tzip_id is NULL\n\t\t\t\t\t AND\n\t\t\t\t\t\tparent_category_id = '\".$cid.\"'\n\t\t\t\t\t ORDER BY sort_order ASC, category_name ASC\n\t\t\t\t\t ;\";\n\t\t\n\t\t// store results in memcached\n\t\t$rows = db_memc_str($sql_query);\n\t\t\n\t\tforeach ($rows as $categories) {\n\t\t $parent_drop_down .= '<option value=\"'.$categories['id'].'\" '.($selected_id == $categories['id'] ? 'selected=\"selected\" ' : '').'>'.$ind.' '.htmlentities($categories['category_name']).'</option>'.LB;\n\t\t $parent_drop_down .= $this->parent_dd_child_chk($categories['id'],$ind.'--');\n\t\t}\n\t\t\n\treturn $parent_drop_down;\n\t}", "public function getParents()\n\t{\n\t\tif ($this->get('parents'))\n\t\t{\n\t\t\treturn $this->get('parents');\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->setParents();\n\t\t}\n\t}" ]
[ "0.6014812", "0.59737283", "0.5889965", "0.58226585", "0.57431567", "0.5719665", "0.5713641", "0.5642811", "0.56135005", "0.5585254", "0.55792195", "0.55677885", "0.5526267", "0.5504596", "0.5497928", "0.54804814", "0.5473635", "0.5462841", "0.5442516", "0.54241216", "0.5415169", "0.5404274", "0.53328294", "0.5330978", "0.5312002", "0.52943194", "0.5289281", "0.5285358", "0.52657706", "0.5262802", "0.5259371", "0.52575713", "0.5255748", "0.5252566", "0.52394193", "0.5234827", "0.5230944", "0.5223411", "0.5223225", "0.52148414", "0.519999", "0.51972586", "0.5171371", "0.51676613", "0.5162274", "0.5154182", "0.5139443", "0.51381016", "0.51296264", "0.5122216", "0.5121996", "0.5121914", "0.5116838", "0.50969356", "0.5082977", "0.5080275", "0.5070274", "0.5068493", "0.5067986", "0.50555134", "0.504751", "0.5046707", "0.50445175", "0.50417453", "0.50394255", "0.5035395", "0.5023687", "0.50226736", "0.5017143", "0.50162864", "0.50129914", "0.5005063", "0.49907365", "0.49795017", "0.49767977", "0.49755114", "0.49714303", "0.49687648", "0.49662742", "0.4965434", "0.49634025", "0.49603537", "0.495875", "0.49534008", "0.49504626", "0.49367774", "0.4933832", "0.4930581", "0.4923677", "0.49223977", "0.49221638", "0.49185798", "0.49165073", "0.49160957", "0.4915534", "0.49155068", "0.49148118", "0.49127603", "0.49050036", "0.4895979" ]
0.7950513
0
Set the content to json $content
public function json(array $content): Content { $this->content = json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDataContent($content)\n {\n if (is_array($content)) {\n $this->headers->set('Content-Type', 'application/json');\n $content = json_encode($content);\n }\n\n $this->setContent($content);\n }", "function json($content = null){\n $this->_JSON = true;\n $this->_HTML = false;\n $this->_redirect = false;\n if(is_array($content)) $this->_JSON_contents = $content;\n }", "public function setContent($content){\n //asign the content\n $this->contentObject = $content;\n\n //save to disk as serialized\n $json = json_encode($this->contentObject);\n if($this->exists()){\n file_put_contents($this->getPath(), $json);\n }\n\t}", "public function setContent($content)\n {\n $this->original = $content;\n\n // If the content is \"JSONable\" we will set the appropriate header and convert the content to JSON, This is\n // useful when returning something like models from routes that will be automatically transformed to their\n // JSON form.\n if ($this->shouldBeJson($content)) {\n $this->header('Content-Type', 'application/json');\n\n $content = $this->morphToJson($content);\n }\n // If this content implements the \"Renderable\" interface then we will call the render method on the object so\n // we will avoid any \"__toString\" exceptions that might be thrown and have their errors obscured(使模糊,费解)\n // by PHP's handling.\n elseif ($content instanceof Renderable) {\n $content = $content->render();\n }\n\n parent::setContent($content);\n\n return $this;\n }", "public function setContent($content): JsonResponse\n {\n $this->data = $content;\n\n return $this;\n }", "public function setContent($content) {\n\t\t$this->buffer['content'] = $content;\n\t}", "public function setContent(string|array $content) : static\n {\n // check if response should be JSON encoded\n if(Arr::is($content)){\n $content = json_encode($content);\n $this->setHeader(\"Content-Type\", \"application/json\");\n }\n\n $this->content = $content;\n return $this;\n }", "protected function setContent() {}", "public function asJson($content=[])\n{\n self::$stored['json'][] = $content;\n return json_encode($content);\n}", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content){\n $this->_content = $content;\n }", "protected function ajaxRenderJson($content)\n {\n header('Content-Type: application/json');\n $this->ajaxDie(json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));\n }", "private function setJsonContentType()\n {\n Http::setContentType(self::JSON_CONTENT_TYPE);\n }", "public function updateJson($key, array &$content) {\n\t\t$json = json_encode($content);\n\t\tupdate($key, $json);\n\t}", "public function setContent($content)\r\n {\r\n $this->_content = $content;\r\n }", "public static function json($content)\n {\n $response = new static;\n $response\n ->header('Content-type', 'application/json')\n ->body(json_encode($content));\n return $response;\n }", "public function setContent($content)\r\n {\r\n $this->content = $content;\r\n }", "public function setContent($content)\n {\n $this->_content = $content;\n }", "public function setContent ($content) {\r\n\t\t$this->content = (string)$content;\r\n\t}", "public function setContent($content) {\n\n $this->content = $content;\n }", "public function setContent($content) {\n\n $this->content = $content;\n }", "public function setContent( string $content );", "public function setContent($content){\n $this->_content = $this->checkFormat($content);\n }", "public function setContent($content) {\n $this->content = $content;\n }", "public function setJSON($data) {\n\t\t$this->json = $data;\n\t}", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->content = $content;\n }", "public function json($content)\n {\n if (!(is_array($content) || is_object($content))) {\n $error = 'Error - Invalid Parameter at [%s->%s()]. Expected and Array or Object but was passed a [%s].';\n throw new \\Exception(sprintf($error, __CLASS__, __FUNCTION__, gettype($content)));\n }\n $this->header('Content-Type', 'application/json');\n $this->response_content = $content;\n return $this;\n }", "public function set_content ($content) {\n $this->content = $content;\n }", "function setContent(string $content_html): void\n {\n $this->data['content'] = $content_html;\n }", "abstract function setContent();", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "public function setContent($content)\n\t{\n\t\t$this->content = $content;\n\t}", "public function toJson(){\n return json_encode($this->content);\n }", "function jsonSave()\n {\n try {\n file_put_contents($this->fname, json_encode($this->content));\n } catch (Exception $e) {\n echo $e;\n }\n }", "public function setContent()\n {\n }", "protected function update()\n {\n if (!$this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) {\n $this->headers->set('Content-Type', 'application/json');\n }\n\n return $this->setContent($this->data);\n }", "public function json($content): ResponseInterface;", "public function addJson($key, array &$content) {\n\t\t$json = json_encode($content);\n\t\t$this->add($key, $json);\n\t}", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "public function setRawContent($content);", "protected function render_content()\n {\n $value = $this->value();\n\n\n try {\n $this->value_array = json_decode($value, true);\n\n $this->value_json = $value;\n\n } catch (Exception $e) {\n $this->value_array = array();\n $this->value_json = \"{}\";\n }\n $this->render_default_values();\n\n $this->render_styling();\n }", "public function setContent($content)\n {\n return $this->setData(self::CONTENT, $content);\n }", "public function initContent()\n {\n /**\n * !!! Do not call parent::initContent().\n * Use it only for collections.\n * Custom output do not have an id and will generate error.\n */\n\n foreach ($this->sql as $key => $query) {\n try {\n $result = Db::getInstance()->executeS($query);\n if (isset($result)) {\n $this->jsonContent[$key] = $result[0][$key];\n }\n } catch (PrestaShopDatabaseException $exception) {\n ClaroLogger::errorLog(__METHOD__ . ' : DBException: ' . $exception->getMessage()\n . ' at line ' . $exception->getLine());\n\n $this->jsonContent = [\n 'status' => 'error',\n 'error' => $exception->getMessage()\n ];\n die(json_encode($this->jsonContent));\n }\n }\n die(json_encode($this->jsonContent));\n }", "public function setContent(string $content): ResponseInterface;", "protected function setJSON($json){\n\t\t$this->json = $json;\n\t}", "private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }", "public function setContent(string $content): void\n {\n $this->_content = $content;\n }", "public function sendContent(): JsonResponse\n {\n echo $this->getContent();\n\n return $this;\n }", "public function set_content(string $content) {\n $this->content = $content;\n }", "public final function setContent($content): FakeResponse\n {\n $this->original = $content;\n\n parent::setContent($content);\n\n return $this;\n }", "protected function setContent($content = null)\n {\n if (!is_null($content)) {\n if (is_array($content)) {\n $this->innerContent = [];\n foreach ($content as $key => $cnt) {\n if (is_a($cnt, self::class) || is_string($cnt) || is_numeric($cnt)) {\n $this->innerContent[] = $cnt;\n }\n }\n } else {\n $this->innerContent = [$content];\n }\n }\n }", "public function setContent($content)\r\n {\r\n $this->string = $content;\r\n $this->fetchHeader($content);\r\n $this->fetchBody($content);\r\n\r\n return $this;\r\n }", "function setContent($c) {\n\t\t$this->set(\"content\",$c);\n\t}", "public function setContent(string $content): void\n {\n $this->content = $content;\n }", "public function setContent($content){\n\t\t$this->content = $content;\n\t\t\n\t\treturn $this;\n\t}", "public function json($content = Array(), $code = 200, $type = NULL)\n\t{\n\t\t$this->response->setStatusCode($code, $type);\n\t\t$this->response->setJsonContent($content);\n\t}", "protected function putJsonContent($result)\n {\n file_put_contents($this->jsonFile, json_encode($result));\n }", "public function parse (){\n $this->json = json_decode($this->content, true);\n $this->numItems = count ($this->json);\n }", "protected function echoJSON ($content)\n {\n // its support for gzencode\n\n $output = json_encode($content);\n\n if (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== FALSE) {\n\n header(\"Content-Encoding: gzip\");\n header(\"Content-Type: text/plain\");\n\n try {\n $output = gzencode($output, 1, ZLIB_ENCODING_GZIP);\n } catch (Exception $e) {\n error_log($e->getMessage());\n }\n\n }\n\n echo $output;\n\n }", "public function setContentAttribute($value)\n {\n $data = [\n 'raw' => $value,\n 'html' => (new Markdowner)->convertMarkdownToHtml($value)\n ];\n\n $this->attributes['content'] = json_encode($data);\n }", "public function setContent($newContent) {\n\t\t$this->content = $newContent; \n\t}", "public static function contentJSON($code = 200): void\n {\n self::set(\"Content-Type\", \"application/json\", true, $code ?? self::$httpCode);\n }", "public function setContent( string $content ) : void\n {\n $this->content = $content;\n }", "public function setContent($content)\n {\n $this->content = $content;\n\n return $this;\n }", "public function setRequestContent()\n {\n $this->requestContent = array(\n 'method' => $this->request->getMethod(),\n 'headers' => $this->request->headers->all(),\n 'content_type' => $this->request->headers->get('content-type'),\n 'content' => array(),\n );\n\n if (strstr($this->requestContent['content_type'], 'application/x-www-form-urlencoded')) {\n $this->requestContent['content'] += $this->request->request->all();\n } elseif (strstr($this->requestContent['content_type'], 'application/json')) {\n $this->requestContent['content'] += json_decode($this->getRequest()->getContent(), true);\n } else {\n $this->requestContent['content'] += $this->request->query->all();\n }\n }", "public function setContent($content) {\n $this->request->setContent($content);\n if(is_file($content)) {\n $this->request->setIsContentString(false);\n }\n else {\n $this->request->setIsContentString(true);\n }\n \n return $this;\n }", "public function setBodyContent($data)\n\t{\n\t\t$this->_pageData['data']['content'] = $data;\n\t}", "public function set_content( $content )\r\n\t {\r\n\t \t$this->_content_to_load = $con;\r\n\t }", "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "private function get_json_data_from_html($content){\n $tmp = explode('var datasource = ',$content)[1];\n\n $tmp = explode(\"<app-root></app-root>\",$tmp)[0];\n\n $tmp = trim(str_replace('</script>','',$tmp));\n\n $tmp = substr($tmp,0,-1);\n\n return json_decode($tmp);\n }", "protected function getContentObject()\n {\n return json_decode($this->response->getContent());\n }", "function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}", "function setContent($content){\n\t\t\tglobal $tableContent;\n\t\t\t\n\t\t\t$tableContent = $content;\n\t\t}", "protected function setResourceContents( $path, $content )\n {\n $this->content[$path] = $content;\n }", "protected function update(): static\n {\n if ( ! $this->headers->has('Content-Type') || 'text/javascript' === $this->headers->get('Content-Type')) {\n $this->headers->set('Content-Type', 'application/json');\n }\n\n return $this->setContent($this->data);\n }", "public function set_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content = $content;\n return true;\n }", "public function initContent()\n {\n parent::initContent();\n\n try {\n $continue = true;\n $simpleAbandonedCart = false;\n\n // coll. items are less than the setup limit and last id is not exceeded\n while ($this->collItems < self::LIMIT && $continue) {\n if (isset($this->collection->carts)) {\n foreach ($this->collection->carts as $cart) {\n // Get all carts that were NOT transformed into orders.\n if (!in_array($cart->id, $this->orderCartId)) {\n // Remove unnecessary keys\n $simpleAbandonedCart = $this->simpleMapping->getSimpleMapping('abandoned_cart', $cart);\n\n // Assign entity_name attribute\n $simpleAbandonedCart['entity_name'] = 'abandonedcart';\n $simpleAbandonedCart['associations'] = $this->associationsCartRowsMapping($cart);\n\n // Add to jsonContent\n $this->jsonContent[] = $simpleAbandonedCart;\n // Increment coll items count\n $this->collItems++;\n }\n }\n // Verify if the last id is exceeded\n $continue = ($cart->id < $this->lastId ? true : false);\n if ($continue) {\n $this->collection = $this->getCollection($cart->id, self::LIMIT - $this->collItems);\n }\n }\n }\n\n // call encoder\n $this->encodeJson('abandonedcart');\n /** @var Cart $cart */\n $this->encodedJson['lastId'] = ($simpleAbandonedCart ? $simpleAbandonedCart['id'] : 0);\n\n die(json_encode($this->encodedJson));\n } catch (Exception $exception) {\n ClaroLogger::errorLog(__METHOD__ . ' : ' . $exception->getMessage() . ' at line ' . $exception->getLine());\n\n $this->jsonContent = [\n 'status' => 'error',\n 'error' => $exception->getMessage()\n ];\n die(json_encode($this->jsonContent));\n }\n }", "private function decodeJson( $content ) {\n\n\t\t$content = preg_replace( '/[\\x00-\\x1F\\x80-\\xFF]/', '', $content );\n\n\t\treturn json_decode( $content, true );\n\t}", "public static function sendJsonResponse($content, $code = 200){\n http_response_code($code);\n\n header('Content-Type', 'application/json');\n dd($content);\n echo $content;\n }", "public function content($content)\n {\n $this->content = $content;\n return $this;\n }", "public function SetContent(Content $content)\n {\n $this->texts = array();\n $wordings = ContentWording::Schema()->FetchByContent(false, $content);\n foreach($wordings as $wording)\n {\n $prefix = Str::Replace('-', '.', $content->GetType());\n $this->texts[$prefix . '.' . $wording->GetPlaceholder()] = $wording->GetText();\n }\n }", "function jsonout($status, $content) {\n if ( !is_array($content) ) {\n $content = (Array('text'=>$content));\n }\n\n return json_encode( Array(\n 'status' => $status,\n 'content'=> $content\n )\n );\n}", "public function addContent($content);" ]
[ "0.78884196", "0.75955975", "0.75914484", "0.71827155", "0.71258885", "0.70481664", "0.6854559", "0.66435784", "0.6586468", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65794635", "0.65747446", "0.6507753", "0.6379922", "0.6368565", "0.6358265", "0.6312613", "0.63007194", "0.6298604", "0.6288533", "0.6253155", "0.6253155", "0.6248609", "0.6245224", "0.62321186", "0.6220347", "0.6208606", "0.6208606", "0.6208606", "0.6197927", "0.6193734", "0.61855024", "0.6166813", "0.6141417", "0.6141417", "0.6141417", "0.6128561", "0.61273634", "0.60780895", "0.6069176", "0.60672265", "0.60527825", "0.60478747", "0.60478747", "0.60478747", "0.60396117", "0.6034076", "0.6009926", "0.5989166", "0.5962505", "0.5883087", "0.58591217", "0.58412737", "0.58360183", "0.583284", "0.58045113", "0.5802762", "0.5799692", "0.5790941", "0.57884926", "0.5775756", "0.57731074", "0.5770837", "0.57669795", "0.57499045", "0.5746592", "0.573637", "0.5728173", "0.572413", "0.5716057", "0.5714623", "0.57143384", "0.57071334", "0.5666369", "0.5658158", "0.5658158", "0.5658158", "0.5658158", "0.56540036", "0.5645724", "0.56262755", "0.56262755", "0.5617641", "0.5614155", "0.56011474", "0.55930024", "0.5586089", "0.5562846", "0.55453324", "0.5517642", "0.551486", "0.5495281" ]
0.67016137
7
Merge the current json content with $additional It's a recursive merge and if the current content can not be decoded it is getting replaced.
public function mergeJson(array $additional): Content { $this->content = json_encode(ArrayMerger::doMerge( json_decode($this->content, true) ?? [], $additional ), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getAdditionalJsonData(): array;", "private function mergeExtra()\n {\n if (method_exists($this, 'extra')) {\n $this->extra = $this->extra();\n }\n }", "public function getExtraJson()\n {\n return $this->extra;\n }", "public function setExtraJson($extra)\n {\n $this->extra = $extra;\n return $this;\n }", "protected function afterFind()\n \t{\n \t\t$this->jsonArray_extra = json_decode($this->json_extra);\n \t\t$this->jsonArray_payload = json_decode($this->json_payload);\n\n \t\tparent::afterFind();\n \t}", "public function get_additional_content()\n {\n\n return apply_filters('subscriptio_email_additional_content_' . $this->id, $this->format_string($this->get_option('additional_content', '')), $this->object);\n }", "public function addExtra($data)\n {\n $data = $this->hydrateIfJsonToArray($data);\n $this->extra[] = $data;\n }", "public function updateJson()\n {\n $ExtensionData = ExtensionData::get()->filter(array(\"Title\" => $this->latestReleasePackage->getPrettyName()))->First();\n\n if ($ExtensionData) {\n $result = $this->dataFields($ExtensionData);\n return $result ;\n } else {\n return ;\n }\n }", "public function additional(array $data);", "public function merge($input)\n\t{\n\t\t$values = (array) json_decode($this->json);\n\n\t\t$values = array_merge($values, $input);\n\n\t\t$this->json = json_encode($values);\n\n\t\t$this->count = count($values);\n\n\t\t// add the new inputs to our existing object\n\t\t// or else our json representation will be\n\t\t// out of sync with our values on this FieldValue\n\t\tforeach ($input as $key => $value)\n\t\t{\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "protected static function _merge($thing1, $thing2) {\n\t\t$thing1 = json_decode(json_encode($thing1));\n\t\t$thing2 = json_decode(json_encode($thing2));\n\n\t\tforeach ($thing2 as $fieldName => $fieldValue) {\n\t\t\tif (isset($thing1->$fieldName) && is_object($fieldValue)) {\n\t\t\t\t$thing1->$fieldName = self::_merge($thing1->$fieldName, $thing2->$fieldName);\n\t\t\t} else {\n\t\t\t\t$thing1->$fieldName = $fieldValue;\n\t\t\t}\n\t\t}\n\n\t\treturn $thing1;\n\t}", "public function merge() {}", "function convert_additional( &$obj )\n\t{\n\t\t// set default photo\n\t\t$obj->default_photo = $this->get_default_photo( $obj->id, 'food-additional' );\n\n\t}", "public function addJson($key, array &$content) {\n\t\t$json = json_encode($content);\n\t\t$this->add($key, $json);\n\t}", "public function getAdditional()\n {\n return $this->additional;\n }", "public function setAdditional(array $additional)\n {\n $this->additional = $additional;\n return $this;\n }", "public function getExtra()\n {\n return json_decode($this->extra);\n }", "function appendtojson($json,$new,$subcategory=false,$limit=false) {\n\tif(!empty($json) OR $json != null){\n\t\t$data = json_decode($json,true);\n\t} else {\n\t\t$data = [];\n\t}\n\tif(!is_array($new)){\n\t\t$new = json_decode($new,true);\n\t}\n\tif($subcategory == false){\n\t\tarray_unshift($data, $new);\n\t\t//$data[] = $new;\n\t} else {\n\t\t//$data = json_decode($data[$subcategory],true);\n\t\tarray_push($data[$subcategory], $new);\n\t\t//$data[$subcategory][] = $new;\n\t}\n\tif($limit){\n\t\t$data = array_slice($data, 0, ($limit -1));\n\t}\n\treturn json_encode($data);\n}", "protected function prepareJsonStructure(){\n\t\t\n\t}", "public function merge_with(&$other)\n {\n }", "public function testMerge()\n {\n $json = new JsonArray(['test' => ['key1' => 'value1', 'key2' => 'value2']]);\n $json->merge(['test' => ['key1' => 'value1', 'key2' => 'foobar', 'key3' => 'three']]);\n\n $this->assertEquals(['test'], $json->getEntries('/'));\n $this->assertEquals(['test/key1', 'test/key2', 'test/key3'], $json->getEntries('/test'));\n\n $this->assertEquals('foobar', $json->get('/test/key2'));\n }", "function give_import_core_settings_merge_data( $json_to_array, $type, $host_give_options ) {\n\tif ( 'merge' === $type ) {\n\t\t$json_to_array_merge = array_merge( $host_give_options, $json_to_array );\n\t\t$json_to_array = $json_to_array_merge;\n\t}\n\n\treturn $json_to_array;\n}", "public function getAdditional();", "public function initContent()\n {\n /**\n * !!! Do not call parent::initContent().\n * Use it only for collections.\n * Custom output do not have an id and will generate error.\n */\n\n foreach ($this->sql as $key => $query) {\n try {\n $result = Db::getInstance()->executeS($query);\n if (isset($result)) {\n $this->jsonContent[$key] = $result[0][$key];\n }\n } catch (PrestaShopDatabaseException $exception) {\n ClaroLogger::errorLog(__METHOD__ . ' : DBException: ' . $exception->getMessage()\n . ' at line ' . $exception->getLine());\n\n $this->jsonContent = [\n 'status' => 'error',\n 'error' => $exception->getMessage()\n ];\n die(json_encode($this->jsonContent));\n }\n }\n die(json_encode($this->jsonContent));\n }", "public function setExtra($extra)\n {\n $this->extra = json_encode($extra);\n return $this;\n }", "public function setExtra($extra)\n {\n $resultData = $this->hydrateIfJsonToArray($extra);\n if (!empty($resultData)) {\n $this->extra = $resultData;\n }\n else {\n $this->extra = [];\n }\n }", "public function updateAdditional(string $additional, bool $replace=false)\n {\n if ($replace) {\n $newAdditional = $additional;\n } else {\n $oldValue = $this->getCustomFieldValue('Additional');\n $newAdditional = $oldValue . \"\\r\\n\" . $additional;\n }\n $this->updateField('Additional', $newAdditional);\n }", "function json($content = null){\n $this->_JSON = true;\n $this->_HTML = false;\n $this->_redirect = false;\n if(is_array($content)) $this->_JSON_contents = $content;\n }", "public function unpackAdditionalAttributes(&$data, $mergeInstructions)\n {\n MonsterVariable::processEntityVariables($this);\n if (isset($data['comment'])) {\n $this->processComments($data['comment']);\n }\n }", "public function getAdditionalData()\n {\n return $this->additionalData;\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 merge(&$data) {\n\t\tarray_merge($this->data, $data);\n\t}", "public function merge();", "public function render()\n\t{\n\t\treturn json_encode((object)$this->process_merged());\n\t}", "public function additional(array $data)\n {\n $this->additional = $data;\n\n return $this;\n }", "public function getAdditionalData() {\n\t\treturn $this->additional_data;\n\t}", "public function extraInstallments($total, $currency, $installments, $bankId, $gateway)\n {\n return json_encode([]);\n }", "function add_json($json, $array)\n{\n\t// convert to array\n\t$json = json_decode($json, TRUE);\n\t// add to array\n\t$json = add_array($json, $array);\n\t// convert to json string\t\n\treturn json_encode($json);\n}", "public function __construct(\\Ammonkc\\Otaehi\\StructType\\AdditionalContent $additionalContent = null)\n {\n $this\n ->setAdditionalContent($additionalContent);\n }", "public function merge( $data )\r\n {\r\n if (! empty( $data['items'] ))\r\n {\r\n foreach ( $data['items'] as $data_key => $data_item )\r\n {\r\n // does it exist in $this? if so, merge\r\n $exists = false;\r\n foreach ( $this->items as $key => $item )\r\n {\r\n if ($item['hash'] == $data_item['hash'])\r\n {\r\n $exists = true;\r\n $data_item['id'] = $item['id'];\r\n $this->items[$key] = $data_item;\r\n break;\r\n }\r\n }\r\n \r\n // otherwise add it\r\n if (! $exists)\r\n {\r\n $this->items[] = $data_item;\r\n }\r\n }\r\n \r\n $this->save();\r\n }\r\n \r\n return $this;\r\n }", "function apply_json_filter( $_post, $post, $context )\n{\n $_post['meta'] = array_merge($_post['meta'],get_fields($post['ID']));\n return $_post;\n}", "abstract public static function buildPayload(array $additionalData);", "public function testOptionMergeWithAdditional()\n {\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'list',\n '--raw'\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(4, $merged);\n $this->assertEquals('--raw', $merged[2]);\n $this->assertEquals('--format=xml', $merged[3]);\n }", "public static function mergeExtendedBlock( $args, $extended_block ) {\n\t\t// First do the parent's merge\n\t\t$args = parent::mergeExtendedBlock( $args, $extended_block );\n\n\t\t// Extract the extended block properties\n\t\t$extended_block_props = get_object_vars( $extended_block );\n\n\t\t// We only handle the properties specific to this child class, not those of the parent\n\t\tif ( ! empty( $extended_block_props ) && is_array( $extended_block_props ) ) {\n\t\t\tif ( ! empty( $extended_block_props['templates'] ) ) {\n\t\t\t\tif ( empty( $args['templates'] ) ) {\n\t\t\t\t\t// Just copy it\n\t\t\t\t\t$args['templates'] = $extended_block_props['templates'];\n\t\t\t\t} elseif ( is_array( $args['templates'] ) && is_array( $extended_block_props['templates'] ) ) {\n\t\t\t\t\t// First we handle templates with defined key (named templates)\n\t\t\t\t\tforeach ( $extended_block_props['templates'] as $key => $template ) {\n\t\t\t\t\t\tif ( ! is_numeric( $key ) && isset( $args['templates'][ $key ] ) ) {\n\t\t\t\t\t\t\t// We overwrite the templates in the extended props and remove named template from the $args\n\t\t\t\t\t\t\t// so it retains the order established by the extended block\n\t\t\t\t\t\t\t$extended_block_props['templates'][ $key ] = $args['templates'][ $key ];\n\t\t\t\t\t\t\tunset( $args['templates'][ $key ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// We want the child block anonymous templates to come before the ones in the extended block\n\t\t\t\t\t$args['templates'] = array_merge( $args['templates'], $extended_block_props['templates'] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $args;\n\t}", "public function initContent()\n {\n parent::initContent();\n\n try {\n $continue = true;\n $simpleAbandonedCart = false;\n\n // coll. items are less than the setup limit and last id is not exceeded\n while ($this->collItems < self::LIMIT && $continue) {\n if (isset($this->collection->carts)) {\n foreach ($this->collection->carts as $cart) {\n // Get all carts that were NOT transformed into orders.\n if (!in_array($cart->id, $this->orderCartId)) {\n // Remove unnecessary keys\n $simpleAbandonedCart = $this->simpleMapping->getSimpleMapping('abandoned_cart', $cart);\n\n // Assign entity_name attribute\n $simpleAbandonedCart['entity_name'] = 'abandonedcart';\n $simpleAbandonedCart['associations'] = $this->associationsCartRowsMapping($cart);\n\n // Add to jsonContent\n $this->jsonContent[] = $simpleAbandonedCart;\n // Increment coll items count\n $this->collItems++;\n }\n }\n // Verify if the last id is exceeded\n $continue = ($cart->id < $this->lastId ? true : false);\n if ($continue) {\n $this->collection = $this->getCollection($cart->id, self::LIMIT - $this->collItems);\n }\n }\n }\n\n // call encoder\n $this->encodeJson('abandonedcart');\n /** @var Cart $cart */\n $this->encodedJson['lastId'] = ($simpleAbandonedCart ? $simpleAbandonedCart['id'] : 0);\n\n die(json_encode($this->encodedJson));\n } catch (Exception $exception) {\n ClaroLogger::errorLog(__METHOD__ . ' : ' . $exception->getMessage() . ' at line ' . $exception->getLine());\n\n $this->jsonContent = [\n 'status' => 'error',\n 'error' => $exception->getMessage()\n ];\n die(json_encode($this->jsonContent));\n }\n }", "public function jsonSerialize()\n {\n return parent::jsonSerialize() + ['text' => $this->text];\n }", "function merge($p_archive_to_add)\n {\n }", "private function convertAdditionalInformation()\n {\n return $this;\n }", "public function updateJson($key, array &$content) {\n\t\t$json = json_encode($content);\n\t\tupdate($key, $json);\n\t}", "private function mergeData()\n {\n\n $files = $this->files;\n $folders = $this->folders;\n $this->templates = [];\n\n if($this->deletedTemplates) {\n\n if ($folders) {\n foreach ($folders as $item) {\n if ($item->is_dir) {\n $this->templates[] = $item;\n } else {\n $this->folderReferenceFiles[] = $item;\n $this->templates[] = $this->fileFindById($item->reference_id);\n }\n }\n }\n\n } else {\n\n if ($folders) {\n foreach ($folders as $item) {\n if ($item->is_dir) {\n $this->templates[] = $item;\n } else {\n $this->folderReferenceFiles[] = $item;\n }\n }\n }\n\n if($files) {\n foreach($files as $file) {\n $file['parent_id'] = $this->findParentIdByRefId($file->id);\n $file['ancestors'] = $this->getFileAncestors($file->id);\n $this->templates[] = $file;\n }\n }\n }\n\n if(!$this->limit) {\n return $this->templates;\n }\n $this->templates = Paginator::make($this->templates, $this->folders->getTotal(), $this->folders->getPerPage());\n return true;\n }", "public function getAdditionalData()\n {\n return $this->data;\n }", "public function merge() {\n\t\t// Holds all the arrays passed\n\t\t$params = &func_get_args();\n\t\t\n\t\t// First array is used as the base, everything else overwrites on it\n\t\t$return = array_shift ( $params );\n\t\t\n\t\t// Merge all arrays on the first array\n\t\tforeach ( $params as $array ) {\n\t\t\tforeach ( $array as $key => $value ) {\n\t\t\t\t// Numeric keyed values are added (unless already there)\n\t\t\t\tif (is_numeric ( $key ) && (! in_array ( $value, $return ))) {\n\t\t\t\t\tif (is_array ( $value )) {\n\t\t\t\t\t\t$return [] = $this->merge ( $return [$key], $value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return [] = $value;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// String keyed values are replaced\n\t\t\t\t} else {\n\t\t\t\t\tif (isset ( $return [$key] ) && is_array ( $value ) && is_array ( $return [$key] )) {\n\t\t\t\t\t\t$return [$key] = $this->merge ( $return[$key], $value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return [$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "public function expand_all ($data) {\n\t\tif (empty($data)) return $data;\n\n\t\t$content = parent::expand_all(json_encode($data));\t\t\n\t\t$data = json_decode($content, true);\n\n\t\treturn $data;\n\t}", "public function merge($incoming)\n {\n }", "public function getAdditionalProperties()\n {\n if ($this->decoded_additional_properties === false) {\n $raw = trim($this->getRawAdditionalProperties());\n $this->decoded_additional_properties = empty($raw) ? [] : json_decode($raw, true);\n\n if (!is_array($this->decoded_additional_properties)) {\n $this->decoded_additional_properties = [];\n }\n }\n\n return $this->decoded_additional_properties;\n }", "public function _get_articles_json_output() {\n\n\t\t\\the_seo_framework()->set_timezone();\n\n\t\t$data = [\n\t\t\t$this->get_article_context(),\n\t\t\t$this->get_article_type(),\n\t\t\t$this->get_article_main_entity(),\n\t\t\t$this->get_article_headline(),\n\t\t\t$this->get_article_image(),\n\t\t\t$this->get_article_published_date(),\n\t\t\t$this->get_article_modified_date(),\n\t\t\t$this->get_article_author(),\n\t\t\t$this->get_article_publisher(),\n\t\t\t$this->get_article_description(),\n\t\t];\n\n\t\t\\the_seo_framework()->reset_timezone();\n\n\t\tif ( ! $this->is_json_valid() )\n\t\t\treturn '';\n\n\t\t//* Build data, and fetch it.\n\t\tarray_filter( array_filter( $data ), [ $this, 'build_article_data' ] );\n\t\t$data = $this->get_article_data();\n\n\t\tif ( ! empty( $data ) )\n\t\t\treturn sprintf( '<script type=\"application/ld+json\">%s</script>', json_encode( $data, JSON_UNESCAPED_SLASHES ) ) . PHP_EOL;\n\n\t\treturn '';\n\t}", "public function setAdditionalInformation($additionalInformation)\n {\n $this->additionalInformation = $additionalInformation;\n return $this;\n }", "public function merge($thing) {\n\t\t$this->document = self::_merge($this->document, $thing);\n\t}", "public function getJsonData()\n {\n $request = Input::get('request');\n $issue = Input::get('issue');\n $articleNo = Input::get('article');\n\n\n Log::info(Input::all());\n /**\n * Returning all the magazines if magazines are requested\n */\n if ($request === 'magz') {\n $magazines = Magazine::all();\n $temp = array();\n $counter = 1;\n foreach ($magazines as $item) {\n $temp['mag_' . $counter] = array();\n\n $temp['mag_' . $counter]['issue'] = $item['issue'];\n $temp['mag_' . $counter]['title'] = $item['heading'];\n $temp['mag_' . $counter]['image'] = '' . asset($item->image);\n\n $temp['mag_' . $counter++]['date'] = $item['date'];\n }\n return json_encode($temp);\n } else if ($request === 'articles') {\n $articlesList = ArticlesList::where('issue', Input::get('issue'))->get();\n $temp = array();\n $counter = 1;\n\n /**\n * Send only the articles\n */\n foreach ($articlesList as $item) {\n $temp['article_' . $counter] = array();\n //$temp['article_'.$counter]['isAdd']=0;\n $temp['article_' . $counter]['issue'] = $item['issue'];\n $temp['article_' . $counter]['articleNo'] = $item['articleNo'];\n $temp['article_' . $counter]['title'] = $item['articleHeading'];\n $imageLink = ArticleData::where('issue', $item->issue)->where('articleNo', $item->articleNo)->first()->image;\n $temp['article_' . $counter]['image'] = asset($imageLink);\n $temp['article_' . $counter]['lng'] = $item->language;\n $temp['article_' . $counter++]['author'] = $item['author'];\n }\n return json_encode($temp);\n } else if ($request == 'article') {\n\n $articlesList = ArticlesList::where('issue', Input::get('issue'))\n ->where('articleNo', $articleNo)->first();\n\n $articleData = ArticleData::where('issue', $issue)\n ->where('articleNo', $articleNo)\n ->first();\n\n $data = array();\n\n $data['issue'] = $articlesList->issue;\n $data['articleNo'] = $articleData->articleNo;\n $data['title'] = $articlesList->articleHeading;\n $data['image'] = '' . asset($articleData->image);\n $data['author'] = $articlesList->author;\n $data['content'] = $articleData->data;\n $data['lng'] = $articlesList->language;\n $data['hasAd'] = $articlesList->hasAd ? 1 : 0;\n $data['adImage'] = $articlesList->hasAd ? $articlesList->adImage : null;\n return json_encode($data);\n } else {\n $file = uploadImage($_POST['issue'], $_FILES);\n return $file;\n }\n }", "function jetpack_json_wrap( &$any, $seen_nodes = array() ) {\n\tif ( is_object( $any ) ) {\n\t\t$input = get_object_vars( $any );\n\t\t$input['__o'] = 1;\n\t} else {\n\t\t$input = &$any;\n\t}\n\n\tif ( is_array( $input ) ) {\n\t\t$seen_nodes[] = &$any;\n\n\t\t$return = array();\n\n\t\tforeach ( $input as $k => &$v ) {\n\t\t\tif ( ( is_array( $v ) || is_object( $v ) ) ) {\n\t\t\t\tif ( in_array( $v, $seen_nodes, true ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$return[ $k ] = jetpack_json_wrap( $v, $seen_nodes );\n\t\t\t} else {\n\t\t\t\t$return[ $k ] = $v;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}\n\n\treturn $any;\n}", "public function contents_merge($refresh = FALSE)\n {\n\n if (!$this->_contents || $refresh)\n {\n\n // content\n $content = NULL;\n\n foreach ($this->assets AS $asset)\n {\n\n if ($asset->is_cachable())\n {\n $content .= $asset->contents(TRUE);\n }\n }\n\n // set content\n $this->_contents = $content;\n }\n\n return $this->_contents;\n }", "public function merge()\n {\n $args = func_get_args();\n array_unshift($args, $this->data);\n $this->data = call_user_func_array('array_merge', $args);\n\n return $this; \n }", "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 }", "public function extend()\n\t{\n\t\t$extensions = func_get_args();\n\n\t\tforeach ( $extensions as $extension )\n\t\t{\n\t\t\tif ( $extension instanceof self )\n\t\t\t\t$this->data = array_merge_recursive( $this->data, $extension->data );\n\t\t\telse\n\t\t\t\t$this->data = array_merge_recursive( $this->data, _A($extension)->data );\n\t\t}\n\n\t\treturn $this;\n\t}", "public function responseAdditionalUpdates($transaction)\n {\n }", "public function merge_with(&$other)\r\n {\r\n foreach ($other->entries as $entry) {\r\n $this->entries[$entry->key()] = $entry;\r\n }\r\n }", "protected function additionalData()\n {\n return [\n 'options' => $this->options\n ];\n }", "abstract public function mergeWith(array $array, $recursively = false);", "function clean_json_content_array($kind, $content_json_data, $remove_id_field = true, $remove_functions_field = true, $encoded_sub_fields = array()){\n // Make a copy of the origin al JSON data\n $cleaned_json_data = $content_json_data;\n // Remove any known unnecessary or deprecated fields from the data\n if ($remove_id_field){ unset($cleaned_json_data[$kind.'_id']); }\n if ($remove_functions_field){ unset($cleaned_json_data[$kind.'_functions']); }\n if (true){ unset($cleaned_json_data[$kind.'_flag_protected']); }\n // Loop through fields and set any psudeo-empty fields to actally empty\n //foreach ($cleaned_json_data AS $k => $v){ if ($v === '[]'){ $cleaned_json_data[$k] = ''; } }\n // Check to see if there are fields we need to remove before export\n if (method_exists('rpg_'.$kind, 'get_fields_excluded_from_json_export')){\n $skip_fields_on_json_export = call_user_func(array('rpg_'.$kind, 'get_fields_excluded_from_json_export'));\n if (!empty($skip_fields_on_json_export)){ foreach ($skip_fields_on_json_export AS $field){ unset($cleaned_json_data[$field]); } }\n }\n // If not empty, loop through any encoded sub-fields and auto-expand them\n if (empty($encoded_sub_fields)\n && method_exists('rpg_'.$kind, 'get_json_index_fields')){\n $encoded_sub_fields = call_user_func(array('rpg_'.$kind, 'get_json_index_fields'));\n }\n if (!empty($encoded_sub_fields)){\n foreach ($encoded_sub_fields AS $sub_field_name){\n $sub_field_value = $cleaned_json_data[$sub_field_name];\n if (!empty($sub_field_value)){\n $fchar = substr($sub_field_value, 0, 1);\n $lchar = substr($sub_field_value, -1, 1);\n if (($fchar === '{' && $lchar === '}') || ($fchar === '[' && $lchar === ']')){\n $sub_field_value = json_decode($sub_field_value, true);\n } else {\n $sub_field_value = array(trim($sub_field_value));\n }\n } else {\n $sub_field_value = array();\n }\n $cleaned_json_data[$sub_field_name] = $sub_field_value;\n }\n }\n // If there are an image editor fields, translate them to contributor IDs\n global $user_ids_to_contributor_usernames;\n $image_fields = array($kind.'_image_editor', $kind.'_image_editor2');\n foreach ($image_fields AS $image_field){\n if (!isset($cleaned_json_data[$image_field])){ continue; }\n if (!empty($cleaned_json_data[$image_field])){\n $user_id = $cleaned_json_data[$image_field];\n if (!empty($user_ids_to_contributor_usernames[$user_id])){\n $contributor_name = $user_ids_to_contributor_usernames[$user_id];\n $cleaned_json_data[$image_field] = $contributor_name;\n }\n } else {\n $cleaned_json_data[$image_field] = '';\n }\n }\n // If there is game field, convert it to the newer format\n if (isset($cleaned_json_data[$kind.'_game'])){\n $xkind = preg_match('/y$/i', $kind) ? substr($kind, 0, -1).'ies' : $kind.'s';\n $new_game_data = migrate_object_game_settings_to_new_format($kind, $xkind, $cleaned_json_data);\n $cleaned_json_data[$kind.'_game'] = $new_game_data[$kind.'_game'];\n }\n // Return the cleaned JSON data\n $cleaned_json_data = $cleaned_json_data;\n return $cleaned_json_data;\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 return array_merge(parent::jsonSerialize(), [\n 'fields' => $this->structure()->fields(),\n 'data' => $this->data,\n 'actionText' => $this->actionText ?? __('Add row'),\n ]);\n }", "function json_success($extra = NULL, $die = TRUE){\r\n\t$json_out = array(\r\n\t\t\"status\" => \"0\"\r\n\t);\r\n\tif(is_string($extra)){\r\n\t\t$extra = json_decode($extra, TRUE);\r\n\t}\r\n\tif(is_array($extra)){\r\n\t\t$json_out = array_merge($json_out, $extra);\r\n\t}\r\n\tif($die){\r\n\t\tdie(json_encode($json_out));\r\n\t}else{\r\n\t\treturn $json_out;\r\n\t}\r\n}", "private function _mergeSuperposable($data)\n {\n return ($data['data']);\n }", "public function asJson($content=[])\n{\n self::$stored['json'][] = $content;\n return json_encode($content);\n}", "public function updateJson() {\r\n\t\t$this->prepareDb();\r\n\t\tif (!$this->getFileContent()) {\r\n\t\t\t$this->log(\"empty db\", 0);\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t\t$this->_jsonFc = json_decode($this->_jsonFc, true);\r\n\t\tif (is_array($this->_jsonFc)) {\r\n\t\t\t$found = false;\r\n\t\t\tforeach ($this->_jsonFc as $key => $fc) {\r\n\t\t\t\tif (isset($fc[\"id\"]) && $fc[\"id\"] == $this->_jsonId) {\r\n\t\t\t\t\t$this->_jsonFc[$key][\"json\"] = $this->expJson();\r\n\t\t\t\t\t$found = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($found) {\r\n\t\t\t\tfile_put_contents($this->_path_db, json_encode($this->_jsonFc, JSON_PRETTY_PRINT));\r\n\t\t\t} else {\r\n\t\t\t\t$this->log(\"id not found in db\", 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->clearDump();\r\n\t}", "protected function mergeTranslationsWithAttributes()\n\t{\n\t\t$this->attributes = array_merge($this->attributes, $this->translatedAttributes);\n\t}", "function privMerge(&$p_archive_to_add)\n {\n }", "public function afterFind()\n\t{\n\t\t//Decode attribute other to set other attributes\n\t\t$this->list_other_attributes=json_decode($this->other,true);\t\n\t\t\t\n\t\tif(isset($this->list_other_attributes['modified']))\n\t\t\t$this->list_other_attributes['modified']=json_decode($this->list_other_attributes['modified'],true);\n\t\telse \n\t\t\t$this->list_other_attributes['modified']=array();\n\t\t\t\n\t\t//Decode content\n\t\tif(isset($this->list_other_attributes['content']))\n\t\t\t$this->list_other_attributes['content']=json_decode($this->list_other_attributes['content'],true);\n\t\telse \n\t\t\t$this->list_other_attributes['content']=array();\n\t\treturn parent::afterFind();\n\t}", "public static function importJson() {\n\t if(self::isJson()) {\n\t foreach (self::getJson() as $name => $value) {\n\t $_REQUEST[$name] = $value;\n\t }\n\t }\n\t}", "private function _setAdditionalRequestData(Array $additional_infos){\n \n // setting reference\n $this->_payment_request->setReference($additional_infos['id_order']);\n \n // setting redirect url\n $redirect_url = $this->_payment_request->getRedirectURL();\n if (Tools::isEmpty($redirect_url))\n $this->_payment_request->setRedirectURL($this->_generateRedirectUrl($additional_infos));\n }", "public function insertJson() {\r\n\t\t$this->prepareDb();\r\n\t\t$json = $this->expJson();\r\n\t\tif (!$this->getFileContent()) {\r\n\t\t\tfile_put_contents($this->_path_db, json_encode([[\"id\"=>0, \"json\"=>$json, \"class\"=>get_class($this)]], JSON_PRETTY_PRINT));\r\n\t\t\t$this->_jsonId = 0;\r\n\t\t} else {\r\n\t\t\t$this->_jsonFc = json_decode($this->_jsonFc, true);\r\n\t\t\tif (is_array($this->_jsonFc)) {\r\n\t\t\t\t$this->_jsonId = $this->getDispId();\r\n\t\t\t\tarray_push($this->_jsonFc, [\"id\"=>$this->_jsonId, \"json\"=>$json, \"class\"=>get_class($this)]);\r\n\t\t\t\t$this->_jsonFc = json_encode($this->_jsonFc, JSON_PRETTY_PRINT);\r\n\t\t\t\tfile_put_contents($this->_path_db, $this->_jsonFc);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->clearDump();\r\n\t}", "protected function mergeWithCurrentConfig($config)\n {\n $currentConfigFilePath = $this->getCurrentConfigFilePath();\n if (File::isFile($currentConfigFilePath)) {\n $currentConfig = include $currentConfigFilePath;\n if (is_array($currentConfig)) {\n foreach ($currentConfig as $key => $value) {\n if (isset($config[$key])) {\n $config[$key]['value'] = $value;\n }\n }\n }\n };\n\n return $config;\n }", "public function expandUpdateData(stdClass $update = null){\r\n $data = $update ? json_decode(json_encode($update),true) : json_decode($this->OriginalUpdate,true) ;\r\n $this->customise($data);\r\n return $this;\r\n }", "public function getJson($extra = array(), $reset = false)\n {\n \tif(!$this->isJsonLoaded($reset))\n \t{\n \t\t$array = array('id' => trim($this->getId()));\n\t DaoMap::loadMap(get_class($this));\n\t foreach(DaoMap::$map[strtolower(get_class($this))] as $field => $fieldMap)\n\t {\n\t if($field === '_' || isset($fieldMap['rel']))\n\t continue;\n\t $getterMethod = 'get' . ucfirst($field);\n\t if(!method_exists($this, $getterMethod))\n\t \tcontinue;\n\t $value = $this->$getterMethod();\n\t switch(trim($fieldMap['type']))\n\t {\n\t \tcase 'bool':\n\t \t\t{\n\t \t\t\t$array[$field] = (trim($value) === '1' ? true : false);\n\t \t\t\tbreak;\n\t \t\t}\n\t \tdefault:\n\t \t\t{\n\t \t\t\t$array[$field] = trim($value);\n\t \t\t\tbreak;\n\t \t\t}\n\t }\n\t }\n\t $this->_jsonArray = array_merge($array, $extra);\n \t}\n return $this->_jsonArray;\n }", "public function processExtrasForView($extraValuesJSON, $extraTypes) {\n $extraValues = (array) json_decode($extraValuesJSON);\n //pr($extraTypes);\n //pr($extraValues);\n //exit;\n \n foreach($extraTypes as $name => $type) {\n if($type === 'datetime' || $type === 'date') {\n $value = [];\n if($type === 'datetime' && !empty($extraValues[$name]->time) && !empty($extraValues[$name]->date)) {\n $extraValues[$name] = $this->formatSimpleDatetimeForView($extraValues[$name]->date, $extraValues[$name]->time);\n }\n else if(!empty($extraValues[$name]->date)) {\n $extraValues[$name] = $this->formatSimpleDatetimeForView($extraValues[$name]->date);\n }\n else if(!empty($extraValues[$name]->time)) {\n $extraValues[$name] = $this->formatSimpleDatetimeForView(null, $extraValues[$name]->time);\n }\n else {\n $extraValues[$name] = null;\n }\n }\n else if($type === 'checkbox') {\n if(!empty($extraValues[$name])) {\n $extraValues[$name] = get_object_vars($extraValues[$name]);\n }\n else {\n $extraValues[$name] = null;\n }\n }\n } \n //pr($extraValues);\n \n return $extraValues;\n }", "function addExtraAssets()\n\t{\n\t\t$base = JURI::base(true);\n\t\t$regurl = '#(http|https)://([a-zA-Z0-9.]|%[0-9A-Za-z]|/|:[0-9]?)*#iu';\n\n\t\tforeach (array(T3_PATH, T3_TEMPLATE_PATH) as $bpath) {\n\t\t\t//full path\n\t\t\t$afile = $bpath . '/etc/assets.xml';\n\t\t\tif (is_file($afile)) {\n\n\t\t\t\t//load xml\n\t\t\t\t$axml = JFactory::getXML($afile);\n\n\t\t\t\t//process if exist\n\t\t\t\tif ($axml) {\n\t\t\t\t\tforeach ($axml as $node => $nodevalue) {\n\t\t\t\t\t\t//ignore others node\n\t\t\t\t\t\tif ($node == 'stylesheets' || $node == 'scripts') {\n\t\t\t\t\t\t\tforeach ($nodevalue->file as $file) {\n\t\t\t\t\t\t\t\t$compatible = $file['compatible'];\n\t\t\t\t\t\t\t\tif ($compatible) {\n\t\t\t\t\t\t\t\t\t$parts = explode(' ', $compatible);\n\t\t\t\t\t\t\t\t\t$operator = '='; //exact equal to\n\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\tif (count($parts) == 2) {\n\t\t\t\t\t\t\t\t\t\t$operator = $parts[0];\n\t\t\t\t\t\t\t\t\t\t$operand = $parts[1];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//compare with Joomla version\n\t\t\t\t\t\t\t\t\tif (!version_compare(JVERSION, $operand, $operator)) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$url = (string)$file;\n\t\t\t\t\t\t\t\tif (substr($url, 0, 2) == '//') { //external link\n\n\t\t\t\t\t\t\t\t} else if ($url[0] == '/') { //absolute link from based folder\n\t\t\t\t\t\t\t\t\t$url = is_file(JPATH_ROOT . $url) ? $base . $url : false;\n\t\t\t\t\t\t\t\t} else if (!preg_match($regurl, $url)) { //not match a full url -> sure internal link\n\t\t\t\t\t\t\t\t\t$url = T3Path::getUrl($url); // so get it\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($url) {\n\t\t\t\t\t\t\t\t\tif ($node == 'stylesheets') {\n\t\t\t\t\t\t\t\t\t\t$this->addStylesheet($url);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$this->addScript($url);\n\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\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// template extended styles\n\t\t$aparams = $this->_tpl->params->toArray();\n\t\t$extras = array();\n\t\t$itemid = JFactory::getApplication()->input->get ('Itemid');\n\t\tforeach ($aparams as $name => $value) {\n\t\t\tif (preg_match ('/^theme_extras_(.+)$/', $name, $m)) {\n\t\t\t\t$extras[$m[1]] = $value;\n\t\t\t}\n\t\t}\n\t\tif (count ($extras)) {\n\t\t\tforeach ($extras as $extra => $pages) {\n\t\t\t\tif (!is_array($pages) || !count($pages) || in_array (0, $pages)) {\n\t\t\t\t\tcontinue; // disabled\n\t\t\t\t}\n\t\t\t\tif (in_array (-1, $pages) || in_array($itemid, $pages)) {\n\t\t\t\t\t// load this style\n\t\t\t\t\t$this->addCss ('extras/'.$extra);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "static protected function mergeConfig($config)\r\n {\r\n $config['all']['stylesheets'] = array_merge(isset($config['default']['stylesheets']) && is_array($config['default']['stylesheets']) ? $config['default']['stylesheets'] : array(), isset($config['all']['stylesheets']) && is_array($config['all']['stylesheets']) ? $config['all']['stylesheets'] : array());\r\n unset($config['default']['stylesheets']);\r\n\r\n $config['all']['javascripts'] = array_merge(isset($config['default']['javascripts']) && is_array($config['default']['javascripts']) ? $config['default']['javascripts'] : array(), isset($config['all']['javascripts']) && is_array($config['all']['javascripts']) ? $config['all']['javascripts'] : array());\r\n unset($config['default']['javascripts']);\r\n\r\n $config['all']['metas']['title'] = array_merge(\r\n isset($config['default']['metas']['title']) && is_array($config['default']['metas']['title']) ? $config['default']['metas']['title'] \r\n : (isset($config['default']['metas']['title']) ? array($config['default']['metas']['title']) : array()), \r\n isset($config['all']['metas']['title']) && is_array($config['all']['metas']['title']) ? $config['all']['metas']['title'] \r\n : (isset($config['all']['metas']['title']) ? array($config['all']['metas']['title']) : array())\r\n );\r\n unset($config['default']['metas']['title']);\r\n \r\n // merge default and all\r\n $config['all'] = sfToolkit::arrayDeepMerge(\r\n isset($config['default']) && is_array($config['default']) ? $config['default'] : array(),\r\n isset($config['all']) && is_array($config['all']) ? $config['all'] : array()\r\n );\r\n unset($config['default']);\r\n return self::replaceConstants($config);\r\n }", "private function getAdditionalDataXML() {\n $extensionsXML = array();\n foreach ($this->extensions as $ext) {\n $extXML = $ext->__getAdditionalData();\n if (!empty($extXML)) $extensionsXML[] = $extXML;\n }\n $relInvoice =& $this->header['relatedInvoice'];\n $additionalInfo =& $this->header['additionalInformation'];\n\n // Validate additional data fields\n $hasData = !empty($extensionsXML) || !empty($this->attachments) || !empty($relInvoice) || !empty($additionalInfo);\n if (!$hasData) return \"\";\n\n // Generate initial XML block\n $xml = '<AdditionalData>';\n if (!empty($relInvoice)) $xml .= '<RelatedInvoice>' . XmlTools::escape($relInvoice) . '</RelatedInvoice>';\n\n // Add attachments\n if (!empty($this->attachments)) {\n $xml .= '<RelatedDocuments>';\n foreach ($this->attachments as $att) {\n $type = explode('/', $att['file']->getMimeType());\n $type = end($type);\n $xml .= '<Attachment>';\n $xml .= '<AttachmentCompressionAlgorithm>NONE</AttachmentCompressionAlgorithm>';\n $xml .= '<AttachmentFormat>' . XmlTools::escape($type) . '</AttachmentFormat>';\n $xml .= '<AttachmentEncoding>BASE64</AttachmentEncoding>';\n $xml .= '<AttachmentDescription>' . XmlTools::escape($att['description']) . '</AttachmentDescription>';\n $xml .= '<AttachmentData>' . base64_encode($att['file']->getData()) . '</AttachmentData>';\n $xml .= '</Attachment>';\n }\n $xml .= '</RelatedDocuments>';\n }\n\n // Add additional information\n if (!empty($additionalInfo)) {\n $xml .= '<InvoiceAdditionalInformation>' . XmlTools::escape($additionalInfo) . '</InvoiceAdditionalInformation>';\n }\n\n // Add extensions data\n if (!empty($extensionsXML)) $xml .= '<Extensions>' . implode('', $extensionsXML) . '</Extensions>';\n\n $xml .= '</AdditionalData>';\n return $xml;\n }", "public function getAdditionalInformation()\n {\n return $this->additionalInformation;\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "private function _processContents()\r\n {\r\n $contents = \"\";\r\n foreach ($this->_bagBody->objects as $obj) {\r\n $isInfoKey = false;\r\n foreach ($this->_aryInfoKeys as $infoKey)\r\n if ($infoKey == $obj['key'])\r\n $isInfoKey = true;\r\n \r\n if ($obj['probableText'] == true && !$isInfoKey)\r\n $contents .= $obj['contents'];\r\n } \r\n $this->_contents = $contents;\r\n }", "private function _parseAdditionalAttributes($rowData)\n {\n if (empty($rowData['additional_attributes'])) {\n return $rowData;\n }\n $rowData = array_merge($rowData, $this->getAdditionalAttributes($rowData['additional_attributes']));\n return $rowData;\n }", "public function mergeExtraData(array $array)\n {\n $this->extra_data = array_merge($this->extra_data, $array);\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 withAdditionalHeaders(array $additionalHeaders)\n {\n $res = $this->headers;\n $additionalHeaders = Util::normalizeHeaders($additionalHeaders);\n\n foreach ($additionalHeaders as $key => $value) {\n if (isset($res[$key])) {\n $res[$key] .= ';' . $value;\n } else {\n $res[$key] = $value;\n }\n }\n\n return $this->withHeaders($res);\n }", "public static function bkap_add_additional_resource_data( $additional_data, $booking_settings, $product_id ) {\n \t\n \t$resource \t\t= self::bkap_resource( $product_id );\n\t\t$resource_ids \t= self::bkap_get_product_resources( $product_id );\n\t\t\n\t\tif ( $resource == \"\" ) {\n\t\t\treturn $additional_data;\n\t\t} elseif ( $resource != \"\" && !( is_array( $resource_ids ) ) ) {\n\t\t\treturn $additional_data;\n\t\t}\n\n \t$resource_additional_data = array();\n \t\n \tforeach ( $resource_ids as $resource_id ) {\n \t\tif ( get_post_status( $resource_id ) ) {\n \t\t\t$resource = new BKAP_Product_Resource( $resource_id, $product_id );\n\t\t\t\t\n \t\t\t$resource_additional_data[$resource_id]['resource_availability']\t= $resource->get_resource_availability();\n \t\t\t$resource_additional_data[$resource_id]['resource_qty'] \t\t\t= $resource->get_resource_qty();\n \t\t}\n \t}\n\n \t$additional_data['bkap_resource_data'] = $resource_additional_data; \t\n\n \treturn $additional_data; \n\n }", "public function extendData() {\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 }" ]
[ "0.5705459", "0.5674741", "0.5347232", "0.53268456", "0.52907085", "0.5189178", "0.5084554", "0.5040155", "0.50257856", "0.50155675", "0.4973082", "0.4886909", "0.4882617", "0.48722002", "0.48604196", "0.4833405", "0.47595862", "0.47458008", "0.47219855", "0.47028667", "0.4699228", "0.46883947", "0.467906", "0.46668482", "0.46567178", "0.46522704", "0.46425918", "0.46322483", "0.46289772", "0.46064645", "0.45998144", "0.45961007", "0.45840117", "0.45782593", "0.45747992", "0.4564275", "0.45367938", "0.4535837", "0.45351154", "0.45335412", "0.45334485", "0.45306617", "0.4499494", "0.44803375", "0.44754294", "0.44709074", "0.44509578", "0.4427163", "0.4425567", "0.44229764", "0.44171247", "0.44092155", "0.4393967", "0.43936512", "0.43877447", "0.43843532", "0.43813986", "0.43795308", "0.43722314", "0.43692854", "0.4364509", "0.43437347", "0.4335585", "0.43322188", "0.4329365", "0.43261603", "0.43181333", "0.43175966", "0.4292086", "0.42918155", "0.42804137", "0.42784652", "0.42749214", "0.42665657", "0.42621762", "0.42620146", "0.42596585", "0.4245371", "0.42337298", "0.42211744", "0.42176703", "0.42172545", "0.4189588", "0.41873142", "0.41805804", "0.417098", "0.41701666", "0.41637167", "0.4160787", "0.4159783", "0.4159783", "0.4159783", "0.41529453", "0.41422728", "0.4139558", "0.41323093", "0.41320482", "0.4131852", "0.41249943", "0.41210786" ]
0.77434695
0
Prepend $line with $content $line is a regular expression so keep in mind for proper masking of special characters. You can also refer to sub patterns keep in mind that the whole line is a subpattern added after $content.
public function prepend(string $line, string $content): Content { $this->content = preg_replace('~^(' . $line . ')$~sm', $content . PHP_EOL . '\1', $this->content); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prependContent ($content) {\r\n\t\t$this->content = (string)$content.$this->content;\r\n\t}", "public function append(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', '\\1' . PHP_EOL . $content, $this->content);\n return $this;\n }", "public function prepend($content)\n\t{\n\t\t$this->content = $content.$this->content;\n\t}", "function prepend($content) {\n\t\t$this->write($content . $this->read());\n\t}", "function prepend($content){\n\t\t$this->_String4 = \"$content\".$this->_String4;\n\t\treturn $this;\n\t}", "public function replace(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', $content, $this->content);\n return $this;\n }", "public function & prependContent( $a_content )\r\n\t{\r\n\t\t$this->m_content = strval($a_content) . $this->m_content;\r\n\t\treturn $this;\r\n\t}", "public function prepend($content)\n {\n return !empty($content) ? $this->renderContent($content) . ' ' : '';\n }", "public function prepend($content)\r\n {\r\n // Require that the response be unlocked before changing it\r\n $this->requireUnlocked();\r\n\r\n $this->body = $content . $this->body;\r\n\r\n return $this;\r\n }", "public function prependContent(string $content): ResponseInterface;", "public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->insertBefore($value[0], $node->firstChild);\r\n\t\t\t\t\telse $node->insertBefore($value, $node->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "public function startOfLine($line) \n {\n return preg_replace_callback(pmwiki_attachments::regular_expression,array($this,'replace_callback'),$line);\n }", "public function before_content( $content ) {\n\t\t\t$this->before_content .= $content;\n\n\t\t\treturn $this->before_content;\n\t\t}", "public function prepend_metadata( $line ) {\n array_unshift( $this->_metadata, $line );\n return $this;\n }", "public function stdWrap_prepend($content = '', $conf = [])\n {\n return $this->cObjGetSingle($conf['prepend'], $conf['prepend.'], '/stdWrap/.prepend') . $content;\n }", "function prepend_attachment($content)\n {\n }", "protected function addToOutput($line, $content)\n {\n if (isset($this->output[$line])) {\n $this->output[$line] .= $content;\n } else {\n $this->output[$line] = $content;\n }\n }", "private function add_next_line($content) {\r\n\t\treturn $content . \"\\n\";\r\n\t}", "public function before($content)\n {\n $this->before = $content;\n\n return $this;\n }", "public function filterByLine($pat, $replacement=\"\") {\r\n $arr = $this->toArray();\r\n $newContents = \"\";\r\n foreach($arr as $line) {\r\n $newContents .= preg_replace($pat, $replacement, $line).\"\\n\";\r\n }\r\n // Following removes extra blank line -- why needed?\r\n $newContents = substr_replace($newContents, \"\", -1);\r\n $this->contents = $newContents;\r\n }", "public function addContent( string $content );", "public static function prepend($filename, $content)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\n\t\t$fileContent = self::readFile($filename);\n\t\t$data = $content . \"\\n\" . $fileContent;\n\n\t\tself::writeFile($filename, $data);\n\t}", "private function appendLineToRewrites($line){\n\t\t$this->rewrites .= \"\\n\" . $line;\n\t}", "public function appendContent($content);", "public function prepend($content, string $username = '', string $avatar = ''): void {\n\t\t$payload = static::createPayload($content, $username, $avatar);\n\t\tarray_unshift($this->queue, $payload);\n\t}", "public function the_replacers($content) {\n \n // Get replacers\n $replacers = md_the_component_variable('content_replacer');\n\n // Get placeholders\n preg_match_all(\"/{[^}]*}/\", $content, $placeholders);\n\n // Verify if placeholders exists\n if ( $placeholders[0] ) {\n\n foreach ( $placeholders[0] as $placeholder ) {\n\n $found = explode(' ', str_replace(array('{', '}'), array('', ''), $placeholder));\n\n if ( $found[0] ) {\n\n if ( isset($replacers[$found[0]]) ) {\n\n $args = array(\n 'start' => 1,\n 'content' => $content\n );\n\n if ( count($found) > 1 ) {\n\n for( $f = 1; $f < count($found); $f++ ) {\n\n parse_str(str_replace('\"', \"\", $found[$f]), $a);\n\n $key = array_keys($a);\n \n if ( isset($a[$key[0]]) ) {\n\n $args[$key[0]] = $a[$key[0]];\n\n }\n\n }\n\n }\n\n $content = $replacers[$found[0]]($args);\n\n } else if ( isset($replacers[str_replace('|', '', $found[0])]) ) {\n\n $args = array(\n 'end' => 1,\n 'content' => $content\n );\n\n $content = $replacers[str_replace('|', '', $found[0])]($args);\n\n }\n\n }\n\n }\n\n }\n\n return $content;\n\n }", "public function prepend($content, $selector = null)\n\t{\n\t\tif (is_array($content))\n\t\t{\n\t\t\t$content = join(\"\\n\", $content);\n\t\t}\n\n\t\treturn $this->cmd('prepend', array(\n\t\t\t$this->typecast($content, true, true)\n\t\t), $selector);\n\t}", "function addContent($content)\n {\n $this->content .= $content;\n }", "function str_replace_first($from, $to, $content) {\n $from = '/' . preg_quote($from, '/') . '/';\n return preg_replace($from, $to, $content, 1);\n }", "public function addContent($content);", "public static function prepend_each_line($input_string, $with)\n {\n }", "public function prepend() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( func_get_arg( 0 ) ) == \"array\" ) {\n $args = func_get_arg( 0 );\n $num_of_args = count( $args );\n } else {\n $args = func_get_args();\n }\n for ( $i = 0; $i < $num_of_args; $i++ ) {\n $arg = $args[$i];\n if ( $arg instanceof AbstractHTMLElement ) {\n $arg = $arg->asHTML();\n }\n $this->content = $arg . $this->content;\n }\n return $this;\n }", "private static function replaceIncludes($content)\n {\n preg_match_all(self::FORMAT['include'], $content, $matches, PREG_OFFSET_CAPTURE);\n\n foreach ($matches[1] as $key => $val) {\n $filename = Str::sanitizePath(trim($val[0], '\"\\''));\n $content = str_replace($matches[0][$key][0], self::getContent($filename), $content);\n }\n\n return $content;\n }", "function prepend(string $data): self {\n $this->buffer = $data.$this->buffer;\n return $this;\n }", "public function parse(&$line)\n {\n foreach ($this->_pattern as $key => $magicConstant) {\n $line = str_replace($key, $magicConstant, $line);\n }\n\n return $line;\n }", "public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }", "final public function addContent($content){\n\t\t$this->content.=$content;\n\t\treturn $this;\n\t}", "static public function addHeadLine($line) {\n\t\tself::$_headLine[] = $line;\n\t}", "function prepend_media( $content ){\n\t\tglobal $post;\n\n\t\t$content = '';\n\n\t\t// Prepend rich media media to RSS item\n\t\t\n\t\tif( has_post_thumbnail( $post->ID ) && 'video' != get_post_format( $post->ID ) ) { // Featured for non-video post format\n\n\t\t\t$content .= '<p>' . get_the_post_thumbnail( $post->ID, 'featured' ) . '</p>';\n\n\t\t} elseif( 'link' == get_post_format( $post->ID ) ) { // Link\n\n\t\t\t$entry_custom_meta = get_post_custom( $post->ID ); \n\t\t\t\n\t\t\tif( isset( $entry_custom_meta['_format_link_url'] ) ){\n\n\t\t\t\t$content .= '<p>'. sprintf( __( '<a href=\"%1$s\" rel=\"bookmark\">link to %2$s</a>', 'opus' ), $entry_custom_meta['_format_link_url'][0], opus_get_domain_name( $entry_custom_meta['_format_link_url'][0] ) ) .'</p>';\n\n\t\t\t}\t\t\t\n\n\t\t} elseif( 'video' == get_post_format( $post->ID ) ){ // Video \n\n\t\t\t$video = get_post_meta( $post->ID, '_format_video_embed', true );\n\t\t\t\n\t\t\tif( $video ){\n\t\t\t\t\n\t\t\t\tob_start();\n\n\t\t\t\topus_get_video_embed_code( $video );\n\n\t\t\t\t$video = ob_get_clean();\n\n\t\t\t\t$content .= $video;\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$content .= get_the_content();\n\n\t\treturn $content;\n\t}", "public function prepend_the_date( $content ) {\n\t\n\t\t// If the post meta isn't empty for `the_date`, then render it in the content\n\t\tif( 0 != ( $the_date = get_post_meta( get_the_ID(), 'the_date', true ) ) ) {\n\t\t\t$content = '<p>' . $the_date . '</p>' . $content;\n\t\t} // end if\n\t\t\n\t\treturn $content;\n\t \n\t}", "public function prepend($name, $content)\n {\n if (!is_string($name)) {\n require_once 'Zend/Controller/Response/Exception.php';\n throw new Zend_Controller_Response_Exception('Invalid body segment key (\"' . gettype($name) . '\")');\n }\n\n if (isset($this->_body[$name])) {\n unset($this->_body[$name]);\n }\n\n $new = [$name => (string) $content];\n $this->_body = $new + $this->_body;\n\n return $this;\n }", "public function prepend($value) {\n $this->_value = $value . $this->_value;\n $this->countLength();\n \n return $this;\n }", "public function appendContent ($content) {\r\n\t\t$this->content .= (string)$content;\r\n\t}", "public function insertBaseTokens($content);", "public function append($content)\n {\n $this->content .= $content;\n }", "public function add($content);", "public function saverAddContent( string $content );", "public static function configAppendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::replace(\n\t\t\t$path,\n\t\t\t\"\\n);\",\n\t\t\t\"\\n\\t$content,\\n);\"\n\t\t);\n\t}", "function add_to_file_contents($content) {\n\t\t$this->contents .= $content;\n\t}", "public function testPrepend($content, callable $assert)\n {\n $dom = (new Dom($this->demoElement()))\n ->append($node = $this->demoCData())\n ->prepend($content);\n\n $assert($content, $dom->children()->get(), function (array $expected) use ($node) {\n return array_merge($expected, [$node]);\n });\n }", "function addContent($content)\n {\n $this->page .= $content;\n }", "function append($content){\n\t\t$this->_String4 .= \"$content\";\n\t\treturn $this;\n\t}", "function replace_content($in='/\\#CONTENIDO\\#/ms', $out,$pagina){\r\n\t\t return preg_replace($in, $out, $pagina);\t \t\r\n\t}", "public function append($content)\n\t{\n\t\t$this->content .= $content;\n\t}", "private static function replaceImports($content)\n {\n $content = preg_replace(self::FORMAT['style'], '<link rel=\"stylesheet\" type=\"text/css\" href=$4/>', $content);\n $content = preg_replace(self::FORMAT['script'], '<script type=\"text/javascript\" src=$4></script>', $content);\n $content = preg_replace(self::FORMAT['icon'], '<link rel=\"icon\" href=$4>', $content);\n\n return $content;\n }", "function autonomie_add_lazy_loading( $content ) {\n\t\t$content = preg_replace( '/(<[^>]*?)(\\ssrc=)(.*?\\/?>)/', '\\1 loading=\"lazy\" src=\\3', $content );\n\n\t\treturn $content;\n\t}", "public function contentStrReplace() {}", "public static function content_save_pre( $content ) {\n\t\t\tif ( false !== strpos( $content, '<table' ) ) {\n\t\t\t\t// paragraphed content inside of a td requires first paragraph to have extra line breaks (or else autop breaks)\n\t\t\t\t$content = preg_replace( \"/<td([^>]*)>(.+\\r?\\n\\r?\\n)/m\", \"<td$1>\\n\\n$2\", $content );\n\n\t\t\t\t// make sure there's space around the table\n\t\t\t\tif ( substr( $content, - 8 ) == '</table>' ) {\n\t\t\t\t\t$content .= \"\\n<br />\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "public static function appendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::append($path, $content);\n\t}", "function prepend($f){\n\t\t$this->pipe->prepend($f);\n\t\treturn $this;\n\t}", "public function addComment($content, $file = '', $line= 0, $parentId = 0) {\n $comment = new MergeRequestComment(array(\n 'mergeRequestId' => $this->id,\n 'userId' => App::session()->getUser()->id,\n 'file' => $file,\n 'line' => $line,\n 'comment' => $content,\n 'parentId' => $parentId,\n 'ctime' => time()\n ));\n\n $comment->save();\n }", "private function addLine($line)\n {\n $slugs = explode(\"\\\\\", $line);\n foreach ($slugs as $key => $slug) {\n if ($slug) {\n $parent = $this->addSlug($slug, $parent ?? null);\n }\n }\n }", "public function add($content) {\n $this->body .= (string)$content;\n }", "public function prependTo($value) {\n \n return $this->append($value);\n }", "public function testPrependLinePrefix() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->setLineEnd(StringBuilder::LE_UNIX);\n\t\t\t$builder->prependLine(\"Hello\", false)->prependLine(\"World\", false);\n\n\t\t\t$this->assertEquals(\"\\nWorld\\nHello\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "private static function replaceAll(string $content)\n {\n $content = self::replaceCsrf($content);\n $content = self::replaceExtend($content);\n $content = self::replaceIncludes($content);\n $content = self::replaceImports($content);\n $content = self::replaceComments($content);\n $content = self::replaceFunctions($content);\n $content = self::replaceCycles($content);\n $content = self::replaceTags($content);\n $content = self::replaceCustom($content);\n $content = self::replaceRaws($content);\n\n return $content;\n }", "public function prepend($prepend): self {\n return new self($prepend, $this);\n }", "public function replaceWith ($content) {\r\n\t\t\r\n\t\tif ($this->length === 0) return null;\r\n\t\t\r\n\t\t$content = $this->process($content);\r\n\t\t\r\n\t\tif (!isset($content)) return null;\r\n\t\t\r\n\t\tif (get_class($content) === 'XDTNodeList') {\r\n\t\t\t$clone = $content[0]->cloneNode(true);\r\n\t\t\t$content->remove();\r\n\t\t} else {\r\n\t\t\t$clone = $content->cloneNode(true);\r\n\t\t\tif (get_class($content) === 'DOMElement') $content->parentNode->removeChild($content);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\t$node->parentNode->replaceChild($clone->cloneNode(true), $node);\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function setBefore(string $content): HtmlElementInterface;", "function setPrepend($text) {\n\n $this->field['prepend'] = $text;\n return $this;\n\n }", "private static function replaceExtend(string $content)\n {\n preg_match(self::FORMAT['extends'], $content, $matches);\n\n if (!isset($matches[1])) {\n return $content;\n }\n\n $filename = Str::sanitizePath(trim($matches[1], '\"\\''));\n $parent_content = self::getContent($filename);\n\n //Replace parent block imports in child view\n preg_match_all(self::FORMAT['parent_block'], $content, $parent_blocks);\n\n foreach ($parent_blocks[1] as $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['parent_block']);\n preg_match($block_regex, $parent_content, $block_content);\n\n $content = preg_replace($parent_block_regex, trim($block_content[2] ?? ''), $content);\n }\n\n //Replace blocks in parent with child blocks content\n preg_match_all(self::FORMAT['block'], $content, $child_blocks);\n\n foreach ($child_blocks[1] as $key => $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_content = preg_replace($block_regex, trim($child_blocks[2][$key]), $parent_content);\n }\n\n //Remove remaining unused tags\n $parent_content = preg_replace(self::FORMAT['block'], '', $parent_content);\n $parent_content = preg_replace(self::FORMAT['parent_block'], '', $parent_content);\n\n return $parent_content;\n }", "function the_content_filter($content) {\n $block = join(\"|\",$this->shortcodes);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\",\"[$2$3]\",$content);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\",\"[/$2]\",$rep);\n return $rep;\n }", "public function prependToRegion($tag, $content)\n\t{\n\t\tif(!isset($this->regions['tag']))\n\t\t\t$this->regions[$tag] = '';\n\n\t\t$this->regions[$tag] = $content . $this->regions[$tag];\n\t}", "public function replaceLineWith($data, $line) {\r\n\t\tif ($this->exists && $data !== null && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t$this->clearFile ();\r\n\t\t\t$lineData [$line] = $data . \"\\n\";\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$this->writeToFile ( $lineData [$y] );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function replaceBaseTokens(&$content);", "protected function _getReplacement($line)\n {\n return $this->_params['replacement']\n ? $this->_params['replacement']\n :substr($line, 0, 1) . str_repeat('*', strlen($line) - 1);\n }", "function addTag($line)\n{\n\t$elem = $this->parser->parseLine($line);\n\n\tif (isset($elem['after'])) {\n\t\t$this->elements = $this->insertAfter($this->elements, \n\t\t\tarray($elem['id'] => $elem), $elem['after']\n\t\t);\n\t}\n\telse {\n\t\t$this->elements[$elem['id']] = $elem;\n\t}\n}", "public function add_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content .= $content;\n return true;\n }", "public function append_metadata( $line ) {\n $this->_metadata[] = $line;\n return $this;\n }", "protected static function replaceContent($node)\n {\n self::setter($node, 'firstName', Faker::getName());\n self::setter($node, 'lastName', Faker::getSurname());\n self::setter($node, 'sdnType', Faker::randomElement(['Entity', 'Individual']));\n self::setter($node, 'uid', mt_rand(10000, 900000));\n self::setter($node, 'title', Faker::randomElement(['Aerospace Engineer', 'Agricultural Engineer', 'Automotive Engineer', 'Biological Engineer', 'Biomedical Engineer']));\n }", "public function prepend($value, $key = null)\n {\n return parent::prepend($value, $key);\n $this->performHook('modified');\n return $this;\n }", "public function append($content)\n {\n $this->contents[] = $content;\n\n return $this;\n }", "public function addLine($line) {\n\t\t$this->children[] = $line;\n\t\treturn $this;\n\t}", "public function withContent(string $content): self\n {\n $this->content = $content;\n return $this;\n }", "function adace_before_content_slot_inject( $content ) {\n\tif ( ! is_singular( ) ) {\n\t\treturn $content;\n\t}\n\t$content_with_inject = adace_get_ad_slot( adace_get_before_content_slot_id() );\n\t$content_with_inject .= $content;\n\treturn $content_with_inject;\n}", "public function prepend(...$items): self;", "public function append($content)\n {\n $this->_contents .= (string) $content;\n\n return $this;\n }", "function icecontent($content) {\n iceinclude($content, 1);\n}", "public function process($content)\n {\n return preg_replace('/<!--(.*?)-->/s', '', $content);\n }", "protected static function extend($section, $content)\n\t{\n\t\tif (isset(static::$sections[$section]))\n\t\t{\n\t\t\tstatic::$sections[$section] = str_replace('@parent', $content, static::$sections[$section]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstatic::$sections[$section] = $content;\n\t\t}\n\t}", "public function prepend(string $key, $value)\n {\n // TODO: Implement prepend() method.\n }", "protected function replace($content)\n {\n // every character that has been processed will be moved to this string\n $processed = '';\n\n // update will keep shrinking, character by character, until all of it\n // has been processed\n while($content) {\n foreach($this->patterns as $i => $pattern) {\n $replacement = $this->replacements[$i];\n\n // replace pattern occurrences starting at this characters\n list($content, $replacement, $match) = $this->replacePattern($pattern, $content, $replacement);\n\n // if a pattern was replaceed out of the content, move the\n // replacement to $processed & remove it from $content\n if($match != '' || $replacement != '') {\n $processed .= $replacement;\n $content = substr($content, strlen($replacement));\n continue 2;\n }\n }\n\n // character processed: add it to $processed & strip from $content\n $processed .= $content[0];\n $content = substr($content, 1);\n }\n\n return $processed;\n }", "public function & appendContent( $a_content )\r\n\t{\r\n\t\t$this->m_content .= $a_content;\r\n\t\treturn $this;\r\n\t}", "private static function replaceCustom(string $content)\n {\n foreach (self::$templates as $template) {\n $content = $template($content);\n }\n\n return $content;\n }", "public function auto_add( $content ) {\n\t\tglobal $post;\n\t\t$options = $this->options;\n\n\t\t// Post exists\n\t\tif ( $post && is_singular( $options['post_types'] ) ) {\n\t\t\t$post_id = $post->ID;\n\t\t\t$post_type = $post->post_type;\n\n\t\t\t// Only deal with some post types\n\t\t\tif ( in_array( $post_type, $options['post_types'] ) ) {\n\t\t\t\t$form = $this->generate_form( $post_id );\n\n\t\t\t\t// Return the content and form\n\t\t\t\tif ( $this->options['add_before'] )\n\t\t\t\t\treturn $form . $content;\n\t\t\t\telse\n\t\t\t\t\treturn $content . $form;\n\t\t\t}\n\t\t}\n\n\t\treturn $content;\n\t}", "public function append($content) {\n\n $this->checkNotStopped();\n\n $args = func_get_args();\n foreach($args as $arg) {\n\n if (is_array($arg)) {\n call_user_func_array(__METHOD__, $arg);\n } else {\n $this->content[] = $arg;\n }\n\n }\n\n return $this;\n\n }", "public function addToHead($headContent)\n\t{\n\t\t$this->head .= (\"\\n\" . $headContent);\n\t}", "public function prepend($stringOrObject)\n {\n array_unshift($this->content, $stringOrObject);\n\n return $this;\n }", "public function replace(string $text, int $line = -1): void\n {\n $this->replaceLine($text, $line);\n }", "public function prepend($string)\n {\n $this->provider->prepend($string);\n return $this;\n }" ]
[ "0.73560673", "0.72558165", "0.7217798", "0.70127034", "0.70068544", "0.6985556", "0.66676086", "0.60524374", "0.60358363", "0.602302", "0.5942655", "0.5942294", "0.5928109", "0.5828813", "0.5816379", "0.5794007", "0.5695521", "0.56891173", "0.5642749", "0.5635985", "0.55922586", "0.5583784", "0.5578304", "0.55322826", "0.54867697", "0.5474644", "0.54445845", "0.54307777", "0.5401909", "0.53877217", "0.53805155", "0.537131", "0.53538376", "0.5304104", "0.5300927", "0.5292767", "0.526451", "0.5249489", "0.5246625", "0.5215584", "0.521263", "0.5176625", "0.5173458", "0.5161049", "0.5160446", "0.51567864", "0.5134846", "0.5128411", "0.51215947", "0.51189035", "0.510963", "0.50938195", "0.5083373", "0.50799453", "0.5057107", "0.50353676", "0.5026652", "0.5015277", "0.50148106", "0.5013173", "0.49954146", "0.49928984", "0.49785975", "0.49749056", "0.49652204", "0.4946102", "0.49430472", "0.49310488", "0.49295548", "0.4897413", "0.48909202", "0.48904857", "0.4886128", "0.48846552", "0.4878301", "0.4867808", "0.48616654", "0.4851865", "0.48499835", "0.48446995", "0.48350275", "0.48269176", "0.48263168", "0.4820549", "0.4817123", "0.4808367", "0.4800194", "0.4775661", "0.47750068", "0.47702852", "0.4769055", "0.4766429", "0.47585908", "0.4740258", "0.4733901", "0.47279587", "0.4727406", "0.47217822", "0.4705361", "0.46987796" ]
0.81915766
0
Prepend $line with $content $line is a regular expression so keep in mind for proper masking of special characters. You can also refer to sub patterns keep in mind that the whole line is a subpattern.
public function replace(string $line, string $content): Content { $this->content = preg_replace('~^(' . $line . ')$~sm', $content, $this->content); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepend(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', $content . PHP_EOL . '\\1', $this->content);\n return $this;\n }", "public function prependContent ($content) {\r\n\t\t$this->content = (string)$content.$this->content;\r\n\t}", "public function append(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', '\\1' . PHP_EOL . $content, $this->content);\n return $this;\n }", "public function prepend($content)\n\t{\n\t\t$this->content = $content.$this->content;\n\t}", "function prepend($content){\n\t\t$this->_String4 = \"$content\".$this->_String4;\n\t\treturn $this;\n\t}", "function prepend($content) {\n\t\t$this->write($content . $this->read());\n\t}", "public function & prependContent( $a_content )\r\n\t{\r\n\t\t$this->m_content = strval($a_content) . $this->m_content;\r\n\t\treturn $this;\r\n\t}", "public function startOfLine($line) \n {\n return preg_replace_callback(pmwiki_attachments::regular_expression,array($this,'replace_callback'),$line);\n }", "public function prepend_metadata( $line ) {\n array_unshift( $this->_metadata, $line );\n return $this;\n }", "public function prepend($content)\r\n {\r\n // Require that the response be unlocked before changing it\r\n $this->requireUnlocked();\r\n\r\n $this->body = $content . $this->body;\r\n\r\n return $this;\r\n }", "public function prependContent(string $content): ResponseInterface;", "public function prepend($content)\n {\n return !empty($content) ? $this->renderContent($content) . ' ' : '';\n }", "public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->insertBefore($value[0], $node->firstChild);\r\n\t\t\t\t\telse $node->insertBefore($value, $node->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "function prepend_attachment($content)\n {\n }", "public function before_content( $content ) {\n\t\t\t$this->before_content .= $content;\n\n\t\t\treturn $this->before_content;\n\t\t}", "public function stdWrap_prepend($content = '', $conf = [])\n {\n return $this->cObjGetSingle($conf['prepend'], $conf['prepend.'], '/stdWrap/.prepend') . $content;\n }", "private function appendLineToRewrites($line){\n\t\t$this->rewrites .= \"\\n\" . $line;\n\t}", "public function filterByLine($pat, $replacement=\"\") {\r\n $arr = $this->toArray();\r\n $newContents = \"\";\r\n foreach($arr as $line) {\r\n $newContents .= preg_replace($pat, $replacement, $line).\"\\n\";\r\n }\r\n // Following removes extra blank line -- why needed?\r\n $newContents = substr_replace($newContents, \"\", -1);\r\n $this->contents = $newContents;\r\n }", "protected function addToOutput($line, $content)\n {\n if (isset($this->output[$line])) {\n $this->output[$line] .= $content;\n } else {\n $this->output[$line] = $content;\n }\n }", "private function add_next_line($content) {\r\n\t\treturn $content . \"\\n\";\r\n\t}", "public static function prepend($filename, $content)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\n\t\t$fileContent = self::readFile($filename);\n\t\t$data = $content . \"\\n\" . $fileContent;\n\n\t\tself::writeFile($filename, $data);\n\t}", "public function before($content)\n {\n $this->before = $content;\n\n return $this;\n }", "public static function prepend_each_line($input_string, $with)\n {\n }", "public function addContent( string $content );", "public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }", "public function parse(&$line)\n {\n foreach ($this->_pattern as $key => $magicConstant) {\n $line = str_replace($key, $magicConstant, $line);\n }\n\n return $line;\n }", "public function prepend($content, string $username = '', string $avatar = ''): void {\n\t\t$payload = static::createPayload($content, $username, $avatar);\n\t\tarray_unshift($this->queue, $payload);\n\t}", "public function prepend() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( func_get_arg( 0 ) ) == \"array\" ) {\n $args = func_get_arg( 0 );\n $num_of_args = count( $args );\n } else {\n $args = func_get_args();\n }\n for ( $i = 0; $i < $num_of_args; $i++ ) {\n $arg = $args[$i];\n if ( $arg instanceof AbstractHTMLElement ) {\n $arg = $arg->asHTML();\n }\n $this->content = $arg . $this->content;\n }\n return $this;\n }", "function prepend(string $data): self {\n $this->buffer = $data.$this->buffer;\n return $this;\n }", "public function appendContent($content);", "static public function addHeadLine($line) {\n\t\tself::$_headLine[] = $line;\n\t}", "public function prepend($content, $selector = null)\n\t{\n\t\tif (is_array($content))\n\t\t{\n\t\t\t$content = join(\"\\n\", $content);\n\t\t}\n\n\t\treturn $this->cmd('prepend', array(\n\t\t\t$this->typecast($content, true, true)\n\t\t), $selector);\n\t}", "public function the_replacers($content) {\n \n // Get replacers\n $replacers = md_the_component_variable('content_replacer');\n\n // Get placeholders\n preg_match_all(\"/{[^}]*}/\", $content, $placeholders);\n\n // Verify if placeholders exists\n if ( $placeholders[0] ) {\n\n foreach ( $placeholders[0] as $placeholder ) {\n\n $found = explode(' ', str_replace(array('{', '}'), array('', ''), $placeholder));\n\n if ( $found[0] ) {\n\n if ( isset($replacers[$found[0]]) ) {\n\n $args = array(\n 'start' => 1,\n 'content' => $content\n );\n\n if ( count($found) > 1 ) {\n\n for( $f = 1; $f < count($found); $f++ ) {\n\n parse_str(str_replace('\"', \"\", $found[$f]), $a);\n\n $key = array_keys($a);\n \n if ( isset($a[$key[0]]) ) {\n\n $args[$key[0]] = $a[$key[0]];\n\n }\n\n }\n\n }\n\n $content = $replacers[$found[0]]($args);\n\n } else if ( isset($replacers[str_replace('|', '', $found[0])]) ) {\n\n $args = array(\n 'end' => 1,\n 'content' => $content\n );\n\n $content = $replacers[str_replace('|', '', $found[0])]($args);\n\n }\n\n }\n\n }\n\n }\n\n return $content;\n\n }", "function str_replace_first($from, $to, $content) {\n $from = '/' . preg_quote($from, '/') . '/';\n return preg_replace($from, $to, $content, 1);\n }", "function addContent($content)\n {\n $this->content .= $content;\n }", "private static function replaceIncludes($content)\n {\n preg_match_all(self::FORMAT['include'], $content, $matches, PREG_OFFSET_CAPTURE);\n\n foreach ($matches[1] as $key => $val) {\n $filename = Str::sanitizePath(trim($val[0], '\"\\''));\n $content = str_replace($matches[0][$key][0], self::getContent($filename), $content);\n }\n\n return $content;\n }", "public function prepend($name, $content)\n {\n if (!is_string($name)) {\n require_once 'Zend/Controller/Response/Exception.php';\n throw new Zend_Controller_Response_Exception('Invalid body segment key (\"' . gettype($name) . '\")');\n }\n\n if (isset($this->_body[$name])) {\n unset($this->_body[$name]);\n }\n\n $new = [$name => (string) $content];\n $this->_body = $new + $this->_body;\n\n return $this;\n }", "public function prepend($value) {\n $this->_value = $value . $this->_value;\n $this->countLength();\n \n return $this;\n }", "function prepend_media( $content ){\n\t\tglobal $post;\n\n\t\t$content = '';\n\n\t\t// Prepend rich media media to RSS item\n\t\t\n\t\tif( has_post_thumbnail( $post->ID ) && 'video' != get_post_format( $post->ID ) ) { // Featured for non-video post format\n\n\t\t\t$content .= '<p>' . get_the_post_thumbnail( $post->ID, 'featured' ) . '</p>';\n\n\t\t} elseif( 'link' == get_post_format( $post->ID ) ) { // Link\n\n\t\t\t$entry_custom_meta = get_post_custom( $post->ID ); \n\t\t\t\n\t\t\tif( isset( $entry_custom_meta['_format_link_url'] ) ){\n\n\t\t\t\t$content .= '<p>'. sprintf( __( '<a href=\"%1$s\" rel=\"bookmark\">link to %2$s</a>', 'opus' ), $entry_custom_meta['_format_link_url'][0], opus_get_domain_name( $entry_custom_meta['_format_link_url'][0] ) ) .'</p>';\n\n\t\t\t}\t\t\t\n\n\t\t} elseif( 'video' == get_post_format( $post->ID ) ){ // Video \n\n\t\t\t$video = get_post_meta( $post->ID, '_format_video_embed', true );\n\t\t\t\n\t\t\tif( $video ){\n\t\t\t\t\n\t\t\t\tob_start();\n\n\t\t\t\topus_get_video_embed_code( $video );\n\n\t\t\t\t$video = ob_get_clean();\n\n\t\t\t\t$content .= $video;\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$content .= get_the_content();\n\n\t\treturn $content;\n\t}", "public function addContent($content);", "public function prepend_the_date( $content ) {\n\t\n\t\t// If the post meta isn't empty for `the_date`, then render it in the content\n\t\tif( 0 != ( $the_date = get_post_meta( get_the_ID(), 'the_date', true ) ) ) {\n\t\t\t$content = '<p>' . $the_date . '</p>' . $content;\n\t\t} // end if\n\t\t\n\t\treturn $content;\n\t \n\t}", "function prepend($f){\n\t\t$this->pipe->prepend($f);\n\t\treturn $this;\n\t}", "final public function addContent($content){\n\t\t$this->content.=$content;\n\t\treturn $this;\n\t}", "private function addLine($line)\n {\n $slugs = explode(\"\\\\\", $line);\n foreach ($slugs as $key => $slug) {\n if ($slug) {\n $parent = $this->addSlug($slug, $parent ?? null);\n }\n }\n }", "public function testPrependLinePrefix() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->setLineEnd(StringBuilder::LE_UNIX);\n\t\t\t$builder->prependLine(\"Hello\", false)->prependLine(\"World\", false);\n\n\t\t\t$this->assertEquals(\"\\nWorld\\nHello\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "public static function configAppendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::replace(\n\t\t\t$path,\n\t\t\t\"\\n);\",\n\t\t\t\"\\n\\t$content,\\n);\"\n\t\t);\n\t}", "public function insertBaseTokens($content);", "function replace_content($in='/\\#CONTENIDO\\#/ms', $out,$pagina){\r\n\t\t return preg_replace($in, $out, $pagina);\t \t\r\n\t}", "public function appendContent ($content) {\r\n\t\t$this->content .= (string)$content;\r\n\t}", "function append($content){\n\t\t$this->_String4 .= \"$content\";\n\t\treturn $this;\n\t}", "public function saverAddContent( string $content );", "public function append($content)\n {\n $this->content .= $content;\n }", "public function testPrepend($content, callable $assert)\n {\n $dom = (new Dom($this->demoElement()))\n ->append($node = $this->demoCData())\n ->prepend($content);\n\n $assert($content, $dom->children()->get(), function (array $expected) use ($node) {\n return array_merge($expected, [$node]);\n });\n }", "public function append_metadata( $line ) {\n $this->_metadata[] = $line;\n return $this;\n }", "public function contentStrReplace() {}", "function add_to_file_contents($content) {\n\t\t$this->contents .= $content;\n\t}", "public function add($content);", "function setPrepend($text) {\n\n $this->field['prepend'] = $text;\n return $this;\n\n }", "public function prepend($prepend): self {\n return new self($prepend, $this);\n }", "function addContent($content)\n {\n $this->page .= $content;\n }", "public function prependTo($value) {\n \n return $this->append($value);\n }", "public function replaceLineWith($data, $line) {\r\n\t\tif ($this->exists && $data !== null && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t$this->clearFile ();\r\n\t\t\t$lineData [$line] = $data . \"\\n\";\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$this->writeToFile ( $lineData [$y] );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function _getReplacement($line)\n {\n return $this->_params['replacement']\n ? $this->_params['replacement']\n :substr($line, 0, 1) . str_repeat('*', strlen($line) - 1);\n }", "function autonomie_add_lazy_loading( $content ) {\n\t\t$content = preg_replace( '/(<[^>]*?)(\\ssrc=)(.*?\\/?>)/', '\\1 loading=\"lazy\" src=\\3', $content );\n\n\t\treturn $content;\n\t}", "public function append($content)\n\t{\n\t\t$this->content .= $content;\n\t}", "public static function appendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::append($path, $content);\n\t}", "public function addComment($content, $file = '', $line= 0, $parentId = 0) {\n $comment = new MergeRequestComment(array(\n 'mergeRequestId' => $this->id,\n 'userId' => App::session()->getUser()->id,\n 'file' => $file,\n 'line' => $line,\n 'comment' => $content,\n 'parentId' => $parentId,\n 'ctime' => time()\n ));\n\n $comment->save();\n }", "public function add($content) {\n $this->body .= (string)$content;\n }", "public function prepend($value, $key = null)\n {\n return parent::prepend($value, $key);\n $this->performHook('modified');\n return $this;\n }", "function addTag($line)\n{\n\t$elem = $this->parser->parseLine($line);\n\n\tif (isset($elem['after'])) {\n\t\t$this->elements = $this->insertAfter($this->elements, \n\t\t\tarray($elem['id'] => $elem), $elem['after']\n\t\t);\n\t}\n\telse {\n\t\t$this->elements[$elem['id']] = $elem;\n\t}\n}", "public function addLine($line) {\n\t\t$this->children[] = $line;\n\t\treturn $this;\n\t}", "public static function content_save_pre( $content ) {\n\t\t\tif ( false !== strpos( $content, '<table' ) ) {\n\t\t\t\t// paragraphed content inside of a td requires first paragraph to have extra line breaks (or else autop breaks)\n\t\t\t\t$content = preg_replace( \"/<td([^>]*)>(.+\\r?\\n\\r?\\n)/m\", \"<td$1>\\n\\n$2\", $content );\n\n\t\t\t\t// make sure there's space around the table\n\t\t\t\tif ( substr( $content, - 8 ) == '</table>' ) {\n\t\t\t\t\t$content .= \"\\n<br />\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "protected static function replaceContent($node)\n {\n self::setter($node, 'firstName', Faker::getName());\n self::setter($node, 'lastName', Faker::getSurname());\n self::setter($node, 'sdnType', Faker::randomElement(['Entity', 'Individual']));\n self::setter($node, 'uid', mt_rand(10000, 900000));\n self::setter($node, 'title', Faker::randomElement(['Aerospace Engineer', 'Agricultural Engineer', 'Automotive Engineer', 'Biological Engineer', 'Biomedical Engineer']));\n }", "private static function replaceImports($content)\n {\n $content = preg_replace(self::FORMAT['style'], '<link rel=\"stylesheet\" type=\"text/css\" href=$4/>', $content);\n $content = preg_replace(self::FORMAT['script'], '<script type=\"text/javascript\" src=$4></script>', $content);\n $content = preg_replace(self::FORMAT['icon'], '<link rel=\"icon\" href=$4>', $content);\n\n return $content;\n }", "public function prepend(...$items): self;", "public function prepend(string $key, $value)\n {\n // TODO: Implement prepend() method.\n }", "public function prependToRegion($tag, $content)\n\t{\n\t\tif(!isset($this->regions['tag']))\n\t\t\t$this->regions[$tag] = '';\n\n\t\t$this->regions[$tag] = $content . $this->regions[$tag];\n\t}", "public function prepend($stringOrObject)\n {\n array_unshift($this->content, $stringOrObject);\n\n return $this;\n }", "private static function replaceAll(string $content)\n {\n $content = self::replaceCsrf($content);\n $content = self::replaceExtend($content);\n $content = self::replaceIncludes($content);\n $content = self::replaceImports($content);\n $content = self::replaceComments($content);\n $content = self::replaceFunctions($content);\n $content = self::replaceCycles($content);\n $content = self::replaceTags($content);\n $content = self::replaceCustom($content);\n $content = self::replaceRaws($content);\n\n return $content;\n }", "public function setBefore(string $content): HtmlElementInterface;", "public function prepend($string)\n {\n $this->provider->prepend($string);\n return $this;\n }", "public function prepend($part)\n {\n array_unshift($this->identifierParts, $part);\n\n return $this;\n }", "public function replaceBaseTokens(&$content);", "public function replaceWith ($content) {\r\n\t\t\r\n\t\tif ($this->length === 0) return null;\r\n\t\t\r\n\t\t$content = $this->process($content);\r\n\t\t\r\n\t\tif (!isset($content)) return null;\r\n\t\t\r\n\t\tif (get_class($content) === 'XDTNodeList') {\r\n\t\t\t$clone = $content[0]->cloneNode(true);\r\n\t\t\t$content->remove();\r\n\t\t} else {\r\n\t\t\t$clone = $content->cloneNode(true);\r\n\t\t\tif (get_class($content) === 'DOMElement') $content->parentNode->removeChild($content);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\t$node->parentNode->replaceChild($clone->cloneNode(true), $node);\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function replace(string $text, int $line = -1): void\n {\n $this->replaceLine($text, $line);\n }", "private static function replaceExtend(string $content)\n {\n preg_match(self::FORMAT['extends'], $content, $matches);\n\n if (!isset($matches[1])) {\n return $content;\n }\n\n $filename = Str::sanitizePath(trim($matches[1], '\"\\''));\n $parent_content = self::getContent($filename);\n\n //Replace parent block imports in child view\n preg_match_all(self::FORMAT['parent_block'], $content, $parent_blocks);\n\n foreach ($parent_blocks[1] as $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['parent_block']);\n preg_match($block_regex, $parent_content, $block_content);\n\n $content = preg_replace($parent_block_regex, trim($block_content[2] ?? ''), $content);\n }\n\n //Replace blocks in parent with child blocks content\n preg_match_all(self::FORMAT['block'], $content, $child_blocks);\n\n foreach ($child_blocks[1] as $key => $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_content = preg_replace($block_regex, trim($child_blocks[2][$key]), $parent_content);\n }\n\n //Remove remaining unused tags\n $parent_content = preg_replace(self::FORMAT['block'], '', $parent_content);\n $parent_content = preg_replace(self::FORMAT['parent_block'], '', $parent_content);\n\n return $parent_content;\n }", "function the_content_filter($content) {\n $block = join(\"|\",$this->shortcodes);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\",\"[$2$3]\",$content);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\",\"[/$2]\",$rep);\n return $rep;\n }", "function prepend($text1, $text2) {\n return $text2 . $text1;\n }", "function prepend($item) {\r\n return Match::on($item)\r\n ->ListM(function($list) {\r\n return new self(array_merge($list->value(), $this->list));\r\n })\r\n ->any(function($item) {\r\n return new self(array_merge([$item], $this->list));\r\n })\r\n ->value(); \r\n }", "public function setLine($line);", "public function prependTitle(string $text);", "public function prepend(\\View $view) {\n $this->prependViews[] = $view;\n return $this;\n }", "public function testPrependLineTerminate() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->setLineEnd(StringBuilder::LE_UNIX);\n\t\t\t$builder->prependLine(\"Hello\", true)->prependLine(\"World\", true);\n\n\t\t\t$this->assertEquals(\"World\\nHello\\n\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "public function add_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content .= $content;\n return true;\n }", "public function prepend($section, $str) {\n\t\t\tif (\\uri\\actions::modify($this->object, 'prepend', $section, $str) === FALSE) {\n\t\t\t\t$this->error_count++;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "protected function line($line, $prependBuffer = false)\n {\n if ($prependBuffer) {\n $line = $this->buffer.$line;\n $this->buffer = \"\";\n }\n\n call_user_func($this->callback, $line);\n }", "public function withContent(string $content): self\n {\n $this->content = $content;\n return $this;\n }", "public function addToHead($headContent)\n\t{\n\t\t$this->head .= (\"\\n\" . $headContent);\n\t}", "public function prepend(string $data): bool {}", "protected function insertBlock($currLineUid, $line)\n {\n preg_match($this->dataregex, $line, $b_data);\n if (count($b_data) > 1) {\n array_shift($b_data);\n }\n\n if (isset($this->userfunc)) {\n $test = call_user_func(array($this->editableContent->plugin->page, $this->userfunc));\n $filter = preg_filter($this->datafilter, $this->datareplace, $test);\n } else {\n preg_match($this->datafilter[3], $line, $debug);\n $filter = preg_filter($this->datafilter, $this->datareplace, $line);\n }\n if (isset($this->trim)) {\n $filter = trim($filter, $this->trim);\n }\n $b_data[] = $filter;\n $this->editableContent->blocks[$currLineUid] = $this->insertEditableTag(\n $currLineUid,\n $this->class,\n 'auto',\n '',\n $b_data\n );\n }" ]
[ "0.82024735", "0.72799104", "0.7233281", "0.7129444", "0.6980303", "0.6972923", "0.66116375", "0.6026539", "0.5989391", "0.5978756", "0.5945223", "0.594215", "0.5882257", "0.57594126", "0.5728624", "0.5727434", "0.56732446", "0.56648135", "0.5647239", "0.5564192", "0.5493114", "0.549077", "0.5487698", "0.5462152", "0.5443646", "0.5416836", "0.54092616", "0.54043156", "0.5394891", "0.53916097", "0.53827125", "0.5375102", "0.53258", "0.53205967", "0.52833694", "0.5219283", "0.5214354", "0.52139324", "0.52119523", "0.5197778", "0.51610523", "0.5103376", "0.5087598", "0.5068435", "0.5060878", "0.5059764", "0.50500834", "0.5029378", "0.5028432", "0.50263685", "0.5018872", "0.5016571", "0.50142616", "0.5012797", "0.50127375", "0.50073683", "0.49915197", "0.4990665", "0.49850655", "0.496918", "0.495993", "0.49584344", "0.49405482", "0.493427", "0.49317575", "0.4922686", "0.49223295", "0.49055353", "0.48948997", "0.48892725", "0.4883502", "0.48832297", "0.4860016", "0.48581058", "0.48296952", "0.4828101", "0.4810463", "0.48053282", "0.4797805", "0.47971633", "0.47949708", "0.47878787", "0.47820076", "0.47813547", "0.47803873", "0.4779823", "0.47795677", "0.47524267", "0.47325537", "0.47288838", "0.47241837", "0.47165087", "0.47140545", "0.47103292", "0.47103244", "0.47071853", "0.47061774", "0.47008002", "0.4695521", "0.46950027" ]
0.69433933
6
Prepend $line with $content $line is a regular expression so keep in mind for proper masking of special characters. You can also refer to sub patterns keep in mind that the whole line is a subpattern.
public function append(string $line, string $content): Content { $this->content = preg_replace('~^(' . $line . ')$~sm', '\1' . PHP_EOL . $content, $this->content); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepend(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', $content . PHP_EOL . '\\1', $this->content);\n return $this;\n }", "public function prependContent ($content) {\r\n\t\t$this->content = (string)$content.$this->content;\r\n\t}", "public function prepend($content)\n\t{\n\t\t$this->content = $content.$this->content;\n\t}", "function prepend($content){\n\t\t$this->_String4 = \"$content\".$this->_String4;\n\t\treturn $this;\n\t}", "function prepend($content) {\n\t\t$this->write($content . $this->read());\n\t}", "public function replace(string $line, string $content): Content\n {\n $this->content = preg_replace('~^(' . $line . ')$~sm', $content, $this->content);\n return $this;\n }", "public function & prependContent( $a_content )\r\n\t{\r\n\t\t$this->m_content = strval($a_content) . $this->m_content;\r\n\t\treturn $this;\r\n\t}", "public function startOfLine($line) \n {\n return preg_replace_callback(pmwiki_attachments::regular_expression,array($this,'replace_callback'),$line);\n }", "public function prepend_metadata( $line ) {\n array_unshift( $this->_metadata, $line );\n return $this;\n }", "public function prepend($content)\r\n {\r\n // Require that the response be unlocked before changing it\r\n $this->requireUnlocked();\r\n\r\n $this->body = $content . $this->body;\r\n\r\n return $this;\r\n }", "public function prependContent(string $content): ResponseInterface;", "public function prepend($content)\n {\n return !empty($content) ? $this->renderContent($content) . ' ' : '';\n }", "public function prepend ($content) {\r\n\t\t\r\n\t\tif ($this->length < 1) return null;\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\tforeach ($args as $offset => $value) \r\n\t\t\tif ($value = $this->process($value)) \r\n\t\t\t\tforeach ($this as $node) \r\n\t\t\t\t\tif (get_class($value) === 'XDTNodeList') $node->insertBefore($value[0], $node->firstChild);\r\n\t\t\t\t\telse $node->insertBefore($value, $node->firstChild);\r\n\t\t\t\t\r\n\t\treturn $this;\r\n\t}", "function prepend_attachment($content)\n {\n }", "public function stdWrap_prepend($content = '', $conf = [])\n {\n return $this->cObjGetSingle($conf['prepend'], $conf['prepend.'], '/stdWrap/.prepend') . $content;\n }", "public function before_content( $content ) {\n\t\t\t$this->before_content .= $content;\n\n\t\t\treturn $this->before_content;\n\t\t}", "private function appendLineToRewrites($line){\n\t\t$this->rewrites .= \"\\n\" . $line;\n\t}", "public function filterByLine($pat, $replacement=\"\") {\r\n $arr = $this->toArray();\r\n $newContents = \"\";\r\n foreach($arr as $line) {\r\n $newContents .= preg_replace($pat, $replacement, $line).\"\\n\";\r\n }\r\n // Following removes extra blank line -- why needed?\r\n $newContents = substr_replace($newContents, \"\", -1);\r\n $this->contents = $newContents;\r\n }", "protected function addToOutput($line, $content)\n {\n if (isset($this->output[$line])) {\n $this->output[$line] .= $content;\n } else {\n $this->output[$line] = $content;\n }\n }", "private function add_next_line($content) {\r\n\t\treturn $content . \"\\n\";\r\n\t}", "public static function prepend($filename, $content)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\n\t\t$fileContent = self::readFile($filename);\n\t\t$data = $content . \"\\n\" . $fileContent;\n\n\t\tself::writeFile($filename, $data);\n\t}", "public function before($content)\n {\n $this->before = $content;\n\n return $this;\n }", "public static function prepend_each_line($input_string, $with)\n {\n }", "public function addContent( string $content );", "public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }", "public function parse(&$line)\n {\n foreach ($this->_pattern as $key => $magicConstant) {\n $line = str_replace($key, $magicConstant, $line);\n }\n\n return $line;\n }", "public function prepend($content, string $username = '', string $avatar = ''): void {\n\t\t$payload = static::createPayload($content, $username, $avatar);\n\t\tarray_unshift($this->queue, $payload);\n\t}", "public function prepend() {\n $num_of_args = func_num_args();\n if ( $num_of_args == 1 && gettype( func_get_arg( 0 ) ) == \"array\" ) {\n $args = func_get_arg( 0 );\n $num_of_args = count( $args );\n } else {\n $args = func_get_args();\n }\n for ( $i = 0; $i < $num_of_args; $i++ ) {\n $arg = $args[$i];\n if ( $arg instanceof AbstractHTMLElement ) {\n $arg = $arg->asHTML();\n }\n $this->content = $arg . $this->content;\n }\n return $this;\n }", "function prepend(string $data): self {\n $this->buffer = $data.$this->buffer;\n return $this;\n }", "public function appendContent($content);", "static public function addHeadLine($line) {\n\t\tself::$_headLine[] = $line;\n\t}", "public function prepend($content, $selector = null)\n\t{\n\t\tif (is_array($content))\n\t\t{\n\t\t\t$content = join(\"\\n\", $content);\n\t\t}\n\n\t\treturn $this->cmd('prepend', array(\n\t\t\t$this->typecast($content, true, true)\n\t\t), $selector);\n\t}", "public function the_replacers($content) {\n \n // Get replacers\n $replacers = md_the_component_variable('content_replacer');\n\n // Get placeholders\n preg_match_all(\"/{[^}]*}/\", $content, $placeholders);\n\n // Verify if placeholders exists\n if ( $placeholders[0] ) {\n\n foreach ( $placeholders[0] as $placeholder ) {\n\n $found = explode(' ', str_replace(array('{', '}'), array('', ''), $placeholder));\n\n if ( $found[0] ) {\n\n if ( isset($replacers[$found[0]]) ) {\n\n $args = array(\n 'start' => 1,\n 'content' => $content\n );\n\n if ( count($found) > 1 ) {\n\n for( $f = 1; $f < count($found); $f++ ) {\n\n parse_str(str_replace('\"', \"\", $found[$f]), $a);\n\n $key = array_keys($a);\n \n if ( isset($a[$key[0]]) ) {\n\n $args[$key[0]] = $a[$key[0]];\n\n }\n\n }\n\n }\n\n $content = $replacers[$found[0]]($args);\n\n } else if ( isset($replacers[str_replace('|', '', $found[0])]) ) {\n\n $args = array(\n 'end' => 1,\n 'content' => $content\n );\n\n $content = $replacers[str_replace('|', '', $found[0])]($args);\n\n }\n\n }\n\n }\n\n }\n\n return $content;\n\n }", "function str_replace_first($from, $to, $content) {\n $from = '/' . preg_quote($from, '/') . '/';\n return preg_replace($from, $to, $content, 1);\n }", "function addContent($content)\n {\n $this->content .= $content;\n }", "private static function replaceIncludes($content)\n {\n preg_match_all(self::FORMAT['include'], $content, $matches, PREG_OFFSET_CAPTURE);\n\n foreach ($matches[1] as $key => $val) {\n $filename = Str::sanitizePath(trim($val[0], '\"\\''));\n $content = str_replace($matches[0][$key][0], self::getContent($filename), $content);\n }\n\n return $content;\n }", "public function prepend($value) {\n $this->_value = $value . $this->_value;\n $this->countLength();\n \n return $this;\n }", "public function prepend($name, $content)\n {\n if (!is_string($name)) {\n require_once 'Zend/Controller/Response/Exception.php';\n throw new Zend_Controller_Response_Exception('Invalid body segment key (\"' . gettype($name) . '\")');\n }\n\n if (isset($this->_body[$name])) {\n unset($this->_body[$name]);\n }\n\n $new = [$name => (string) $content];\n $this->_body = $new + $this->_body;\n\n return $this;\n }", "function prepend_media( $content ){\n\t\tglobal $post;\n\n\t\t$content = '';\n\n\t\t// Prepend rich media media to RSS item\n\t\t\n\t\tif( has_post_thumbnail( $post->ID ) && 'video' != get_post_format( $post->ID ) ) { // Featured for non-video post format\n\n\t\t\t$content .= '<p>' . get_the_post_thumbnail( $post->ID, 'featured' ) . '</p>';\n\n\t\t} elseif( 'link' == get_post_format( $post->ID ) ) { // Link\n\n\t\t\t$entry_custom_meta = get_post_custom( $post->ID ); \n\t\t\t\n\t\t\tif( isset( $entry_custom_meta['_format_link_url'] ) ){\n\n\t\t\t\t$content .= '<p>'. sprintf( __( '<a href=\"%1$s\" rel=\"bookmark\">link to %2$s</a>', 'opus' ), $entry_custom_meta['_format_link_url'][0], opus_get_domain_name( $entry_custom_meta['_format_link_url'][0] ) ) .'</p>';\n\n\t\t\t}\t\t\t\n\n\t\t} elseif( 'video' == get_post_format( $post->ID ) ){ // Video \n\n\t\t\t$video = get_post_meta( $post->ID, '_format_video_embed', true );\n\t\t\t\n\t\t\tif( $video ){\n\t\t\t\t\n\t\t\t\tob_start();\n\n\t\t\t\topus_get_video_embed_code( $video );\n\n\t\t\t\t$video = ob_get_clean();\n\n\t\t\t\t$content .= $video;\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$content .= get_the_content();\n\n\t\treturn $content;\n\t}", "public function addContent($content);", "public function prepend_the_date( $content ) {\n\t\n\t\t// If the post meta isn't empty for `the_date`, then render it in the content\n\t\tif( 0 != ( $the_date = get_post_meta( get_the_ID(), 'the_date', true ) ) ) {\n\t\t\t$content = '<p>' . $the_date . '</p>' . $content;\n\t\t} // end if\n\t\t\n\t\treturn $content;\n\t \n\t}", "function prepend($f){\n\t\t$this->pipe->prepend($f);\n\t\treturn $this;\n\t}", "final public function addContent($content){\n\t\t$this->content.=$content;\n\t\treturn $this;\n\t}", "private function addLine($line)\n {\n $slugs = explode(\"\\\\\", $line);\n foreach ($slugs as $key => $slug) {\n if ($slug) {\n $parent = $this->addSlug($slug, $parent ?? null);\n }\n }\n }", "public function testPrependLinePrefix() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->setLineEnd(StringBuilder::LE_UNIX);\n\t\t\t$builder->prependLine(\"Hello\", false)->prependLine(\"World\", false);\n\n\t\t\t$this->assertEquals(\"\\nWorld\\nHello\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "public static function configAppendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::replace(\n\t\t\t$path,\n\t\t\t\"\\n);\",\n\t\t\t\"\\n\\t$content,\\n);\"\n\t\t);\n\t}", "public function insertBaseTokens($content);", "function replace_content($in='/\\#CONTENIDO\\#/ms', $out,$pagina){\r\n\t\t return preg_replace($in, $out, $pagina);\t \t\r\n\t}", "public function appendContent ($content) {\r\n\t\t$this->content .= (string)$content;\r\n\t}", "function append($content){\n\t\t$this->_String4 .= \"$content\";\n\t\treturn $this;\n\t}", "public function saverAddContent( string $content );", "public function testPrepend($content, callable $assert)\n {\n $dom = (new Dom($this->demoElement()))\n ->append($node = $this->demoCData())\n ->prepend($content);\n\n $assert($content, $dom->children()->get(), function (array $expected) use ($node) {\n return array_merge($expected, [$node]);\n });\n }", "public function append($content)\n {\n $this->content .= $content;\n }", "public function append_metadata( $line ) {\n $this->_metadata[] = $line;\n return $this;\n }", "public function contentStrReplace() {}", "function add_to_file_contents($content) {\n\t\t$this->contents .= $content;\n\t}", "function setPrepend($text) {\n\n $this->field['prepend'] = $text;\n return $this;\n\n }", "public function add($content);", "public function prepend($prepend): self {\n return new self($prepend, $this);\n }", "function addContent($content)\n {\n $this->page .= $content;\n }", "public function prependTo($value) {\n \n return $this->append($value);\n }", "public function replaceLineWith($data, $line) {\r\n\t\tif ($this->exists && $data !== null && $line !== null) {\r\n\t\t\t$lineData = $this->readByLine ();\r\n\t\t\t$this->clearFile ();\r\n\t\t\t$lineData [$line] = $data . \"\\n\";\r\n\t\t\tfor($y = 0; $y < sizeof ( $lineData ); $y ++) {\r\n\t\t\t\t$this->writeToFile ( $lineData [$y] );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "protected function _getReplacement($line)\n {\n return $this->_params['replacement']\n ? $this->_params['replacement']\n :substr($line, 0, 1) . str_repeat('*', strlen($line) - 1);\n }", "function autonomie_add_lazy_loading( $content ) {\n\t\t$content = preg_replace( '/(<[^>]*?)(\\ssrc=)(.*?\\/?>)/', '\\1 loading=\"lazy\" src=\\3', $content );\n\n\t\treturn $content;\n\t}", "public function append($content)\n\t{\n\t\t$this->content .= $content;\n\t}", "public static function appendOnce($path, $content)\n\t{\n\t\t$data = self::get($path, '');\n\t\t\n\t\tif (strstr($data, $content) !== false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tself::append($path, $content);\n\t}", "public function addComment($content, $file = '', $line= 0, $parentId = 0) {\n $comment = new MergeRequestComment(array(\n 'mergeRequestId' => $this->id,\n 'userId' => App::session()->getUser()->id,\n 'file' => $file,\n 'line' => $line,\n 'comment' => $content,\n 'parentId' => $parentId,\n 'ctime' => time()\n ));\n\n $comment->save();\n }", "public function add($content) {\n $this->body .= (string)$content;\n }", "public function prepend($value, $key = null)\n {\n return parent::prepend($value, $key);\n $this->performHook('modified');\n return $this;\n }", "function addTag($line)\n{\n\t$elem = $this->parser->parseLine($line);\n\n\tif (isset($elem['after'])) {\n\t\t$this->elements = $this->insertAfter($this->elements, \n\t\t\tarray($elem['id'] => $elem), $elem['after']\n\t\t);\n\t}\n\telse {\n\t\t$this->elements[$elem['id']] = $elem;\n\t}\n}", "public static function content_save_pre( $content ) {\n\t\t\tif ( false !== strpos( $content, '<table' ) ) {\n\t\t\t\t// paragraphed content inside of a td requires first paragraph to have extra line breaks (or else autop breaks)\n\t\t\t\t$content = preg_replace( \"/<td([^>]*)>(.+\\r?\\n\\r?\\n)/m\", \"<td$1>\\n\\n$2\", $content );\n\n\t\t\t\t// make sure there's space around the table\n\t\t\t\tif ( substr( $content, - 8 ) == '</table>' ) {\n\t\t\t\t\t$content .= \"\\n<br />\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $content;\n\t\t}", "public function addLine($line) {\n\t\t$this->children[] = $line;\n\t\treturn $this;\n\t}", "protected static function replaceContent($node)\n {\n self::setter($node, 'firstName', Faker::getName());\n self::setter($node, 'lastName', Faker::getSurname());\n self::setter($node, 'sdnType', Faker::randomElement(['Entity', 'Individual']));\n self::setter($node, 'uid', mt_rand(10000, 900000));\n self::setter($node, 'title', Faker::randomElement(['Aerospace Engineer', 'Agricultural Engineer', 'Automotive Engineer', 'Biological Engineer', 'Biomedical Engineer']));\n }", "private static function replaceImports($content)\n {\n $content = preg_replace(self::FORMAT['style'], '<link rel=\"stylesheet\" type=\"text/css\" href=$4/>', $content);\n $content = preg_replace(self::FORMAT['script'], '<script type=\"text/javascript\" src=$4></script>', $content);\n $content = preg_replace(self::FORMAT['icon'], '<link rel=\"icon\" href=$4>', $content);\n\n return $content;\n }", "public function prepend(...$items): self;", "public function prepend(string $key, $value)\n {\n // TODO: Implement prepend() method.\n }", "public function prependToRegion($tag, $content)\n\t{\n\t\tif(!isset($this->regions['tag']))\n\t\t\t$this->regions[$tag] = '';\n\n\t\t$this->regions[$tag] = $content . $this->regions[$tag];\n\t}", "public function prepend($stringOrObject)\n {\n array_unshift($this->content, $stringOrObject);\n\n return $this;\n }", "public function setBefore(string $content): HtmlElementInterface;", "private static function replaceAll(string $content)\n {\n $content = self::replaceCsrf($content);\n $content = self::replaceExtend($content);\n $content = self::replaceIncludes($content);\n $content = self::replaceImports($content);\n $content = self::replaceComments($content);\n $content = self::replaceFunctions($content);\n $content = self::replaceCycles($content);\n $content = self::replaceTags($content);\n $content = self::replaceCustom($content);\n $content = self::replaceRaws($content);\n\n return $content;\n }", "public function prepend($string)\n {\n $this->provider->prepend($string);\n return $this;\n }", "public function prepend($part)\n {\n array_unshift($this->identifierParts, $part);\n\n return $this;\n }", "public function replaceBaseTokens(&$content);", "public function replaceWith ($content) {\r\n\t\t\r\n\t\tif ($this->length === 0) return null;\r\n\t\t\r\n\t\t$content = $this->process($content);\r\n\t\t\r\n\t\tif (!isset($content)) return null;\r\n\t\t\r\n\t\tif (get_class($content) === 'XDTNodeList') {\r\n\t\t\t$clone = $content[0]->cloneNode(true);\r\n\t\t\t$content->remove();\r\n\t\t} else {\r\n\t\t\t$clone = $content->cloneNode(true);\r\n\t\t\tif (get_class($content) === 'DOMElement') $content->parentNode->removeChild($content);\r\n\t\t}\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t\t$node->parentNode->replaceChild($clone->cloneNode(true), $node);\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "function the_content_filter($content) {\n $block = join(\"|\",$this->shortcodes);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\",\"[$2$3]\",$content);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\",\"[/$2]\",$rep);\n return $rep;\n }", "public function replace(string $text, int $line = -1): void\n {\n $this->replaceLine($text, $line);\n }", "private static function replaceExtend(string $content)\n {\n preg_match(self::FORMAT['extends'], $content, $matches);\n\n if (!isset($matches[1])) {\n return $content;\n }\n\n $filename = Str::sanitizePath(trim($matches[1], '\"\\''));\n $parent_content = self::getContent($filename);\n\n //Replace parent block imports in child view\n preg_match_all(self::FORMAT['parent_block'], $content, $parent_blocks);\n\n foreach ($parent_blocks[1] as $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['parent_block']);\n preg_match($block_regex, $parent_content, $block_content);\n\n $content = preg_replace($parent_block_regex, trim($block_content[2] ?? ''), $content);\n }\n\n //Replace blocks in parent with child blocks content\n preg_match_all(self::FORMAT['block'], $content, $child_blocks);\n\n foreach ($child_blocks[1] as $key => $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_content = preg_replace($block_regex, trim($child_blocks[2][$key]), $parent_content);\n }\n\n //Remove remaining unused tags\n $parent_content = preg_replace(self::FORMAT['block'], '', $parent_content);\n $parent_content = preg_replace(self::FORMAT['parent_block'], '', $parent_content);\n\n return $parent_content;\n }", "function prepend($text1, $text2) {\n return $text2 . $text1;\n }", "function prepend($item) {\r\n return Match::on($item)\r\n ->ListM(function($list) {\r\n return new self(array_merge($list->value(), $this->list));\r\n })\r\n ->any(function($item) {\r\n return new self(array_merge([$item], $this->list));\r\n })\r\n ->value(); \r\n }", "public function setLine($line);", "public function prependTitle(string $text);", "public function prepend(\\View $view) {\n $this->prependViews[] = $view;\n return $this;\n }", "public function testPrependLineTerminate() {\n\t\t\t$builder = new StringBuilder();\n\t\t\t$builder->setLineEnd(StringBuilder::LE_UNIX);\n\t\t\t$builder->prependLine(\"Hello\", true)->prependLine(\"World\", true);\n\n\t\t\t$this->assertEquals(\"World\\nHello\\n\", $builder->__toString());\n\t\t\tunset($builder);\n\t\t}", "public function prepend($section, $str) {\n\t\t\tif (\\uri\\actions::modify($this->object, 'prepend', $section, $str) === FALSE) {\n\t\t\t\t$this->error_count++;\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "public function add_content($content) {\n if (!is_string($content)) { return false; }\n $this->_content .= $content;\n return true;\n }", "protected function line($line, $prependBuffer = false)\n {\n if ($prependBuffer) {\n $line = $this->buffer.$line;\n $this->buffer = \"\";\n }\n\n call_user_func($this->callback, $line);\n }", "public function withContent(string $content): self\n {\n $this->content = $content;\n return $this;\n }", "public function addToHead($headContent)\n\t{\n\t\t$this->head .= (\"\\n\" . $headContent);\n\t}", "public function prepend(string $data): bool {}", "public static function prepend($path, $data)\n\t{\n\t\tif(self::exists($path)){\n\t\t\treturn self::put($path, $data . self::get($path));\n\t\t}\n\n\t\treturn self::put($path, $data);\n\t}" ]
[ "0.82019734", "0.7280032", "0.71302056", "0.69813806", "0.69727147", "0.69410735", "0.6612531", "0.6026453", "0.5989103", "0.59780234", "0.59448737", "0.5942994", "0.588412", "0.5759845", "0.5728072", "0.57278395", "0.5672914", "0.56635535", "0.5646495", "0.5562488", "0.54927397", "0.5490641", "0.5488432", "0.5461108", "0.54430723", "0.54160976", "0.5410322", "0.5404711", "0.53963083", "0.5390523", "0.5383535", "0.5376836", "0.5324564", "0.5320716", "0.52821946", "0.52188206", "0.5215375", "0.52143705", "0.52125925", "0.5197383", "0.5161516", "0.5104586", "0.5086608", "0.50678056", "0.5061165", "0.5058741", "0.5050086", "0.5029188", "0.5027223", "0.5026027", "0.50186014", "0.5016053", "0.50157624", "0.5011604", "0.50103855", "0.5005343", "0.4992609", "0.49920288", "0.49864474", "0.49685305", "0.49615037", "0.4957033", "0.49396348", "0.49335265", "0.4931026", "0.492189", "0.49212304", "0.4905007", "0.48967463", "0.48883927", "0.48831227", "0.48830205", "0.4858251", "0.48563698", "0.48313224", "0.48302916", "0.48115382", "0.48067212", "0.47966567", "0.47965556", "0.47959232", "0.47882238", "0.47814307", "0.47811416", "0.4779462", "0.47792852", "0.47775105", "0.47545424", "0.47351053", "0.47271946", "0.47269207", "0.471767", "0.4713823", "0.47113982", "0.4709617", "0.47071785", "0.47044763", "0.47008044", "0.46968675", "0.46951193" ]
0.72313964
2
Add method after method named $after
public function addMethod(string $methodDeclaration, string $after = null): Content { if (!preg_match('~(class|interface|trait)[a-z \n\\\\]+\{~ism', $this->content)) { throw new \Exception('Not a class, trait or interface'); } $pos = strrpos($this->content, '}'); $regex = '~^ [a-z ]*?' . // a method has to start with indentation of 4 and may have keywords in front 'function ' . $after . // the function keyword plus the method name '\s*\([^)]*\)' . // parameter definitions (note: no closing parenthesis inside strings allowed) '\s*(:\s*[a-z\\\n]+)?' . // maybe with return type declaration '\s*(\{.*?\n \}$|;$)' . // with a body or a semicolon at a end of line '~ism'; if ($after && preg_match($regex, $this->content, $match, PREG_OFFSET_CAPTURE)) { $pos = $match[0][1] + strlen($match[0][0]) + 1; } $this->content = substr_replace($this->content, $methodDeclaration, $pos, 0); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function after(\\Closure $after);", "public static function _after() : void {\n\t}", "abstract function after();", "protected function after(){}", "protected function after(){}", "protected function after(){}", "protected function _after()\n {\n }", "protected function _after()\n\t{\n\t\t\n\t}", "protected function _after()\n\t{\n\t\t\n\t}", "abstract protected function after();", "public function after() {}", "public function after()\n\t{\n\t}", "public function after()\n {\n parent::after();\n }", "protected function _after()\n {\n }", "public static function after() {\n\n\t}", "public function __after()\t{\n\t}", "protected function after(): void\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "protected function after()\n {\n }", "protected function after()\n {\n }", "protected function getAddAfterFunction()\n {\n \n }", "protected function after() {\n\t\t// Empty default implementation. Should be implemented by descendant classes if needed\n\t}", "public function addEventAfter($method, $callback){\n VEvent::add(\n After,\n array(\n $this->__classname,\n $method\n ),\n $callback\n );\n }", "public function afterAction() {\n }", "function afterAction()\n {\n }", "public function _after($I)\n {\n }", "public function after($callback);", "protected function after() {\n }", "protected function afterAdd() {\n\t}", "final public function addAfter(CtkBuildable $node, CtkBuildable $after) {\n\t\tthrow new CakeException(sprintf('Cannot add children to %s', get_class($this)));\n\t}", "function after(\\Closure $closure)\n{\n pho\\after($closure);\n}", "protected function after(){\n\n }", "protected function _after()\n {\n // the time it takes to execute\n // @see cleanup() inside this test\n }", "public function after($params = '')\n {\n \t//\n }", "public function testAfter() {\n\t\t$function = function() {\n\t\t\tstatic $n = null;\n\t\t\tif (is_null($n)) {\n\t\t\t\t$n = 1;\n\t\t\t} else {\n\t\t\t\t++$n;\n\t\t\t}\n\t\t\treturn $n;\n\t\t};\n\t\t$afterFunction = _::after(3, $function);\n\t\t$result1 = $afterFunction();\n\t\t$this->assertNull($result1);\n\t\t$result2 = $afterFunction();\n\t\t$this->assertNull($result2);\n\t\t$result3 = $afterFunction();\n\t\t$this->assertEquals(1, $result3);\n\t\t$result4 = $afterFunction();\n\t\t$this->assertEquals(2, $result4);\n\t}", "protected function afterAction () {\n\t}", "public function after_insert() {}", "public function after($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function after($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function after_run(){}", "protected function after_foo()\n {\n }", "protected function afterAction() {\n\n }", "public function after($query);", "public function after(\\Closure $callback)\n {\n $this->affirmCallable($callback, \"after\");\n $this->after = $callback;\n }", "public function afterTest(TestCase $t);", "public function after_run() {}", "public function after($callback)\r\n {\r\n // TODO: Implement after() method.\r\n }", "public function after(CommandInterface $command);", "public function hook_after($postdata,&$result) {\n\n\t\t }", "public function hook_after($postdata,&$result) {\n\n\t\t }", "protected function afterInsert()\n {\n }", "public function hook_after($postdata,&$result) {\n\t\t\t\n\t\t }", "public function afterRules(): void\n {\n }", "function after_create() {}", "function udesign_page_content_after() {\r\n do_action('udesign_page_content_after');\r\n}", "protected function getUpdateAfterFunction()\n {\n \n }", "protected function _after() {\n\t\t$this->yumlModelsCreator = null;\n\t\tparent::_after ();\n\t}", "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "protected function afterDispatch(string $method): void\n {\n $this->registerCallback('afterDispatch', $method);\n }", "public function after($callback)\n {\n $this->app['events']->listen('custom.queue.after', $callback);\n }", "public function stopAfter() {\n\t\t// Optional\n\t}", "public function afterUserMethodAdvice()\n {\n }", "public function after($content)\n {\n $this->after = $content;\n\n return $this;\n }", "function after_save() {}", "function afterroute() {\r\n\r\n }", "function udesign_footer_after() {\r\n do_action('udesign_footer_after');\r\n}", "public function afterTest(TestCase $t) {\n // Empty\n }", "public function addCallback($method, $callback, $before = true) {}", "function udesign_blog_entry_after() {\r\n do_action('udesign_blog_entry_after');\r\n}", "public function hook_after($postdata, &$result)\n {\n \n }", "public function hook_after($postdata, &$result)\n {\n \n }", "static function after(){\n\t\t$text = \"\n\t\t\";\n\treturn $text;\n\t}", "function afterroute() {\n\t}", "protected function makeAfterInfo()\n {\n $this->setY($this->getY() + $this->layout['entriesPaddingBottom']);\n $this->renderInfo($this->content['afterInfo'] ?? []);\n }", "public function after(Response $response)\n {\n }", "public function after_update() {}", "protected function _after() {\n\t\t$this->startup = null;\n\t}", "protected function callAfterCallbacks(Application $app)\n {\n foreach ($this->_afterCallbacks as $callback) {\n call_user_func($callback, $app);\n }\n }", "function after_update() {}", "protected function _after(){\n $this->stopApplication();\n }", "protected function afterQueue(string $method): void\n {\n $this->registerCallback('afterQueue', $method);\n }", "public function reactToOnAfterAction($event) { }", "protected function _after() {\n\t\t$this->dao->closeDb ();\n\t}", "function udesign_entry_after() {\r\n do_action('udesign_entry_after');\r\n}", "public function after()\n\t{\t\n\t\tparent::after();\n\t\t\n\t\t/*\n\t\t * Clean up for the presentation\n\t\t */\n\t\t\n\t\t//logout\n\t\t$id = Auth::instance()->get_user()->id;\n\t\tRequest::factory(\n\t\t\t\tRoute::get('default')->uri(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller' \t=> 'user', \n\t\t\t\t\t\t\t\t'action' \t\t=> 'logout',\n\t\t\t\t\t\t\t\t'id' \t\t\t=> Coder::instance()->to_url($id)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t)\n\t\t->execute();\n\t\t//delete user\n\t\t$user = ORM::factory('User', $id);\n\t\t$user->delete();\n\t}", "protected function _after()\n {\n unset($this->_adapter);\n parent::_after();\n }", "public function after()\n {\n m::close();\n }", "public function afterSave()\n {\n\n }", "public static function after($name, $callback) {\n self::$filters['after'][$name][] = $callback;\n }", "protected function after()\n {\n $object = new self($this->routeParams);\n (new Middleware())->middlewares($this->callAfterMiddlewares())\n ->middleware($object, function ($object) {\n return $object;\n });\n }", "function OnAfterApply(){\n }", "public abstract function afterExec();", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function hook_after_add($id) { \n\t //Your code here\n\n\t }", "public function _after(\\AcceptanceTester $I)\n {\n }", "public function afterInsert() {\n\t\t\tparent::afterInsert();\n\t\t\t//$this->pos = 1;\n\t\t\t$this->updatePos(1);\n\t\t}" ]
[ "0.8131647", "0.7950567", "0.77985257", "0.7711803", "0.7711803", "0.7711803", "0.77065855", "0.7621594", "0.7621594", "0.7570001", "0.75496113", "0.75267786", "0.7520458", "0.7478968", "0.7464653", "0.7428816", "0.7285258", "0.7141182", "0.7140441", "0.7140265", "0.7139118", "0.7139118", "0.71091616", "0.71091616", "0.7067753", "0.70662904", "0.7020283", "0.6987166", "0.68881357", "0.6882897", "0.68725145", "0.68125117", "0.6767251", "0.67618704", "0.6708171", "0.6704899", "0.6657797", "0.66444135", "0.65835285", "0.6580769", "0.6553969", "0.65403044", "0.65403044", "0.65400517", "0.6513008", "0.6499334", "0.6315542", "0.6300712", "0.6299554", "0.6233903", "0.62217855", "0.6179734", "0.6110608", "0.6110608", "0.6029622", "0.60130036", "0.60066324", "0.598421", "0.5942726", "0.59413147", "0.5940468", "0.5926157", "0.59195936", "0.5903947", "0.58961445", "0.58874285", "0.5856017", "0.5855218", "0.5849075", "0.584339", "0.58380616", "0.58326125", "0.5828146", "0.58203036", "0.58203036", "0.58152294", "0.58096004", "0.5800014", "0.57826245", "0.5779585", "0.57665247", "0.575847", "0.5741473", "0.5738819", "0.57367814", "0.5723712", "0.5723442", "0.56943214", "0.5692511", "0.5685928", "0.5677445", "0.56683964", "0.56459063", "0.56299835", "0.56225485", "0.56196475", "0.56086475", "0.56086475", "0.55993766", "0.5594156" ]
0.56655526
92
last tail of first array
public function shiftRole($arr){ $first_tail = $arr["head"][0]["tail"]; //first head of last array $last_head = $arr["tail"][0]["head"]; //result first value array $res_first_head = []; //result last value array $res_last_tail = []; //result array $res_arr = []; foreach($arr as $key => $val){ switch ($key) { case "head" : $res_arr = $this->headRole($val[0],$res_arr); break; case "body" : $res = $this->bodyRole($val,$res_arr,$first_tail,$last_head); $res_arr = $res['res_arr']; $res_first_head = $res['res_first_head']; $res_last_tail = $res['res_last_tail']; break; case "tail" : $res_arr = $this->tailRole($val[0],$res_arr); break; } } $res_arr = array_merge($res_first_head,$res_arr); $res_arr = array_merge($res_arr,$res_last_tail); return $res_arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_last($array)\n {\n return arr::last($array);\n }", "static function last(array $array) {\n return end($array);\n }", "function tail(array $list)\n{\n return array_slice($list, 1);\n}", "function asdb_last($array)\n\t{\n\t\treturn end($array);\n\t}", "public function last()\n {\n $copy = $this->array;\n return end($copy);\n }", "public function last()\n {\n return $this->fixedArray->offsetGet($this->currentSize - 1);\n }", "function last ()\n {\n return $this->A ? array_slice ($this->A, -1)[0] : null;\n }", "function last(array $array): mixed\n{\n return $array ? end($array) : null; // No falses.\n}", "function array_last($array)\n{\n if( is_array($array) )\n {\n $keys = array_keys($array);\n if( isset($keys[count($keys)-1]) )\n return $array[$keys[count($keys)-1]];\n }\n return null;\n}", "function array_last($array, $callback, $default = null)\n\t{\n\t\treturn array_first(array_reverse($array), $callback, $default);\n\t}", "public function last($array)\n {\n return end($array);\n }", "public static function last($array) {\n if (count($array) == 0) {\n return null;\n }\n $keys = array_keys($array);\n return $array[$keys[count($keys) - 1]];\n }", "public static function last(array $array)\n {\n return !empty($array) ? end($array): null;\n }", "function arr_end($val = [])\n{\n return end($val);\n}", "public function getLast();", "public function getLast();", "function last(array $list)\n{\n return array_pop($list);\n}", "public function tail(?int $length = null): Base;", "public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }", "public static function LastItem(array $array) {\n\n\t\t\t// Anything?\n\t\t\tif (count($array) == 0) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Return it\n\t\t\treturn $array[count($array) - 1];\n\n\t\t}", "public function peekLast();", "function array_last($array, $callback, $default = null)\n {\n return Arr::last($array, $callback, $default);\n }", "function tail() {\r\n return new self(array_slice($this->list, 1));\r\n }", "public function last(): mixed\n {\n return array_last($this->data);\n }", "public function testLast()\r\n {\r\n self::assertEquals(3, Arr::last([1, 2, 3]));\r\n self::assertEquals('c', Arr::last(['a', 'b', 'c']));\r\n self::assertNotEquals('b', Arr::last(['a', 'b', 'c']));\r\n\r\n self::assertEquals(2, Arr::last([1, 2, 3], function ($value) {\r\n return $value === 2;\r\n }));\r\n self::assertEquals(null, Arr::last([1, 2, 3], function ($value) {\r\n return $value === 20;\r\n }));\r\n\r\n self::assertInternalType('int', Arr::last([1, 2, 3]));\r\n self::assertInternalType('string', Arr::last(['a', 'b', 'c']));\r\n }", "public function last()\n {\n if($this->length()>0)\n {\n return $this->getAt(($this->length()-1));\n }\n throw new \\OutOfBoundsException();\n }", "function headTail(array $list) {\n assert(count($list) > 0);\n \n return [\n $list[0],\n array_slice($list, 1),\n ];\n}", "public function last() {\n\t\tif ($this->isNotEmpty()) {\n\t\t\t$length = $this->length();\n\t\t\t$counter = 1;\n\n\t\t\tforeach ($this->_value as $value) {\n\t\t\t\tif ($counter === $length) {\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\n\t\t\t\t++$counter;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public function last()\n {\n return \\count($this->data) > 0 ? $this->data[\\count($this->data) - 1] : null;\n }", "public function last() { \t\n try{\n if (!is_array($this->Items)) return $this->Items; \t\n if (!count($this->Items)) return null; \t\n end($this->Items); \t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n }\n }", "function array_last($array, callable $callback = null, $default = null)\n {\n return Arr::last($array, $callback, $default);\n }", "public function last() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_pop( $result );\n\t}", "public function last(): mixed;", "public function last(): mixed;", "public function testLast() {\n\t\t$array = array(1, 2, 3, 4, 5);\n\t\t$result = _::last($array);\n\t\t$this->assertEquals(5, $result);\n\n\t\t// test getting the last three elements\n\t\t$result = _::last($array, 3);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(3, $result);\n\t\t$this->assertEquals(3, $result[0]);\n\t\t$this->assertEquals(4, $result[1]);\n\t\t$this->assertEquals(5, $result[2]);\n\t}", "public function last()\n {\n return end($this->_elements);\n }", "final public function getLast() {\n\t\treturn null;\n\t}", "function last(iterable $items)\n{\n if (is_array($items)) {\n return $items[count($items) - 1];\n }\n else {\n foreach ($items as $last);\n return $last;\n }\n}", "public function last()\n {\n return Arr::last($this->items);\n }", "function tail(iterable $collection): array\n{\n return asList(TailOperation::of($collection)());\n}", "public function lastObject()\n {\n return end($this->array);\n }", "function tail($count = 10)\n\t{\n\t\treturn array_slice($this->_data, 0 - $count);\n\t}", "public function last() {\n return end($this->list);\n }", "public function last() {\n if ($this->count >= 1) {\n return $this->items[count($this->items) - 1];\n }\n else\n return null;\n }", "public function getLast()\n\t{\n\t\treturn $this->last;\n\t}", "public function last();", "public function last();", "public function last();", "public function last()\r\n\t{\r\n\t\treturn end($this->_items);\r\n\t}", "function array_key_last( $array ) {\n $key = NULL;\n if ( is_array( $array ) ) {\n end( $array );\n $key = key( $array );\n }\n return $key;\n }", "public function Tail() {\n\t\treturn $this->tail;\n\t}", "public function last()\n {\n return end($this->items);\n }", "public function last()\n {\n return end($this->storage);\n }", "public function getLast ()\n {\n return reset ( $this->_list ) ;\n }", "public function getLastBase() {\n\n if (\n ($bases = $this->getBases())\n && (is_array($bases))\n )\n return $bases[intval(count($bases)-1)];\n //===\n\n\n return NULL;\n //===\n\n }", "public function last()\n {\n foreach (array_reverse($this->lists) as $list) {\n foreach ($list->reverse() as $record) {\n return $record;\n }\n }\n return null;\n }", "public static function last($array, $callback = NULL, $default = NULL)\n {\n if (is_null($callback)) {\n \n if (empty($array)) {\n return $default;\n }\n \n return end($array);\n \n }\n \n return static::first(array_reverse($array, true), $callback, $default);\n \n }", "function last()\r\n {\r\n if ($this->count()>=1)\r\n {\r\n return($this->items[count($this->items)-1]);\r\n }\r\n else\r\n {\r\n return(null);\r\n }\r\n }", "public function lastElement(): string {\n $len = count($this->elements);\n return $len > 0 ? $this->elements[$len - 1] : '';\n }", "public function getLast()\n {\n $this->update();\n $count = sizeof($this->data);\n if (isset($this->data[$count - 1])) {\n return $this->updateValueIfNeeded($this->data, $count - 1);\n }\n return null;\n }", "public function removeLast(){\n $temp = $this->head;\n if(!$this->isEmpty()){\n if($this->tail === $this->head){\n $this->head = $this->tail = NULL;\n }else{\n while($temp->next != $this->tail){\n $temp = $temp->next;\n }\n $temp->next = NULL;\n $this->tail = &$temp;\n }\n }\n }", "public function getLastItem() {}", "public function getLastItem() {}", "public function getLastArguments() {}", "public function lastItem();", "function getArrayLastIndex($arr) {\n\t$result = '';\n\tforeach ($arr as $key => $value) {\n\t\t$result = $key;\n\t}\n\treturn $result;\n}", "public static function trimTail(array $array, int $limit): array\n {\n return self::slice($array, 0, -$limit);\n }", "public function getLastIndex()\n {\n return $this->index - 1;\n }", "public static function getLastIndex(array $array)\n {\n $length = count($array);\n return $length > 0 ? (int) ($length - 1) : null;\n }", "function KeyLastList ( )\n{\n if ( count($this->_dataset) > 0 ) {\n $n = $this->_CurrPtr;\n $this->LastRecord();\n $this->_fetch_current_key_($this->_KeyLastList);\n $this->_CurrPtr = $n;\n }\n return $this->_KeyLastList;\n}", "public function last()\n {\n if (count($this->items)) {\n return end($this->items);\n }\n\n return null;\n }", "public static function last()\n {\n return end(static::$titles);\n }", "public function extractLast(): array\n {\n if (!$this->keyTotal) {\n return [];\n }\n\n $this->keyTotal--;\n\n return array_splice($this->keys, -1);\n }", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "public function last()\n\t{\n\t\treturn parent::last();\n\t}", "function twig_last(Twig_Environment $env, $item)\n{\n $elements = twig_slice($env, $item, -1, 1, false);\n return is_string($elements) ? $elements[0] : current($elements);\n}", "function recent_last($first, $second) {\n\tif ($first[0] == $second[0])\n\t\treturn 0;\n\telse\n \t\treturn ($first[0] < $second[0]) ? -1 : 1;\n}", "public function last()\n {\n $this->cursor = $this->length - 1;\n\n return $this->current();\n }", "public function array_last($array, callable $callback = null, $default = null)\n {\n return Arr::last($array, $callback, $default);\n }", "public function removeLast();", "public function last($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function getAndRemoveLastItem();" ]
[ "0.7111093", "0.6940916", "0.69408154", "0.6937575", "0.68588424", "0.6845268", "0.68448305", "0.68429536", "0.6834951", "0.67404515", "0.672879", "0.6697093", "0.6610664", "0.6454563", "0.64343375", "0.64343375", "0.64109355", "0.6387493", "0.63742244", "0.6287923", "0.628485", "0.62625855", "0.626208", "0.62165105", "0.6184335", "0.61644477", "0.613456", "0.6072324", "0.6050011", "0.6035287", "0.60305053", "0.6030494", "0.6017531", "0.6017531", "0.601746", "0.5990074", "0.5973078", "0.5944884", "0.594065", "0.5932416", "0.59266657", "0.59262156", "0.5919021", "0.5905093", "0.58663476", "0.58441263", "0.58441263", "0.58441263", "0.5841492", "0.5838586", "0.5828207", "0.58222395", "0.58128995", "0.57729226", "0.57551575", "0.5752854", "0.57528126", "0.57525057", "0.5735455", "0.57264966", "0.5719454", "0.56970733", "0.56970733", "0.5686018", "0.5678958", "0.56757927", "0.56668234", "0.566115", "0.56293684", "0.5625008", "0.55958986", "0.5593542", "0.55855733", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.5576169", "0.55377436", "0.55312175", "0.5523807", "0.5522334", "0.5516508", "0.5512774", "0.54692113" ]
0.0
-1
Run the database seeds.
public function run() { // Themes Table Seeder DB::table('themes')->insert([ ['fileName' => "0", 'themeName' => "Flatty"], ['fileName' => "1", 'themeName' => "Cerulean"], ['fileName' => "2", 'themeName' => "Cosmo"], ['fileName' => "3", 'themeName' => "Cyborg"], ['fileName' => "4", 'themeName' => "Darkly"], ['fileName' => "5", 'themeName' => "Journal"], ['fileName' => "6", 'themeName' => "Lumen"], ['fileName' => "7", 'themeName' => "Paper"], ['fileName' => "8", 'themeName' => "Readable"], ['fileName' => "9", 'themeName' => "Sandstone"], ['fileName' => "10", 'themeName' => "Simplex"], ['fileName' => "11", 'themeName' => "Slate"], ['fileName' => "12", 'themeName' => "Solar"], ['fileName' => "13", 'themeName' => "Spacelab"], ['fileName' => "14", 'themeName' => "Superhero"], ['fileName' => "15", 'themeName' => "United"], ['fileName' => "16", 'themeName' => "Yeti"] ]); DB::table('users')->insert([ 'name' => 'saman', 'email' => '[email protected]', 'password' => bcrypt('0019421664'), ]); DB::table('apartments')->insert([ 'code' =>'test', 'manager_name' => 'saman', 'manager_phone' => '09379084098', 'address' => 'lsadkfasudflkajsdf', 'description' => 'asjkdhfkjashdfklhaslkhfd' ]); }
{ "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
Display a listing of showings
public function index(Cinema $cinema) { $startingAfter = $this->getStartingAfter($cinema); $endOfDay = $startingAfter->copy()->endOfDay(); $movieIds = Showing::where('start_time', '>=', $startingAfter->toDateTimeString()) ->where('start_time', '<=', $endOfDay->toDateTimeString()) ->where('cinema_id', $cinema->id)->distinct()->lists('movie_id')->unique(); // There are no movies left for today, try tomorrow (this should be moved to the app in the future) if(!count($movieIds)) { $startingAfter = Carbon::tomorrow(); $endOfDay = $startingAfter->copy()->endOfDay(); $movieIds = Showing::where('start_time', '>=', $startingAfter->toDateTimeString()) ->where('start_time', '<=', $endOfDay->toDateTimeString()) ->where('cinema_id', $cinema->id)->distinct()->lists('movie_id')->unique(); } $movies = Movie::whereIn('id', $movieIds)->with(array('details', 'showings' => function($q) use ($startingAfter, $endOfDay, $cinema) { $q->where('start_time', '>=', $startingAfter->toDateTimeString()); $q->where('start_time', '<=', $endOfDay->toDateTimeString()); $q->where('cinema_id', $cinema->id); }))->orderBy('tomato_meter', 'desc')->get(); foreach($movies as $movie) { // set if they are new // did they have a session 1 week ago? $movie->new = Showing::where('movie_id', $movie->id) ->where('cinema_id', $cinema->id) ->where('start_time', '>', Carbon::today($cinema->timezone)->subDays(7)) ->where('start_time', '<', Carbon::today($cinema->timezone)->subDays(6))->count() == 0; } return Fractal::collection($movies, new MovieTransformer)->responseJson(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Listing $listing)\n {\n //\n }", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listing();", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $shows = Show::orderBy(Config::get('constants.fields.IdField'),'DESC')->paginate(5);\n \n if(empty($shows)){\n\n return view('shows.show') \n -> with('shows', $shows);\n }\n \n return view('shows.show')\n -> with('shows', $shows);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "function listing() {\r\n\r\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "function index() {\n\t\t$this->show_list();\n\t}", "public function show()\r\n\r\n { \r\n $listings = listing::all();\r\n return view('Listing')->withListings($listings);\r\n //dd($listings);\r\n // $Listings = Listing::where('id',$Listings)->first();\r\n\r\n // return view ::make('listing',['Listing'=>$Listings]); \r\n \r\n }", "public function listing() {\r\n $options = get_option( 'myhome_redux' );\r\n $show_advanced = is_null( $options['mh-listing-show_advanced'] ) ? true : intval( $options['mh-listing-show_advanced'] );\r\n $show_clear = is_null( $options['mh-listing-show_clear'] ) ? true : intval( $options['mh-listing-show_clear'] );\r\n $show_sort_by = is_null( $options['mh-listing-show_sort_by'] ) ? true : intval( $options['mh-listing-show_sort_by'] );\r\n $show_view_types = is_null( $options['mh-listing-show_view_types'] ) ? true : intval( $options['mh-listing-show_view_types'] );\r\n $advanced_number = is_null( $options['mh-listing-search_form_advanced_number'] ) ? 3 : intval( $options['mh-listing-search_form_advanced_number'] );\r\n // settings from Listing options page\r\n $atts = array(\r\n 'lazy_loading' => $options['mh-listing-lazy_loading'] ? 'true' : 'false',\r\n 'lazy_loading_limit' => intval( $options['mh-listing-load_more_button_number'] ),\r\n 'load_more_button' => $options['mh-listing-load_more_button_label'],\r\n 'load_prev_button' => $options['mh-listing-load_prev_button_label'],\r\n 'listing_default_view' => $options['mh-listing-default_view'],\r\n 'estates_per_page' => $options['mh-listing-estates_limit'],\r\n 'search_form_position' => $options['mh-listing-search_form_position'],\r\n 'label' => $options['mh-listing-label'],\r\n 'search_form_advanced_number' => $advanced_number,\r\n 'show_advanced' => $show_advanced ? 'true' : 'false',\r\n 'show_clear' => $show_clear ? 'true' : 'false',\r\n 'show_sort_by' => $show_sort_by ? 'true' : 'false',\r\n 'show_view_types' => $show_view_types ? 'true' : 'false',\r\n 'agent_id' => $this->id, // get estates only from this agent\r\n 'map' => false\r\n );\r\n\r\n // prepare attributes\r\n foreach ( My_Home_Attribute::get_attributes() as $attr ) {\r\n $value = $options['mh-listing-' . $attr->get_slug() . '_show'];\r\n $atts[$attr->get_slug() . '_show'] = $value ? 'true' : 'false';\r\n }\r\n\r\n // initiate listing\r\n $listing = new My_Home_Listing( $atts );\r\n ?>\r\n <div class=\"mh-listing--full-width mh-listing--horizontal-boxed\">\r\n <?php $listing->listing(); ?>\r\n </div>\r\n <?php\r\n }", "public function index()\n {\n $listings = Listing::paginate()->random(3);\n return view('Listing',compact('listings'));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Show::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listing() \r\n\t{\r\n\t\t$data['header']['title'] = 'Country listing';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_listing_view';\r\n\t\t$data['view_data'] = $this->country->get();\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}", "public function index() {\n\t\t$shows = Show::all();\n\t\t$title = 'Shows';\n\n\t\treturn view('admin.show.index', compact('shows', 'title'));\n\t}", "public function show($id)\n {\n return view('listings.show')->with('listing', Listing::find($id));\n }", "function showListing ($listType,$sort,$alevel){\n\t\tif($alevel == 0){$aonly = \"AND aonly='0'\";}\n\t\telse if ($alevel == 3){$aonly = \"AND aonly<='1'\";}\n\t\telse{$aonly = '';}\n\t\tif($sort == NULL)\n\t\t{\n\t\t\t$sql = \"SELECT UPPER(SUBSTRING(seriesName,1,1)) AS letter, id, fullSeriesName FROM series WHERE seriesList='$listType' \".$aonly.\"ORDER BY fullSeriesName\";\n\t\t}\n\t\telse {\n\t\t\t$sql = \"SELECT UPPER(SUBSTRING(seriesName,1,1)) AS letter, id, fullSeriesName FROM series WHERE seriesList='$listType' \".$aonly.\"AND category LIKE '%\".mysqli_real_escape_string($conn, $sort).\"%' ORDER BY seriesName\";\n\t\t}\n\t\t$query = mysqli_query ($sql) or die (mysqli_error());\n\t\t$total_rows = mysqli_num_rows($query) or die(\"Error: \". mysqli_error(). \" with query \". $query);\n\t\twhile ($records = @mysqli_fetch_array ($query)) {\n\t\t\t$alpha[$records['letter']] += 1;\n\t\t\t${$records['letter']}[$records['id']] = $records['fullSeriesName'];\n\t\t}\n\t\techo '<div align=\"center\">';\n\t\tforeach(range('A','Z') as $i) {\n\t\t\techo (array_key_exists (\"$i\", $alpha)) ? '<a href=\"#'.$i.'\" title=\"'.$alpha[\"$i\"].' results\">'.$i.'</a>' : \"$i\";\n\t\t\techo ($i != 'Z') ? ' | ':'';\n\t\t}\n\t\techo '</div><br />';\n\t\t// Create Data Listing\n\t\t$countup = 1;\n\t\t$columncount = 1; \n\t\t$col = 2;\n\t\techo \"<div id=\\\"col1\\\">\\n\";\n\t\tfloor($total_rows/3);\n\t\tforeach(range('A','Z') as $i) {\n\t\t\tif (array_key_exists (\"$i\", $alpha)) {\n\t\t\t\techo '\t\t<a name=\"'.$i.'\"></a><h2>'.$i.\"</h2>\\n\";\n\t\t\t\tforeach ($$i as $key=>$value) {\n\t\t\t\t\techo \"\t\t<div>\".checkSeriesWIconsV2($key).\"</div>\\n\";\n\t\t\t\t\t$countup++;\n\t\t\t\t\tif($countup == (floor($total_rows/3)) || $countup == (floor(($total_rows/3)*2)) || $countup == (floor(($total_rows/3)*3)) || $countup == floor(($total_rows/3)*4))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($columncount == 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\techo \"\t\t\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\techo \"\t\t</div>\\n\";\n\t\t\t\t\t\t\tif($columncount == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\techo \"\t\t<div id=\\\"col2outer\\\">\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"\t\t<div id=\\\"col$col\\\">\\n\";\n\t\t\t\t\t\t\t$columncount++;\n\t\t\t\t\t\t\t$col++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\techo \"\t\t<br />\\n\";\n\t\t\t}\n\t\t}\n\t\techo '</div></div></div>';\n\t}", "public function travelListing() {\n\t\t$pageTitle = 'Travel Listing';\n\t\t$this->viewBuilder()->setLayout('homelayout');\n\t\t$this->loadModel('Travels');\n\n\t\t$travels = $this->Travels->find()->where(['Travels.published' => 1])->order(['Travels.created' => 'DESC'])->limit(3)->all();\n\n\t\t$this->set(compact('pageTitle', 'travels'));\n\t}", "public function index()\n {\n return view('listings.index');\n }", "public function listing() {\n check_access($this->session->userdata('role_id'),3);\n \n $data = array();\n $data['title'] = \"Day Listings\";\n $data['content'] = \"admin/dayopenclose/listing\";\n $this->load->view(ADMIN_BODY, $data);\n }", "public function index()\n {\n $categories = Category::with('parent')->get();\n return view('listings.index');\n }", "public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\n\n\t\tif ( $singular ) {\n\t\t\t$data_attr = \" data-wp-lists='list:$singular'\";\n\t\t}\n\n\t\t$this->display_tablenav( 'top' );\n\n?>\n<div class=\"wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>\">\n<?php\n\t$this->screen->render_screen_reader_content( 'heading_list' );\n?>\n\t<div id=\"the-list\"<?php echo $data_attr; ?>>\n\t\t<?php $this->display_rows_or_placeholder(); ?>\n\t</div>\n</div>\n<?php\n\t\t$this->display_tablenav( 'bottom' );\n\t}", "public function show($id)\n {\n $listing = Listing::find($id);\n return view('listings.show')->withListing($listing);\n }", "public function show($id)\n {\n $listing = Listings::find($id);\n \n //OLD way of doing it\n // $listings = Listings::where('id', $id)->get(); \n //should only be one result!\n //$listing = $listings[0];\n\n\n return view('listings.show', compact('listing'));\n\n }", "function Index($f3,$params) {\n $db_show = new DB\\SQL\\Mapper($f3->get('DB'), 'shows');\n // virtual fields for some additional metadata\n $db_show->episode_count = 'SELECT count(*) FROM episodes WHERE episodes.show_id = shows.show_id';\n $db_show->category_name = 'SELECT category_name FROM categories WHERE categories.category_id = shows.category_id';\n $db_show->category_group = 'SELECT category_group FROM categories WHERE categories.category_id = shows.category_id';\n\n // get data for display from the database\n $f3->set('shows', $db_show->find(\n array('active IS TRUE'), // filter\n array('order' => 'title') // sorting\n ));\n\n $this->RenderPage('show/index.htm', 'Shows', 'Show Directory');\n }", "public function listDisplay() {\n $stores = Store::orderBy('created_at','desc')->get();\n\n return view('home.storeList')\n ->with('stores',$stores);\n }", "public function index()\n {\n $tvshows = Tv_show::orderBy('title', 'asc')->paginate(10);\n if(empty($tvshows)){abort(404);}\n return view('tvshow.index')->with('tvshows', $tvshows);\n }", "public function show(Listing $listing)\n {\n return $listing;\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Media list';\t\t\r\n\t\treturn $this->renderWith(array('Media_printresults','Print'));\r\n\t}", "public function showall()\n {\n }", "public function showAll()\n {\n }", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function index()\n {\n return view('showtimes.index', [Showtime::paginate(6)]);\n }", "public function index()\n {\n\t\t// $offers = listing::where('id', '=', '4')->take(1)->get();\n\t\t//les 4 derniers\n\t\t// $recents= listing::take(4)->orderBy('id','asc')->get();\n\t\t// return view('offre', compact('recents', 'offers'));\n \n }", "public function index()\n {\n $data = array(\n \"dispensers\" => Dispenser::with(\"stations\")->get(),\n );\n return view(\"dispensers.index\", compact('data'));\n }", "public function store_trunkshows_list($store_id)\n\t{\n\t\t$data['event_list']=$this->tbl_trunkshows->get_many_by('store_id',$store_id);\n\t\t$data['store_details']=$this->store->select('store_name')->get($store_id);\n\t\t$data['page']='Event And Trunk Shows';\n\t\t$view = 'Admin/trunkshows/Admin_storewise_trunkshows_list';\n\t\techo Modules::run('Template/admin_template', $view, $data);\t\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function showList(): void\n {\n \n $admin = filter_input(INPUT_GET, 'admin');\n $type = (isset($admin)) ? 'admin' : 'front';\n \n $path = 'posts-list';\n \n switch($type)\n {\n case 'front':\n $pageTitle = 'News';\n $condition = 'status = '.self::STATUS_APPROVED.' AND publication_date <= NOW()'; // only approved and published posts\n $order = 'publication_date DESC';\n $filter_com = true; // count only approved comments in getComments function\n break;\n case 'admin':\n $this->checkAccess(); // redirect to login page if not connected\n $pageTitle = 'Gérer les posts';\n $condition = '1 = 1';\n // If user is not admin, he can only see his own posts\n if(!($this->isAdmin())) $condition = 'author = '.$_SESSION['user_id'];\n $order = 'last_update_date DESC';\n $filter_com = false; // count all comments (= approved or not) in getComments function\n break;\n }\n\n $posts = $this->model->findAll($condition, $order);\n\n foreach ($posts as $post)\n { \n $post->nb_comments = $post->getComments($filter_com, true); // get the number of comments on the post (only approved ones in public list)\n }\n\n $this->display($type, $path, $pageTitle, compact('posts'));\n }", "public function showAll() {\n $qry = $this->db->prepare('SELECT DISTINCT NAME,ADDRESS,SUBURB,LATITUDE,LONGITUDE FROM n8598177.items;');\n $qry->execute();\n foreach ($qry as $hotspot) {\n include('server/includes/recentReview.tpl.php');\n }\n }", "public function store_trunkshows_list($store_id)\n\t{\n\t\t$data['event_list']=$this->tbl_trunkshows->get_many_by('store_id',$store_id);\n\t\t$data['store_details']=$this->store->select('store_name')->get($store_id);\n\t\t$data['page']='Event And Trunk Shows';\n\t\t$view = 'admin/trunkshows/admin_storewise_trunkshows_list';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function show(ListingImage $listingImage)\n {\n //\n }", "public function index()\n {\n //$bookings = Booking::orderBy('title', 'desc')->get();\n $bookings = Booking::orderBy('created_at', 'desc')->paginate(10);\n return view('bookings.index')->with('bookings', $bookings);\n }", "public function index()\n {\n $films = Film::orderBy('created_at', 'desc')->paginate(9);\n\n return view('admin.list', [\n 'films' => $films\n ]);\n }", "public function get_shows($queryargs = array()) {\n $query = \"/shows/\";\n return $this->get_list_data($query, $queryargs);\n }", "public function index()\n {\n $bans = Ban::join('adkats_records_main', 'adkats_bans.latest_record_id', '=', 'adkats_records_main.record_id')\n ->join('tbl_server', 'adkats_records_main.server_id', '=', 'tbl_server.ServerID')\n ->join('tbl_games', 'tbl_server.GameID', '=', 'tbl_games.GameID')\n ->orderBy('ban_startTime', 'desc')->paginate(200);\n\n View::share('title', 'Ban Listing');\n\n $this->layout->content = View::make('admin.adkats.bans.banlist')->with('bans', $bans);\n }", "public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }", "public function render()\n {\n if(request()->has('search-listing')){\n $search = request()->get('search-listing');\n $listings = Listing::where('title', 'like', '%'.$search.'%')->\n orWhere('status', 'like', '%'.$search.'%')->\n orWhere('breed', 'like', '%'.$search.'%')->paginate(20);\n }else{\n $listings = Listing::all();\n }\n \n return view('components.admin-listings-table')->with('listings', $listings);\n }", "public function index()\n {\n $tvShows = TvShow::all();\n return view(\"tvshows.index\", [\n \"tvShows\" => $tvShows\n ]);\n }", "public function showList() {\n\t \treturn 0;\n\t }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function show()\n {\n //\n $building = building::get();\n return view::make('building.List', compact('building'));\n }", "public function show(Listing $listing)\n {\n return view('listings.show', compact('listing'));\n }", "public function show(Listing $listing)\n {\n return view('listings.show', compact('listing'));\n }", "public function show(Shelf $shelf)\n {\n //\n }", "public static function shows ( $req ) {\n\t\t//$section = \"\";\n\t\t//$sub_section = \"shows\";\n\t\t\n\t\t//$options = array( \n\t\t//\t\"user_id\" => User::$user_id, \n\t\t//\t\"data\" => 1,\n\t\t//\t\"channel_id\" => $req['id'],\n\t\t//\t\"nosegments\" => \"1\",\n\t\t//\t\"data\" => \"1\", \n\t\t//\t\"date_range\" => \"month\",\n\t\t//\t\"fav_user_id\" => User::$user_id,\n\t\t//\t\"limit\" => \"1000\", \"offset\" => \"0\" );\n\t\t\n\t\t//global $header_block;\n\t\t//$header_block = \"<link rel=\\\"stylesheet\\\" href=\\\"/static/css/v2/feed_view.css\\\" type=\\\"text/css\\\" media=\\\"screen\\\" charset=\\\"utf-8\\\">\";\n\t\t\n\t\t//$data = Feed::find_blog_data($options);\n\t\t$req['section'] = \"home\";\n\t\t$req['sub_section'] = \"shows\";\n\t\t//$req['get_public'] = true;\n\t\t\n\t\tself::_default( $req );\n\t\t\n\t\t\n\t}", "public function showAll(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'order' => array('Task.created_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}", "public function index()\n {\n\n $farms = \\App\\Farm::withCount('harvests')\n ->where('crops_owned', '>', 0)\n ->orderBy('bitcorn_owned', 'desc')\n ->paginate(3);\n\n return view('home', compact('farms'));\n }", "function display_shows ( $postID, $numPosts = 4, $topSeller = false, $offset = 0, $mobile = false ) {\n // what parameters might we need?\n\n if ( $_POST && isset($_POST['showData']) ) {\n\n $numPosts = 4;\n $topSeller = false;\n\n $postID = $_POST['showData']['postID'];\n $offset = $_POST['showData']['offset'];\n }\n\n // grab array of show IDs\n $showIDs = get_post_meta( $postID, 'shows', true );\n\n\n // establish total possible size of result set, use this to modulate offset\n $totalShows = count( $showIDs );\n /*echo \"Total possible shows is $totalShows <br />\";\n echo \"Current offset is $offset <br />\";\n echo \"Requested number of shows is $numPosts <br />\";*/\n\n // logic to set next and previous nav offset values\n if ( $numPosts < $totalShows) {\n //echo \"Requested less than total<br />\";\n if ( $offset == 0 ) {\n // We're at the beginning of the list\n $prevOffset = 0;\n $nextOffset = 1;\n //echo \"Offset is zero, previous is $prevOffset and next is $nextOffset <br />\";\n }\n if ( $offset+$numPosts == $totalShows ) {\n // We've hit the end of the list\n $nextOffset = $offset;\n $prevOffset = $offset - 1;\n //echo \"End of list reached, previous is $prevOffset and next is $nextOffset <br />\";\n }\n if ( $offset+$numPosts < $totalShows && $offset != 0 ) {\n $nextOffset = $offset + 1;\n $prevOffset = $offset - 1;\n //echo \"We're in the middle of the list, previous is $prevOffset and next is $nextOffset <br />\";\n }\n }\n\n // grab Show objects\n $args = array (\n \"include\" => $showIDs,\n \"post_type\" => \"show\",\n \"posts_per_page\" => $numPosts,\n \"offset\" => $offset\n );\n if ( $topSeller ) {\n $args[ 'meta_key' ] = 'top_seller';\n $args[ 'meta_value' ] = 1;\n }\n // check if city option is selected. If so, use its \"shows\" post meta array to add that limit to the query\n if ( MICRO_SHOWS != \"\" ) {\n $args['post__in'] = theme_arr(\"shows\");\n }\n\n $shows = get_posts( $args );\n\n if ( $mobile ) {\n return array( \"shows\" => $shows );\n }\n\n /*echo \"<pre>\";\n print_r( $shows );\n echo \"</pre>\";*/\n\n // start building out $html\n $cntr = 1;\n $html = \"<div class='show-list'>\";\n $html .= \"<input type='hidden' id='post-id' value='\" . $postID . \"' />\";\n // add previous shows nav\n if ( $totalShows > $numPosts ) {\n if ( $prevOffset == 0 && $nextOffset != 2 )\n $html .= '<div style=\"filter:grayscale(100%)\">';\n \n $html .= \"<a id='prev-shows-btn' ><input id='prev-shows-offset' value='\" . $prevOffset . \"' type='hidden' /><img src='\" . get_template_directory_uri() . \"/library/assets/icons/dotted-arrow.png' class='show-list-nav' /></a>\";\n if ( $prevOffset == 0 && $nextOffset != 2 )\n $html .= \"</div>\";\n }\n foreach ( $shows as $show ) {\n if ( $cntr > $numPosts )\n break;\n $html .= \"<div class='show-list-item'>\";\n $html .= \"<a href='\" . get_permalink( $show ) . \"'>\";\n $html .= \"<div class='show-poster dropshadow'>\";\n if ( has_post_thumbnail( $show ) ) {\n $html .= get_the_post_thumbnail( $show, 'small' );\n } else {\n $html .= \"<img src='\" . get_template_directory_uri() . \"/library/assets/placeholder.jpg' class='placeholder' />\";\n }\n $html .= \"</div></a>\";\n $html .= \"<div class='show-title'><a href='\" . get_permalink( $show ) . \"'>\" . $show->post_title . \"</a></div>\";\n $html .= \"<a href='\" . get_permalink( $show ) . \"' ><div class='buy-tickets'>Buy Tickets</div></a>\";\n $html .= \"</div>\";\n $cntr++;\n }\n // add next shows nav\n if ( $totalShows > $numPosts ) {\n if ( $nextOffset == $offset ) \n $html .= '<div style=\"filter:grayscale(100%)\">';\n\n $html .= \"<a id='next-shows-btn' ><input id='next-shows-offset' value='\" . $nextOffset . \"' type='hidden' /><img src='\" . get_template_directory_uri() . \"/library/assets/icons/dotted-arrow.png' class='show-list-nav' /></a>\";\n if ( $nextOffset == $offset )\n $html .= \"</div>\";\n }\n $html .= \"</div>\";\n\n // finally, let's echo out $html\n echo $html;\n\n if( $_POST && isset($_POST['showData']) ) {\n wp_die();\n }\n}", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function showIndex()\n\t{\n\n\t\t//var_dump(Parser::GetRazdely());\n\n\t\t//var_dump(Parser::getCarPost('prodam-mikroavtobus-26483298'));\n\n\t\t//var_dump(Parser::getPosts('realty/sell_flats', 5));\n\n\t\t//var_dump(Parser::getPosts('auto/sale', 5, 5));\n\n\t\tvar_dump(Parser::getPosts('free', 4, 1, 10));\n\t}", "public function index()\n {\n return new ShowtimeCollection(ShowtimeRepository::getAll());\n }", "public function index()\n {\n return View('admin.bookings.index', [\n 'bookings' => $this->bookingRepository->orderBy('created_at', 'DESC')->paginate(),\n 'active' => 'bookings_all',\n ]);\n }", "function _syndicated_content_listings_page()\n{\n}", "public function showGigs() {\n $page = isset($_POST['page']) ? intval($_POST['page']) : 1;\n $gigs = $this->db->getPaginated('gigs', $page);\n $this->view->set('gigs', $gigs);\n $this->view->show('gig/list');\n $this->view->render('html');\n }", "public function index()\n {\n\n\n if (Auth::user()) {\n $listings = Listing::where('user_id', Auth::user()->id)\n ->orderBy('name')\n ->get();\n\n return view('listings', [ 'listings' => $listings ]);\n }\n\n else {\n return back()->with('message', \"Please login to see your Listings\");\n }\n\n\n }", "public function index ()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n //objekte in ein array\n $list = $dbHandler->getRestaurants();\n $view = new View\\ShowRestaurant();\n $view->setVars($list);\n //echo $view->render();\n $view->show($view);\n }", "public function index ()\n {\n\n $shows = Show::orderBy('airstamp', 'asc')->get();\n \t\n return view('welcome', [\n 'shows' => $shows\n ]);\n }", "public function listing()\n {\n\t$special_abilities = SpecialAbility::all()->sortBy('name'); \n\t\n return view('special_abilities.list', ['special_abilities' => $special_abilities]);\n }", "public function index()\n {\n return view('home', [ 'spacecrafts' => Spacecraft::search(request([ 'name', 'class', 'status' ])) ]);\n }", "public function showIndex()\n\t{\n $menuItems = Category::orderBy('category_name', 'ASC')->whereparent_id(NULL)->get();\n $menu = $this->drawMenu($menuItems);\n\n $products = Product::orderBy('created_at', 'DESC')->take(12)->get();\n $featured = Product::orderBy('featured', 'DESC')->first();\n\n\t\treturn View::make('catalog')\n ->with('menu', $menu)\n ->with('products', $products)\n ->with('featured', $featured);\n\t}", "public function index()\n {\n $overviews = FeatureOverview::where('status',1)->paginate(5);\n return view('admin.feature_overview.List',compact('overviews'));\n }", "public function index()\n {\n $shows = array('Doctor Who', 'Deadliest Catch', 'Alaska Gold', 'Prison Break', 'Broadchurch');\n\n return Response::json($shows);\n }", "public function index()\n\t{\n\t\t$bookings = Booking::all();\n\n\t\treturn View::make('bookings.index', compact('bookings'));\n\t}", "public function index()\n {\n $playlists = Playlist::with(['murotal_reciter_surah_playlists' , 'murotal_reciter_surah'])->orderBy('name', 'asc')->get();\n return view('playlists.index',compact('playlists'))->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function showList()\n {\n // Get posts datas\n $postList = $this->currentModel->getListWithAuthor();\n // Loop to find any existing comments attached to each post\n for ($i = 0; $i < count($postList); $i ++) {\n // Retrieve (or not) single post comments\n $postComments = $this->currentModel->getCommentListForSingle($postList[$i]->id);\n // Comments are found for a post.\n if ($postComments != false) {\n // Add temporary param \"postComments\" to object\n $postList[$i]->postComments = $postComments;\n }\n // Retrieve single post images\n $postImages = $this->currentModel->getImageListForSingle($postList[$i]->id);\n // Images are found for a post.\n if ($postImages != false) {\n // Add temporary param \"postImages\" to object\n $postList[$i]->postImages = $postImages;\n }\n }\n $varsArray = [\n 'metaTitle' => 'Posts list',\n 'metaDescription' => 'Here, you can follow our news and technical topics.',\n 'imgBannerCSSClass' => 'post-list',\n 'postList' => $postList\n ];\n echo $this->page->renderTemplate('Blog/Post/post-list.tpl', $varsArray);\n }", "public function index()\n {\n $stations = Station::paginate(20);\n return view('stations.index')->withStations($stations);\n }", "public function index()\n\t{\n\t\n\t\t$offers = Laramill::getListOffer();\n\t\t\n\t\treturn View::make('offers.index')->with( array( 'offers' => $offers ) );\t\n\t}", "function lists()\n {\n $data[\"data\"] = $this->RapatModel->get();\n $this->load->view('rapat/lists', $data);\n }", "public function index()\n {\n $grid = new Grid(Song::query()->with('singer'), 'Song');\n\n $grid->fields([\n 'id' => 'ID',\n 'title' => 'Title',\n 'slug' => 'Slug',\n 'singer_id' => 'Singer',\n 'hit' => 'Hit',\n 'status' => 'Status'\n ])->processLine(function($row){\n $row['status'] = Song::$statuses[$row['status']];\n $row['singer_id'] = $row['singer']['name'];\n\n return $row;\n })->defaultOrder(['id', 'DESC'])\n ->allowExport(false)\n ->action('Edit', 'song/{id}/edit')\n ->action('Delete', 'song/{id}', [\n 'confirm' => 'Do you with so continue?',\n 'method' => 'DELETE',\n ]);\n\n return view('admin.song.index', ['grid' => $grid]);\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function index() {\n // Get also the room type data for the room\n // Get also the name for the user from each booking\n $bookings = Booking::with( [ 'room.roomType', 'users:name' ] )->paginate( 20 );\n\n return view( 'bookings.index' )->with( 'bookings', $bookings );\n }", "public function index()\n {\n\n $film = Films::query();\n $film->latest();\n if (request()->has(\"search\") && strlen(request()->query(\"search\")) >= 1) {\n $film->where(\n \"films.name\", \"like\", \"%\" . request()->query(\"search\") . \"%\"\n );\n }\n $counter = 1;\n $pagination = 5;\n $film = $film->paginate($pagination);\n if( request()->has('page') && request()->get('page') > 1){\n $counter += (request()->get('page')- 1) * $pagination;\n }\n\n $genre = Genres::all();\n $studio = Studios::all();\n return view('film',\n compact('film',\n 'genre',\n 'studio',\n 'counter'\n ));\n }", "public function showBookings()\n {\n return $this->render('account/bookings.html.twig');\n }", "public function index()\n {\n return Listing::all();\n }", "function property_showings(){\n $post_id= $this->uri->segment(3);\t\t\n\t\t\t $p_id = base64_decode( urldecode( $post_id ));\n\t\t\t $all_showings = $this->InteractModal->count_showing_logs( $p_id );\n\t\t\t $pagedata['all_showings']= $all_showings ;\n\t\t\t $this->load->view('dashboard/header');\n\t\t\t $this->load->view('dashboard/view_more_properties',$pagedata);\n\t\t\t $this->load->view('dashboard/footer'); \n\t\t\t\n\t\t}", "public function index()\n {\n $items = Afisha::activeWithPlaces();\n\n return view('afisha.index', compact('items'));\n }", "public function showItemsToSell(){\n $data = $this->getListing();\n\n return view('sales.show-items')->with(['listing' => $data]);\n }", "function Display($f3,$params) {\n $show_id = $params['show_id'];\n $db_show = new DB\\SQL\\Mapper($f3->get('DB'), 'shows');\n $db_episode = new DB\\SQL\\Mapper($f3->get('DB'), 'episodes');\n\n /* some virtual fields for showing foreign key data with some nice values\n * instead of keys, as well as some additional metadata about the show\n */\n $db_show->license_description = 'SELECT description FROM licenses WHERE licenses.license_id = shows.license_id';\n $db_show->category_name = 'SELECT category_name FROM categories WHERE categories.category_id = shows.category_id';\n $db_show->category_group = 'SELECT category_group FROM categories WHERE categories.category_id = shows.category_id';\n $db_show->episode_count = 'SELECT count(*) FROM episodes WHERE episodes.show_id = shows.show_id';\n $db_episode->download_count = 'SELECT download_count FROM media WHERE media.media_id = episodes.media_id';\n\n // query the database and validate the result\n $db_show->load(array('show_id=?', $show_id));\n if ($db_show->dry())\n $f3->error(404, 'Unable to find that show, sorry!');\n $f3->set('show', $db_show->cast());\n\n // convert the media_id to a url for rendering on the html page output\n $f3->set('cover_art_url', $this->GetMediaURLByID($db_show->cover_art_id));\n\n // load episode data for this show\n $f3->set('episodes', $db_episode->find(\n array('show_id=?', $show_id), // filter\n array('order'=>'publish_ts DESC') // sorting\n ));\n\n $this->RenderPage('show/display.htm', $db_show->title);\n }", "public function stores_list()\n\t{\n\t\t$data['store_list']=$this->store->get_all();\n\t\t$data['page']='Store List';\n\t\t$view = 'admin/stores/admin_store_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n\t\t$allowed_cols = array('created_at'); \n\t\t\n\t\t// default column to sort 'created_at'\n\t\t$sort = in_array(Input::get('sort'), $allowed_cols) ? Input::get('sort') : 'created_at'; \n\t\t\n\t\t// default order 'desc'\n\t\t$order = Input::get('order') === 'asc' ? 'asc' : 'desc';\n\n\t\t// sort & paginate\n\t\t$entries = Offer::orderBy($sort, $order)->paginate(10);\n\t\t\n\t\treturn \\View::make('admin.offers.index')->with(array('entries' => $entries, 'sort' => $sort, 'order' => $order));\n }", "function show_restaurants()\n \t{\n\t\t\t$conn = connect_to_server();\n\t \t\t$sql = \"SELECT nazev, id_provozovna FROM Provozovna;\";\n\t \t\t\n\t \t\tif ($result = $conn->query($sql))\n\t \t\t\t// output data of each row\n\t\t \t\twhile($row = $result->fetch_assoc()) {\n\t\t \techo \"<a href=\\\"projekt.php?show_food_list=\". $row[\"id_provozovna\"]. \"\\\">\". $row[\"nazev\"]. \"</a><br>\";\n\t\t \t}\n\t\t}", "public function index()\n {\n \n //with caching\n /*\n $listings = Cache::remember('listings', 2, function () {\n return Listings::all();\n }); */\n \n $listings = Listings::where('user_id', Auth::user()->id )->get(); \n\n \n //WORKED!\n return view('listings.index', compact('listings'));\n\n // return view('pages.listings', $listings);\n // return view('pages.listings')->with($listings);\n //return View::make('pages.listings', $listings);\n \n }", "function mediaPage()\n{\n\n $search = isset($_GET['title']) ? $_GET['title'] : null;\n $medias = Media::showMedias(null, \"SELECT title,trailer_url,release_date,type,season_series FROM media GROUP BY title ORDER BY release_date DESC\");\n $AllType = Media::getTypeOfShow();\n require('view/mediaListView.php');\n}", "public function index()\n\t{\n\t\t$stations = Station::paginate(9);\n\t\t$branches = DB::table('branches')->get();\n\t\t$branches_id = DB::table('branches')\n\t\t->lists('branch_name', 'id');\n\n\t\treturn View::make('stations.index', compact('stations'))\n\t\t->with('stations', $stations)\n\t\t->with('branches', $branches)\n\t\t->with('branches_id', $branches_id);\n\t}", "public function show()\n {\n $offset = Input::get('offset');\n $news = App\\News::latest('created_at')->skip($offset)->take(6)->get();\n \\DB::table('news')->count() > 7 + $offset ? $hide = false : $hide = true;\n foreach ($news as $item){\n $item['url'] = IndexController::translitURL($item['title']);\n $item['created'] = IndexController::restyleDate($item['created_at']);\n }\n return ['news' => $news, 'hide' => $hide];\n }", "public function story_list()\n\t{\n\t\t$data['page']='Story List';\n\t\t$data['stories_list']=$this->stories->get_all();\n\t\t$view = 'admin/stories/admin_stories_list_view';\n\t\techo Modules::run('template/admin_template', $view, $data);\t\n\t}", "public function index()\n {\n $categories = Category::withCount('listings')->get();\n\n return view('category.index')->with('categories', $categories);\n }", "public function show(AnesthesiaList $anesthesiaList)\n {\n //\n }" ]
[ "0.7427381", "0.7295781", "0.7233856", "0.70804", "0.70496756", "0.6984542", "0.69112945", "0.68775874", "0.6847938", "0.68263924", "0.6690762", "0.6681035", "0.66565746", "0.66407114", "0.6623656", "0.6612671", "0.6611816", "0.6561395", "0.65363634", "0.6479455", "0.646418", "0.646267", "0.6461945", "0.64565825", "0.6455327", "0.6433762", "0.64235955", "0.64079577", "0.63998955", "0.6395073", "0.6386874", "0.63624775", "0.6348845", "0.63472927", "0.63399273", "0.63363445", "0.63214415", "0.6319494", "0.63173455", "0.63163245", "0.6309679", "0.63013846", "0.6301208", "0.62885255", "0.62707317", "0.6270423", "0.62655413", "0.6258046", "0.624941", "0.62472016", "0.6245231", "0.6244882", "0.6235387", "0.6227188", "0.6227188", "0.6225668", "0.6221421", "0.6215864", "0.6203757", "0.6192576", "0.6179245", "0.61755615", "0.61660457", "0.6165779", "0.61654514", "0.6163723", "0.6161856", "0.61599183", "0.6158106", "0.6145064", "0.61445993", "0.61415404", "0.6130992", "0.6130208", "0.6120332", "0.6118966", "0.6112701", "0.6109897", "0.6109723", "0.6104493", "0.61016464", "0.6099688", "0.6097923", "0.60973024", "0.6094727", "0.60920197", "0.60903907", "0.60860825", "0.60854524", "0.6082755", "0.60657156", "0.606434", "0.60639983", "0.60617024", "0.60578823", "0.60578424", "0.6057498", "0.60566825", "0.6053814", "0.6050856", "0.60474044" ]
0.0
-1
Returns the field name for the type of work.
public static function workType(): string { return 'type'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_field_name();", "public function getFieldName()\r\n\t{\r\n\t\treturn $this->name;\r\n\t}", "public function getFieldName() {}", "public function getFieldName()\n {\n return $this->fieldName;\n }", "public function getFieldName()\n {\n return $this->fieldName;\n }", "public function getFieldName()\n {\n return $this->fieldName;\n }", "public function getFieldName() {\n return $this->fieldName;\n }", "public function getFieldName($field) {\n return $field['name'];\n }", "public function getFieldName() {\r\n return $this->_fieldName;\r\n }", "public function getName()\n {\n return $this->__get(self::FIELD_NAME);\n }", "public function getField(): string\n {\n return $this->field;\n }", "public function name($field) {\n\t\treturn $field;\n\t}", "public function getFieldName(): float|int|string|null\n {\n return $this->field?->getFieldName();\n }", "public function fieldName()\n\t{\n\t\tif(strpos($this->key, '_id'))\n\t\t{\n\t\t\treturn str_replace('_id', '', $this->key);\n\t\t}\n\n\t\treturn $this->key;\n\t}", "public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}", "function getName () {return $this->getFieldValue ('name');}", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "function get_fields_name()\n\t{\n\t\treturn $this->db->list_fields( $this->table );\n\t}", "function getFieldName($n){\n\t\t$field = $this->fields[$n]['Field'];\n\t\treturn $field;\n\t}", "public function getTypeName()\n {\n return $this->type_name;\n }", "function get_field_name( $str ){\n\t\treturn 'field-'.$this->id_base.'['.$this->number.']['.$str.']';\n\t}", "public function getName(){ return $this->getField('name'); }", "public function getName(): string {\n\t\t\treturn $this->type;\n\t\t}", "public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}", "public function getTypeName()\n {\n return $this->type->getName();\n }", "function hc_field_name($field){\n\t\techo hc_get_field_name($field);\n\t}", "public function getIdFieldName()\n {\n return $this->prototype->getIdFieldName();\n }", "function getFieldType() {\n\t\treturn 'field';\n\t}", "public function get_name() {\n\n\t\treturn $this->post_type_name;\n\t}", "public function get_field_name($name)\n {\n if( ! $this->_model)\n {\n return $name;\n }\n return $this->get_model()->get_field_name($name);\n }", "public function getRecordIdFieldName()\n {\n $metadata = $this->exportMetaData();\n $recordIdFieldName = $metadata[0]['field_name'];\n return $recordIdFieldName;\n }", "public function getDbFieldName($field_name);", "public function get_field_name($field_name)\n {\n }", "public function getField()\n {\n $value = $this->name;\n if (null != $this->field) {\n $value = $this->field;\n }\n return $value;\n }", "function fieldname($fieldnum) {\r\n\t\treturn @mysql_field_name( $this->result, $fieldnum );\r\n\t}", "public function __getClassName($type){\n\t\t\treturn 'field' . $type;\n\t\t}", "public function getIdFieldName()\n {\n return $this->_idFieldName;\n }", "public function field_name( $qHanle, $offset )\r\n\t{\r\n\t\treturn $qHanle->Fields( $offset )->Name;\r\n\t}", "public function getFieldNameByBaseType($base_type)\n {\n $this->getTableInfo();\n $field = null;\n if (isset($this['fields'])) {\n if (isset($this['fields'][$base_type])) {\n $field = $base_type;\n }\n foreach ($this['fields'] as $v) {\n if (isset($v['base_type']) && $v['base_type'] == $base_type) {\n $field = $v['field_name'];\n break;\n }\n }\n }\n \n return $field;\n }", "public function getField(): string;", "public static function __getClassName($type)\n {\n return 'field' . $type;\n }", "public function getFieldName(): ?string\n {\n return $this->getOption('fieldname');\n }", "protected function getTypeName(): string\n {\n if (isset($this->typeName)) {\n return $this->typeName;\n }\n\n return $this->getModelNameBasedOnClassName();\n }", "private function getFieldTypeName(FormBuilder $field)\n {\n return get_class($field->getType()->getInnerType());\n }", "public function getName() \n { \n return $this->getType().\"_\".substr(md5(implode($this->getParameters())), 0, 20);\n }", "public abstract function getProjectFieldName();", "function acf_get_field_type_label($name = '')\n{\n}", "public function getDisplayNameSourceField(): string\n {\n switch ($this->getDisplayNameSourceFieldConf()) {\n case self::INHERIT:\n $type = $this->Type();\n // ID check to prevent infinite recursion since type returns itself as its type\n if ($type && $type->exists() && $type->ID !== $this->ID) {\n return $type->getDisplayNameSourceField();\n }\n\n return 'Title';\n case self::SINGULAR:\n return 'Title';\n case self::PLURAL:\n return 'TitlePlural';\n case self::CUSTOM:\n return 'TitleCustom';\n default:\n return 'Title';\n }\n }", "public function getTypeName()\n {\n return $this->TypeName;\n }", "public function getName() {\n static $name;\n\n if (empty($name)) {\n $name = uniqid($this->field->name . '-');\n\n $matches = array();\n preg_match('/([a-z0-9]{1,})$/i', $_FILES['file']['name'], $matches);\n if (isset($matches[0])) {\n $name .= '.' . $matches[0];\n }\n }\n\n return $name;\n }", "public function get_name() {\n return get_string('pluginname', 'forumngtype_' . $this->get_id());\n }", "public function getTitleFieldName($objectType)\n {\n if ($objectType == 'branch') {\n return 'name';\n }\n if ($objectType == 'location') {\n return 'name';\n }\n if ($objectType == 'part') {\n return 'name';\n }\n if ($objectType == 'imageOfLocation') {\n return 'name';\n }\n if ($objectType == 'fileOfLocation') {\n return 'name';\n }\n if ($objectType == 'offer') {\n return 'name';\n }\n if ($objectType == 'menuOfLocation') {\n return 'name';\n }\n if ($objectType == 'partOfMenu') {\n return 'name';\n }\n if ($objectType == 'dish') {\n return 'name';\n }\n if ($objectType == 'event') {\n return 'name';\n }\n if ($objectType == 'product') {\n return 'name';\n }\n if ($objectType == 'specialOfLocation') {\n return 'name';\n }\n if ($objectType == 'serviceOfLocation') {\n return 'name';\n }\n if ($objectType == 'abonnement') {\n return 'name';\n }\n \n return '';\n }", "function getLabelField()\n {\n return 'person_fname';\n }", "public function getTypeName()\n {\n return BalanceOperations::typeName($this->type_id);\n }", "public function getName($type) {\n return $this->load($type)->getName();\n }", "private function getPropertyName(): string\n {\n $name = $this->foreignKey->getLocalTableName();\n if ($this->hasLocalUniqueIndex()) {\n $name = TDBMDaoGenerator::toSingular($name);\n }\n return TDBMDaoGenerator::toCamelCase($name);\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getField()\n {\n return $this->field;\n }", "public function getPreparedTypeFieldName () {\n return null;\n }", "public function get_field_name($field_name) {\n\t\treturn 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']';\n\t}", "public function type_name(){\r\n \r\n //sends back the name of the class running\r\n return $this->type_name;\r\n \r\n }", "public function getTypeName()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typename'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typename'];\n\t\t}\n\t}", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "protected function getIdField()\n {\n return self::OBJ_NAME;\n }", "public function getFieldName()\n\t{\n\t\treturn 'slider[content]';\n\t}", "function getFieldName(DataProperty &$property)\n {\n if (!is_object($property)) debug($property); // <-- this throws an exception\n // support [database.]table.field syntax\n if (preg_match('/^(.+)\\.(\\w+)$/', $property->source, $matches)) {\n $table = $matches[1];\n $field = $matches[2];\n return $field;\n }\n }", "private function course_bank_get_field_name($field) {\n return get_string($field, 'tool_coursebank');\n }", "public function getNameT()\n {\n return $this->name_t;\n }", "public function getNameType()\n {\n return $this->nameType;\n }", "abstract public function getTypeName();", "public function name()\n {\n return $this->getFromCache(\n ['type' => 'name']\n );\n }", "public function getField() {\n\t\treturn $this->field;\n\t}", "public function getField() {\n\t\treturn $this->field; \n\t}", "public function getKeyField()\n {\n $class = get_class($this);\n $parts = explode('\\\\', $class);\n $name = $parts[count($parts)-1];\n return strtolower($name) . '_id';\n }", "private function _getCategoryFieldName()\n\t{\n\t\tif ($this->_categoryFieldName == null) {\n\t\t\t$this->_categoryFieldName = $this->getVar('category_field_name', 'categories');\n\t\t}\n\t\treturn $this->_categoryFieldName;\n\t}", "public function getName() {\n $path = explode('\\\\', get_class($this->object[\"data\"]));\n return array_pop($path);\n }", "public function getType(): string {\n return $this->fqType;\n }", "function _getFullName() {\n\t\treturn \"document.{$this->form_name}.elements['{$this->field_name}']\";\n\t}", "public function getUuidFieldName() {\n \n return $this->getUuidColumnName();\n }", "public function get_field_key() {\n\t\treturn $this->get_field_attr( 'field_key' );\n\t}", "function get_field_type($name)\n {\n }", "public function getNameProjectType()\n {\n return $this->name_project_type;\n }", "public function getField() {\n\t\treturn $this->_field;\n\t}", "function wrapper_field_name($columnnum) {\n\t\treturn $this->functions['field_name']($this->query_id, $columnnum);\n\t}", "public function getField()\n {\n return $this->_field;\n }", "public function getTaskTypeText()\n {\n return $this->getTaskType()->get('name');\n }", "public function getName()\n {\n return $this->getValue('name');\n }", "public function getType() {\n return $this->field->type;\n }", "public function getFieldName($field_name)\n {\n\n return sfConfig::get('app_sf_guard_plugin_profile_'.$field_name.'_name', $field_name);\n }", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function getFieldName($key)\n {\n return sprintf('%s[%s]', self::SETTING_BASENAME, $key);\n }", "protected function buildSchemaField() {\n if (!empty($this->entityPropertyInfo['key'])) {\n return $this->processValueTemplate('%property_schemas_fields_name_base%');\n }\n }", "public function getName()\n {\n return $this->propertyName;\n }", "public function name()\n {\n return $this->getName();\n }", "public function name()\n {\n return $this->getName();\n }", "public function getName()\n {\n return $this->internalName;\n }", "protected function _getFieldName(Model $Model) {\n\t\t$firstField = reset($this->settings[$Model->alias]);\n\t\treturn $firstField['field'];\n\t}", "protected function getNameInput()\n {\n return Str::singular(parent::getNameInput());\n }" ]
[ "0.7989957", "0.75793093", "0.74331254", "0.7429479", "0.7429479", "0.7429479", "0.73942125", "0.72984844", "0.72907996", "0.7278204", "0.7229615", "0.71899027", "0.7125336", "0.7095347", "0.70200104", "0.6999807", "0.6966098", "0.6945453", "0.6898232", "0.6863563", "0.68424296", "0.6818787", "0.6797559", "0.6773487", "0.677012", "0.6748994", "0.6744943", "0.6740185", "0.6727343", "0.67262095", "0.6711411", "0.6703118", "0.66993886", "0.6680934", "0.6670009", "0.6654759", "0.66434133", "0.660897", "0.6607196", "0.6606873", "0.6568825", "0.6560271", "0.6536471", "0.6530549", "0.65149534", "0.65102726", "0.64823234", "0.64675176", "0.6447653", "0.64372647", "0.6432253", "0.6420313", "0.63911784", "0.6364075", "0.63606733", "0.6357767", "0.6357041", "0.6357041", "0.6357041", "0.6357041", "0.6352851", "0.6348106", "0.63479865", "0.6332947", "0.6329274", "0.6329274", "0.63257426", "0.6318842", "0.62987405", "0.62857807", "0.62853056", "0.6272378", "0.6264592", "0.625953", "0.62492484", "0.624479", "0.6238853", "0.622698", "0.62255114", "0.6222743", "0.62173384", "0.62150806", "0.62132615", "0.62092584", "0.6201599", "0.6198561", "0.61891985", "0.6177407", "0.61768925", "0.61747456", "0.6173796", "0.6171731", "0.61690605", "0.6163425", "0.6157499", "0.61563635", "0.61563635", "0.6149475", "0.61481345", "0.6147247" ]
0.65729266
40
Adds the type of work.
public function addWorkType(WorkType $workType): Term { return $this->addTerm($workType, self::workType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addType($type);", "public static function workType(): string\n {\n return 'type';\n }", "public function AddType($type) {\n $this->Types[] = $type;\n }", "public function onTickettypesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "static public function objectToAdd($type)\n\t{\n\t\treturn QuickBooks_Utilities::actionToObject($type) . 'Add';\n\t}", "function register_work() {\n\tregister_extended_post_type( 'work', array(\n\t\t'menu_icon' \t\t=> 'dashicons-art',\n\t\t'supports' \t\t\t=> array( 'title', 'editor', 'excerpt', 'thumbnail' ),\n\t) );\n}", "public function add(string $name, string $type = null, array $options = []);", "public function add($work)\n {\n $name = $work['name'];\n $startingDate = date('Y-m-d', strtotime($work['startingDate']));\n $endingDate = date('Y-m-d', strtotime($work['endingDate']));\n $status = $work['status'];\n $sql_insert = \"INSERT INTO `works` (`name`, `starting_date`, `ending_date`, `status`) VALUES ('$name', '$startingDate', '$endingDate', '$status')\";\n\n return mysqli_query($this->database, $sql_insert);\n }", "public function addType($type) {\n $this->type[] = $type;\n return $this;\n }", "public function add(string $type): void\n {\n /**\n * Don't add in case of an invalid type or in case the type has already\n * been added.\n */\n if (in_array($type, self::$allowedTypes, true)\n && !in_array($type, $this->types, true)\n ) {\n $this->types[] = $type;\n }\n }", "public function addMealType(){\n \t$id = $this->formValueForKey(\"mealTypeSelection\");\n \t\n \t$foundMealType = BLGenericRecord::recordMatchingKeyAndValue(\"MealType\", \"id\", $id);\n \t$this->currentRecipe()->addMealType($foundMealType);\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "public function add();", "public function add();", "public function add_group_type( $type ){\n\t\tarray_push($this->_group_types, $type);\n\t}", "public function onSessiontypesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function run()\n {\n $jobtype = new \\App\\Jobtype([\n 'type' => 'Full Time'\n ]);\n\n $jobtype->save();\n\n $jobtype = new \\App\\Jobtype([\n 'type' => 'Part Time'\n ]);\n\n $jobtype->save();\n }", "public function addNewJobOpo()\n {\n }", "protected function add() {\n\t}", "function node_add($type) {\n global $user;\n\n $types = node_get_types();\n $type = isset($type) ? str_replace('-', '_', $type) : NULL;\n // If a node type has been specified, validate its existence.\n if (isset($types[$type]) && node_access('create', $type)) {\n // Initialize settings:\n $node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');\n\n drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));\n $output = drupal_get_form($type .'_node_form', $node);\n }\n\n return $output;\n}", "public function add_type($data){\n\t\t$this->db->insert('training_types', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function add($type,$data){\n\t// PARAM $type : type of data, as above\n\t// $data : data to add\n\n\t\tif (!is_array($this->$type)) { die(\"Not a valid data type\"); }\n\t\t$this->$type[] = $data;\n\t}", "public function add()\n {\n echo '客户需求添加一个新需求' . PHP_EOL;\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add($userid, $type)\r\n {\r\n $getInfo = $this->get($userid);\r\n\r\n $getInfo[$type] = $type;\r\n\r\n $this->update($userid, $getInfo);\r\n }", "public function addAction() {\n \t$dataType = $this->getInput('dataType');\n \tif (!in_array($dataType,$this->DATATYPE)) {\n \t exit(\"参数错误\");\n \t}\n \t$this->assign('dataType', $dataType);\n $this->assign('dataTypes', $this->DATATYPE);\n }", "public function addAction() {\n $this->assign('ad_ptypes', $this->ad_ptypes);\n }", "public function addTransactionType()\n {\n return $this->addCollection('transaction_type', 'Activity\\Transactions\\Type', '', [], trans('elementForm.transaction_type'));\n }", "public function add() {\n $this->out('CakePHP Queue Example task.');\n $this->hr();\n $this->out('This is a very simple example of a QueueTask.');\n $this->out('I will now add an example Job into the Queue.');\n $this->out('This job will only produce some console output on the worker that it runs on.');\n $this->out(' ');\n $this->out('To run a Worker use:');\n $this->out('\tbin/cake queue runworker');\n $this->out(' ');\n $this->out('You can find the sourcecode of this task in: ');\n $this->out(__FILE__);\n $this->out(' ');\n\n //$options = getopt('',['id:']);\n /*\n * Adding a task of type 'example' with no additionally passed data\n */\n //if ($this->QueuedJobs->createJob('RemittanceApi', ['id'=>4033, 'batch_id'=>'58e44de0f33a7'])) {\n if ($this->QueuedJobs->createJob('RemittanceApi', null)) {\n $this->out('OK, job created, now run the worker');\n } else {\n $this->err('Could not create Job');\n }\n }", "public function addType()\r\n\t{\r\n\t\tif(isset($_SESSION['auth']) && $_SESSION['users']['niveau'] == 3){\r\n\t\tif(isset($_POST['dataF'])){\r\n\t\t\t$spe = str_replace('&', '=', $_POST['dataF']);\r\n\t\t\t$data = $this->convertArray($spe);\r\n\t\t\t//print_r($data);die();\r\n\t\t\t$spec = $this->model('type');\r\n\t\t\t$id = $spec->addType($data);\r\n\t\t\tif($id){\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(['SUCCESS'=>true]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}else{\r\n\t\t\t$this->view('login',['page'=>'Speciality','msg'=>'you should to connect first']);\r\n\t\t}\r\n\t}", "public function workType($value = null)\n \t{\n \t\tif ($value != null) $this->_workType = $value;\n \t\telse return $this->_workType;\n \t}", "public function add_field($name, $type)\n {\n $this->fields[$name] = $type;\n }", "private function _type_base_add_actions() {\n\t\t// Enable \"Links\" post type\n\t\t// add_filter( 'pre_option_link_manager_enabled', '__return_true' );\n\n\t\t// hook to create post_type\n\t\tadd_action( 'init', array( &$this, 'register_post_type' ) );\n\n\t\t// hook into save post to reset cache\n\t\tadd_action( 'save_post', array( &$this, 'reset_transient' ) );\n\n\t\t// featured image column action\n\t\t$this->_add_image_column_action();\n\t}", "function add() {\n }", "public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "function travel_add($type) {\n $entity_type = travel_type_load_multiple($type);\n drupal_set_title(t('Create @name', array('@name' => entity_label('entity_type', $entity_type))));\n\n // Return form for the given entity bundle.\n $entity = entity_create('travel', array('type' => $type));\n $output = drupal_get_form('travel_form', $entity);\n return $output;\n}", "public function add($type, $message)\n\t{\n\t\t$this->messages[] = array(\n\t\t\t'type' => $type,\n\t\t\t'message' => $message,\n\t\t);\n\t}", "public function add(Operation $operation);", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "public static function register_type()\n {\n }", "function add_work_order_quick($wo_ref, $loc_code, $units_reqd, $stock_id, $type, \n\t$date_, $memo_, $costs, $cr_acc, $labour, $cr_lab_acc)\n{\n\tglobal $Refs;\n\n\tbegin_transaction();\n\t$args = func_get_args();\n\t$args = (object)array_combine(array('wo_ref', 'loc_code', 'units_reqd', 'stock_id',\n\t\t'type', 'date_', 'memo_', 'costs', 'cr_acc', 'labour', 'cr_lab_acc'), $args);\n\t$args->woid = 0;\n\thook_db_prewrite($args, ST_WORKORDER);\n\n\t// if unassembling, reverse the stock movements\n\tif ($type == WO_UNASSEMBLY)\n\t\t$units_reqd = -$units_reqd;\n\n\tadd_material_cost($stock_id, $units_reqd, $date_);\n\n\t$date = date2sql($date_);\n\tif (!isset($costs) || ($costs == \"\"))\n\t\t$costs = 0;\n\tadd_overhead_cost($stock_id, $units_reqd, $date_, $costs);\n\tif (!isset($labour) || ($labour == \"\"))\n\t\t$labour = 0;\n\tadd_labour_cost($stock_id, $units_reqd, $date_, $labour);\n\t\t\n\t$sql = \"INSERT INTO \".TB_PREF.\"workorders (wo_ref, loc_code, units_reqd, units_issued, stock_id,\n\t\ttype, additional_costs, date_, released_date, required_by, released, closed)\n \tVALUES (\".db_escape($wo_ref).\", \".db_escape($loc_code).\", \".db_escape($units_reqd)\n \t.\", \".db_escape($units_reqd).\", \".db_escape($stock_id).\",\n\t\t\".db_escape($type).\", \".db_escape($costs).\", '$date', '$date', '$date', 1, 1)\";\n\tdb_query($sql, \"could not add work order\");\n\n\t$woid = db_insert_id();\n\n\t//--------------------------------------------------------------------------\n\n\t// create Work Order Requirements based on the bom\n\t$result = get_bom($stock_id);\n\n\twhile ($bom_item = db_fetch($result))\n\t{\n\n\t\t$unit_quantity = $bom_item[\"quantity\"];\n\t\t$item_quantity = $bom_item[\"quantity\"] * $units_reqd;\n\n\n\t\t$sql = \"INSERT INTO \".TB_PREF.\"wo_requirements (workorder_id, stock_id, workcentre, units_req, units_issued, loc_code)\n\t\t\tVALUES ($woid, \" . \"'\" . $bom_item[\"component\"] . \"'\" . \",\n\t\t\t'\". $bom_item[\"workcentre_added\"] . \"',\n\t\t\t$unit_quantity,\t$item_quantity, '\" . $bom_item[\"loc_code\"] . \"')\";\n\n db_query($sql, \"The work order requirements could not be added\");\n\n\t\t// insert a -ve stock move for each item\n\t\t// Chaitanya: Updated to record price and cost as std_cost for work order issued item\n\t\t$UnitCost = get_standard_cost($bom_item[\"component\"]);\n\t\tadd_stock_move(ST_WORKORDER, $bom_item[\"component\"], $woid,\n\t\t\t$bom_item[\"loc_code\"], $date_, $wo_ref, -$item_quantity, $UnitCost, 0, 1, $UnitCost);\n\t}\n\t\n\t// -------------------------------------------------------------------------\n\t//Negative Stock Handling\n\t$qoh = get_qoh_on_date($stock_id);\n\t$cost_adjust = false;\n\tif ($qoh < 0)\n\t{\n\t\tif ($qoh + $units_reqd >= 0)\n\t\t\t$cost_adjust = true;\n\t}\n\n\t// -------------------------------------------------------------------------\n\t\n\t//Negative Stock Handling First; Prior to add_stock_move\n\tif ($cost_adjust)\n\t\tadjust_deliveries($stock_id, get_standard_cost($stock_id), $date_);\n\t\t\n\t// -------------------------------------------------------------------------\t\n\n\t// insert a +ve stock move for the item being manufactured\n\tadd_stock_move(ST_WORKORDER, $stock_id, $woid,\t$loc_code, $date_,\n\t\t$wo_ref, $units_reqd, 0);\n\n\t// -------------------------------------------------------------------------\n\n\twork_order_quick_costs($woid, $stock_id, $units_reqd, $date_, 0, $costs, $cr_acc, $labour, $cr_lab_acc);\n\t\t\n\t//--------------------------------------------------------------------------\n\n\tadd_comments(ST_WORKORDER, $woid, $date_, $memo_);\n\n\t$Refs->save(ST_WORKORDER, $woid, $wo_ref);\n\tadd_audit_trail(ST_WORKORDER, $woid, $date_,_(\"Quick production.\"));\n\n\t$args->woid = $woid;\n\thook_db_postwrite($args, ST_WORKORDER);\n\tcommit_transaction();\n\treturn $woid;\n}", "public function add($type)\n {\n $rsp = new Response();\n\n if(!isAuthorized::isAdmin())\n {\n $rsp->setFailure(401, \"You are not authorized to do this action.\")\n ->send();\n\n return;\n }\n\n if($type === \"word\" && isset($_POST['word']))\n return $this->addWord();\n\n if($type === \"email\" && isset($_POST['email']))\n return $this->addEmail();\n\n $rsp->setFailure(400, \"Your request couldn't be executed. Check for wrong arguments or missing values.\")\n ->send();\n }", "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "public function addAction()\n {\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $workout = $this->_workout->getRow(array('workout_id' => $id));\n//\n if (!$workout) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING Row\n */\n $row = new WorkoutExerciseRow(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $row->setFieldOptions('type_id', array(\n 'values' => $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForSelect(),\n 'onchange' => 'exerciseType(this);',\n ));\n $row->setFieldOptions('workout_id', array(\n 'value' => $id,\n ));\n\n //\n\n\n\n //\n $row->build();\n\n //\n $form->addSubForm($row, $row->getName());\n\n //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/add.js',\n array(\n 'currentFormType' => 0,\n 'back' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/list/wildcard',\n array('workout_id' => $id)\n ),\n 'ajaxFormType' => $this->url()->fromRoute(\n 'hi-training/exercise-type/ajax-form-type/wildcard',\n array('type_id' => '')\n ),\n 'ajaxLastOfType' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/ajax-last-of-type/wildcard',\n array('type_id' => '')\n ),\n )\n )\n );\n\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n if ($form->isValid($formData)) {\n\n// \\Zend\\Debug::dump($formData);\n\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseRow']['actions']['save'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveAdd'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id));\n }\n\n }\n }\n }\n }\n\n //\n return array(\n 'form' => $form,\n 'workout' => $workout,\n );\n\n }", "public function saveType()\n {\n }", "public function addType($type)\n {\n $this->type = $this->type . Collection::OPERATOR_OR . $type;\n $this->types = null;\n $this->content = null;\n return $this;\n }", "public function add(TypeInterface $type) : TypeInterface;", "function _add_task( $data=array() )\n\t{\n\t\t$taskfunc = $this->ipsclass->load_class( ROOT_PATH.'sources/lib/func_taskmanager.php', 'func_taskmanager' );\n\t\t\n\t\t$task = array();\n\t\t\n\t\t$task['task_title'] = $data['task_title']['VALUE'];\n\t\t$task['task_file'] = $data['task_file']['VALUE'];\n\t\t$task['task_week_day'] = $data['task_week_day']['VALUE'];\n\t\t$task['task_month_day'] = $data['task_month_day']['VALUE'];\n\t\t$task['task_hour'] = $data['task_hour']['VALUE'];\n\t\t$task['task_minute'] = $data['task_minute']['VALUE'];\n\t\t$task['task_cronkey'] = md5( microtime() );\n\t\t$task['task_log'] = $data['task_log']['VALUE'];\n\t\t$task['task_description'] = $data['task_description']['VALUE'];\n\t\t$task['task_enabled'] = $data['task_enabled']['VALUE'];\n\t\t$task['task_key'] = $data['task_key']['VALUE'];\n\t\t$task['task_safemode'] = $data['task_safemode']['VALUE'];\n\t\t$task['task_next_run'] = $taskfunc->generate_next_run( $task );\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'task_manager', $task );\n\t\t\n\t\t$taskfunc->save_next_run_stamp();\n\t}", "public function addTrainingByType($residencyApplication,$typeName,$orderinlist,$maxNumber=1) {\n $user = $residencyApplication->getUser();\n\n $trainings = $user->getTrainings();\n //echo \"training count=\".count($trainings).\"<br>\";\n\n $count = 0;\n\n foreach( $trainings as $training ) {\n //echo \"training=\".$training->getTrainingType().\"<br>\";\n if( $training->getTrainingType() && $training->getTrainingType()->getName().\"\" == $typeName ) {\n //echo $typeName.\": count++=[\".$training->getTrainingType()->getName().\"]<br>\";\n $count++;\n }\n }\n //echo $typeName.\": maxNumber=\".$maxNumber.\", count=\".$count.\"<br>\";\n\n //add up to maxNumber\n for( $count; $count < $maxNumber; $count++ ) {\n //echo \"maxNumber=\".$maxNumber.\", count=\".$count.\"<br>\";\n $this->addSingleTraining($residencyApplication,$typeName,$orderinlist);\n }\n\n }", "public function addTask()\n\t{\n\t\t// Output the HTML\n\t\t$this->editTask();\n\t}", "public function add($val, $type = NULL) {\n if (is_null($type)) {\n if (is_integer($val)) $type = \"i\";\n else if (is_double($val)) $type = \"d\";\n else $type = \"s\";\n }\n $this->types .= $type;\n array_push($this->items, $val);\n }" ]
[ "0.6574077", "0.6183576", "0.6173784", "0.59997857", "0.59317607", "0.5731618", "0.5722681", "0.569007", "0.56357265", "0.5601423", "0.5544256", "0.55344784", "0.55344784", "0.552291", "0.552291", "0.54903704", "0.5484543", "0.54658854", "0.54612595", "0.54545116", "0.5428739", "0.539337", "0.5367043", "0.5351281", "0.5344687", "0.5344687", "0.5344687", "0.5335834", "0.5316592", "0.5312161", "0.52704877", "0.5266223", "0.5265778", "0.5257065", "0.52565765", "0.52485967", "0.52365184", "0.5227304", "0.5206677", "0.5181383", "0.51811296", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51610655", "0.51602685", "0.51573485", "0.5115666", "0.5114948", "0.5112195", "0.51067", "0.5104272", "0.5101826", "0.5097292", "0.50952756", "0.50921416" ]
0.62523764
1
Upgrades data for a module
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $setup->startSetup(); $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]); if (version_compare($context->getVersion(), '1.1.0', '<')) { $options = ['km', 'qm', 'cbm', 'pc']; // holds the conversion rates $dataTemplate = [ 'km' => [ [ 'reference_unit' => 'm', 'conversion_rate' => '0.001', ], [ 'reference_unit' => 'cm', 'conversion_rate' => '0.00001', ], [ 'reference_unit' => 'mm', 'conversion_rate' => '0.000001', ], ], 'm' => [ [ 'reference_unit' => 'km', 'conversion_rate' => '1000', ], ], 'cm' => [ [ 'reference_unit' => 'km', 'conversion_rate' => '100000', ], ], 'mm' => [ [ 'reference_unit' => 'km', 'conversion_rate' => '1000000', ], ], ]; $this->addOption($eavSetup, $options); $this->eavConfig->clear(); $this->addToSystemConfiguration($dataTemplate); $this->sortOptions($setup); } $setup->endSetup(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function updateData();", "function upgrade_module_1_1_0($module)\n{\n /*\n * Do everything you want right there,\n * You could add a column in one of your module's tables\n */\n\n return true;\n}", "function processData() \n {\n \n // store values in table manager object.\n $moduleID = $this->dataManager->getModuleID();\n $moduleCreator = new ModuleCreator( $moduleID, $this->pathModuleRoot);\n $moduleCreator->createModule();\n \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 }", "private function update_modules()\n\t{\n\t\tee()->db->select('module_name, module_version');\n\t\t$query = ee()->db->get('modules');\n\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$module = strtolower($row->module_name);\n\n\t\t\t// Only update first-party modules\n\t\t\tif ( ! in_array($module, $this->native_modules))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Send version to update class and let it do any required work\n\t\t\tif (in_array($module, $this->native_modules))\n\t\t\t{\n\t\t\t\t$path = EE_APPPATH.'/modules/'.$module.'/';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$path = PATH_THIRD.$module.'/';\n\t\t\t}\n\n\t\t\tif (file_exists($path.'upd.'.$module.'.php'))\n\t\t\t{\n\t\t\t\t$this->load->add_package_path($path);\n\n\t\t\t\t$class = ucfirst($module).'_upd';\n\n\t\t\t\tif ( ! class_exists($class))\n\t\t\t\t{\n\t\t\t\t\trequire $path.'upd.'.$module.'.php';\n\t\t\t\t}\n\n\t\t\t\t$UPD = new $class;\n\t\t\t\t$UPD->_ee_path = EE_APPPATH;\n\n\t\t\t\tif ($UPD->version > $row->module_version && method_exists($UPD, 'update') && $UPD->update($row->module_version) !== FALSE)\n\t\t\t\t{\n\t\t\t\t\tee()->db->update('modules', array('module_version' => $UPD->version), array('module_name' => ucfirst($module)));\n\t\t\t\t}\n\n\t\t\t\t$this->load->remove_package_path($path);\n\t\t\t}\n\t\t}\n\t}", "public function updateDataModule()\n {\n //get data\n $create_by \t\t= $this->app_loader->current_account();\n $create_date \t\t= date('Y-m-d H:i:s');\n $create_ip \t\t= $this->input->ip_address();\n\n\t\t$id_module\t\t\t\t\t= html_escape($this->input->post('module', TRUE));\n $nama_module\t\t\t\t= html_escape($this->input->post('nama_module', TRUE));\n $label_module \t\t\t= html_escape($this->input->post('label_module', TRUE));\n $url_module \t\t\t= html_escape($this->input->post('url_module', TRUE));\n\t\t$deskripsi_module \t= html_escape($this->input->post('deskripsi_module', TRUE));\n $status \t\t= html_escape($this->input->post('status', TRUE));\n\n\t\t$data = array(\n 'nama_module' => $this->db->escape_str($nama_module),\n 'label_module' => $this->db->escape_str($label_module),\n 'url_module' => $this->db->escape_str($url_module),\n\t\t\t'deskripsi_module' => $this->db->escape_str($deskripsi_module),\n 'mod_by' => $this->db->escape_str($create_by),\n 'mod_date' => $this->db->escape_str($create_date),\n 'mod_ip' => $this->db->escape_str($create_ip),\n 'id_status' => $this->db->escape_str($status),\n );\n\n\t\t//cek nama fungsi biar tidak terjadi duplikat data\n\t\t$this->db->where('id_module <>', abs($id_module));\n\t\t$this->db->where('nama_module', $this->db->escape_str($nama_module));\n\t\t$count = $this->db->count_all_results('xi_sa_module');\n\t\tif($count > 0)\n\t\t\treturn FALSE;\n\t\telse{\n\t\t\t/*query update*/\n\t\t\t$this->db->where('id_module', abs($id_module));\n\t\t\t$this->db->update('xi_sa_module', $data);\n\t\t\treturn TRUE;\n\t\t}\n }", "public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n {\n }", "protected function getModulesData() {}", "function upgrade_activity_modules($return) {\n\n global $CFG, $db;\n\n if (!$mods = get_list_of_plugins('mod') ) {\n error('No modules installed!');\n }\n\n $updated_modules = false;\n $strmodulesetup = get_string('modulesetup');\n\n foreach ($mods as $mod) {\n\n if ($mod == 'NEWMODULE') { // Someone has unzipped the template, ignore it\n continue;\n }\n\n $fullmod = $CFG->dirroot .'/mod/'. $mod;\n\n unset($module);\n\n if ( is_readable($fullmod .'/version.php')) {\n include_once($fullmod .'/version.php'); // defines $module with version etc\n } else {\n notify('Module '. $mod .': '. $fullmod .'/version.php was not readable');\n continue;\n }\n\n $oldupgrade = false;\n $newupgrade = false;\n if ( is_readable($fullmod .'/db/' . $CFG->dbtype . '.php')) {\n include_once($fullmod .'/db/' . $CFG->dbtype . '.php'); // defines old upgrading function\n $oldupgrade = true;\n }\n if ( is_readable($fullmod . '/db/upgrade.php')) {\n include_once($fullmod . '/db/upgrade.php'); // defines new upgrading function\n $newupgrade = true;\n }\n\n if (!isset($module)) {\n continue;\n }\n\n if (!empty($module->requires)) {\n if ($module->requires > $CFG->version) {\n $info = new object();\n $info->modulename = $mod;\n $info->moduleversion = $module->version;\n $info->currentmoodle = $CFG->version;\n $info->requiremoodle = $module->requires;\n if (!$updated_modules) {\n print_header($strmodulesetup, $strmodulesetup,\n build_navigation(array(array('name' => $strmodulesetup, 'link' => null, 'type' => 'misc'))), '',\n upgrade_get_javascript(), false, '&nbsp;', '&nbsp;');\n }\n upgrade_log_start();\n notify(get_string('modulerequirementsnotmet', 'error', $info));\n $updated_modules = true;\n continue;\n }\n }\n\n $module->name = $mod; // The name MUST match the directory\n\n include_once($fullmod.'/lib.php'); // defines upgrading and/or installing functions\n\n if ($currmodule = get_record('modules', 'name', $module->name)) {\n if ($currmodule->version == $module->version) {\n // do nothing\n } else if ($currmodule->version < $module->version) {\n /// If versions say that we need to upgrade but no upgrade files are available, notify and continue\n if (!$oldupgrade && !$newupgrade) {\n notify('Upgrade files ' . $mod . ': ' . $fullmod . '/db/' . $CFG->dbtype . '.php or ' .\n $fullmod . '/db/upgrade.php were not readable');\n continue;\n }\n if (!$updated_modules) {\n print_header($strmodulesetup, $strmodulesetup,\n build_navigation(array(array('name' => $strmodulesetup, 'link' => null, 'type' => 'misc'))), '',\n upgrade_get_javascript(), false, '&nbsp;', '&nbsp;');\n }\n upgrade_log_start();\n print_heading($module->name .' module needs upgrading');\n\n /// Run de old and new upgrade functions for the module\n $oldupgrade_function = $module->name . '_upgrade';\n $newupgrade_function = 'xmldb_' . $module->name . '_upgrade';\n\n /// First, the old function if exists\n $oldupgrade_status = true;\n if ($oldupgrade && function_exists($oldupgrade_function)) {\n $db->debug = true;\n $oldupgrade_status = $oldupgrade_function($currmodule->version, $module);\n if (!$oldupgrade_status) {\n notify ('Upgrade function ' . $oldupgrade_function .\n ' did not complete successfully.');\n }\n } else if ($oldupgrade) {\n notify ('Upgrade function ' . $oldupgrade_function . ' was not available in ' .\n $mod . ': ' . $fullmod . '/db/' . $CFG->dbtype . '.php');\n }\n\n /// Then, the new function if exists and the old one was ok\n $newupgrade_status = true;\n if ($newupgrade && function_exists($newupgrade_function) && $oldupgrade_status) {\n $db->debug = true;\n $newupgrade_status = $newupgrade_function($currmodule->version, $module);\n } else if ($newupgrade && $oldupgrade_status) {\n notify ('Upgrade function ' . $newupgrade_function . ' was not available in ' .\n $mod . ': ' . $fullmod . '/db/upgrade.php');\n }\n\n $db->debug=false;\n /// Now analyze upgrade results\n if ($oldupgrade_status && $newupgrade_status) { // No upgrading failed\n // OK so far, now update the modules record\n $module->id = $currmodule->id;\n if (! update_record('modules', $module)) {\n error('Could not update '. $module->name .' record in modules table!');\n }\n remove_dir($CFG->dataroot . '/cache', true); // flush cache\n notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');\n echo '<hr />';\n } else {\n notify('Upgrading '. $module->name .' from '. $currmodule->version .' to '. $module->version .' FAILED!');\n }\n\n /// Update the capabilities table?\n if (!update_capabilities('mod/'.$module->name)) {\n error('Could not update '.$module->name.' capabilities!');\n }\n events_update_definition('mod/'.$module->name);\n\n $updated_modules = true;\n\n } else {\n upgrade_log_start();\n error('Version mismatch: '. $module->name .' can\\'t downgrade '. $currmodule->version .' -> '. $module->version .' !');\n }\n\n } else { // module not installed yet, so install it\n if (!$updated_modules) {\n print_header($strmodulesetup, $strmodulesetup,\n build_navigation(array(array('name' => $strmodulesetup, 'link' => null, 'type' => 'misc'))), '',\n upgrade_get_javascript(), false, '&nbsp;', '&nbsp;');\n }\n upgrade_log_start();\n print_heading($module->name);\n $updated_modules = true;\n $db->debug = true;\n @set_time_limit(0); // To allow slow databases to complete the long SQL\n\n /// Both old .sql files and new install.xml are supported\n /// but we priorize install.xml (XMLDB) if present\n if (file_exists($fullmod . '/db/install.xml')) {\n $status = install_from_xmldb_file($fullmod . '/db/install.xml'); //New method\n } else {\n $status = modify_database($fullmod .'/db/'. $CFG->dbtype .'.sql'); //Old method\n }\n\n $db->debug = false;\n\n /// Continue with the installation, roles and other stuff\n if ($status) {\n if ($module->id = insert_record('modules', $module)) {\n\n /// Capabilities\n if (!update_capabilities('mod/'.$module->name)) {\n error('Could not set up the capabilities for '.$module->name.'!');\n }\n\n /// Events\n events_update_definition('mod/'.$module->name);\n\n /// Run local install function if there is one\n $installfunction = $module->name.'_install';\n if (function_exists($installfunction)) {\n if (! $installfunction() ) {\n notify('Encountered a problem running install function for '.$module->name.'!');\n }\n }\n\n notify(get_string('modulesuccess', '', $module->name), 'notifysuccess');\n echo '<hr />';\n } else {\n error($module->name .' module could not be added to the module list!');\n }\n } else {\n error($module->name .' tables could NOT be set up successfully!');\n }\n }\n\n /// Check submodules of this module if necessary\n\n $submoduleupgrade = $module->name.'_upgrade_submodules';\n if (function_exists($submoduleupgrade)) {\n $submoduleupgrade();\n }\n\n\n /// Run any defaults or final code that is necessary for this module\n\n if ( is_readable($fullmod .'/defaults.php')) {\n // Insert default values for any important configuration variables\n unset($defaults);\n include($fullmod .'/defaults.php'); // include here means execute, not library include\n if (!empty($defaults)) {\n foreach ($defaults as $name => $value) {\n if (!isset($CFG->$name)) {\n set_config($name, $value);\n }\n }\n }\n }\n }\n\n upgrade_log_finish(); // finish logging if started\n\n if ($updated_modules) {\n print_continue($return);\n print_footer('none');\n die;\n }\n}", "function update_modification($data)\n\t{\n\t\tglobal $db, $cid, $mid;\n\n\t\t$sql = \"UPDATE \". GARAGE_MODS_TABLE .\"\n\t\t\tSET category_id = '\".$data['category_id'].\"', title = '\".$data['title'].\"', price = '\".$data['price'].\"', install_price = '\".$data['install_price'].\"', install_rating = '\".$data['install_rating'].\"', product_rating = '\".$data['product_rating'].\"', comments = '\".$data['comments'].\"', install_comments = '\".$data['install_comments'].\"' , business_id = '\".$data['business_id'].\"', install_business_id = '\".$data['install_business_id'].\"', date_updated = '\".$data['time'].\"'\n\t\t\tWHERE id = '$mid' and garage_id = '$cid'\";\n\n\t\tif(!$result = $db->sql_query($sql))\n\t\t{\n\t\t\tmessage_die(GENERAL_ERROR, 'Could Not Update Modification', '', __LINE__, __FILE__, $sql);\n\t\t}\n\n\t\treturn;\n\t}", "public function updateData(){\n try{\n $this->dbConnection->query($this->query);\n $this->message = $this->moduleName.' Successfully Updated';\n $this->data = array();\n $this->data['id'] = $this->dbConnection->lastInsertId();\n $this->sendJSONResponse();\n \n }catch( PDOException $ex ) {\n $this->message = 'Error storing '.$this->moduleName.' :'. $ex->getMessage();\n $this->sendJSONErrorReponse();\n }\n }", "function myPear_update21(){\n\n // Clean up\n $q=myPear_db()->qquery(\"SELECT * FROM zzz_units WHERE u_rank = 'RO'\",1);\n while($r=myPear_db()->next_record($q)) b_debug::print_r($r,'record');\n \n myPear_db()->qquery(\"DELETE FROM zzz_units WHERE u_rank = 'RO'\",1);\n myPear_db()->qquery(\"SELECT * FROM zzz_list_members WHERE lm_key='' AND lm_value=''\",1); \n myPear_db()->qquery(\"DELETE FROM zzz_list_members WHERE lm_key='' AND lm_value=''\",1); \n $q = myPear_db()->qquery(\"SELECT l_id FROM zzz_lists WHERE l_member_title='department'\",1);\n while($r = myPear_db()->next_record($q)){\n myPear_db()->qquery(\"DELETE FROM zzz_lists WHERE l_id=$r[l_id]\",1);\n myPear_db()->qquery(\"DELETE FROM zzz_list_members WHERE lm_lid=$r[l_id]\",1);\n }\n myPear_db()->qquery(\"UPDATE zzz_organizations SET org_name='SU/Fysikum' WHERE org_name='Stockholm U/Fysikum'\",1);\n\n\n // NO. Write module name to the database for the bLists\n foreach(array('zzz_units'=> 'u',\n\t\t'zzz_lists'=> 'l',\n\t\t) as $t=>$prefix){\n\n if (myPear_db()->columnExists(\"${prefix}_module\",$t)){\n myPear_db()->query(\"ALTER TABLE `$t` DROP `${prefix}_module`\");\n myPear_db()->reset_cache();\n }\n }\n \n // Upgrade Organozation\n if (!myPear_db()->columnExists('org_roles','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` ADD `org_roles` VARCHAR(240) NOT NULL AFTER `org_theme`\",1); \n myPear_db()->reset_cache();\n }\n\n // Keep u_name\n $type = myPear_db()->getColumnType('zzz_units','u_rank');\n if (strToLower($type) != 'int'){\n myPear_db()->qquery(\"ALTER TABLE `zzz_units` CHANGE `u_rank` `u_rank` INT NOT NULL\"); \n }\n\n myPear_db()->qquery(\"UPDATE zzz_lists SET l_class = 'bList_eaEmpRecords' WHERE l_class = 'bList_ea'\",1);\n foreach(array('zzz_units'=>array(//'u_name',\n\t\t\t\t //'u_member_title',\n\t\t\t\t ),\n\t\t'zzz_lists'=>array('l_rank',\n\t\t\t\t //'l_name',\n\t\t\t\t //'l_member_title',\n\t\t\t\t )) as $t=>$ff){\n foreach($ff as $f)\n if (myPear_db()->columnExists($f,$t)) myPear_db()->query(\"ALTER TABLE `$t` DROP `$f`\");\n }\n myPear_db()->reset_cache();\n}", "public function loadModuleData() {}", "function upgrade_module_3_1_1()\n{\n $query = new \\DbQuery();\n $query->select('id, data')\n ->from(bqSQL('packlink_entity'))\n ->where('index_1=\"defaultParcel\"');\n\n $records = \\Db::getInstance()->executeS($query);\n foreach ($records as $record) {\n if (empty($record)) {\n continue;\n }\n\n $data = json_decode($record['data'], true);\n if (!empty($data['value']['weight'])) {\n $weight = (float)$data['value']['weight'];\n $data['value']['weight'] = !empty($weight) ? $weight : 1;\n }\n\n foreach (array('length', 'height', 'width') as $field) {\n if (!empty($data['value'][$field])) {\n $fieldValue = (int)$data['value'][$field];\n $data['value'][$field] = !empty($fieldValue) ? $fieldValue : 10;\n }\n }\n\n if (!empty($record['id'])) {\n \\Db::getInstance()->update(\n 'packlink_entity',\n array(\n 'data' => pSQL(json_encode($data), true)\n ),\n '`id` = ' . $record['id']\n );\n }\n }\n\n return true;\n}", "public function upgrade () {\r\n }", "public function upgrade() {\n//\t\tupdate it's database table, you will need to run this:\n//\t\t\n//\t\t$est = AttributeType::getByHandle('attribute_handle');\n//\t\t$path = $est->getAttributeTypeFilePath(FILENAME_ATTRIBUTE_DB);\n//\t\tPackage::installDB($path);\n\n\t\tparent::upgrade();\n\t\t//$pkg = Package::getByHandle($this->pkgHandle);\n\t\t//$this->installAdditionalPageAttributes($pkg);\n\t}", "function finalizeModuleUpgrade() {\n $modules_table = TABLE_PREFIX . 'modules';\n $config_options_table = TABLE_PREFIX . 'config_options';\n\n try {\n\n // Remove merged modules\n DB::execute(\"DELETE FROM $modules_table WHERE name IN (?)\", array('incoming_mail', 'milestones', 'mobile_access', 'resources'));\n\n // Update incoming mail related settings\n DB::execute(\"UPDATE $config_options_table SET module = ? WHERE module = ?\", 'system', 'incoming_mail');\n\n // Uninstall backup module\n DB::execute(\"DELETE FROM $modules_table WHERE name = ?\", 'backup');\n DB::execute(\"DELETE FROM $config_options_table WHERE module = ?\", 'backup');\n\n // Enable only first party modules\n DB::execute(\"DELETE FROM $modules_table WHERE name NOT IN (?)\", array('system', 'discussions', 'milestones', 'files', 'todo', 'calendar', 'notebooks', 'tasks', 'tracking', 'project_exporter', 'status', 'documents', 'source', 'invoicing'));\n DB::execute(\"UPDATE $modules_table SET is_enabled = ?\", true);\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function updateMultiple_data()\n {\n \n }", "protected function update() {}", "public function update($data) { \n\n\t\tif ($data['name'] != $this->name) { \n\t\t\t$this->update_name($data['name']); \n\t\t} \n\t\tif ($data['pl_type'] != $this->type) { \n\t\t\t$this->update_type($data['pl_type']); \n\t\t} \n\n\t}", "public function updated(Module $module)\n {\n //\n }", "function upgrade_module_1_3_2($module)\n{\n $sql = array();\n $sql[] = 'DELETE FROM `'._DB_PREFIX_.'facebookpixels` WHERE pixel_extras_type = 4;';\n $sql[] = 'UPDATE `'._DB_PREFIX_.'facebookpixels` SET pixel_extras_type = 4 WHERE pixel_extras_type = 5';\n $sql[] = 'UPDATE `'._DB_PREFIX_.'facebookpixels` SET pixel_extras_type = 5 WHERE pixel_extras_type = 6';\n foreach ($sql as $query) {\n DB::getInstance()->execute(pSQL($query));\n }\n // All done if we get here the upgrade is successfull\n return $module;\n}", "public function updateModuleFile() {\n\t\t$module = Yii::app()->db->createCommand(\"SELECT * FROM {$this->_moduleTableName} WHERE enabled=1\")->queryAll();\n\n\t\tif(count($module) > 0) {\n\t\t\t$config = \"<?php \\n\";\n\t\t\t$config .= \"return array(\\n\\t'modules' => array(\\n\";\n\t\t\t$i = 1;\n\t\t\tforeach($module as $val) {\n\t\t\t\tif($i !== count($module))\n\t\t\t\t\t$config .= \"\\t\\t'\" . $val['name'] . \"',\\n\";\n\t\t\t\telse\n\t\t\t\t\t$config .= \"\\t\\t'\" . $val['name'] . \"'\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$config .= \"\\t),\\n);\";\n\n\t\t}else {\n\t\t\t$config = \"<?php \\n\";\n\t\t\t$config .= \"return array(\\n\\t'modules' => array(\\n\";\n\t\t\t$config .= \"\\t),\\n);\";\n\t\t}\n\n\t\t$fileHandle = @fopen(Yii::getPathOfAlias('application.config').'/module_addon.php', 'w');\n\t\t@fwrite($fileHandle, $config, strlen($config));\n\t\t@fclose($fileHandle);\n\t}", "public static function update_module($module) {\n\t\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $result = glueserver_course_db::glueserver_update_module($module);\n $courseid = $module['course'];\n //It is necessary to call this Moodle function in order to rebuild the course cache\n rebuild_course_cache($courseid); \n\t\treturn array ('success' => $result);\n }", "public function actionRebuildCache()\n {\n foreach (Yii::app()->Modules as $id => $params)\n $this->actionDb2php(array('module' => $id));\n\n }", "public function setModuleData(){\n\t\t/* variable initialization */\n\t\t$this->_strSchemaName\t.= \"_\".$this->getCompanyCode();\n\t\t$intRespone\t\t\t\t= \"\";\n\t\t\n\t\t/* Setting the Pokicy filed */\n\t\tif((isset($this->_strDataSet['policy'])) && (!empty($this->_strDataSet['policy']))){\n\t\t\t/* Iterating the loop */\n\t\t\tforeach($this->_strDataSet['policy'] as $strPlicyKey => $strPolicyValue){\n\t\t\t\t/* Decoding the value */\n\t\t\t\t$this->_strDataSet['policy'][$strPlicyKey]\t= getDecyptionValue($strPolicyValue);\n\t\t\t}\n\t\t\t/* Imploding the value */\n\t\t\t$this->_strDataSet['policy']\t\t= implode(\",\",$this->_strDataSet['policy']);\n\t\t}else{\n\t\t\t/* Setting the value */\n\t\t\t$this->_strDataSet['policy']\t= \"\";\n\t\t}\n\t\t\n\t\t/* Set the operation filter array */\n\t\t$strEventFilterArr \t= array(\n\t\t\t\t\t\t\t\t\t\t'table' \t=> $this->_strSchemaName,\n\t\t\t\t\t\t\t\t\t\t'data' \t\t=> $this->_strDataSet,\n\t\t\t\t\t\t\t\t\t\t'where' \t=> array('id' => $this->_strDataSet['foreign']),\n\t\t\t\t\t\t\t\t\t);\n\t\t/* removed unwanted variables */\n\t\tunset($strEventFilterArr['data']['foreign']);\n\t\t\n\t\t/* Perfomaning the addition operation */\n\t\tif($this->_strDataSet['foreign'] == 0){\n\t\t\t/* add new records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setDataInTable($strEventFilterArr);\n\t\t/* Perfomaning the update operation */\n\t\t}else{\n\t\t\t/* update the existing records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setUpdateData($strEventFilterArr);\n\t\t}\n\t\t/* removed used variables */\n\t\tunset($strResultArr);\n\t\t\n\t\t/* return the operation status */\n\t\treturn $intResultStatus;\n\t}", "function update_data($data_update_item) {\n\t}", "protected function row_to_module_form_data($data) {\n\t\tif ( empty($data) ) {\n\t\t\treturn $data;\n\t\t}\n\n $data['global_perm'] = Permission::to_binary($data['global_perm']);\n\n //TODO: convert module permissions to field format\n\t\t\n\t\treturn $data;\n\t}", "function module_upgrade () {\n \n // Make sure core is installed\n if (!module_core_installed()) {\n error_register('Please run the install script');\n return false;\n }\n foreach (module_list() as $module) {\n \n // Get current schema and code revisions\n $old_revision = module_get_schema_revision($module);\n $new_revision = module_get_code_revision($module);\n \n // Upgrade the module to the current revision\n $installer = $module . '_install';\n if (function_exists($installer)) {\n call_user_func($installer, $old_revision);\n }\n \n // Update the revision number in the database\n module_set_schema_revision($module, $new_revision);\n }\n return true;\n}", "public function testUpdateServiceData()\n {\n\n }", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function up()\n {\n $oldStores = $this->getOldStores(); // update to newest data_version\n $newStores = $this->getNewStores(); // run all upgrade files\n if (!count($oldStores) && !count($newStores)) {\n return;\n }\n\n foreach ($this->getDepends() as $moduleCode) {\n if (0 !== strpos($moduleCode, 'TM_')) {\n continue;\n }\n $this->_getModuleObject($moduleCode)->up();\n }\n $saved = false;\n\n // upgrade currently installed version to the latest data_version\n if (count($oldStores)) {\n foreach ($this->getUpgradesToRun() as $version) {\n // customer able to skip upgrading data of installed modules\n if (!$this->getSkipUpgrade()) {\n $this->getUpgradeObject($version)\n ->setStoreIds($oldStores)\n ->upgrade();\n }\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n // install module to the new stores\n if (count($newStores)) {\n foreach ($this->getUpgradesToRun(0) as $version) {\n $this->getUpgradeObject($version)\n ->setStoreIds($newStores)\n ->upgrade();\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n if (!$saved) {\n $this->save(); // identity key could be updated without running the upgrades\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 }", "public function process_info_details_mod($data) {\n $this->currentmod = $data;\n $this->currentmod['instances'] = array();\n }", "function module_update($data){\n\t\t\tif(isset($data[\"label\"])){\n\t\t\t\t$this->EE->db->update(\t\n\t\t\t\t\t\t\t\t\t'br_config',\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t'sort' \t\t=> round($data[\"sort\"] * 1),\n\t\t\t\t\t\t\t\t\t\t\t'label' \t=> $data[\"label\"],\n\t\t\t\t\t\t\t\t\t\t\t'enabled' \t=> $data[\"enabled\"],\n\t\t\t\t\t\t\t\t\t\t\t'groups' => isset($data[\"groups\"]) ? $data[\"groups\"] : 0\n\t\t\t\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t\t\t\"config_id = \".$data[\"config_id\"]\n\t\t\t\t\t\t\t\t);\n\t\t\t\tunset($data[\"sort\"]);\n\t\t\t\tunset($data[\"label\"]);\n\t\t\t\tunset($data[\"enabled\"]);\n\t\t\t}\n\t\t\t\n\t\t// We are going to build an array of all config elements so we can \n\t\t// handle if the user submits no value for a checkbox for instance. \n\t\t\t$this->EE->db->from('br_config_data')->where('config_id',$data[\"config_id\"]); \n\t\t\t$qry = $this->EE->db->get();\n\t\t\tforeach($qry->result_array() as $rst)\n\t\t\t{\n\t\t\t\t$list[$rst[\"config_data_id\"]] = TRUE;\n\t\t\t}\n\t\t\n\t\t// Now update the params\t\t\t\t\n\t\t\tforeach($data as $key => $val){\n\t\t\t\tif(strpos($key,'cAttribute_') !== false){ \n\t\t\t\t\t// Custom Attributes\n\t\t\t\t\t$config_data_id = str_replace('0_cAttribute_','',$key);\n\t\t\t\t\t$this->EE->db->update('br_config_data',array('value' => $val), \"config_data_id = \".$config_data_id);\n\t\t\t\t\tunset($list[$config_data_id]);\n\t\t\t\t}\n\t\t\t\tif(strpos($key,'cAttributePW_') !== false){ \n\t\t\t\t\t// Custom Attributes\n\t\t\t\t\t$config_data_id = str_replace('0_cAttributePW_','',$key);\n\t\t\t\t\tif(trim($val) != '************************'){\n\t\t\t\t\t\t$this->EE->db->update('br_config_data',array('value' => $val), \"config_data_id = \".$config_data_id);\n\t\t\t\t\t}\n\t\t\t\t\tunset($list[$config_data_id]);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t// If there are any empty settings left we need to clear them\n\t\t\tif(isset($list)){\n\t\t\t\tforeach($list as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this->EE->db->update('br_config_data',array('value' => ''), \"config_data_id = \".$key);\n\t\t\t\t}\t\n\t\t\t}\n\t}", "protected function _updatefields() {}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "public function update_equipment($data)\n\t {\n\t }", "public function ApplyChanges() {\n parent::ApplyChanges();\n\n $ModulInfo = IPS_GetInstance($this->InstanceID);\n $ModulName = $ModulInfo['ModuleInfo']['ModuleName'];\n\n $HourUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimer\");\n $HourNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimer\");\n $MinuteUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimerMinute\");\n $MinuteNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimerMinute\");\n $HourResetTimer = $this->ReadPropertyInteger(\"IntervalHtmlResetColorTodayTimer\");\n $EnableResetTimer = $this->ReadPropertyBoolean(\"cbxHtmlResetColorToday\");\n \n If ((($HourUpdateTimer > 23) || ($HourNotificationTimer > 23)) || (($HourUpdateTimer < 0) || ($HourNotificationTimer < 0)))\n {\n $this->SetStatus(202);\n $this->SendDebug($ModulName, $this->Translate(\"The hour of a time is wrong!\"), 0);\n }\n else {\n $this->SetStatus(102);\n }\n\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteUpdateTimer.\":17\", \"UpdateTimer\");\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteNotificationTimer.\":07\", \"NotificationTimer\");\n If($EnableResetTimer)\n {\n $this->SetNewTimerInterval($HourResetTimer.\":\".\"00\".\":14\", \"ResetFontTimer\");\n }\n If ($this->ReadPropertyBoolean(\"cbxGS\"))\n {\n $this->RegisterVariableString(\"YellowBagTime\", $this->Translate(\"Packaging waste event\"));\n $this->RegisterVariableString(\"YellowBagTimes\", $this->Translate(\"Packaging waste\"), \"~TextBox\");\n $this->EnableAction(\"YellowBagTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"YellowBagTimes\");\n $this->UnregisterVariable(\"YellowBagTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxHM\"))\n {\n $this->RegisterVariableString(\"WasteTime\", $this->Translate(\"Household garbage event\"));\n $this->RegisterVariableString(\"WasteTimes\", $this->Translate(\"Household garbage\"), \"~TextBox\");\n $this->EnableAction(\"WasteTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"WasteTimes\");\n $this->UnregisterVariable(\"WasteTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPP\"))\n {\n $this->RegisterVariableString(\"PaperTime\", $this->Translate(\"Cardboard bin event\"));\n $this->RegisterVariableString(\"PaperTimes\", $this->Translate(\"Cardboard bin\"), \"~TextBox\");\n $this->EnableAction(\"PaperTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PaperTimes\");\n $this->UnregisterVariable(\"PaperTime\");\n }\n\n If ($this->ReadPropertyBoolean(\"cbxBO\"))\n {\n $this->RegisterVariableString(\"BioTime\", $this->Translate(\"Organic waste event\"));\n $this->RegisterVariableString(\"BioTimes\", $this->Translate(\"Organic waste\"), \"~TextBox\");\n $this->EnableAction(\"BioTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"BioTime\");\n $this->UnregisterVariable(\"BioTimes\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPT\"))\n {\n $this->RegisterVariableString(\"PollutantsTime\", $this->Translate(\"Pollutants event\"));\n $this->RegisterVariableString(\"PollutantsTimes\", $this->Translate(\"Pollutants\"), \"~TextBox\");\n $this->EnableAction(\"PollutantsTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PollutantsTimes\");\n $this->UnregisterVariable(\"PollutantsTime\");\n }\n }", "function _update_do_one($module, $number, &$context) {\n // If updates for this module have been aborted\n // in a previous step, go no further.\n if (!empty($context['results'][$module]['#abort'])) {\n return;\n }\n\n $function = $module .'_update_'. $number;\n drush_log(\"Executing $function\", 'success');\n\n if (function_exists($function)) {\n $ret = $function($context['sandbox']);\n $context['results'][$module] = $ret;\n _drush_log_update_sql($ret);\n }\n\n if (isset($ret['#finished'])) {\n $context['finished'] = $ret['#finished'];\n unset($ret['#finished']);\n }\n\n if ($context['finished'] == 1 && empty($context['results'][$module]['#abort'])) {\n drupal_set_installed_schema_version($module, $number);\n }\n\n}", "protected function _update()\n\t{\n\t}", "public function saveModule($data)\n\t{\n\t\t$name = $data['ModuleClassName'];\n\t\t$moduleID = $this->_getModuleIdByClassName($name);\n\t\tif ( $moduleID == 0 )\n\t\t{\n\t\t\t$this->_insert($data,'SC_modules');\n\t\t\t$moduleID = $this->_lastInsertId('SC_modules');\n\t\t}\n\t\treturn $moduleID;\n\t}", "function updateRow() {\n global $dbConnection;\n global $secondaryDBConnection;\n\n /*\n * Set Values for use with in this function.\n */\n $setPageID = filter_input(INPUT_POST, 'pageID');\n $getModuleCode = '[' . filter_input(INPUT_POST, 'addModule') . ']';\n $getRowID = filter_input(INPUT_POST, 'rowID');\n $setRowCode = \"pageRow\" . $getRowID;\n\n #if Clear Value is set remove the data from the page.\n if ($getModuleCode == '[Clear]') {\n $getModuleCode = '';\n }\n\n $result = $conn->query(\"SELECT * FROM modules WHERE moduleName='$fileName'\");\n\n if ($result->num_rows > 0) {\n\n } else {\n\n }\n \n \n if (empty($getModuleCode)) {\n\n $deleteRow = $dbConnection->prepare(\"DELETE FROM page_settings WHERE pageID='$setPageID' AND rowID='$getRowID' \");\n $deleteRow->execute();\n $deleteRow->close();\n \n } else {\n\n $SettingRef = $secondaryDBConnection->prepare(\"SELECT moduleCode FROM page_settings WHERE pageID='$setPageID' AND rowID='$getRowID' \");\n $SettingRef->execute();\n $SettingRef->bind_result($moduleCode);\n $SettingRef->fetch();\n\n if ($SettingRef) {\n\n if (!$moduleCode) {\n\n $createRow = $dbConnection->prepare(\"INSERT INTO page_settings (pageID, rowID, moduleCode) VALUES ('$setPageID', '$getRowID', '$getModuleCode')\");\n $createRow->execute();\n $createRow->close();\n \n } else {\n \n $updateRow = $dbConnection->prepare(\"UPDATE page_settings SET moduleCode=? WHERE pageID=? AND rowID=?\");\n $updateRow->bind_param('sii', $getModuleCode, $setPageID, $getRowID);\n\n if ($updateRow === false) {\n trigger_error($dbConnection->error, E_USER_ERROR);\n }\n\n $status = $updateRow->execute();\n\n if ($status === false) {\n trigger_error($updateRow->error, E_USER_ERROR);\n }\n \n echo 'RowCode: '.$setRowCode.'<br>';\n \n $updatePageData = $dbConnection->prepare(\"UPDATE pages SET $setRowCode=? WHERE pageID=?\");\n $updatePageData->bind_param('si', $getModuleCode, $setPageID);\n\n if ($updatePageData === false) {\n trigger_error($dbConnection->error, E_USER_ERROR);\n }\n\n $status2 = $updatePageData->execute();\n\n if ($status2 === false) {\n trigger_error($updatePageData->error, E_USER_ERROR);\n }\n \n }\n }\n\n }\n\n echo '<font color=black><b>Page Row Updated <br><br> Please Wait!!!!<br>';\n echo '<meta http-equiv=\"refresh\" content=\"1;url=?id=Pages&&moduleID=EditPage&&pageID=' . $setPageID . '\">';\n}", "function updateModules() {\n $modules_table = TABLE_PREFIX . 'modules';\n\n try {\n DB::execute(\"ALTER TABLE $modules_table ADD is_enabled tinyint(1) NOT NULL DEFAULT '0' AFTER position\");\n DB::execute(\"ALTER TABLE $modules_table DROP is_system\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function update() {\r\n\r\n\t}", "public function updateData(array $data);", "function updateSourceModule() {\n try {\n $commits_table = TABLE_PREFIX . 'source_commits';\n $paths_table = TABLE_PREFIX . 'source_paths';\n $repositories_table = TABLE_PREFIX . 'source_repositories';\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $source_users_table = TABLE_PREFIX . 'source_users';\n $activity_logs_table = TABLE_PREFIX . 'activity_logs';\n\n $engine = defined('DB_CAN_TRANSACT') && DB_CAN_TRANSACT ? 'InnoDB' : 'MyISAM';\n if(DB::executeFirstCell(\"SELECT COUNT(*) AS count FROM \" . TABLE_PREFIX . \"modules WHERE name='source'\")) {\n DB::execute(\"CREATE TABLE $commits_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(255) DEFAULT NULL,\n type varchar(25) DEFAULT NULL,\n revision_number int(11) unsigned DEFAULT '0',\n repository_id int(11) unsigned DEFAULT '0',\n message_title text,\n message_body text,\n authored_on datetime DEFAULT NULL,\n authored_by_name varchar(100) DEFAULT NULL,\n authored_by_email varchar(100) DEFAULT NULL,\n commited_on datetime DEFAULT NULL,\n commited_by_name varchar(100) DEFAULT NULL,\n commited_by_email varchar(100) DEFAULT NULL,\n diff text,\n PRIMARY KEY (id),\n KEY repository_id (repository_id),\n KEY commited_on (commited_on)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $paths_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n commit_id int(11) unsigned DEFAULT '0',\n is_dir tinyint(1) unsigned NOT NULL DEFAULT '0',\n path varchar(255) DEFAULT NULL,\n action varchar(1) DEFAULT NULL,\n PRIMARY KEY (id),\n KEY commit_id (commit_id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n DB::execute(\"CREATE TABLE $repositories_table (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(255) DEFAULT NULL,\n type varchar(25) DEFAULT NULL,\n created_on datetime DEFAULT NULL,\n created_by_id int(10) unsigned DEFAULT '0',\n created_by_name varchar(100) DEFAULT NULL,\n created_by_email varchar(150) DEFAULT NULL,\n updated_on datetime DEFAULT NULL,\n updated_by_id int(10) unsigned DEFAULT '0',\n updated_by_name varchar(100) DEFAULT NULL,\n updated_by_email varchar(150) DEFAULT NULL,\n repository_path_url varchar(255) DEFAULT NULL,\n username varchar(255) DEFAULT NULL,\n password varchar(255) DEFAULT NULL,\n update_type int(3) DEFAULT '0',\n graph text,\n PRIMARY KEY (id)\n ) ENGINE=$engine DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci\");\n\n $repositories_link = array();\n $repositories = DB::execute(\"SELECT * FROM $project_objects_table WHERE type = 'Repository'\");\n if (is_foreachable($repositories)) {\n foreach ($repositories as $repository) {\n //insert new source repository\n DB::execute(\"INSERT INTO $repositories_table (name,type,created_on,created_by_id,created_by_name,created_by_email,updated_on,updated_by_id,updated_by_name,updated_by_email,\n repository_path_url,username,password,update_type,graph) VALUES (?, 'SvnRepository', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\",\n $repository['name'],\n $repository['created_on'],\n $repository['created_by_id'],\n $repository['created_by_name'],\n $repository['created_by_email'],\n $repository['updated_on'],\n $repository['updated_by_id'],\n $repository['updated_by_name'],\n $repository['updated_by_email'],\n $repository['text_field_1'],\n $repository['varchar_field_1'],\n $repository['varchar_field_2'],\n $repository['integer_field_2'],\n $repository['text_field_2']\n );\n\n // Update project object repository\n $last_insert_id = DB::lastInsertId();\n DB::execute(\"UPDATE $project_objects_table SET type = 'ProjectSourceRepository', parent_id = ? WHERE id = ?\", $last_insert_id, $repository['id']);\n\n // Update source user links\n DB::execute(\"UPDATE $source_users_table SET repository_id = ? WHERE repository_id = ?\", $last_insert_id, $repository['id']);\n } //foreach\n } //if\n\n\n if (extension_loaded('svn')) {\n $svn_type = 'extension';\n } elseif (extension_loaded('xml') && function_exists('xml_parser_create')) {\n $svn_type = 'exec';\n } else {\n $svn_type = 'none';\n } // if\n\n // Update configuration options\n DB::execute('INSERT INTO ' . TABLE_PREFIX . 'config_options (name, module, value) VALUES (?, ?, ?), (?, ?, ?)',\n 'source_svn_type', 'source', serialize($svn_type),\n 'source_mercurial_path', 'source', serialize('/usr/bin/')\n );\n } //if\n // Delete all commits from project object\n DB::execute(\"DELETE FROM $project_objects_table WHERE type = 'Commit'\");\n\n // Delete all activity logs\n DB::execute(\"DELETE FROM $activity_logs_table WHERE type = 'RepositoryUpdateActivityLog'\");\n\n //delete unnecessary configuration options\n DB::execute(\"DELETE FROM \" . TABLE_PREFIX . \"config_options WHERE name = 'source_svn_trust_server_cert' OR name = 'source_svn_use_output_redirect'\");\n\n } catch (Exception $e) {\n return $e->getMessage();\n } //try\n\n return true;\n }", "function myPear_update26(){\n \n if (myPear_db()->tableExists('zzz_organizations')){\n if (myPear_db()->columnExists('org_nickname','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` CHANGE `org_nickname` `org_code` VARCHAR(32) NULL\",1);\n myPear_db()->reset_cache();\n }\n \n if (!myPear_db()->columnExists('org_name_short','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` ADD `org_name_short` VARCHAR(32) NOT NULL AFTER `org_name`\",1);\n myPear_db()->reset_cache();\n foreach(array('an' => 'AlbaNova',\n\t\t 'nordita'=> 'Nordita',\n\t\t 'fysikum'=> 'Fysikum',\n\t\t 'kth' => 'KTH',\n\t\t 'okc' => 'OKC',\n\t\t 'vh' => 'Vetenskapenshus',\n\t\t 'gu' => 'GU',\n\t\t ) as $org_code=>$org_name_short){\n\tmyPear_db()->qquery(\"UPDATE `zzz_organizations` SET org_name_short='$org_name_short' WHERE org_code='$org_code'\",1);\n\t\n }\n }\n }\n}", "private static function writeModulesCache($data)\n {\n $file = fopen(static::getModulesCache(), 'w+');\n\n if ($file !== false) {\n fwrite($file, '<?php' . PHP_EOL);\n fwrite($file, '// Autogenerated module list cache for retailCRM' . PHP_EOL);\n fwrite($file, '// Delete this file if you cannot see some payment types in module' . PHP_EOL);\n fwrite($file, 'return ' . var_export($data, true) . ';' . PHP_EOL);\n fflush($file);\n fclose($file);\n }\n }", "function sitemgr_upgrade1_2()\n{\n\t$GLOBALS['egw_setup']->db->update('egw_sitemgr_modules',array('module_name' => 'news_admin'),array('module_name' => 'news'),__LINE__,__FILE__);\n\n\t$GLOBALS['setup_info']['sitemgr']['currentver'] = '1.3.001';\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'];\n}", "public function ajaxProcessChangeModuleHook(){\n $result = array();\n $id_hook = (int)Tools::getValue('id_hook');\n $hookname = Hook::getNameById($id_hook);\n $id_option = (int)Tools::getValue('id_option');\n $option = new Options($id_option);\n $id_hookexec = (int)Tools::getValue('id_hookexec');\n $hookexec_name = Hook::getNameById($id_hookexec);\n $old_hook = (int)Tools::getValue('old_hook');\n $id_module = (int)Tools::getValue('id_module');\n if ($option && Validate::isLoadedObject($option) && $id_module && Validate::isUnsignedId($id_module) && $hookname && Validate::isHookName($hookname) && $hookexec_name && Validate::isHookName($hookexec_name)){\n $result['status'] = true;\n $moduleObject = Module::getInstanceById($id_module);\n $HookedModulesArr = OvicLayoutControl::getModulesHook($option->theme, $option->alias, $hookname);\n $HookedModulesArr = Tools::jsonDecode($HookedModulesArr['modules'],true);\n if (!is_array($HookedModulesArr)){\n $result['status'] = false;\n }\n if ($result['status']){\n $moduleHook = array();\n $moduleHook[] = $moduleObject->name;\n $moduleHook[] = Hook::getNameById($old_hook);\n $key = array_search($moduleHook,$HookedModulesArr);\n $result['test'] = $key;\n if (array_key_exists($key,$HookedModulesArr)){\n $moduleHook[1] = $hookexec_name;\n $HookedModulesArr[$key] = $moduleHook;\n $result['status'] = OvicLayoutControl::registerHookModule($option, $hookname, Tools::jsonEncode($HookedModulesArr),$this->context->shop->id);\n $result['moduleinfo'] = $moduleObject->name.'-'.$hookexec_name;\n }\n }\n }\n die(Tools::jsonEncode($result));\n }", "public static function set($module, $id, $data) {\n return self::setDb($module, $id, $data);\n \n\n }", "public function setModule(string $module)\n\t{\n\t\t$this->module=$module; \n\t\t$this->keyModified['module'] = 1; \n\n\t}", "public function process_course_module($data, $raw) {\n global $CFG;\n\n // add the course module id into the section's sequence\n if (is_null($this->currentsection['sequence'])) {\n $this->currentsection['sequence'] = $data['id'];\n } else {\n $this->currentsection['sequence'] .= ',' . $data['id'];\n }\n\n // add the sectionid and sectionnumber\n $data['sectionid'] = $this->currentsection['id'];\n $data['sectionnumber'] = $this->currentsection['number'];\n\n // generate the module version - this is a bit tricky as this information\n // is not present in 1.9 backups. we will use the currently installed version\n // whenever we can but that might not be accurate for some modules.\n // also there might be problem with modules that are not present at the target\n // host...\n $versionfile = $CFG->dirroot.'/mod/'.$data['modulename'].'/version.php';\n if (file_exists($versionfile)) {\n include($versionfile);\n $data['version'] = $module->version;\n } else {\n $data['version'] = null;\n }\n\n // stash the course module info in stashes like 'cminfo_forum' with\n // itemid set to the instance id. this is needed so that module handlers\n // can later obtain information about the course module and dump it into\n // the module.xml file\n $this->converter->set_stash('cminfo_'.$data['modulename'], $data, $raw['INSTANCE']);\n }", "public function getUpdateProductData();", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "public function update_with($new_data)\n {\n }", "public function prepareDataModules($inputData) {\n\t\t\t$data = array();\n\t\t\t$modules = array_values($inputData);\n\n\t\t\t$items = array();\n\t\t\tforeach($modules as $module_name) {\n\t\t\t\t$item_arr = array();\n\t\t\t\t$item_arr['attribute:label'] = getLabel('module-' . $module_name);\n\t\t\t\t$item_arr['node:module'] = $module_name;\n\t\t\t\t$items[] = $item_arr;\n\t\t\t}\n\n\t\t\t$data['nodes:module'] = $items;\n\t\t\treturn $data;\n\t\t}", "private function course_module_updated($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n\n $cmid = $event->contextinstanceid;\n $cm = $DB->get_record('course_modules', array('id' => $cmid), 'visible');\n $cmcontext = context_module::instance($cmid);\n\n $siteadmins = $this->get_siteadmins();\n $users = $this->get_google_authenticated_users($courseid);\n\n $insertcalls = array();\n $deletecalls = array();\n\n // Get current fileids for module.\n $fileids = $this->get_fileids($cmid);\n\n // Get previous fileids for module.\n $prevfilerecs = $DB->get_records('repository_gdrive_references', array('cmid' => $cmid), '', 'id, reference');\n $prevfileids = array();\n foreach ($prevfilerecs as $prevfilerec) {\n $prevfileids[] = $prevfilerec->reference;\n }\n\n // Determine fileids that were added, deleted, or didn't change from module.\n $addfileids = array_diff($fileids, $prevfileids);\n $delfileids = array_diff($prevfileids, $fileids);\n $eqfileids = array_diff($fileids, $addfileids);\n\n // Check unchanged module fileids for visibility and access changes.\n if ($eqfileids) {\n foreach ($eqfileids as $eqfileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; already has permission - do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); already has permission - do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible; continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n $cminfo = $modinfo->get_cm($cmid);\n\n if ($cminfo->uservisible && $secinfo->available) {\n // Course module is visible and available, section is available.\n // Insert reader permission.\n $call = new stdClass();\n $call->fileid = $eqfileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } else {\n // Course module or section is not visible or available,\n // Delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($eqfileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $eqfileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n }\n // Course is not visible; do nothing (course visibility would not have changed during this event).\n }\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n\n // Insert permissions for added fileids.\n if ($addfileids) {\n foreach ($addfileids as $addfileid) {\n // Insert writer permission for site admins.\n foreach ($siteadmins as $siteadmin) {\n $call = new stdClass();\n $call->fileid = $addfileid;\n $call->gmail = $siteadmin->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n \n // Insert permissions for course users.\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; insert writer permission.\n $call = new stdClass();\n $call->fileid = $addfileid;\n $call->gmail = $user->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); insert writer permission.\n $call = new stdClass();\n $call->fileid = $addfileid;\n $call->gmail = $user->gmail;\n $call->role = 'writer';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue access checks.\n if ($course->visible == 1) {\n // Course is visible; continue checks.\n // Course module is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // User can view and access course module and can access section; insert reader permission.\n $call = new stdClass();\n $call->fileid = $addfileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n }\n // Course module is not accessible; do nothing.\n }\n // Course is not visible; do nothing.\n }\n // Unenrolled user; do nothing.\n }\n\n // Add new fileids to database.\n $newdata = new stdClass();\n $newdata->courseid = $courseid;\n $newdata->cmid = $cmid;\n $newdata->reference = $addfileid;\n $DB->insert_record('repository_gdrive_references', $newdata);\n }\n }\n\n // Remove permissions for site admins and course users for deleted fileids.\n if ($delfileids) {\n foreach ($delfileids as $delfileid) {\n foreach ($siteadmins as $siteadmin) {\n try {\n $permissionid = $this->service->permissions->getIdForEmail($siteadmin->gmail);\n $permission = $this->service->permissions->get($delfileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $delfileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n\n foreach ($users as $user) {\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($delfileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $delfileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n $DB->delete_records_select('repository_gdrive_references', 'cmid = :cmid AND reference = :reference', array('cmid' => $cmid, 'reference' => $delfileid));\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "function coder_upgrade_upgrade_begin_alter($item) {\n// return; // TODO Temporary\n// cdp(\"inside \" . __FUNCTION__);\n global $upgrade_menu_registry;\n if (!$upgrade_menu_registry) {\n $upgrade_menu_registry = array();\n }\n /*\n * TODO Should we:\n * - write the core cache to a file (and commit the file?)\n * - make an admin settings page button to generate this cache (and any others we need)\n * - check for existence of cache if core upgrades are being run\n */\n coder_upgrade_cache_theme_registry();\n coder_upgrade_cache_info_hooks($item);\n cdp($upgrade_menu_registry);\n}", "protected function _update(array $data)\n {\t\n /* @var $stockItem Mage_CatalogInventory_Model_Stock_Item */\t\t\n\n $productId = Mage::getModel('catalog/product')->getIdBySku($data['sku']);\n\t\t$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\n\n\n /* @var $validator Mage_CatalogInventory_Model_Api2_Stock_Item_Validator_Item */\n $validator = Mage::getModel('cataloginventory/api2_stock_item_validator_item', array(\n 'resource' => $this\n ));\n\n if (!$validator->isValidData($data)) {\n foreach ($validator->getErrors() as $error) {\n $this->_error($error, Mage_Api2_Model_Server::HTTP_BAD_REQUEST);\n }\n $this->_critical(self::RESOURCE_DATA_PRE_VALIDATION_ERROR);\n }\n\n\t\t// Quantity\n\t\tif ($data['qty'] != null && $data['qty'] != '')\n\t\t{\n\t\t\t$stockItem->setData('qty', $data['qty']);\n\t\t\tMage::log('Qty: '.$data['qty'],null,'nChannel_Communicator.log');\n\t\t}\n\t\t\n\t\t// Reorder Point\n\t\tif ($data['notify_stock_qty'] != null && $data['notify_stock_qty'] != '')\n\t\t{\n\t\t\t$stockItem->setData('notify_stock_qty', $data['notify_stock_qty']);\n\t\t\tMage::log('Notify_Stock_Qty: '.$data['notify_stock_qty'],null,'nChannel_Communicator.log');\n\t\t}\n\t\t\n\t\t// Restock Level\n\t\tif ($data['min_qty'] != null && $data['min_qty'] != '')\n\t\t{\n\t\t\t$stockItem->setData('min_qty', $data['min_qty']);\n\t\t\tMage::log('Min_Qty: '.$data['min_qty'],null,'nChannel_Communicator.log');\n\t\t}\n\t\t\n\t\t// Is In Stock\n\t\tif ($data['is_in_stock'] != null && $data['is_in_stock'] != '')\n\t\t{\n\t\t\t$stockItem->setData('is_in_stock', $data['is_in_stock']);\n\t\t\tMage::log('Is_In_Stock: '.$data['is_in_stock'],null,'nChannel_Communicator.log');\n\t\t}\n\t\t\n\t\tif ($data['price'] != null && $data['price'] != '')\n\t\t{\n\t\t\t//$product->setPrice($data['price']);\n\t\t\tMage::getSingleton('catalog/product_action')\n \t\t\t->updateAttributes(array($productId), array('price' => $data['price']), 0);\n\t\t\tMage::log('Price: '.$data['price'],null,'nChannel_Communicator.log');\n\t\t}\n\t\t\n try {\n $stockItem->save();\n } catch (Mage_Core_Exception $e) {\n\t\t\tMage::log($e->getMessage(),null,'nChannel_Communicator.log');\n $this->_error($e->getMessage(), Mage_Api2_Model_Server::HTTP_INTERNAL_ERROR);\n } catch (Exception $e) {\n\t\t\tMage::log($e->getMessage(),null,'nChannel_Communicator.log');\n $this->_critical(self::RESOURCE_INTERNAL_ERROR);\n }\n }", "function update_all_module_options($mod_name, $new_options) {\n if (is_array($new_options)) {\n $new_options = (object) $new_options;\n }\n $this->modules->$mod_name->options = $new_options;\n $this->$mod_name->module = $this->modules->$mod_name;\n return update_option($this->clientele_prefix . $mod_name . '_options', (array) $this->modules->$mod_name->options);\n }", "protected function rebuild()\n {\n $this->cleanCaches();\n $mi = new ModuleInstaller();\n $mi->silent = true;\n $mi->rebuild_modules();\n }", "public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }", "function sitemgr_upgrade1_0_1_001()\n{\n\t$modules2nav_type = array('currentsection' => 1,'index' => 2,'index_block' => 3,'navigation' => 4,'sitetree' => 5,'toc' => 6,'toc_block' => 7);\n\n\t$db = clone($GLOBALS['egw_setup']->db);\n\t$db->set_app('sitemgr');\n\t$db2 = clone($db);\n\n\t// get the module_id of all navigation modules and remove the old modules\n\t$db->select('egw_sitemgr_modules','module_id,module_name',array('module_name' => array_keys($modules2nav_type)),__LINE__,__FILE__);\n\t$id2module = $old_modules = array();\n\twhile(($row = $db->row(true)))\n\t{\n\t\t$id2module[$row['module_id']] = $row['module_name'];\n\t\tif ($row['module_name'] != 'navigation')\n\t\t{\n\t\t\t$old_modules[] = $row['module_id'];\n\t\t}\n\t}\n\t$db->delete('egw_sitemgr_modules',array('module_id' => $old_modules),__LINE__,__FILE__);\n\n\t// check if navigation is already registered, if not register it\n\n\tif (!($navigation_id = array_search('navigation',$id2module)))\n\t{\n\t\tif (ereg('\\$this->description = lang\\(\\'([^'.\"\\n\".']*)\\'\\);',implode(\"\\n\",file(EGW_SERVER_ROOT.'/sitemgr/modules/class.module_navigation.inc.php')),$parts))\n\t\t{\n\t\t\t$description = str_replace(\"\\\\'\",\"'\",$parts[1]);\n\t\t}\n\t\t$db->insert('egw_sitemgr_modules',array(\n\t\t\t'module_name' => 'navigation',\n\t\t\t'module_description' => $description,\n\t\t),false,__LINE__,__FILE__);\n\t\t$navigation_id = $db->get_last_insert_id('egw_sitemgr_modules','module_id');\n\t}\n\t// add navigation to all contentareas, which allowed any for the old modules before and remove the old modules\n\t$db->select('egw_sitemgr_active_modules','DISTINCT cat_id,area',array('module_id' => $old_modules),__LINE__,__FILE__);\n\twhile (($row = $db->row(true)))\n\t{\n\t\t$row['module_id'] = $navigation_id;\n\t\t$db2->insert('egw_sitemgr_active_modules',array(),$row,__LINE__,__FILE__);\n\t}\n\t$db->delete('egw_sitemgr_active_modules',array('module_id' => $old_modules),__LINE__,__FILE__);\n\n\t// replace old modules in the blocks with the navigation module\n\t$db->select('egw_sitemgr_blocks','block_id,module_id',array('module_id' => array_keys($id2module)),__LINE__,__FILE__);\n\t$block_id2module_id = array();\n\twhile (($row = $db->row(true)))\n\t{\n\t\t$block_id2module_id[$row['block_id']] = $row['module_id'];\n\t}\n\t$db->select('egw_sitemgr_content','version_id,block_id,arguments',array('block_id' => array_keys($block_id2module_id)),__LINE__,__FILE__);\n\twhile (($row = $db->row(true)))\n\t{\n\t\t$arguments = unserialize($row['arguments']);\n\t\tif (!isset($arguments['nav_type']))\n\t\t{\n\t\t\t$version_id = $row['version_id'];\n\t\t\tunset($row['version_id']);\n\t\t\t$arguments['nav_type'] = $modules2nav_type[$id2module[$block_id2module_id[$row['block_id']]]];\n\t\t\t$row['arguments'] = serialize($arguments);\n\t\t\t$db2->update('egw_sitemgr_content',$row,array('version_id' => $version_id),__LINE__,__FILE__);\n\t\t}\n\t}\n\t$db->update('egw_sitemgr_blocks',array('module_id' => $navigation_id),array('module_id' => $old_modules),__LINE__,__FILE__);\n\n\t$GLOBALS['setup_info']['sitemgr']['currentver'] = '1.2';\n\treturn $GLOBALS['setup_info']['sitemgr']['currentver'];\n}", "function field_views_data_alter(&$data) {\n foreach (field_info_fields() as $field) {\n if ($field['storage']['type'] != 'field_sql_storage') {\n continue;\n }\n\n $function = $field['module'] . '_field_views_data_views_data_alter';\n if (function_exists($function)) {\n $function($data, $field);\n }\n }\n}", "function update_do_one($module, $number, &$context) {\n // If updates for this module have been aborted\n // in a previous step, go no further.\n if (!empty($context['results'][$module]['#abort'])) {\n return;\n }\n\n $function = $module .'_update_'. $number;\n if (function_exists($function)) {\n $ret = $function($context['sandbox']);\n }\n\n if (isset($ret['#finished'])) {\n $context['finished'] = $ret['#finished'];\n unset($ret['#finished']);\n }\n\n if (!isset($context['results'][$module])) {\n $context['results'][$module] = array();\n }\n if (!isset($context['results'][$module][$number])) {\n $context['results'][$module][$number] = array();\n }\n $context['results'][$module][$number] = array_merge($context['results'][$module][$number], $ret);\n\n if (!empty($ret['#abort'])) {\n $context['results'][$module]['#abort'] = TRUE;\n }\n // Record the schema update if it was completed successfully.\n if ($context['finished'] == 1 && empty($context['results'][$module]['#abort'])) {\n drupal_set_installed_schema_version($module, $number);\n }\n\n $context['message'] = 'Updating '. check_plain($module) .' module';\n}", "public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n {\n $this->setup = $setup;\n $this->setup->startSetup();\n\n /*\n * Update config values\n */\n\n \n foreach ($this->_getConfigArray() as $config) {\n if (isset($config['version']) && version_compare($context->getVersion(), $config['version'], '<')) {\n $this->setConfigData($config['path'], $config['value'],\n isset($config['scope']) ? $config['scope'] : 'default',\n isset($config['scope_id']) ? $config['scope_id'] : 0\n );\n }\n }\n\n\n /*\n * Update static blocks\n */\n foreach ($this->_getBlockArray() as $block) {\n if (isset($block['version']) && version_compare($context->getVersion(), $block['version'], '<')) {\n $this->createCmsBlock($block['identifier'], $block['content'], $block['title'], $block['stores']);\n }\n }\n\n\n /*\n * Create / Update cms pages\n */\n foreach ($this->_getPageArray() as $block) {\n if (isset($block['version']) && version_compare($context->getVersion(), $block['version'], '<')) {\n $this->createCmsPage($block['identifier'], $block['content'], $block['title'], $block['content_heading'], $block['page_layout'], $block['stores']);\n }\n }\n\n if ( version_compare($context->getVersion(), '0.0.7', '<')) {\n /** @var \\Magento\\Eav\\Setup\\EavSetup $eavSetup */\n $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);\n $eavSetup->addAttribute(\n \\Magento\\Catalog\\Model\\Product::ENTITY,\n 'product_options_type',\n [\n 'group' => 'Product Details',\n 'type' => 'int',\n 'backend' => '',\n 'frontend' => '',\n 'label' => 'Product Options Type',\n 'input' => 'select',\n 'class' => '',\n 'source' => '',\n 'global' => \\Magento\\Eav\\Model\\Entity\\Attribute\\ScopedAttributeInterface::SCOPE_GLOBAL,\n 'visible' => true,\n 'required' => false,\n 'user_defined' => true,\n 'default' => '',\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' => 'configurable',\n 'option' => ['values' => ['dropdown', 'radio']]\n ]\n );\n }\n \n \n\n $this->setup->endSetup();\n }", "protected function _updateContextData()\n\t{\n\n\t\t// if not been there before, or context has changed since last visit\n\t\tif (is_null($this->_context) || $this->_context != $this->getState('context'))\n\t\t{\n\n\t\t\t// read context name and store inclass variabel, easier to access later on\n\t\t\t$this->_context = $this->getState('context', $this->_context);\n\n\t\t\t// get an application instance\n\t\t\t$application = JFactory::getApplication();\n\n\t\t\t// define context data to be retrieved. Cannot be done at class level,\n\t\t\t// as some default values are dynamic\n\t\t\t$contextData = $this->_getContextDataDef();\n\n\t\t\t// must reset limistart if limit is changed\n\t\t\t$mustResetLimitstart = false;\n\n\t\t\t// get the values from session and store them for future reuse\n\t\t\tforeach ($contextData as $contextDataItem)\n\t\t\t{\n\n\t\t\t\t// must reset limistart if limit is changed, so store previous value of limit\n\t\t\t\tif ($contextDataItem['name'] == 'limit')\n\t\t\t\t{\n\t\t\t\t\t// search for previous value\n\t\t\t\t\t$previousLimit = $application->getUserState($this->_context . '.limit');\n\t\t\t\t\t$previousLimitstart = $application->getUserState($this->_context . '.limitstart');\n\t\t\t\t}\n\n\t\t\t\t// get value\n\t\t\t\t$value = $application->getUserStateFromRequest($this->_context . '.' . $contextDataItem['name'], $contextDataItem['html_name'], $contextDataItem['default'], $contextDataItem['type']);\n\n\t\t\t\tif ($contextDataItem['name'] == 'limit' && isset($previousLimit) && $value != $previousLimit)\n\t\t\t\t{\n\t\t\t\t\t$mustResetLimitstart = true;\n\t\t\t\t\t$newLimit = $value;\n\t\t\t\t}\n\n\t\t\t\t// and store it into this model\n\t\t\t\t$this->setState($this->_context . '.' . $contextDataItem['name'], $value);\n\t\t\t}\n\n\t\t\t// now check if we should reset limitstart\n\t\t\tif ($mustResetLimitstart)\n\t\t\t{\n\n\t\t\t\t$newLimitstart = empty($newLimit) ? 0 : $newLimit * floor($previousLimitstart / $newLimit);\n\t\t\t\t// store it into the session and the model\n\t\t\t\t$application->setUserState($this->_context . '.limitstart', $newLimitstart);\n\t\t\t\t$this->setState($this->_context . '.limitstart', $newLimitstart);\n\t\t\t}\n\t\t}\n\t}", "function update( $source ) {\n\t\tglobal $mod_config;\n\n\t\t//get mcache\n\t\t$mod_mcache = get_memcache();\n\n\t\t//db\n\t\t$mod_db = get_db( $mod_mcache );\n\n\t\t//mod_memcache\n\t\t$mod_memcache = new mod_memcache( $mod_db );\n\n\t\t//load our items\n\t\tif( $source['type'] == 'website' ):\n\t\t\t$mod_source = new mod_source( $source['feed_url'], $source['type'] );\n\t\telse:\n\t\t\t$mod_source = new mod_source( $source['auth_data'], $source['type'], $source['since_id'] );\n\t\tendif;\n\t\t$items = $mod_source->load();\n\n\t\t//if we have auth issues, label in db\n\t\tif( ( $items == 'deauthed' or $items == 'authexpire' ) and $source['type'] != 'website' ):\n\t\t\t//update account\n\t\t\t$mod_db->query( '\n\t\t\t\tUPDATE mod_account\n\t\t\t\tSET ' . ( $items == 'deauthed' ? 'deauthed' : 'expired' ) . ' = 1\n\t\t\t\tWHERE user_id = ' . $source['user_id'] . '\n\t\t\t\tAND type = \"' . $source['type'] . '\"\n\t\t\t\tAND o_id = ' . $source['o_id'] . '\n\t\t\t\tLIMIT 1\n\t\t\t' );\n\n\t\t\t//and we're done\n\t\t\techo 'source loading failed' . PHP_EOL;\n\t\t\texit( 0 );\n\t\tendif;\n\n\t\t//false items? baw\n\t\tif( !is_array( $items ) ):\n\t\t\t//only sources (feeds) fail\n\t\t\tif( $source['type'] == 'website' ):\n\t\t\t\t//update failcount\n\t\t\t\t$mod_db->query( '\n\t\t\t\t\tUPDATE mod_website\n\t\t\t\t\tSET fail_count = fail_count + 1\n\t\t\t\t\tWHERE id = ' . $source['id'] . '\n\t\t\t\t\tLIMIT 1\n\t\t\t\t' );\n\t\t\tendif;\n\n\t\t\t//and we're done\n\t\t\techo 'source loading failed' . PHP_EOL;\n\t\t\texit( 0 );\n\t\tendif;\n\n\t\t//no items?\n\t\tif( count( $items ) == 0 ):\n\t\t\techo 'no items located' . PHP_EOL;\n\t\t\texit( 0 );\n\t\tendif;\n\n\t\t//twitter? update last_twitter_id\n\t\tif( $source['type'] == 'twitter' ):\n\t\t\t$max_id = 0;\n\t\t\tforeach( $items as $item )\n\t\t\t\tif( $item['ex_postid'] >= $max_id )\n\t\t\t\t\t$max_id = $item['ex_postid'];\n\n\t\t\t//update\n\t\t\t$mod_db->query( '\n\t\t\t\tUPDATE mod_account\n\t\t\t\tSET latest_tweet_id = ' . $max_id . '\n\t\t\t\tWHERE user_id = ' . $source['user_id'] . '\n\t\t\t\tAND type = \"' . $source['type'] . '\"\n\t\t\t\tAND o_id = ' . $source['o_id'] . '\n\t\t\t\tLIMIT 1\n\t\t\t' );\n\t\tendif;\n\n\t\t//facebook? update latest_post_time\n\t\tif( $source['type'] == 'facebook' ):\n\t\t\t$max_time = 0;\n\t\t\tforeach( $items as $item )\n\t\t\t\tif( $item['time'] >= $max_time )\n\t\t\t\t\t$max_time = $item['time'];\n\n\t\t\t//update\n\t\t\t$mod_db->query( '\n\t\t\t\tUPDATE mod_account\n\t\t\t\tSET latest_post_time = ' . $max_time . '\n\t\t\t\tWHERE user_id = ' . $source['user_id'] . '\n\t\t\t\tAND type = \"' . $source['type'] . '\"\n\t\t\t\tAND o_id = ' . $source['o_id'] . '\n\t\t\t\tLIMIT 1\n\t\t\t' );\n\t\tendif;\n\n\t\t//clean the items for mysql\n\t\t$items = $mod_db->clean( $items );\n\n\t\t//insert arrays\n\t\t$website_article = array();\n\t\t$user_article = array();\n\t\t$topic_article = array();\n\n\t\t//get our subscribers\n\t\tif( $source['type'] == 'website' ):\n\t\t\t$subscribers = $mod_db->query( '\n\t\t\t\tSELECT user_id\n\t\t\t\tFROM mod_user_websites\n\t\t\t\tWHERE website_id = ' . $source['id'] . '\n\t\t\t' );\n\t\telse:\n\t\t\t$subscribers = array(\n\t\t\t\tarray(\n\t\t\t\t\t'user_id' => $source['user_id']\n\t\t\t\t)\n\t\t\t);\n\t\tendif;\n\n\t\t//loop each item\n\t\tforeach( $items as $key => $item ):\n\t\t\t//remove any older than update time\n\t\t\tif( $source['type'] == 'source' and $item['time'] < $source['update_time'] ):\n\t\t\t\techo 'old article, skipping (' . $key . ' / ' . count( $items ) . ') ' . $item['end_url'] . PHP_EOL;\n\t\t\t\tcontinue; //we're done\n\t\t\tendif;\n\n\t\t\t//work out source, locate/insert where needed\n\t\t\tif( $source['type'] == 'website' ):\n\t\t\t\t//article may appear on multiple sources, in this case we're adding it to this source\n\t\t\t\t$items[$key]['source_id'] = $item['source_id'] = $source['id'];\n\t\t\t\t$items[$key]['source_title'] = $item['source_title'] = $source['site_title'];\n\t\t\t\t$items[$key]['source_url'] = $item['source_url'] = $source['site_url'];\n\t\t\t\t$items[$key]['source_subscribers'] = $item['source_subscribers'] = $source['subscribers'];\n\t\t\telse:\n\t\t\t\t//not a source updating, so lets try find one, first work out root url\n\t\t\t\t$url = parse_url( $item['end_url'] );\n\t\t\t\t$url = $url['scheme'] . '://' . $url['host'];\n\n\t\t\t\t//look for feeds on the url\n\t\t\t\t$test = new mod_source( $url );\n\t\t\t\t$feed = @$test->find( $url );\n\n\t\t\t\t//found one?\n\t\t\t\tif( $feed and isset( $feed['feed_url'] ) and !empty( $feed['feed_url'] ) and isset( $feed['site_url'] ) and !empty( $feed['site_url'] ) ):\n\t\t\t\t\techo 'source located @: ' . $url . PHP_EOL;\n\n\t\t\t\t\t//do we have it already?\n\t\t\t\t\t$exist = $mod_db->query( '\n\t\t\t\t\t\tSELECT id, site_title, site_url, subscribers\n\t\t\t\t\t\tFROM mod_website\n\t\t\t\t\t\tWHERE feed_url = \"' . $feed['feed_url'] . '\"\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t' );\n\t\t\t\t\t//no?\n\t\t\t\t\tif( !$exist or count( $exist ) == 0 ):\n\t\t\t\t\t\t$feed = $mod_db->clean( $feed );\n\t\t\t\t\t\n\t\t\t\t\t\t//create the source\n\t\t\t\t\t\t$create = $mod_db->query( '\n\t\t\t\t\t\t\tINSERT INTO mod_website\n\t\t\t\t\t\t\t( site_title, site_url, feed_url, time )\n\t\t\t\t\t\t\tVALUES ( \"' . $feed['site_title'] . '\", \"' . $feed['site_url'] . '\", \"' . $feed['feed_url'] . '\", ' . time() . ' )\n\t\t\t\t\t\t' );\n\t\t\t\t\t\t//create worked?\n\t\t\t\t\t\tif( $create ):\n\t\t\t\t\t\t\t$items[$key]['source_id'] = $item['source_id'] = $mod_db->insert_id();\n\t\t\t\t\t\t\t$items[$key]['source_title'] = $item['source_title'] = $feed['site_title'];\n\t\t\t\t\t\t\t$items[$key]['source_url'] = $item['source_url'] = $feed['site_url'];\n\t\t\t\t\t\t\t$items[$key]['source_subscribers'] = $item['source_subscribers'] = 0;\n\t\t\t\t\t\t\techo 'source inserted: ' . $url . PHP_EOL;\n\t\t\t\t\t\tendif;\n\t\t\t\t\t//yes!\n\t\t\t\t\telse:\n\t\t\t\t\t\t$items[$key]['source_id'] = $item['source_id'] = $exist[0]['id'];\n\t\t\t\t\t\t$items[$key]['source_title'] = $item['source_title'] = $exist[0]['site_title'];\n\t\t\t\t\t\t$items[$key]['source_url'] = $item['source_url'] = $exist[0]['site_url'];\n\t\t\t\t\t\t$items[$key]['source_subscribers'] = $item['source_subscribers'] = $exist[0]['subscribers'];\n\t\t\t\t\t\techo 'source added: ' . $item['source_id'] . PHP_EOL;\n\t\t\t\t\tendif;\n\t\t\t\telse:\n\t\t\t\t\t$items[$key]['source_id'] = $item['source_id'] = 0;\n\t\t\t\t\techo 'could not find feed on: ' . $url . PHP_EOL;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\t\t//source url set?\n\t\t\tif( isset( $item['source_url'] ) and isset( $item['source_title'] ) and isset( $item['source_id'] ) ):\n\t\t\t\t$tmp = parse_url( $item['source_url'] );\n\t\t\t\t$item['source_domain'] = isset( $tmp['host'] ) ? $tmp['host'] : '';\n\t\t\tendif;\n\n\t\t\t//work out id, insert where needed (now we have source_id)\n\t\t\tif( !isset( $item['id'] ) ):\n\t\t\t\t//insert the article\n\t\t\t\t$insert = $mod_db->query( '\n\t\t\t\t\tINSERT INTO mod_article\n\t\t\t\t\t( title, url, end_url, description, author, time, image_thumb, image_tall, image_wide, image_wide_big, source_id, source_title, source_data, type, xframe )\n\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\"' . $item['title'] . '\",\n\t\t\t\t\t\t\"' . $item['url'] . '\",\n\t\t\t\t\t\t\"' . $item['end_url'] . '\",\n\t\t\t\t\t\t\"' . $item['summary'] . '\",\n\t\t\t\t\t\t\"' . $item['author'] . '\",\n\t\t\t\t\t\t' . $item['time'] . ',\n\t\t\t\t\t\t\"' . $item['image_thumb'] . '\",\n\t\t\t\t\t\t\"' . $item['image_tall'] . '\",\n\t\t\t\t\t\t\"' . $item['image_wide'] . '\",\n\t\t\t\t\t\t\"' . $item['image_wide_big'] . '\",\n\t\t\t\t\t\t' . ( isset( $item['source_domain'] ) ? $item['source_id'] : 0 ) . ',\n\t\t\t\t\t\t\"' . ( isset( $item['source_domain'] ) ? $item['source_title'] : '' ) . '\",\n\t\t\t\t\t\t\\'' . ( isset( $item['source_domain'] ) ? json_encode( array( 'domain' => $item['source_domain'], 'subscribers' => $item['source_subscribers'] ) ) : '{}' ) . '\\',\n\t\t\t\t\t\t\"' . $item['type'] . '\",\n\t\t\t\t\t\t' . ( $item['xframe'] ? 1 : 0 ) . '\n\t\t\t\t\t)\n\t\t\t\t' );\n\t\t\t\t//all good?\n\t\t\t\tif( $insert ):\n\t\t\t\t\t$items[$key]['id'] = $item['id'] = $mod_db->insert_id();\n\t\t\t\t\techo 'inserted: #' . $item['id'] . ' : ' . $item['end_url'] . PHP_EOL;\n\n\t\t\t\t\t//if we have a source id, we can tag\n\t\t\t\t\tif( $item['source_id'] > 0 ):\n\t\t\t\t\t\t//topic/tag time\n\t\t\t\t\t\t$topics = array();\n\n\t\t\t\t\t\t//get topics (cached, daily)\n\t\t\t\t\t\t$source_topics = $mod_db->query( '\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tmod_topic.id, mod_topic.title, mod_topic.subscribers, mod_topic.type, mod_topic.parent_id, mod_topic2.title AS parent_title, 0 AS auto_tag\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\tmod_topic LEFT JOIN mod_topic AS mod_topic2 ON mod_topic2.id = mod_topic.parent_id\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\tmod_topic.auto_tag = 1\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t) UNION (\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tmod_topic.id, mod_topic.title, mod_topic.subscribers, mod_topic.type, mod_topic.parent_id, mod_topic2.title AS parent_title,\n\t\t\t\t\t\t\t\t\t( mod_topic_websites.auto_tag and mod_topic.parent_id != mod_topic_websites.topic_id ) AS auto_tag\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\tmod_topic_websites,\n\t\t\t\t\t\t\t\t\tmod_topic LEFT JOIN mod_topic AS mod_topic2 ON mod_topic2.id = mod_topic.parent_id\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\tmod_topic_websites.website_id = ' . $item['source_id'] . '\n\t\t\t\t\t\t\t\t\tAND ( mod_topic.id = mod_topic_websites.topic_id OR mod_topic.parent_id = mod_topic_websites.topic_id )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\tORDER BY id\n\t\t\t\t\t\t', true, 86400 );\n\t\t\t\t\t\t//arrays\n\t\t\t\t\t\t$possible_topics = array();\n\t\t\t\t\t\t$auto_topics = array();\n\n\t\t\t\t\t\t//loop source topics\n\t\t\t\t\t\tforeach( $source_topics as $topic ):\n\t\t\t\t\t\t\t//add to possible\n\t\t\t\t\t\t\t$possible_topics[$topic['id']] = array(\n\t\t\t\t\t\t\t\t'id' => $topic['id'],\n\t\t\t\t\t\t\t\t'title' => $topic['title'],\n\t\t\t\t\t\t\t\t'parent' => $topic['parent_id'],\n\t\t\t\t\t\t\t\t'subscribers' => $topic['subscribers'],\n\t\t\t\t\t\t\t\t'used' => false\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t//parent? better add that\n\t\t\t\t\t\t\tif( $topic['parent_id'] > 0 and !isset( $possible_topics[$topic['parent_id']] ) ):\n\t\t\t\t\t\t\t\t$possible_topics[$topic['parent_id']] = array(\n\t\t\t\t\t\t\t\t\t'id' => $topic['parent_id'],\n\t\t\t\t\t\t\t\t\t'title' => $topic['parent_title'],\n\t\t\t\t\t\t\t\t\t'parent' => 0,\n\t\t\t\t\t\t\t\t\t'subscribers' => $topic['subscribers'],\n\t\t\t\t\t\t\t\t\t'used' => false\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t\t//general, auto_tag?\n\t\t\t\t\t\t\tif( $topic['auto_tag'] == 1 ):\n\t\t\t\t\t\t\t\t$topics[] = array(\n\t\t\t\t\t\t\t\t\t'id' => $topic['id'],\n\t\t\t\t\t\t\t\t\t'title' => $topic['title'],\n\t\t\t\t\t\t\t\t\t'parent' => $topic['parent_id'],\n\t\t\t\t\t\t\t\t\t'subscribers' => $topic['subscribers']\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t//set to used\n\t\t\t\t\t\t\t\t$possible_topics[$topic['id']]['used'] = true;\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\tendforeach;\n\n\t\t\t\t\t\t//title words\n\t\t\t\t\t\t$words = explode( ' ', $item['title'] );\n\n\t\t\t\t\t\t//foreach possible_topic, test\n\t\t\t\t\t\tforeach( $possible_topics as $key => $topic ):\n\t\t\t\t\t\t\tif( $possible_topics[$key]['used'] ) continue;\n\n\t\t\t\t\t\t\tforeach( $words as $word ):\n\t\t\t\t\t\t\t\t//match or substring?\n\t\t\t\t\t\t\t\tif( strcasecmp( $topic['title'], trim( substr( $word, 0, strlen( $topic['title'] ) ) ) ) == 0 ):\n\t\t\t\t\t\t\t\t\t$topics[] = array(\n\t\t\t\t\t\t\t\t\t\t'id' => $topic['id'],\n\t\t\t\t\t\t\t\t\t\t'title' => $topic['title'],\n\t\t\t\t\t\t\t\t\t\t'parent' => $topic['parent'],\n\t\t\t\t\t\t\t\t\t\t'subscribers' => $topic['subscribers']\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t$possible_topics[$key]['used'] = true;\n\t\t\t\t\t\t\t\t\t//add parent if one\n\t\t\t\t\t\t\t\t\tif( $topic['parent'] > 0 and !$possible_topics[$topic['parent']]['used'] ):\n\t\t\t\t\t\t\t\t\t\t$topics[] = array(\n\t\t\t\t\t\t\t\t\t\t\t'id' => $topic['parent'],\n\t\t\t\t\t\t\t\t\t\t\t'title' => $possible_topics[$topic['parent']]['title'],\n\t\t\t\t\t\t\t\t\t\t\t'parent' => $possible_topics[$topic['parent']]['parent'],\n\t\t\t\t\t\t\t\t\t\t\t'subscribers' => $possible_topics[$topic['parent']]['subscribers']\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t$possible_topics[$topic['parent']]['used'] = true;\n\t\t\t\t\t\t\t\t\t\t//parent has parent?\n\t\t\t\t\t\t\t\t\t\tif( $possible_topics[$topic['parent']]['parent'] > 0 and !$possible_topics[$possible_topics[$topic['parent']]['parent']]['used'] ):\n\t\t\t\t\t\t\t\t\t\t\t$topics[] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id' => $possible_topics[$topic['parent']]['parent'],\n\t\t\t\t\t\t\t\t\t\t\t\t'title' => $possible_topics[$possible_topics[$topic['parent']]['parent']]['title'],\n\t\t\t\t\t\t\t\t\t\t\t\t'parent' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t'subscribers' => $possible_topics[$possible_topics[$topic['parent']]['parent']]['subscribers']\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t$possible_topics[$possible_topics[$topic['parent']]['parent']]['used'] = true;\n\t\t\t\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tendforeach;\n\n\t\t\t\t\t\t//add to topic_articles (article_id, topic_id, time, source_id, source_title, source_data, article_time)\n\t\t\t\t\t\tforeach( $topics as $topic ):\n\t\t\t\t\t\t\t$tmp = array(\n\t\t\t\t\t\t\t\t'article_id' => $item['id'],\n\t\t\t\t\t\t\t\t'article_type' => $item['type'],\n\t\t\t\t\t\t\t\t'topic_id' => $topic['id'],\n\t\t\t\t\t\t\t\t'source_id' => $item['source_id'],\n\t\t\t\t\t\t\t\t'source_title' => '',\n\t\t\t\t\t\t\t\t'source_data' => '{}',\n\t\t\t\t\t\t\t\t'article_time' => $item['time']\n\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t//do we have the source?\n\t\t\t\t\t\t\tif( $item['source_id'] > 0 ):\n\t\t\t\t\t\t\t\t$domain = parse_url( $item['source_url'] );\n\t\t\t\t\t\t\t\t$domain = isset( $domain['host'] ) ? $domain['host'] : '';\n\n\t\t\t\t\t\t\t\t$tmp['source_title'] = $item['source_title'];\n\t\t\t\t\t\t\t\t$tmp['source_data'] = json_encode( array( 'domain' => $domain, 'subscribers' => $item['source_subscribers'] ) );\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t//add to topic articles\n\t\t\t\t\t\t\t$topic_article[] = $tmp;\n\n\t\t\t\t\t\t\t//select topic subscribers\n\t\t\t\t\t\t\t$topic_subscribers = $mod_db->query( '\n\t\t\t\t\t\t\t\tSELECT user_id\n\t\t\t\t\t\t\t\tFROM mod_user_topics\n\t\t\t\t\t\t\t\tWHERE topic_id = ' . $topic['id'] . ( \n\t\t\t\t\t\t\t\t\t$topic['parent'] > 0 ? ' OR topic_id = ' . $topic['parent'] : '' \n\t\t\t\t\t\t\t), true, 3600 );\n\n\t\t\t\t\t\t\t//add basic info\n\t\t\t\t\t\t\tunset( $tmp['topic_id'] );\n\t\t\t\t\t\t\t$tmp['source_type'] = 'topic';\n\t\t\t\t\t\t\t$tmp['source_id'] = $topic['id'];\n\t\t\t\t\t\t\t$tmp['source_title'] = $topic['title'];\n\t\t\t\t\t\t\t$tmp['source_data'] = json_encode( array( 'subscribers' => $topic['subscribers'] ) );\n\t\t\t\t\t\t\t$tmp['origin_id'] = 0;\n\t\t\t\t\t\t\t$tmp['origin_title'] = '';\n\t\t\t\t\t\t\t$tmp['origin_data'] = '{}';\n\n\t\t\t\t\t\t\t//add to user_article\n\t\t\t\t\t\t\tforeach( $topic_subscribers as $subscriber ):\n\t\t\t\t\t\t\t\t$tmp['user_id'] = $subscriber['user_id'];\n\t\t\t\t\t\t\t\t$tmp['unread'] = count( $mod_memcache->get( 'mod_user_hides', array(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'user_id' => $subscriber['user_id'],\n\t\t\t\t\t\t\t\t\t\t'article_id' => $item['id']\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t) ) ) == 1 ? 0 : 1;\n\n\t\t\t\t\t\t\t\t//origin?\n\t\t\t\t\t\t\t\tif( $item['source_id'] > 0 and isset( $domain ) ):\n\t\t\t\t\t\t\t\t\t$tmp['origin_id'] = $item['source_id'];\n\t\t\t\t\t\t\t\t\t$tmp['origin_title'] = $item['source_title'];\n\t\t\t\t\t\t\t\t\t$tmp['origin_data'] = json_encode( array( 'domain' => $domain ) );\n\t\t\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\t\t\t//finally add\n\t\t\t\t\t\t\t\t$user_article[] = $tmp;\n\t\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\techo 'article autotagged ' . count( $topics ) . ' times #' . $item['id'] . PHP_EOL;\n\t\t\t\t\tendif; //if source id > 0\n\t\t\t\telse:\n\t\t\t\t\techo 'insert failed on: ' . $item['end_url'] . ' : ' . mysql_error() . PHP_EOL;\n\t\t\t\t\tcontinue;\n\t\t\t\tendif; //if insert\n\n\t\t\t\t//for mod_source when checking for articles\n\t\t\t\t@$mod_mcache->set( md5( $item['end_url'] ), $item['id'] );\n\t\t\t\t@$mod_mcache->set( md5( $item['url'] ), $item['id'] );\n\t\t\t\t@$mod_mcache->set( md5( $item['title'] ), $item['id'] );\n\t\t\telse:\n\t\t\t\techo 'article already has id: ' . $item['id'] . PHP_EOL;\n\t\t\tendif;\n\n\t\t\t//finally, add to source_article\n\t\t\tif( $item['source_id'] > 0 ):\n\t\t\t\t$website_article[] = array(\n\t\t\t\t\t'website_id' => $item['source_id'],\n\t\t\t\t\t'article_id' => $item['id'],\n\t\t\t\t\t'article_time' => $item['time']\n\t\t\t\t);\n\t\t\tendif;\n\n\t\t\t//finally finally, add to user_articles, gets complicated\n\t\t\tforeach( $subscribers as $subscriber ):\n\t\t\t\t//standard data\n\t\t\t\t$tmp = array(\n\t\t\t\t\t'user_id' => $subscriber['user_id'],\n\t\t\t\t\t'article_id' => $item['id'],\n\t\t\t\t\t'article_type' => $item['type'],\n\t\t\t\t\t'source_type' => $source['type'],\n\t\t\t\t\t'article_time' => $item['time'],\n\t\t\t\t\t'unread' => count( $mod_memcache->get( 'mod_user_hides', array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'user_id' => $subscriber['user_id'],\n\t\t\t\t\t\t\t'article_id' => $item['id']\n\t\t\t\t\t\t)\n\t\t\t\t\t) ) ) == 1 ? 0 : 1,\n\t\t\t\t\t'origin_id' => 0,\n\t\t\t\t\t'origin_title' => '',\n\t\t\t\t\t'origin_data' => '{}'\n\t\t\t\t);\n\n\t\t\t\t//now, source_id, source_title, source_data, ( +where needed: origin_id, origin_title, origin_data )\n\t\t\t\tif( $source['type'] == 'website' ):\n\t\t\t\t\t$tmp['source_id'] = $source['id'];\n\t\t\t\t\t$tmp['source_title'] = $source['site_title'];\n\n\t\t\t\t\t$domain = parse_url( $source['site_url'] );\n\t\t\t\t\t$domain = $domain['host'];\n\t\t\t\t\t$tmp['source_data'] = json_encode( array( 'domain' => $domain, 'subscribers' => $item['source_subscribers'] ) );\n\n\t\t\t\t//facebook or twitter (so far)\n\t\t\t\telse:\n\t\t\t\t\t$tmp['source_id'] = $item['ex_userid']; //source ignored\n\t\t\t\t\t$tmp['source_title'] = $item['ex_username'];\n\t\t\t\t\t$tmp['source_data'] = json_encode( array( 'text' => $item['ex_text'], 'postid' => $item['ex_postid'] ) );\n\n\t\t\t\t\t//origin defined? (source 0 by default here)\n\t\t\t\t\tif( $item['source_id'] > 0 ):\n\t\t\t\t\t\t$tmp['origin_id'] = $item['source_id'];\n\t\t\t\t\t\t$tmp['origin_title'] = $item['source_title'];\n\n\t\t\t\t\t\t$domain = parse_url( $item['source_url'] );\n\t\t\t\t\t\t$domain = isset( $domain['host'] ) ? $domain['host'] : false;\n\t\t\t\t\t\t$tmp['origin_data'] = json_encode( array( 'domain' => $domain ? $domain : '' ) );\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\n\t\t\t\t//add to user_article\n\t\t\t\t$user_article[] = $tmp;\n\t\t\tendforeach;\n\n\t\t\techo 'item complete: ' . $key . ' / ' . count( $items ) . ' : ' . $item['end_url'] . PHP_EOL;\n\t\tendforeach;\n\n\t\t//build the mod_source_articles query (after we have article ids)\n\t\tif( count( $website_article ) > 0 ):\n\t\t\t//store article counts per website\n\t\t\t$tmp = array();\n\n\t\t\t$sql = '\n\t\t\t\tINSERT IGNORE INTO mod_website_articles ( website_id, article_id, article_time )\n\t\t\t\tVALUES';\n\n\t\t\tforeach( $website_article as $bit ):\n\t\t\t\t$sql .= ' (\n\t\t\t\t\t' . $bit['website_id'] . ',\n\t\t\t\t\t' . $bit['article_id'] . ',\n\t\t\t\t\t' . $bit['article_time'] . '\n\t\t\t\t),';\n\n\t\t\t\t//article counter\n\t\t\t\tif( !isset( $tmp[$bit['website_id']] ) )\n\t\t\t\t\t$tmp[$bit['website_id']] = 1;\n\t\t\t\telse\n\t\t\t\t\t$tmp[$bit['website_id']]++;\n\n\t\t\tendforeach;\n\n\t\t\t$sql = rtrim( $sql, ',' );\n\n\t\t\t//run it\n\t\t\t$insert = $mod_db->query( $sql );\n\n\t\t\t//fail message\n\t\t\tif( !$insert ):\n\t\t\t\techo 'mod_source_article insert failed: ' . mysql_error() . PHP_EOL . $sql . PHP_EOL;\n\t\t\telse:\n\t\t\t\techo 'mod_source_article insert complete' . PHP_EOL;\n\n\t\t\t\t//update website article counts\n\t\t\t\tforeach( $tmp as $website_id => $count ):\n\t\t\t\t\t$website = $mod_memcache->get( 'mod_website', array( array(\n\t\t\t\t\t\t'id' => $website_id\n\t\t\t\t\t) ) );\n\n\t\t\t\t\tif( $website and count( $website ) == 1 )\n\t\t\t\t\t\t$mod_memcache->set( 'mod_website', array( array(\n\t\t\t\t\t\t\t'id' => $website_id,\n\t\t\t\t\t\t\t'articles' => $website[0]['articles'] + $count\n\t\t\t\t\t\t) ), false );\n\n\t\t\t\tendforeach;\n\n\t\t\tendif;\n\t\tendif;\n\n\t\t//build the mod_source_articles query\n\t\tif( count( $user_article ) > 0 ):\n\t\t\t$sql = '\n\t\t\t\tINSERT IGNORE INTO mod_user_articles ( user_id, article_id, article_type, source_type, source_id, source_title, article_time, unread, source_data, origin_id, origin_title, origin_data )\n\t\t\t\tVALUES';\n\n\t\t\tforeach( $user_article as $bit )\n\t\t\t\t$sql .= ' (\n\t\t\t\t\t' . $bit['user_id'] . ',\n\t\t\t\t\t' . $bit['article_id'] . ',\n\t\t\t\t\t\"' . $bit['article_type'] . '\",\n\t\t\t\t\t\"' . $bit['source_type'] . '\",\n\t\t\t\t\t\"' . $bit['source_id'] . '\",\n\t\t\t\t\t\"' . $bit['source_title'] . '\",\n\t\t\t\t\t' . $bit['article_time'] . ',\n\t\t\t\t\t' . $bit['unread'] . ',\n\t\t\t\t\t\\'' . $bit['source_data'] . '\\',\n\t\t\t\t\t' . $bit['origin_id'] . ',\n\t\t\t\t\t\"' . $bit['origin_title'] . '\",\n\t\t\t\t\t\\'' . $bit['origin_data'] . '\\'\n\t\t\t\t),';\n\n\t\t\t$sql = rtrim( $sql, ',' );\n\n\t\t\t//run it\n\t\t\t$insert = $mod_db->query( $sql );\n\n\t\t\t//fail message\n\t\t\tif( !$insert ):\n\t\t\t\techo 'mod_user_article insert failed: ' . mysql_error() . PHP_EOL . $sql . PHP_EOL;\n\t\t\telse:\n\t\t\t\techo 'mod_user_article insert complete' . PHP_EOL;\n\t\t\tendif;\n\t\tendif;\n\n\t\t//build the topic_articles query\n\t\tif( count( $topic_article ) > 0 ):\n\t\t\t//store article counts per topic\n\t\t\t$tmp = array();\n\n\t\t\t$sql = '\n\t\t\t\tINSERT IGNORE INTO mod_topic_articles ( article_id, topic_id, source_id, source_title, source_data, article_time, article_type )\n\t\t\t\tVALUES';\n\n\t\t\tforeach( $topic_article as $bit ):\n\t\t\t\t$sql .= ' (\n\t\t\t\t\t' . $bit['article_id'] . ',\n\t\t\t\t\t' . $bit['topic_id'] . ',\n\t\t\t\t\t' . $bit['source_id'] . ',\n\t\t\t\t\t\"' . $bit['source_title'] . '\",\n\t\t\t\t\t\\'' . $bit['source_data'] . '\\',\n\t\t\t\t\t' . $bit['article_time'] . ',\n\t\t\t\t\t\"' . $bit['article_type'] . '\"\n\t\t\t\t),';\n\n\t\t\t\t//article counter\n\t\t\t\tif( !isset( $tmp[$bit['topic_id']] ) )\n\t\t\t\t\t$tmp[$bit['topic_id']] = 1;\n\t\t\t\telse\n\t\t\t\t\t$tmp[$bit['topic_id']]++;\n\n\t\t\tendforeach;\n\n\t\t\t$sql = rtrim( $sql, ',' );\n\n\t\t\t//run inserts\n\t\t\t$insert = $mod_db->query( $sql );\n\n\t\t\t//message\n\t\t\tif( !$insert ):\n\t\t\t\techo 'mod_topic_article insert failed: ' . mysql_error() . PHP_EOL . $sql . PHP_EOL;\n\t\t\telse:\n\t\t\t\techo 'mod_topic_article insert complete' . PHP_EOL;\n\n\t\t\t\t//update topic article counts\n\t\t\t\tforeach( $tmp as $topic_id => $count ):\n\t\t\t\t\t$topic = $mod_memcache->get( 'mod_topic', array( array(\n\t\t\t\t\t\t'id' => $topic_id\n\t\t\t\t\t) ) );\n\n\t\t\t\t\tif( $topic and count( $topic ) == 1 )\n\t\t\t\t\t\t$mod_memcache->set( 'mod_topic', array( array(\n\t\t\t\t\t\t\t'id' => $topic_id,\n\t\t\t\t\t\t\t'articles' => $topic[0]['articles'] + $count\n\t\t\t\t\t\t) ), false );\n\n\t\t\t\tendforeach;\n\t\t\tendif;\n\t\tendif;\n\n\t\t//complete\n\t\techo 'source update complete #' . ( $source['id'] > 0 ? $source['id'] : $source['type'] ) . PHP_EOL;\n\n\t\t//remove db\n\t\t$mod_db->__destruct();\n\t\tunset( $mod_db );\n\n\t\t//exit\n\t\texit( 0 );\n\t}", "public function actionGet_modules_sheet_data(){\n //get existing modules data\n $modules_data = ArrayHelper::map(DvModuleModel::find()->all(), 'module_name', 'module_name');\n //get sheet's modules data\n $fetch_sheet_data = Yii::$app->runAction('dv-cron/get_batch_data');\n $new_modules_array = array();\n $course_array = ['SMM','SEO','SEM','IM','WA','DAP','DAR','CMAM','EM'];\n //DAP','DAR : da && rest of --> //dm\n $domain_array = ['DAP','DAR']; // da\n $module_array = array();\n \n foreach ($fetch_sheet_data as $sheet_data) {\n if(!in_array(trim($sheet_data['Course']),$modules_data)){\n \n if(trim($sheet_data['Course']) !='' && !in_array(trim($sheet_data['Course']), $module_array)){\n //get new modules name\n\n $module_array[] = trim($sheet_data['Course']);\n\n if(substr(trim($sheet_data['Type']),1) == 'w' || substr(trim($sheet_data['Type']),2) == 'w'){\n $weeks_data = '';\n $weeks_data = explode('w',$sheet_data['Type'])[0];\n }\n $domain='';\n if($sheet_data['Course'] == \"DAP\" || $sheet_data['Course'] == 'DAR'){\n $domain = \"da\";\n }else{\n $domain = \"dm\"; \n } \n if(in_array($sheet_data['Course'], $course_array)){\n $new_modules_array[] = [trim($sheet_data['Course']),\"Instructor led\",\"Core\",$weeks_data,$domain];\n }else{\n $new_modules_array[] = [trim($sheet_data['Course']),\"Self\",\"Special\",$weeks_data,$domain];\n }\n }\n } \n }//End of inner loop\n \n /* echo \"<pre>\";\n print_r($new_modules_array);\n die;*/\n //TRUNCATE TABLE assist_module_sheet_data;\n //INSERT INTO assist_module_sheet_data SELECT * FROM assist_module;\n \n /*\n foreach ($new_modules_array as $new_value) {\n Yii::$app->db->createCommand()->insert('assist_module_sheet_data',['module_name'=>$new_value[0], 'module_type'=>$new_value[1],'number_of_weeks'=>$new_value[3],'category_type'=>$new_value[2],'mcourse'=>$new_value[4]])->execute();\n \n }\n */\n echo \"All Modules data has been inserted\";\n }", "public function modifyVegData()\n\t{\n\t\tif('A' != $this->Session->read('UserType'))\n\t\t{\n\t\t\t$this->Session->setFlash(__('You do not have permissions to access this page !'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->VegSample->recursive = 0;\n\t\t\t$startDate = $this->request->params['pass']['0'];\n\t\t\t$endDate = $this->request->params['pass']['1'];\n\t\t\t$this->set('VegSample', $this->VegSample->getVegData($startDate,$endDate));\n\t\t\t$this->set('startDate', $startDate);\n\t\t\t$this->set('endDate',$endDate);\n\t\t}\n\t}", "public function updateData()\n {\n return ([\n [\"2\", \"9898989898\", \"pune\", 302, \"manager-records\"]\n ]);\n }", "function updateDB() {\n if (array_key_exists('model', $this->ptcdUpdates)) {\n $manufacturer = Dropdown::getDropdownName(\"glpi_dropdown_manufacturer\",\n $this->getValue('FK_glpi_enterprise'));\n $this->ptcdUpdates['model'] = Dropdown::importExternal(\"NetworkEquipmentModel\",\n $this->ptcdUpdates['model'], 0,\n array('manufacturer'=>$manufacturer));\n }\n if (array_key_exists('firmware', $this->ptcdUpdates)) {\n $this->ptcdUpdates['firmware'] = Dropdown::importExternal(\"NetworkEquipmentFirmware\",\n $this->ptcdUpdates['firmware']);\n }\n if (array_key_exists('location', $this->ptcdUpdates)) {\n $this->ptcdUpdates['location'] = Dropdown::importExternal(\"Location\",\n $this->ptcdUpdates['location']);\n }\n\n parent::updateDB();\n // update last_fusioninventory_update even if no other update\n $this->setValue('last_fusioninventory_update', date(\"Y-m-d H:i:s\"));\n $this->oFusionInventory_networking->updateDB();\n // ports\n $this->savePorts();\n }", "function refresh() {\n $missing = array_keys($this->dl + $this->en);\n $this->dl = array();\n $this->en = array();\n $this->visited = array();\n $this->requireModules($missing, '(missing)');\n }", "function rebuildDeviceData() {\n\t\tsystemLog::notice('Starting rebuild of device data');\n\t\t$oStmt = dbManager::getInstance()->prepare('SELECT deviceID FROM '.system::getConfig()->getDatabase('wurfl').'.devices WHERE rootDevice = 1');\n\t\tif ( $oStmt->execute() ) {\n\t\t\tforeach ( $oStmt as $row ) {\n\t\t\t\tsystemLog::getInstance()->setSource('rebuild]['.$row['deviceID']);\n\t\t\t\t$oDevice = wurflManager::getInstance($row['deviceID']);\n\t\t\t\tsystemLog::notice('Processing deviceID '.$row['deviceID']);\n\t\t\t\t$oDevice->setModelName($oDevice->getCapabilities()->getCapability('model_name'));\n\t\t\t\t\n\t\t\t\t$oMan = wurflManufacturer::getInstance($oDevice->getCapabilities()->getCapability('brand_name'));\n\t\t\t\tif ( $oMan->getManufacturerID() > 0 ) {\n\t\t\t\t\t$oDevice->setManufacturerID($oMan->getManufacturerID());\n\t\t\t\t}\n\t\t\t\t$oDevice->save();\n\t\t\t}\n\t\t}\n\t}", "public function process_scorm($data) {\n global $CFG;\n\n // get the course module id and context id\n $instanceid = $data['id'];\n $currentcminfo = $this->get_cminfo($instanceid);\n $this->moduleid = $currentcminfo['id'];\n $contextid = $this->converter->get_contextid(CONTEXT_MODULE, $this->moduleid);\n\n // conditionally migrate to html format in intro\n if ($CFG->texteditors !== 'textarea') {\n $data['intro'] = text_to_html($data['intro'], false, false, true);\n $data['introformat'] = FORMAT_HTML;\n }\n\n // get a fresh new file manager for this instance\n $this->fileman = $this->converter->get_file_manager($contextid, 'mod_scorm');\n\n // convert course files embedded into the intro\n $this->fileman->filearea = 'intro';\n $this->fileman->itemid = 0;\n $data['intro'] = moodle1_converter::migrate_referenced_files($data['intro'], $this->fileman);\n\n // check 1.9 version where backup was created\n $backupinfo = $this->converter->get_stash('backup_info');\n if ($backupinfo['moodle_version'] < 2007110503) {\n // as we have no module version data, assume $currmodule->version <= $module->version\n // - fix data as the source 1.9 build hadn't yet at time of backing up.\n $data['grademethod'] = $data['grademethod']%10;\n }\n\n // update scormtype (logic is consistent as done in scorm/db/upgrade.php)\n $ismanifest = preg_match('/imsmanifest\\.xml$/', $data['reference']);\n $iszippif = preg_match('/.(zip|pif)$/', $data['reference']);\n $isurl = preg_match('/^((http|https):\\/\\/|www\\.)/', $data['reference']);\n if ($isurl) {\n if ($ismanifest) {\n $data['scormtype'] = 'external';\n } else if ($iszippif) {\n $data['scormtype'] = 'localtype';\n }\n }\n\n // migrate scorm package file\n $this->fileman->filearea = 'package';\n $this->fileman->itemid = 0;\n $this->fileman->migrate_file('course_files/'.$data['reference']);\n\n // start writing scorm.xml\n $this->open_xml_writer(\"activities/scorm_{$this->moduleid}/scorm.xml\");\n $this->xmlwriter->begin_tag('activity', array('id' => $instanceid, 'moduleid' => $this->moduleid,\n 'modulename' => 'scorm', 'contextid' => $contextid));\n $this->xmlwriter->begin_tag('scorm', array('id' => $instanceid));\n\n foreach ($data as $field => $value) {\n if ($field <> 'id') {\n $this->xmlwriter->full_tag($field, $value);\n }\n }\n\n $this->xmlwriter->begin_tag('scoes');\n\n return $data;\n }", "public function update()\r\n {\r\n \r\n }", "public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n {\n $setup->startSetup();\n\n if (version_compare($context->getVersion(), '0.0.3', '<')) {\n $binds = [\n ['retailer_id' => 1, 'product_id' => 1],\n ['retailer_id' => 1, 'product_id' => 2],\n ['retailer_id' => 1, 'product_id' => 3],\n ['retailer_id' => 2, 'product_id' => 1],\n ['retailer_id' => 2, 'product_id' => 2],\n ['retailer_id' => 3, 'product_id' => 3],\n ['retailer_id' => 3, 'product_id' => 4],\n ['retailer_id' => 3, 'product_id' => 3],\n ['retailer_id' => 4, 'product_id' => 1]\n ];\n\n foreach ($binds as $bind) {\n $setup->getConnection()\n ->insertForce($setup->getTable('unit4_retailer2product'), $bind);\n }\n\n }\n $setup->endSetup();\n }", "public function _loadData()\n\t{\n\t\t$this->username = $this->_admin->username;\n\t\t$this->oldPassword = '';\n\t\t$this->last_name = $this->_admin->last_name;\n\t\t$this->first_name = $this->_admin->first_name;\n\t}", "protected function processUpdates()\n {\n $this->importStaticData();\n }", "public function extendData() {\n }", "protected function rewriteData()\n\t{\n\t\t$db = $this->getDatabase();\n\n\t\t$fields = array('someval_facebook_valid', 'someval_facebook_type', 'someval_facebook_friends_or_likes',\n\t\t\t\t\t\t'someval_twitter_valid', 'someval_twitter_tweets', 'someval_twitter_followers', 'someval_twitter_following');\n\n\t\tforeach ($this->aData AS &$elm)\n\t\t{\n\t\t\t$query = $db->getQuery(true);\n\n\t\t\t$query->update($db->qn('#__accountdata'))\n\t\t\t\t\t->where('bid = ' . $elm->bid);\n\n\t\t\tforeach ($fields as $f)\n\t\t\t{\n\t\t\t\t$query->set($db->qn($f) . ' = ' . $db->q($elm->$f));\n\t\t\t}\n\n\t\t\t$db->setQuery($query);\n\n\t\t\tif (!$db->execute())\n\t\t\t{\n\t\t\t\tLog::add('Something went wrong for bid=:' . $elm->bid);\n\t\t\t}\n\t\t}\n\t}", "public function update($data) {}", "public function update($data) {}", "public function modify();", "public function processData() {\n\t\t$GLOBALS['TCA'] = \\BusyNoggin\\BnBackend\\BackendLibrary::removeExcludeFields($GLOBALS['TCA']);\n\t}", "private function ezXSS3migrate()\n {\n // Store old data\n $password = $this->model('Setting')->get('password');\n $notepad = $this->model('Setting')->get('notepad');\n\n // Update the database tables and rows\n $sql = file_get_contents(__DIR__ . '/../../ezXSS3migrate.sql');\n $database = Database::openConnection();\n $database->exec($sql);\n $database->exec('ALTER DATABASE `' . DB_NAME . '` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;');\n\n $this->model('Setting')->set('version', version);\n\n // Create new user and update old \n $user = $this->model('User')->create('admin', 'Temp1234!', 7);\n $this->model('User')->setPassword($user['id'], $password, true);\n\n $this->model('Payload')->add($user['id'], host);\n\n // Add note\n $this->model('Setting')->set('notepad', \"Great! U have updated to ezXSS 4!\\n\\nA lot of things have changed, and some settings like your alerts and payloads needs to be re-done in other to make everything work correct again.\\n\\nPlease visit the Github wiki for help on github.com/ssl/ezXSS/wiki\\n\\n\" . $notepad);\n\n // Update all oldskool 'collected pages' and NULL payloads\n $reports = $this->model('Report')->getAllInvalid();\n foreach ($reports as $report) {\n // Set payload to current host\n $this->model('Report')->setSingleValue($report['id'], 'payload', '//' . host . '/');\n\n // Set refer to collected if collected is set\n if (strpos($report['payload'], 'Collected page via ') === 0) {\n $this->model('Report')->setSingleValue($report['id'], 'referer', $report['payload']);\n }\n }\n }", "public function uultra_modules_deactivate_activate_membership()\r\n\t{\r\n\t\t$module_list = array();\r\n\t\t$modules = $_POST[\"modules_list\"]; \r\n\t\t$package_id = $_POST[\"package_id\"]; \r\n\t\t\r\n\t\t\r\n\t\tif($modules!=\"\")\r\n\t\t{\r\n\t\t\t$modules =rtrim($modules,\"|\");\r\n\t\t\t$module_list = explode(\"|\", $modules);\t\t\t\r\n\t\t\t$modules_disalowed = serialize($module_list);\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tprint_r($module_list);\r\n\t\t\t\t\r\n\t\t//update custom\t\t\r\n\t\t$defaultmodules = $this->uultra_get_modules_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules\r\n\t\t$user_menu_modules = $this->uultra_get_user_navigator_for_membership($package_id);\r\n\t\t\r\n\t\t//user menu modules added by admin\r\n\t\t$user_menu_modules_by_admin = $this->uultra_get_custom_modules_for_membership($package_id);\r\n\t\t\r\n\t\t$html = '';\r\n\t\t\r\n\t\t$modules_array = array();\r\n\t\t$i = 1;\r\n\t\tforeach($defaultmodules as $key => $module)\r\n\t\t{\r\n\t\t\tif(!$this->check_if_in_deactivate_array($module_list, $key))\r\n\t\t\t{\r\n\t\t\t\t//if (strpos($modules,$key) !== true) {\r\n\t\t\t\t\t\r\n\t\t\t\t//set position and custom settings\t\t\t\t\t\t\t\r\n\t\t\t\tif(isset($user_menu_modules[$key]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$module[\"position\"] = $i;\r\n\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t\t$modules_array[$key] = $module;\t\t\t\t\t\t\t\r\n\t\t\t\t$i++;\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t\r\n\t\t\t\techo \"disallowed: \" . $key;\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(is_array($user_menu_modules_by_admin) && $user_menu_modules_by_admin!=\"\")\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$modules_array = $modules_array + $user_menu_modules_by_admin;\t\t\r\n\t\t}\r\n\t\tprint_r($modules_array);\r\n\t\tupdate_option('userultra_default_user_features_custom_package_'.$package_id.'',$modules_array);\t\t\t\t\t\r\n\t\tupdate_option('uultra_excluded_user_modules_package_'.$package_id.'',$modules_disalowed);\r\n\t\tdie();\r\n\t\r\n\t}", "public function update(){\n\t\t$modifications[] = new Modification();\n\t}", "public function upModule()\n {\n // check if module is already installed\n if (!is_null(App::findOne(['name' => $this->module->id, 'className' => $this->module->getModuleClassName()])))\n {\n throw new yii\\base\\Exception('Module is already installed');\n }\n\n // 1 - Adds the Module into the database\n $app_record = new App();\n $app_record->name = $this->module->getName();\n $app_record->app_id = $this->module->getId();\n $app_record->description = $this->module->getDescription();\n $app_record->className = $this->module->getModuleClassName();\n $app_record->directory = $this->module->getModuleDirectory();\n $app_record->namespace = $this->module->getModuleNamespace();\n $app_record->version = $this->module->getVersion();\n $app_record->alias = '@' . $this->module->getAlias();\n $app_record->install_date = date(\"Y-m-d H:i:s\");\n $app_record->backend = $this->module->is_backend;\n $app_record->frontend = $this->module->is_frontend;\n $app_record->core_module = $this->module->is_core_module;\n $app_record->status = 'active';\n $app_record->insert();\n\n \n // Add the class and aliases to each module config\n $this->normalizeModuleConfig($app_record);\n\n return $app_record;\n }", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n $this->attributes->save();\n\n }", "public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}", "public function updateModuleTracking( $event )\n {\n $eventArgs = $event->getArgs();\n\n $courseCode = isset( $eventArgs['courseCode'] ) ? $eventArgs['courseCode'] : null;\n $userId = isset( $eventArgs['userId'] ) ? (int)$eventArgs['userId'] : null;\n $type = isset( $eventArgs['type'] ) ? $eventArgs['type'] : \"update\";\n $date = isset( $eventArgs['date'] ) ? $eventArgs['date'] : date(\"Y-m-d H:i:s\");\n\n $scoreRaw = isset( $eventArgs['scoreRaw'] ) ? (int)$eventArgs['scoreRaw'] : 0;\n $scoreMin = isset( $eventArgs['scoreMin'] ) ? (int)$eventArgs['scoreMin'] : 0;\n $scoreMax = isset( $eventArgs['scoreMax'] ) ? (int)$eventArgs['scoreMax'] : 0;\n $sessionTime = isset( $eventArgs['sessionTime'] ) ? $eventArgs['sessionTime'] : '0000:00:00.00';\n $status = isset( $eventArgs['status'] ) ? $eventArgs['status'] : \"NOT ATTEMPTED\";\n\n $learnPathId = isset( $eventArgs['learnPathId'] ) ? (int)$eventArgs['learnPathId'] : null;\n $moduleId = isset( $eventArgs['moduleId'] ) ? (int)$eventArgs['moduleId'] : null;\n $learnPathModuleId = isset( $eventArgs['learnPathModuleId'] ) ? (int)$eventArgs['learnPathModuleId'] : null;\n $userModuleProgressId = isset( $eventArgs['userModuleProgressId'] ) ? (int)$eventArgs['userModuleProgressId'] : null;\n\n if(is_null( $learnPathId ) || is_null( $moduleId ) )\n {\n if( is_null( $learnPathModuleId ) && !is_null( $userModuleProgressId ) )\n {\n $learnPathModuleId = TrackingUtils::getLearnPathModuleIdFromUserModuleProgressId( $courseCode, $userModuleProgressId );\n }\n\n if( !is_null( $learnPathModuleId ) )\n {\n if( is_null( $learnPathId ) )\n {\n $learnPathId = TrackingUtils::getLearnPathIdFromRelLearnPathModuleId( $courseCode, $learnPathModuleId );\n }\n if(is_null( $moduleId ))\n {\n $moduleId = TrackingUtils::getModuleIdFromRelLearnPathModuleId( $courseCode, $learnPathModuleId );\n }\n }\n }\n\n if( !is_null( $courseCode ) && !is_null( $userId ) && !is_null( $learnPathId ) && !is_null( $moduleId ) )\n {\n $data = LearnPathTrackingListener::generateData( $learnPathId, $moduleId, $scoreRaw, $scoreMin, $scoreMax, $sessionTime, $status );\n if( $type == \"init\" )\n {\n $this->addNewLearnPathTracking( $courseCode, $userId, $date, $data, 'learnpath_tracking_init' );\n }\n else\n {\n $this->addNewLearnPathTracking( $courseCode, $userId, $date, $data, 'learnpath_tracking' );\n }\n }\n else\n {\n throw new Exception( \"Unable to generate a tracking event log due to invalid data\" );\n }\n }", "public function update()\n\t{\n\n\t}", "public function update(array $data)\n {\n parent::update($data);\n if (array_key_exists('data', $data)) {\n $this->setData($data['data']);\n }\n }", "public function process_info_details_mod_instance($data) {\n $this->currentmod['instances'][$data['id']] = $data;\n }", "function alters()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['alters'] == 1 ) ? 'Database Field' : 'Database Fields';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'dropped' : 'added';\n\t\t\n\t\tforeach ( $this->xml_array['alters_group']['alter'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] && $v['alter_type']['VALUE'] == 'add' )\n\t\t\t{\n\t\t\t\tif ( !$this->ipsclass->DB->field_exists( \"{$v['field_name']['VALUE']}\", \"{$v['table']['VALUE']}\" ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->sql_add_field( \"{$v['table']['VALUE']}\", \"{$v['field_name']['VALUE']}\", \"{$v['field_type']['VALUE']}\", \"{$v['field_default']['VALUE']}\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $this->ipsclass->DB->field_exists( \"{$v['field_name']['VALUE']}\", \"{$v['table']['VALUE']}\" ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->sql_drop_field( \"{$v['table']['VALUE']}\", \"{$v['field_name']['VALUE']}\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['alters']} {$object} {$operation}....\" );\n\t}", "function categories_upgrade($oldversion)\n{\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n // Upgrade dependent on old version number\n switch($oldversion) {\n case '1.0':\n // Code to upgrade from version 1.0 goes here\n // fall through to the next upgrade\n\n case '2.0':\n // Code to upgrade from version 2.0 goes here\n\n // TODO: remove this for release\n $query = \"ALTER TABLE $xartable[categories]\n ADD COLUMN xar_image varchar(255) NOT NULL\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n // fall through to the next upgrade\n\n case '2.1':\n // Code to upgrade from version 2.1 goes here\n\n // TODO: remove this for release\n\n // when a new module item is being specified\n if (!xarModRegisterHook('item', 'new', 'GUI',\n 'categories', 'admin', 'newhook')) {\n return false;\n }\n // when a module item is created (uses 'cids')\n if (!xarModRegisterHook('item', 'create', 'API',\n 'categories', 'admin', 'createhook')) {\n return false;\n }\n // when a module item is being modified (uses 'cids')\n if (!xarModRegisterHook('item', 'modify', 'GUI',\n 'categories', 'admin', 'modifyhook')) {\n return false;\n }\n // when a module item is updated (uses 'cids')\n if (!xarModRegisterHook('item', 'update', 'API',\n 'categories', 'admin', 'updatehook')) {\n return false;\n }\n // when a module item is deleted\n if (!xarModRegisterHook('item', 'delete', 'API',\n 'categories', 'admin', 'deletehook')) {\n return false;\n }\n // when a module configuration is being modified (uses 'cids')\n if (!xarModRegisterHook('module', 'modifyconfig', 'GUI',\n 'categories', 'admin', 'modifyconfighook')) {\n return false;\n }\n // when a module configuration is updated (uses 'cids')\n if (!xarModRegisterHook('module', 'updateconfig', 'API',\n 'categories', 'admin', 'updateconfighook')) {\n return false;\n }\n // when a whole module is removed, e.g. via the modules admin screen\n // (set object ID to the module name !)\n if (!xarModRegisterHook('module', 'remove', 'API',\n 'categories', 'admin', 'removehook')) {\n return false;\n }\n // fall through to the next upgrade\n\n case '2.2':\n // Code to upgrade from version 2.2 goes here\n\n if (xarModIsAvailable('articles')) {\n // load API for table definition etc.\n if (!xarModAPILoad('articles','user')) return;\n }\n\n $linkagetable = $xartable['categories_linkage'];\n\n xarDBLoadTableMaintenanceAPI();\n\n // add the xar_itemtype column\n $query = xarDBAlterTable($linkagetable,\n array('command' => 'add',\n 'field' => 'xar_itemtype',\n 'type' => 'integer',\n 'null' => false,\n 'default' => '0'));\n $result = $dbconn->Execute($query);\n if (!$result) return;\n\n // make sure all current records have an itemtype 0 (just in case)\n $query = \"UPDATE $linkagetable SET xar_itemtype = 0\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // update the itemtype field for all articles\n if (xarModIsAvailable('articles')) {\n $modid = xarModGetIDFromName('articles');\n $articlestable = $xartable['articles'];\n\n $query = \"SELECT xar_aid, xar_pubtypeid FROM $articlestable\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n while (!$result->EOF) {\n list($aid,$ptid) = $result->fields;\n $update = \"UPDATE $linkagetable SET xar_itemtype = $ptid WHERE xar_iid = $aid AND xar_modid = $modid\";\n $test = $dbconn->Execute($update);\n if (!$test) return;\n\n $result->MoveNext();\n }\n $result->Close();\n }\n\n// TODO: any other modules where we need to insert the right itemtype here ?\n\n // add an index for the xar_itemtype column\n $index = array('name' => 'i_' . xarDBGetSiteTablePrefix() . '_cat_linkage_4',\n 'fields' => array('xar_itemtype'),\n 'unique' => FALSE);\n $query = xarDBCreateIndex($linkagetable,$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n // fall through to the next upgrade\n\n case '2.3':\n case '2.3.0':\n // remove old instance definitions for 'Category'\n $instancetable = $xartable['security_instances'];\n $query = \"DELETE FROM $instancetable\n WHERE xar_module='categories' AND xar_component='Category'\";\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $categorytable =$xartable['categories'];\n // use external privilege wizard for 'Category' instance\n $instances = array(\n array('header' => 'external', // this keyword indicates an external \"wizard\"\n 'query' => xarModURL('categories', 'admin', 'privileges'),\n 'limit' => 0\n )\n );\n // TODO: get this parent/child stuff to work someday, or implement some other way ?\n //xarDefineInstance('categories', 'Category', $instances);\n xarDefineInstance('categories', 'Category', $instances,1,$categorytable,'xar_cid',\n 'xar_parent','Instances of the categories module, including multilevel nesting');\n\n // fall through to the next upgrade\n\n case '2.3.1':\n xarTplRegisterTag('categories', 'categories-filter',\n array(),\n 'categories_userapi_filtertag');\n\n // fall through to the next upgrade\n\n case '2.3.2':\n xarTplRegisterTag('categories', 'categories-catinfo', array(),\n 'categories_userapi_getcatinfotag');\n // fall through to the next upgrade\n case '2.3.3':\n\n xarRemoveInstances('categories','Block');\n\n case '2.3.4':\n xarModSetVar('categories', 'inputsize', 5);\n case '2.3.5'://\n\n case '2.4.0':\n // Indicate to the core privilege there is some xarprivilege.php to extend\n xarModSetVar('categories', 'extended_privileges', 1);\n\n // Todo: add the minimum core version requirement dependancy. Or should the privilege acts the same than before for full compability?\n\n //Load Table Maintainance API\n xarDBLoadTableMaintenanceAPI();\n\n // Get database information\n $dbconn = xarDBGetConn();\n $xartable = xarDBGetTables();\n\n $fields = array(\n 'xar_pid'=>array('type'=>'integer','null'=>FALSE,'default'=>'0'),\n 'xar_name'=>array('type'=>'varchar','size'=>254,'null'=>FALSE,'default'=>'0'),\n 'xar_cid'=>array('type'=>'integer','null'=>FALSE,'default'=>'0'),\n 'xar_forced_deny'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_forced_allow'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_forbid_receive'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_multi_level'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_children'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_parents'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_to_siblings'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_not_itself'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_override_others'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_inheritance_depth'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_deactivated'=>array('type'=>'integer','size'=>'tiny','null'=>FALSE,'default'=>'0'),\n 'xar_comment'=>array('type'=>'varchar','size'=>254,'null'=>FALSE,'default'=>'')\n );\n\n // Create the Table - the function will return the SQL is successful or\n // raise an exception if it fails, in this case $query is empty\n $query = xarDBCreateTable($xartable['categories_ext_privileges'],$fields);\n if (empty($query)) return; // throw back\n\n // Pass the Table Create DDL to adodb to create the table and send exception if unsuccessful\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '_categories_priv_pid',\n 'fields' => array('xar_pid'),\n 'unique' => false\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '_categories_priv_cid',\n 'fields' => array('xar_cid'),\n 'unique' => false\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n $index = array(\n 'name' => 'i_' . xarDBGetSiteTablePrefix() . '__categories_priv_cid_pid',\n 'fields' => array('xar_pid','xar_cid'),\n 'unique' => true\n );\n $query = xarDBCreateIndex($xartable['categories_ext_privileges'],$index);\n $result= $dbconn->Execute($query);\n if (!$result) return;\n\n case '2.4.1':\n // One or all-or nothing category access\n // http://xarigami.com/contrails/display/xcat/554\n xarModSetVar('categories', 'securitytestall', true);\n // Set to true to keep the former testall behavior.\n\n case '2.4.2':\n //upgrade for core 1.4.0 compatibility\n //add modvar to turn on/off dragdrop\n xarModSetVar('categories','allowdragdrop',false);\n\n case '2.4.3':\n\n case '2.5.0':\n case '2.5.1':\n case '2.5.2':\n case '2.5.3':\n xarModSetVar('categories', 'singleinput', false);\n case '2.5.5': //upgrade to reflect javascript update of treeTable. admin-veiwcats-render template also updated.\n default:\n break;\n }\n\n // Upgrade successful\n return true;\n}", "public function onLoadModulesPost(ModuleEvent $event)\n {\n $this->moduleLoader->unregister();\n $this->writeArrayToFile(\n $this->options->getModuleMapCacheFile(),\n $this->moduleLoader->getModuleClassMap()\n );\n }" ]
[ "0.6612304", "0.64889705", "0.64011186", "0.6351384", "0.6349843", "0.62532115", "0.61109763", "0.60980785", "0.6042899", "0.59778166", "0.5975903", "0.59604204", "0.59535545", "0.5898077", "0.5875901", "0.58236986", "0.57752895", "0.57316774", "0.57241946", "0.5715318", "0.5694225", "0.56936747", "0.5674404", "0.5660918", "0.56525433", "0.5650134", "0.56382513", "0.5635186", "0.5598734", "0.5593744", "0.55700874", "0.5535562", "0.5520619", "0.5503427", "0.54866076", "0.5480998", "0.5477918", "0.5477918", "0.54708475", "0.54458684", "0.5443959", "0.5443614", "0.54384863", "0.5434705", "0.5431453", "0.54187864", "0.5416449", "0.5401012", "0.5394588", "0.5390664", "0.5387931", "0.5382042", "0.5381367", "0.53794044", "0.5375001", "0.53665394", "0.53657037", "0.5363336", "0.53620225", "0.53528786", "0.53528684", "0.53488696", "0.5343011", "0.53420097", "0.5341502", "0.5338271", "0.53291196", "0.5328261", "0.53001463", "0.52999264", "0.5299362", "0.5299337", "0.529043", "0.5289077", "0.52887684", "0.5287748", "0.5281254", "0.5269161", "0.5259689", "0.5258093", "0.525385", "0.52298176", "0.52279425", "0.5227584", "0.52191144", "0.52191144", "0.5214013", "0.52089024", "0.52087915", "0.52073675", "0.5203753", "0.52023005", "0.52004576", "0.51988554", "0.5195166", "0.51936954", "0.5193176", "0.51927257", "0.51862586", "0.5180488", "0.5177687" ]
0.0
-1
Sets conversations for added default units
protected function addToSystemConfiguration(array $dataTemplate) { // get all attribute options for product unit $productUnitOptions = []; foreach ($this->productAttributeOptionManagementInterface->getItems('baseprice_product_unit') as $option) { $productUnitOptions[$option->getLabel()] = $option->getValue(); } // get all attribute options for reference unit $referenceUnitOptions = []; foreach ($this->productAttributeOptionManagementInterface->getItems('baseprice_reference_unit') as $option) { $referenceUnitOptions[$option->getLabel()] = $option->getValue(); } //Config value is not available during first installation -> maybe config cache if (is_null($this->scopeConfig->getValue(Data::CONVERSION_CONFIG_PATH))) { $data = []; $dataTemplate = array_merge_recursive(self::DEFAULT_DATA_TEMPLATE, $dataTemplate); } else { $data = $this->serializer->unserialize($this->scopeConfig->getValue(Data::CONVERSION_CONFIG_PATH)); } // iterate over attribute options in order to replace labels with option ids foreach ($dataTemplate as $unit => $unitData) { foreach ($unitData as $key => $unitDataEntry) { $data[] = [ 'product_unit' => $productUnitOptions[$unit], 'reference_unit' => $referenceUnitOptions[$unitDataEntry['reference_unit']], 'conversion_rate' => $unitDataEntry['conversion_rate'], ]; } } //save system configuration $this->configResource->saveConfig( Data::CONVERSION_CONFIG_PATH, $this->serializer->serialize($data), ScopeConfigInterface::SCOPE_TYPE_DEFAULT, 0 ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetMessagesConfidentiels() {\n\n $obj = new Collaborateurs();\n\n $obj->setMessagesConfidentiels(\"messagesConfidentiels\");\n $this->assertEquals(\"messagesConfidentiels\", $obj->getMessagesConfidentiels());\n }", "private function setMessageToPlayer()\n {\n if ($this->isUserMode()) {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng. Vill du vara med i tävlingen, spara poängen med den gröna knappen!\";\n } else {\n $this->playerMessage = 'Du fick ' . $this->points . \" poäng!\";\n }\n }", "public function setMessDefault ($v)\n {\n // Since the native PHP type for this column is integer,\n // we will cast the input value to an int (if it is not).\n if ( $v !== null && !is_int ($v) && is_numeric ($v) )\n {\n $v = (int) $v;\n }\n if ( $this->mess_default !== $v || $v === 0 )\n {\n $this->mess_default = $v;\n }\n }", "static function set_default_messages($messages) {\n\t\tforeach($messages as $ruleName => $message) {\n\t\t\tself::add_default_message($ruleName, $message);\n\t\t}\n\t}", "static function set_default_messages($messages) {\n\t\tif (is_array($messages)) {\n\t\t\tforeach($messages as $ruleName => $message) {\n\t\t\t\tself::addDefaultMessage($ruleName, $message);\n\t\t\t}\n\t\t}\n\t}", "public function set_group_default_max_recipients()\n\t{\n\t\t$sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5\n\t\t\tWHERE ' . $this->db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));\n\t\t$this->sql_query($sql);\n\t}", "public function set_data($default) {\n global $CFG;\n\n $mform = $this->_form;\n // Load or freeze room size.\n if ($default->instance) {\n $roomsizes = array();\n $roomsizes[$default->roomsize] = $default->roomsize;\n $roomsize = &$mform->getElement('roomsize');\n $roomsize->loadArray($roomsizes);\n $mform->freeze(array('roomsize'));\n } else {\n $roomsizes = vitero_get_available_roomsizes();\n $roomsize = &$mform->getElement('roomsize');\n $roomsize->loadArray($roomsizes);\n }\n\n // Freeze entire form if meeting is in the past.\n if (isset($default->endtime, $default->endbuffer) && $default->endtime > 0) {\n if ($default->endtime + (int)$default->endbuffer * 60 < time()) {\n $mform->freeze();\n }\n }\n\n // Give id to administration button (or hide if activity hasn't been created yet).\n if ($default->coursemodule) {\n $adminbutton = $mform->getElement('adminlogin');\n $url = $CFG->wwwroot . '/mod/vitero/adminlogin.php?cm=' . $default->coursemodule;\n $url = htmlentities($url);\n $btnstr = 'onclick=\"window.open(\\'' . $url . '\\', \\'\\', \\'\\');\"';\n $adminbutton->updateAttributes($btnstr);\n $mform->removeElement('nologinhint');\n } else {\n $mform->removeElement('adminlogin');\n }\n\n parent::set_data($default);\n }", "protected function setupMessengers(): void\n {\n $messengerList = [\n 'telegram',\n 'line_notify',\n 'sendgrid',\n 'native_php_mail',\n 'smtp',\n 'mailgun',\n 'rocket_chat',\n 'slack',\n 'slack_webhook',\n ];\n\n foreach ($messengerList as $messenger) {\n $setting = $this->getOption($messenger, 'messengers');\n\n if (is_array($setting)) {\n // Initialize messenger instances from the factory/\n if (MessengerFactory::check($setting)) {\n $this->kernel->setMessenger(\n MessengerFactory::getInstance(\n // The ID of the messenger module in the configuration.\n $messenger,\n // The settings of the messenger module in the configuration.\n $setting\n )\n );\n }\n }\n\n unset($setting);\n }\n }", "public function applyDefaultValues()\n\t{\n\t\t$this->setName('');\n\t\t$this->setFullName('');\n\t\t$this->setEntriesCount(0);\n\t\t$this->setDirectEntriesCount(0);\n\t\t$this->setMembersCount(0);\n\t\t$this->setPendingMembersCount(0);\n\t\t$this->setDisplayInSearch(DisplayInSearchType::PARTNER_ONLY);\n\t\t$this->setPrivacy(PrivacyType::ALL);\n\t\t$this->setInheritanceType(InheritanceType::MANUAL);\n\t\t$this->setUserJoinPolicy(UserJoinPolicyType::NOT_ALLOWED);\n\t\t$this->setDefaultPermissionLevel(CategoryKuserPermissionLevel::MEMBER);\n\t\t$this->setContributionPolicy(ContributionPolicyType::ALL);\n\t\t$this->setStatus(CategoryStatus::ACTIVE);\n\t}", "function conversation()\n {\n $data['scripts'] = array('jquery', 'bootstrap', 'lte', 'datepicker','cssMessagerie','tinyMCE' );\n\n // Creation du bandeau\n $data['titre'] = array(\"Messagerie\", \"fas fa-envelope\");\n \n // si la session est null c'est que l'utilisateur n'est pas connecté donc retour à la page de login\n if($_SESSION['dataUser'] == null)\n {\n redirect($this->dir_login);\n }\n else\n {\n //Permet de récupérer l'id de l'utilisateur de session\n $data['userId']=$_SESSION['dataUser'][0]->user_id;\n //Permet de créer les boutons dans le menu en header\n $data['boutons'] = array(\n array(\"Rafraichir\", \"fas fa-sync\", $this->dir_controlleur, null),\n array(\"Déconnexion\", \"fas fa-sign-out-alt\", $this->dir_login, null),\n array(\"Retour\", \"fa fa-arrow-left\", $this->dir_retour, null),\n );\n }\n\n //permet de savoir si une conversation est en cours\n $data['ActiveConv'] = true;\n\n //Permet de trier tous les utilisateurs à qui on a parler du plus récent au plus ancien\n $data['profils_envoyeur'] = $this->m_messagerie->get_id_profil_envoyeur($data['userId']);\n $x = 0;\n foreach ( $data['profils_envoyeur'] as $value) \n {\n $data['last_message'][$x] = $this->m_messagerie->get_last_message_profil($data['userId'],$data['profils_envoyeur'][$x]->message_id_envoyeur);\n $data['profils_envoyeur_name'][$x] = $this->m_messagerie->get_name_user($data['profils_envoyeur'][$x]->message_id_envoyeur);\n $x = $x + 1;\n }\n\n //on récupère l'id de la personne qui recoit\n $data['personne'] = $this->input->post('id_personne');\n\n \n if($data['personne'] == NULL )\n {\n $data['personne'] = $_SESSION['personne'];\n } else{\n $_SESSION['personne'] = $data['personne'];\n }\n \n //permet de récupérer tout les messages entre deux personnes et de les ajouter dans un tableau\n $data['conv'] = $this->m_messagerie->get_message_profil_envoyeur($data['userId'],$data['personne']);\n\n //Permet de récupérer les noms prénoms des deux utilisateurs\n $data['conv_name'] = $this->m_messagerie->get_name_user($data['userId']) ;\n $data['conv_name'] = $data['conv_name']->user_nom . \" \" . $data['conv_name']->user_prenom;\n if($data['conv'][0]->message_id_receveur == $data['userId'])\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_envoyeur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n } else\n {\n $data['conv_name1'] = $this->m_messagerie->get_name_user($data['conv'][0]->message_id_receveur);\n $data['conv_name1'] = $data['conv_name1']->user_nom . \" \" . $data['conv_name1']->user_prenom;\n }\n\n \n \n // On charge les differents modules neccessaires a l'affichage d'une page\n //$this->load->view('template/header_html_base', $data);\n $this->load->view('template/header_scripts', $data); \n $this->load->view('template/bandeau', $data);\n $this->load->view('template/footer_scripts', $data);\n $this->load->view('template/footer_html_base');\n $this->load->view('messagerie/editeur',$data);\n }", "function testDefaultSettings() {\n $administrator = Users::findById(1);\n\n $member = new Member();\n\n $member->setCompanyId(1);\n $member->setEmail('[email protected]');\n $member->setPassword('123');\n $member->save();\n\n $client = new Client();\n\n $client->setCompanyId(1);\n $client->setEmail('[email protected]');\n $client->setPassword('123');\n $client->save();\n\n $email_channel = new EmailNotificationChannel();\n\n $this->assertTrue($email_channel->isEnabledByDefault());\n $this->assertTrue($email_channel->isEnabledFor($administrator));\n $this->assertTrue($email_channel->isEnabledFor($member));\n $this->assertTrue($email_channel->isEnabledFor($client));\n\n $this->assertEqual($email_channel->whoCanOverrideDefaultStatus(), array('Member', 'Manager'));\n\n $this->assertTrue($email_channel->canOverrideDefaultStatus($administrator));\n $this->assertTrue($email_channel->canOverrideDefaultStatus($member));\n $this->assertFalse($email_channel->canOverrideDefaultStatus($client));\n }", "private function _customizeDatabase(){\n\n // Core conversations integration\n $db = ConnectionManager::getDataSource('default');\n if(isset($db->config['prefix'])){\n $userTable = $db->config['prefix'].\"users\";\n $queryGetFirstUser = \"SELECT * FROM $userTable LIMIT 1\";\n $queryAddChatCountField = \"ALTER TABLE $userTable ADD `chat_count` INT NOT NULL DEFAULT '0' \";\n\n try\n {\n\n $result = $db->fetchAll($queryGetFirstUser);\n if($result){\n $user = $result[0][$userTable];\n if(!isset($user[\"chat_count\"])){\n try\n {\n $db->rawQuery($queryAddChatCountField);\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n\n }\n\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n //$db = ConnectionManager::getDataSource('default');\n $roomTable = $db->config['prefix'].\"chat_rooms\";\n $messagesTable = $db->config['prefix'].\"chat_messages\";\n $queryRoomIds = \"SELECT id FROM $roomTable WHERE latest_mesasge_id=0\";\n $queryLastestMessage = \"SELECT MAX(id) AS id FROM $messagesTable WHERE room_id=%s\";\n $queryUpdateRoom = \"UPDATE $roomTable SET latest_mesasge_id=%s WHERE id=%s\";\n try\n {\n\n $result = $db->fetchAll($queryRoomIds);\n if($result){\n\n foreach ($result as $i){\n\n try\n {\n $messageId = $db->fetchAll(sprintf($queryLastestMessage,$i[$roomTable][\"id\"]));\n if($messageId){\n try\n {\n if(!empty($messageId[0][0][\"id\"])){\n $db->rawQuery(sprintf($queryUpdateRoom,$messageId[0][0][\"id\"],$i[$roomTable][\"id\"]));\n }\n\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }catch(Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }\n }\n catch (Exception $ex)\n {\n echo $ex->getMessage();\n die();\n }\n }\n }", "protected function setDefaultValueExtra()\n {\n $this->default_data['address'] = 'xxx.atlassian.net';\n $this->default_data['rest_api_resource'] = '/rest/api/latest/';\n $this->default_data['timeout'] = 60;\n\n $this->default_data['clones']['mappingTicket'] = array(\n array(\n 'Arg' => self::ARG_SUMMARY,\n 'Value' => 'Issue {include file=\"file:$centreon_open_tickets_path/providers/' .\n 'Abstract/templates/display_title.ihtml\"}'\n ),\n array('Arg' => self::ARG_DESCRIPTION, 'Value' => '{$body}'),\n array('Arg' => self::ARG_PROJECT, 'Value' => '{$select.jira_project.id}'),\n array('Arg' => self::ARG_ASSIGNEE, 'Value' => '{$select.jira_assignee.id}'),\n array('Arg' => self::ARG_PRIORITY, 'Value' => '{$select.jira_priority.id}'),\n array('Arg' => self::ARG_ISSUETYPE, 'Value' => '{$select.jira_issuetype.id}'),\n );\n }", "private function setBotProvider(): void\n {\n $this->providers[Bot::class] = new MessengerProviderDTO(Bot::class);\n }", "public function testSetTypeMessage() {\n\n $obj = new AppelsEnCours();\n\n $obj->setTypeMessage(\"typeMessage\");\n $this->assertEquals(\"typeMessage\", $obj->getTypeMessage());\n }", "public function testSetSuiviMessages() {\n\n $obj = new Collaborateurs();\n\n $obj->setSuiviMessages(true);\n $this->assertEquals(true, $obj->getSuiviMessages());\n }", "public function setChannelTemplates(){\n if ($this->channel == self::$WTSORDER_SOURCE_SITE_MOBILE){\n $this->defaultStepTemplates = $this->mobileDefaultStepTemplates;\n } elseif($this->customerIsPro()){\n $this->defaultStepTemplates = $this->proDefaultStepTemplates;\n } \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 }", "protected function resolveAndSetDefaultSubscribers()\n {\n //Add requested by user as default subscriber\n if ($this->requestedByUser->id > 0)\n {\n NotificationSubscriberUtil::addSubscriber($this->requestedByUser, $this, false);\n }\n NotificationSubscriberUtil::addSubscriber($this->owner, $this, false);\n }", "private function syncronize() {\n\t\t$existingsOptions = get_option( $this->getMaillistKey() );\n\t\t\n\t\t// Get the saved options in the object\n\t\t$options = $this->getSettings();\n\t\t\n\t\t// If options exists we need to merge them with the default ones\n\t\tif ( $existingsOptions ){\n\t\t\tforeach ( $existingsOptions as $option ){\n\t\t\t\t$options[ $option->getName() ]->setValue( $option->getValue() );\n\t\t\t}\n\t\t}\n\t\t\t\n\t}", "function admin_init() {\n\t\tadd_meta_box(\"1-Round\", \"First Round\", array(&$this, \"meta_options\"), \"Tournaments\" );\n\t}", "protected function setDefaults(): void {\n\t\t$fromEmail = Configure::read('Config.systemEmail');\n\t\tif ($fromEmail) {\n\t\t\t$fromName = Configure::read('Config.systemName');\n\t\t} else {\n\t\t\t$fromEmail = Configure::read('Config.adminEmail');\n\t\t\t$fromName = Configure::read('Config.adminName');\n\t\t}\n\t\tif ($fromEmail) {\n\t\t\t$this->setFrom($fromEmail, $fromName);\n\t\t}\n\t}", "public function updateSettings(){\n\t\tuser_login_required();\n\n\t\t//Get conversationID\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\n\t\t//Check if user want to update its follow state\n\t\tif(isset($_POST['following'])){\n\t\t\t$follow = $_POST[\"following\"] === \"true\" ? true : false;\n\n\t\t\t//Try to update follow state\n\t\t \tif(!CS::get()->components->conversations->changeFollowState(userID, $conversationID, $follow))\n\t\t \t\tRest_fatal_error(500, \"Couldn't update user follow state !\");\n\t\t}\n\t\t\n\t\t//Check if user asked to change moderation settings\n\t\tif(isset($_POST['members']) OR isset($_POST['name'])){\n\n\t\t\t//Check if user is allowed to change such settings\n\t\t\tif(!CS::get()->components->conversations->userIsModerator(userID, $conversationID))\n\t\t\t\tRest_fatal_error(401, \"The user isn't a moderator, he can't updates such settings !\");\n\t\t\t\n\t\t\t//Update conversation name (if required)\n\t\t\tif(isset($_POST[\"name\"])){\n\t\t\t\t$conversationName = $_POST['name'] == \"false\" ? \"\" : $_POST['name'];\n\n\t\t\t\t//Update conversation name\n\t\t\t\tif(!CS::get()->components->conversations->changeName($conversationID, $conversationName))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation name !\");\n\t\t\t}\n\n\t\t\t//Update conversation users (if required)\n\t\t\tif(isset($_POST[\"members\"])){\n\t\t\t\t//Get user list\n\t\t\t\t$conversationMembers = numbers_list_to_array($_POST['members']);\n\n\t\t\t\t//Make sure current user is in the list\n\t\t\t\t$conversationMembers[userID] = userID;\n\n\t\t\t\t//Try to update conversation members\n\t\t\t\tif(!CS::get()->components->conversations->updateMembers($conversationID, $conversationMembers))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation members list !\");\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t//Success\n\t\treturn array(\"success\" => \"Conversation informations were successfully updated !\");\n\t}", "function ms_override($ms_overriden){\n $model_config = WYSIJA::get('config' , 'model');\n if($model_config->getValue('premium_key')){\n $bounce_value = array('bounce','bouncing');\n return array_merge($ms_overriden, $bounce_value);\n }\n return $ms_overriden;\n }", "function getDefaultSendParams()\n {\n $params = array();\n\n $params['max_length'] = array(\n 'label' => _(\"Max messages quantity\"),\n 'type' => 'int',\n 'default_value' => 3);\n\n $params['unicode'] = array(\n 'label' => _(\"Unicode message flag\"),\n 'type' => 'int',\n 'default_value' => 1);\n\n return $params;\n }", "public function initPubChannelMms()\n\t{\n\t\tif ($this->collPubChannelMms === null) {\n\t\t\t$this->collPubChannelMms = array();\n\t\t}\n\t}", "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 }", "public function initAnnounceChannelMms()\n\t{\n\t\tif ($this->collAnnounceChannelMms === null) {\n\t\t\t$this->collAnnounceChannelMms = array();\n\t\t}\n\t}", "public function testSetMessageLu() {\n\n $obj = new AppelsEnCours();\n\n $obj->setMessageLu(true);\n $this->assertEquals(true, $obj->getMessageLu());\n }", "function setDefaults($defaults = array ())\r\n {\r\n $course_type_user_category_rel_course = $this->course_type_user_category_rel_course;\r\n\r\n $course = WeblcmsDataManager :: get_instance()->retrieve_course($course_type_user_category_rel_course->get_course_id());\r\n\r\n $defaults[Course :: PROPERTY_ID] = $course->get_name();\r\n $defaults[CourseTypeUserCategoryRelCourse :: PROPERTY_COURSE_TYPE_USER_CATEGORY_ID] = $course_type_user_category_rel_course->get_course_type_user_category_id();\r\n\r\n parent :: setDefaults($defaults);\r\n }", "public function setDefaultSounds(){\n if ( ! in_array($this->letter, self::$vowels_special) ){\n $this->sounds[] = new SingleSound( $this->letter );\n }else{\n //if previous letter not consonant\n if ($this->prevLetter && !in_array($this->prevLetter->letter, self::$consonants_sound) ){\n $this->sounds[] = new SingleSound( 'й');\n switch($this->letter){\n case \"я\": $this->sounds[] = new SingleSound(\"а\"); break;\n case \"е\": $this->sounds[] = new SingleSound(\"э\"); break;\n case \"ё\": $this->sounds[] = new SingleSound(\"о\"); break;\n case \"ю\": $this->sounds[] = new SingleSound(\"у\"); break;\n }\n }else{\n switch($this->letter){\n case \"я\": $this->sounds[] = new SingleSound(\"а\"); break;\n case \"е\": $this->sounds[] = new SingleSound(\"э\"); break;\n case \"ё\": $this->sounds[] = new SingleSound(\"о\"); break;\n case \"ю\": $this->sounds[] = new SingleSound(\"у\"); break;\n }\n //and prev consonant now soft\n if (count($this->prevLetter->sounds) > 0){\n $this->prevLetter->sounds[0]->setSoftness();\n }\n }\n }\n\n //2: soft sign after consonant make consonant soft\n if ( $this->nextLetter && $this->nextLetter->letter === 'ь' && in_array($this->letter, self::$consonants_sound) ){\n $this->sounds[0]->setSoftness();\n }\n\n //3: voiced in the end of word or before clunk consonant becomes clunk\n if ( in_array($this->letter, self::$voiced_paired) ){\n if ( is_null($this->nextLetter) || ($this->nextLetter && in_array($this->nextLetter->letter, self::$clunk_paired)) ){\n $key = array_search($this->letter, self::$voiced_paired);\n $this->sounds[0]->setClunkPaired( self::$clunk_paired[$key] );\n }\n }\n\n //4:жи ши ци\n if ( $this->letter == 'и' && in_array($this->prevLetter->letter, array('ж', 'ш', 'ц')) ){\n $this->sounds[0]->setSpell('ы');\n }\n\n //5: non pronounce consonants //http://orthographia.ru/orfografia.php?sid=45\n if ($this->prevLetter && $this->nextLetter){\n $non_pc = array('стн', 'стл', 'здн', 'рдц', 'рдч', 'стц', 'здц', 'ндц');\n foreach ($non_pc as $non_p) {\n $combo = $this->prevLetter->letter.$this->letter.$this->nextLetter->letter;\n #$non_letter = mb_substr($non_p, 1, 1, 'utf-8');\n if ($combo == $non_p){\n $this->sounds[0]->setSpell('');\n }\n }\n $non_pc_2 = array('нтск', 'ндск', 'нтств', 'стск');\n }\n\n //6: озвончение, косьба [з], молотьба [д] Глухой согласный перед звонким согласным ( кроме л, м, н, р, в, й ) заменяется парным ему звонким\n // http://bugaga.net.ru/ege/rus/theory/?n=1\n if ($this->nextLetter && in_array($this->letter, array('п', 'к', 'т', 'ш', 'с'))) {\n $nextLetter = $this->nextLetter->letter;\n if ($nextLetter == 'ь' && $this->nextLetter->nextLetter){\n $nextLetter = $this->nextLetter->nextLetter->letter;\n }\n if ( in_array($nextLetter, array('б', 'г', 'д', 'ж', 'з'))){\n $key = array_search($this->letter, self::$clunk_paired);\n $this->sounds[0]->setVoicedPaired( self::$voiced_paired[$key] );\n }\n }\n\n\n }", "public function testSendDefaultTime(): void\n {\n // Testing default value of a $now variable. Asserted below with generous\n // delta.\n $expectedDate = new DateTime('now');\n\n $activityData = new ActivityDataStub();\n\n $activityPersister = new ActivityPersisterStub();\n $activityPersister->setNextSequence(5);\n $dispatcher = new EventDispatcherStub();\n $payloadManager = new PayloadManagerStub();\n $payloadManager->addPayload(['payload' => 'wot']);\n\n $manager = $this->getManager(\n $dispatcher,\n $payloadManager,\n $activityPersister\n );\n\n $manager->send(new Provider('provider', 'Test Provider Inc.'), $activityData);\n\n $saved = $activityPersister->getSaved();\n $activity = \\reset($saved);\n\n self::assertArrayHasKey('occurredAt', $activity);\n\n // Asserts the expected date is within 10 seconds of the generated now inside the\n // service.\n self::assertEqualsWithDelta($expectedDate, $activity['occurredAt'], 10);\n }", "public function setSent();", "function set_message($section,$messages) {\n //script_message is an array of lists. Each element of array is indexed by\n // section name and contains a list of messages.\n $this->store_in_session('script_messages',$section,$messages);\n \n }", "function setFromName($to_set=\"noreply\"){\n\t\t\t$this->from_name = $to_set;\n\t\t}", "public function testSetMessageDefaultKey()\n {\n $this->_validator->setMessage(\n 'Your value is too short',\n Zend_Validate_StringLength::TOO_SHORT\n );\n\n $this->assertFalse($this->_validator->isValid('abc'));\n $messages = $this->_validator->getMessages();\n $this->assertEquals('Your value is too short', current($messages));\n $errors = $this->_validator->getErrors();\n $this->assertEquals(Zend_Validate_StringLength::TOO_SHORT, current($errors));\n }", "public function setMessAccount ($v)\n {\n // Since the native PHP type for this column is string,\n // we will cast the input to a string (if it is not).\n if ( $v !== null && !is_string ($v) )\n {\n $v = (string) $v;\n }\n if ( $this->mess_account !== $v || $v === '' )\n {\n $this->mess_account = $v;\n }\n }", "protected function setMoneyBar()\n {\n $mysidia = Registry::get(\"mysidia\");\n $this->moneyBar = new Paragraph;\n $this->moneyBar->add(new Comment(\"You have {$mysidia->user->money} {$mysidia->settings->cost}.\"));\n \n $donate = new Link(\"donate\");\n $donate->setText(\"Donate Money to Friends\");\n $this->moneyBar->add($donate);\n $this->setDivision($this->moneyBar);\n }", "public function applyDefaultValues()\n {\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function _setDefaults() {}", "function setDefaults()\n {\n }", "private function _default_date_time_units()\n {\n $this->seconds = '00';\n $this->minutes = '00';\n $this->hours = '00';\n\n \n $this->days = date('d');\n $this->months = date('m');\n $this->years = date('Y');\n $this->ampm = 'am';\n }", "public function setUpDefaultVars() {\n $this->response['numAttempts'] = new qti_variable('single', 'integer', array('value' => 0));\n $this->response['duration'] = new qti_variable('single', 'float', array('value' => 0));\n $this->outcome['completionStatus'] = new qti_variable('single', 'identifier', array('value' => 'not_attempted'));\n \n // TODO: We have this to get around mistakes (?) in the example QTI - should we?\n $this->outcome['completion_status'] = $this->outcome['completionStatus'];\n }", "protected function initParticipant()\n {\n $default = ['maximum' => 1, 'minimum' => 0];\n $this->setProperty(ParticipantInterface::BPMN_PROPERTY_PARTICIPANT_MULTIPICITY, $default);\n }", "protected function addNewsroomDefaultValueTamper($default_source) {\n if ($default_source) {\n $tamper['tamper']['plugins'] = [\n 'newsroom_default_value' => [\n 'default_value' => '[' . $default_source . ']',\n ],\n ];\n\n $this->addTampers($tamper);\n }\n }", "function AddDetailsForDefaultLang()\n\t{\t$this->AddDetailsForLang($this->def_lang);\n\t}", "public function setMessageCount()\n\t\t{\n\t\t\tif(Auth::check() && Auth::user()->profiles)\n\t\t\t{\n\t\t\t\t$profileId = \\Auth::user()->profiles->id;\n\n\t\t\t\t$messageCount = \\DB::table('messages')->where('receiver_id', $profileId)->where('read', false)->count();\n\n\t\t\t\t\\View::share('messageCount', $messageCount);\n\t\t\t}\n\t\t}", "public function getMessDefault ()\n {\n return $this->mess_default;\n }", "public function configure() {\n\t\t$this -> messages = array();\n\t\t$this -> sent = array();\n\t\t$this -> read = array();\n\t\t$this -> receieved = array();\n\t\t$user = $this -> user;\n\t\t$statement = $this -> database -> query(\"SELECT * FROM messages WHERE sender='\" . $user -> getUsername() . \"' OR recipient='\" . $user -> getUsername() . \"' ORDER BY date DESC\");\n\t\twhile ($message = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\tif ($message['sender'] == $user -> getUsername() && $message['s_delete'] == 1 || $message['recipient'] == $user -> getUsername() && $message['r_delete'] == 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$object = new Message($message);\n\t\t\t$this -> messages[$message['id']] = $object;\n\t\t\tif ($message['sender'] == $user -> getUsername()) {\n\t\t\t\t$this -> sent[$message['id']] = $object;\n\t\t\t} else if ($message['recipient'] == $user -> getUsername() && $message['is_read'] == 0) {\n\t\t\t\t$this -> receieved[$message['id']] = $object;\n\t\t\t} else if ($message['recipient'] == $user -> getUsername() && $message['is_read'] == 1) {\n\t\t\t\t$this -> read[$message['id']] = $object;\n\t\t\t}\n\t\t\t//echo \"Put message in messages id = \" . $message['id'] . \"\\n\";\n\t\t}\n\t\t//echo \"Size of \" . sizeof($this -> messages);\n\t}", "function setSyncCategoryText()\n {\n }", "public function initSettingsData()\n {\n $this->maximum_users_per_group = 5;\n $this->maximum_user_group_memberships = 3;\n $this->maximum_groups_own_per_user = 3;\n $this->maximum_points_group = 200;\n //$this->mail_group_invite_template = 'dma.friends::mail.invite'; \n $this->reset_groups_every_day = $this->days;\n $this->reset_groups_time = '00:00';\n }", "function create_conversation( $user1, $user2 ) {\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t$conversation_id = false;\r\n\r\n\t\t// Test for previous conversation\r\n\t\t$conversation_id = $wpdb->get_var( $wpdb->prepare(\r\n\t\t\t\"SELECT conversation_id \r\n\t\t\tFROM {$this->table_name1} \r\n\t\t\tWHERE user_a = %d AND \r\n\t\t\t\t user_b = %d \r\n\t\t\tLIMIT 1\",\r\n\t\t\t$user1,\r\n\t\t\t$user2\r\n\t\t) );\r\n\r\n\t\tif ( empty( $conversation_id ) ) {\r\n\t\t\t$conversation_id = $wpdb->get_var( $wpdb->prepare(\r\n\t\t\t\t\"SELECT conversation_id \r\n\t\t\t\tFROM {$this->table_name1} \r\n\t\t\t\tWHERE user_a = %d AND \r\n\t\t\t\t\t user_b = %d \r\n\t\t\t\tLIMIT 1\",\r\n\t\t\t\t$user2,\r\n\t\t\t\t$user1\r\n\t\t\t) );\r\n\t\t}\r\n\r\n\t\t// Build new conversation\r\n\t\tif ( ! $conversation_id ) {\r\n\r\n\t\t\t$wpdb->insert(\r\n\t\t\t\t$this->table_name1,\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'user_a' => $user1,\r\n\t\t\t\t\t'user_b' => $user2\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t$conversation_id = $wpdb->insert_id;\r\n\r\n\t\t\tdo_action('um_after_new_conversation', $user1, $user2, $conversation_id );\r\n\r\n\t\t} else {\r\n\r\n\t\t\tdo_action('um_after_existing_conversation', $user1, $user2, $conversation_id );\r\n\r\n\t\t}\r\n\r\n\t\t// Insert message\r\n\t\t$wpdb->update(\r\n\t\t\t$this->table_name1,\r\n\t\t\tarray(\r\n\t\t\t\t'last_updated' \t\t\t=> current_time( 'mysql', true ),\r\n\t\t\t),\r\n\t\t\tarray(\r\n\t\t\t\t'conversation_id' \t\t=> $conversation_id,\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$wpdb->insert(\r\n\t\t\t$this->table_name2,\r\n\t\t\tarray(\r\n\t\t\t\t'conversation_id' => $conversation_id,\r\n\t\t\t\t'time' => current_time( 'mysql' ),\r\n\t\t\t\t'content' => strip_tags( $_POST['content'] ),\r\n\t\t\t\t'status' => 0,\r\n\t\t\t\t'author' => $user2,\r\n\t\t\t\t'recipient' => $user1\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$this->update_user( $user2 );\r\n\r\n\t\t$hidden = (array) get_user_meta( $user1, '_hidden_conversations', true );\r\n\t\tif ( in_array( $conversation_id, $hidden ) ) {\r\n\t\t\t$hidden = array_diff($hidden, array( $conversation_id ) );\r\n\t\t\tupdate_user_meta( $user1, '_hidden_conversations', $hidden );\r\n\t\t}\r\n\r\n\t\t$hidden = (array) get_user_meta( $user2, '_hidden_conversations', true );\r\n\t\tif ( in_array( $conversation_id, $hidden ) ) {\r\n\t\t\t$hidden = array_diff($hidden, array( $conversation_id ) );\r\n\t\t\tupdate_user_meta( $user2, '_hidden_conversations', $hidden );\r\n\t\t}\r\n\r\n\t\tdo_action('um_after_new_message', $user1, $user2, $conversation_id );\r\n\r\n\t\t$wpdb->close();\r\n\t\t$wpdb->db_connect();\r\n\r\n\t\treturn $conversation_id;\r\n\r\n\t}", "protected function doCommonAssignments()\n\t{\n\t\t$this->message = $this->getMessages(); // ?\n\t\tparent::doCommonAssignments();\n\t}", "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 populateDefaults()\n {\n // Populate Defaults (from parent):\n \n parent::populateDefaults();\n \n // Populate Defaults:\n \n $this->Title = _t(__CLASS__ . '.DEFAULTTITLE', 'Share via Email');\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}", "public function defaultConfiguration(){\n return array(\n// 'noticias_block_string' => $this->t('Valor por defecto. Este bloque se creó a las %time', array('%time' => date('c'))),\n 'noticias_block_string' => $this->t('Valor por defecto. Este bloque se creó a las %time', array('%time' => date('c'))),\n \n \n ); \n }", "public function setDefaultValueSelling($settings = array())\n {\n if ( !isset($settings['comission_fee'])) \n {\n $settings['comission_fee'] = 0;\n }\n if ( !isset($settings['min_payout'])) \n {\n $settings['min_payout'] = 30;\n }if ( !isset($settings['max_payout'])) \n {\n $settings['max_payout'] = 100;\n }if ( !isset($settings['can_buy_song'])) \n {\n $settings['can_buy_song'] = 0;\n }\n if ( !isset($settings['can_sell_song'])) \n {\n $settings['can_sell_song'] = 0;\n }\n if ( !isset($settings['min_price_song'])) \n {\n $settings['min_price_song'] = 0;\n }\n if ( !isset($settings['method_payment'])) \n {\n $settings['method_payment'] = 1;\n }\n return $settings;\n \n \n }", "public function createConversations($from_id, $to_id)\n {\n global $db, $system, $date;\n /* insert conversation */\n $db->query(\"INSERT INTO conversations_global (last_message_id) VALUES ('0')\") or _error(\"SQL_ERROR_THROWEN\");\n $conversation_id = $db->insert_id;\n /* insert the sender (viewer) */\n $db->query(sprintf(\"INSERT INTO conversations_global_users (conversation_id, user_id, seen) VALUES (%s, %s, '1')\", secure($conversation_id, 'int'), secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* insert recipients */\n // foreach($recipients as $recipient) {\n $db->query(sprintf(\"INSERT INTO conversations_global_users (conversation_id, user_id) VALUES (%s, %s)\", secure($conversation_id, 'int'), secure($to_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n // }\n\n\n\n /* insert message */\n $image = '';\n $voice_note = '';\n $message = '';\n\n $db->query(sprintf(\"INSERT INTO conversations_global_messages (conversation_id, user_id, message, image, voice_note, time) VALUES (%s, %s, %s, %s, %s, %s)\", secure($conversation_id, 'int'), secure($this->_data['user_id'], 'int'), secure($message), secure($image), secure($voice_note), secure($date))) or _error(\"SQL_ERROR_THROWEN\");\n $message_id = $db->insert_id;\n /* update the conversation with last message id */\n $db->query(sprintf(\"UPDATE conversations_global SET last_message_id = %s WHERE conversation_id = %s\", secure($message_id, 'int'), secure($conversation_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* update sender (viewer) with last message id */\n $db->query(sprintf(\"UPDATE users SET user_live_messages_lastid = %s WHERE user_id = %s\", secure($message_id, 'int'), secure($this->_data['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n /* get conversation */\n $conversation = $this->get_conversation($conversation_id);\n /* update all recipients with last message id & only offline recipient messages counter */\n foreach ($conversation['recipients'] as $recipient) {\n $db->query(sprintf(\"UPDATE users SET user_live_messages_lastid = %s, user_live_messages_counter = user_live_messages_counter + 1 WHERE user_id = %s\", secure($message_id, 'int'), secure($recipient['user_id'], 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n }\n }", "protected function initializeMessages()\n {\n $this->messages = array(\n \n );\n }", "public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}", "protected function setDefaultParameters() {\n // Vendor token of the business that done the request.\n $this->setParameter('vendor_token', $this->getLydiaVendorToken()) ;\n\n // UUID of the remote payment request.\n $this->setParameter('request_uuid', $this->requestUUID) ;\n }", "protected function _initDefaultOptions()\n {\n $this->_options[self::OPT_STOP_PROMPTING_ON_DTMF] = self::STOP_PROMPTING_ON_DTMF_DEFAULT;\n $this->_options[self::OPT_NO_INPUT_PROMPT_PLAYLIST] = array();\n $this->_options[self::OPT_END_READING_KEY] = Streamwide_Engine_Dtmf_Handler::KEY_POUND;\n $this->_options[self::OPT_RETURN_ALL_INPUT] = self::RETURN_ALL_INPUT_DEFAULT;\n $this->_options[self::OPT_TRIES] = self::DEFAULT_NUMBER_OF_TRIES;\n }", "public function populateDefaults() {\n\t\t$this->owner->ShowInMenus = false;\n\t\t$this->owner->ShowInSearch = false;\n\t\t$this->owner->SubmitButtonText = \"Show my results\";\n \t}", "function chch_popup_pro_agile_set_adapter() {\n if(!empty($_POST['_chch_pop_up_pro_newsletter_adapter'])) {\n $_POST['_chch_pop_up_pro_newsletter_adapter'] = 'AgileCRM';\n }\n}", "function testOverride() {\n $email_channel = new EmailNotificationChannel();\n $web_interface_channel = new WebInterfaceNotificationChannel();\n\n $new_comment_notification = new NewCommentNotification();\n $forgot_password_notification = new ForgotPasswordNotification();\n\n $member = new Member();\n\n $member->setCompanyId(1);\n $member->setEmail('[email protected]');\n $member->setPassword('123');\n $member->save();\n\n $this->assertTrue($email_channel->isEnabledFor($member));\n $this->assertTrue($email_channel->canOverrideDefaultStatus($member));\n\n $email_channel->setEnabledFor($member, false);\n\n $this->assertFalse($email_channel->isEnabledFor($member));\n\n // Show new comment in web interface, but skip email because user turned off email channel\n $this->assertTrue($new_comment_notification->isThisNotificationVisibleInChannel($web_interface_channel, $member));\n $this->assertFalse($new_comment_notification->isThisNotificationVisibleInChannel($email_channel, $member));\n\n // Default, forced behavior - never show in web interface, but always send email, regardless of user settings\n $this->assertFalse($forgot_password_notification->isThisNotificationVisibleInChannel($web_interface_channel, $member));\n $this->assertTrue($forgot_password_notification->isThisNotificationVisibleInChannel($email_channel, $member));\n }", "function charity_is_hope_team_add_override_options($boxes = array()) {\n $boxes[] = array_merge(charity_is_hope_storage_get('team_override_options'), array('callback' => 'charity_is_hope_team_show_override_options'));\n return $boxes;\n\t}", "public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}", "public function setDefaultSettings() {\n $defaultSettings = array(\n \"media_buttons\" => false,\n \"textarea_name\" => $this->getNameAttribute(),\n \"textarea_rows\" => 10,\n \"teeny\" => false,\n \"quicktags\" => false\n );\n $this->setWpEditorSettings($defaultSettings);\n }", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "function options($default) {\r\n $default = array_merge(\r\n $default,\r\n array(\r\n \"maximum_result_set\" => \"3\",\r\n \"default_title\" => __(\"Find nearby locations\", 'slp-experience'),\r\n 'radius_label' => __('Within', 'slp-experience'),\r\n \"search_label\" => __(\"Zip Code\", 'slp-experience'),\r\n \"button_label\" => __(\"Go!\", 'slp-experience'),\r\n )\r\n );\r\n\r\n return $default;\r\n }", "public function testGetDefaultMessageIfNoMatchingValueFoundInMessagesList()\n {\n $this->translator->load();\n $this->assertEquals('default_value', $this->translator->get('invalid_message_key', 'default_value'));\n }", "public function SetCustomVars()\n\t\t{\n\t\t\t$this->_variables['displayname'] = array(\"name\" => GetLang($this->_languagePrefix.\"DisplayName\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang('DisplayNameHelp'),\n\t\t\t \"default\" => $this->GetName(),\n\t\t\t \"required\" => true\n\t\t\t);\n\n\t\t\t$this->_variables['MerchantId'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['MerchantEmail'] = array(\"name\" => GetLang($this->_languagePrefix.\"MerchantEmail\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'MerchantEmailHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['CallbackId'] = array(\"name\" => GetLang($this->_languagePrefix.\"CallbackId\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'CallbackIdHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t\t$this->_variables['SecretWord'] = array(\"name\" => GetLang($this->_languagePrefix.\"SecretWord\"),\n\t\t\t \"type\" => \"textbox\",\n\t\t\t \"help\" => GetLang($this->_languagePrefix.'SecretWordHelp'),\n\t\t\t \"default\" => '',\n\t\t\t \"required\" => true\n\t\t\t);\n\t\t}", "public function setDefaultLocale()\n {\n $this->setLocale('en');\n $locale = \\Locale::getDefault();\n if ($locale) {\n $this->setLocale($locale);\n }\n }", "function inbox_upgrade_20162209() {\n\n\t$setting = elgg_get_plugin_setting('default_message_types', 'hypeInbox');\n\tif ($setting) {\n\t\t$setting = unserialize($setting);\n\t\tunset($setting['__notification']);\n\t\telgg_set_plugin_setting('default_message_types', serialize($setting), 'hypeInbox');\n\t}\n\n\t$messages = new ElggBatch('elgg_get_entities_from_metadata', [\n\t\t'types' => 'object',\n\t\t'subtypes' => 'messages',\n\t\t'metadata_name_value_pairs' => [\n\t\t\t'name' => 'msgType',\n\t\t\t'value' => '__notification',\n\t\t],\n\t\t'limit' => 0,\n\t]);\n\n\t$messages->setIncrementOffset(false);\n\n\tforeach ($messages as $message) {\n\t\t$message->msgType = hypeJunction\\Inbox\\Message::TYPE_PRIVATE;\n\t}\n\n}", "function setType($type=0){\n\t\t\tswitch ($type){\n\t\t\t\tcase 0:{$type = 0; break;}\n\t\t\t\tdefault:{$type = 0;}\n\t\t\t}\n\t\t\t$this->message_type = $type;\n\t\t}", "protected function setMessageType()\n {\n $type = array();\n if ($this->alternativeExists()) {\n $type[] = 'alt';\n }\n if ($this->inlineImageExists()) {\n $type[] = 'inline';\n }\n if ($this->attachmentExists()) {\n $type[] = 'attach';\n }\n $this->message_type = implode('_', $type);\n if ($this->message_type == '') {\n //The 'plain' message_type refers to the message having a single body element, not that it is plain-text\n $this->message_type = 'plain';\n }\n }", "public static function setMSGForHaveNTEmailUsers() {\n\n // not have email end moderation job seekers\n $queryMail = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n r.ismoder\n FROM\n user u\n INNER JOIN \n resume r ON r.id_user=u.id_user \n WHERE\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY \n GROUP BY u.id_user\n \";\n $queryMail = Yii::app()->db->createCommand($queryMail)->queryAll();\n\n if(count($queryMail)){\n\n foreach ($queryMail as $user){\n $email = $user['email'];\n if ((!preg_match(\"/^(?:[a-z0-9]+(?:[-_.]?[a-z0-9]+)?@[a-z0-9_.-]+(?:\\.?[a-z0-9]+)?\\.[a-z]{2,5})$/i\", $email))\n || ( $email = '' )){\n /**\n * Send messages to users who did not enter the email\n */\n $resultm['users'][] = $user['id_user'];\n $resultm['title'] = 'Администрация';\n $resultm['text'] = 'Уважаемый пользователь, будьте добры заполнить \n поле e-mail в вашем профиле.\n Заранее спасибо!';\n }\n }\n $admMsgM = new AdminMessage();\n\n // send notifications\n if (isset($resultm)) {\n $admMsgM->sendDataByCron($resultm);\n }\n\n foreach ($queryMail as $user){\n $status = $user['status'];\n $ismoder = $user['ismoder'];\n if ( ($status == 2) && ($ismoder != 1)){\n /**\n * Send messages to users who did not enter moderation information\n */\n $resultjs['users'][] = $user['id_user'];\n $resultjs['title'] = 'Администрация';\n $resultjs['text'] = 'Уважаемый пользователь, заполните '.\n 'поля, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>имя и фамилия</li>'.\n '<li>год рождения</li>'.\n '<li>Фото(допускается и без него, на фото не природа, '.\n 'не больше одной личности, не анимация и т.д)</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>целевая вакансия</li>'.\n '<li>раздел \"О себе\"</li>'.\n '<ul>';\n }\n }\n $admMsgJS = new AdminMessage();\n if (isset($resultjs)) {\n $admMsgJS->sendDataByCron($resultjs);\n }\n\n }\n\n $queryEmpl = \"\n SELECT\n u.id_user,\n u.email,\n u.crdate,\n u.mdate,\n u.status,\n e.ismoder\n FROM\n user u\n INNER JOIN \n employer e ON e.id_user=u.id_user \n WHERE\n (\n DATE(u.crdate) >= NOW() - INTERVAL 1 DAY \n or \n DATE(u.mdate) >= NOW() - INTERVAL 1 DAY\n ) and u.status = 3 \n \n GROUP BY u.id_user\n \";\n $queryEmpl = Yii::app()->db->createCommand($queryEmpl)->queryAll();\n\n if(count($queryEmpl)) {\n\n foreach ($queryEmpl as $user){\n $ismoder = $user['ismoder'];\n if ( $ismoder != 1 ){\n /**\n * Send messages to employer who did not enter moderation information\n */\n $resulte['users'][] = $user['id_user'];\n $resulte['title'] = 'Администрация';\n $resulte['text'] = 'Уважаемый пользователь, заполните '.\n 'поля в вашем профиле, необходимые для модерации:'.\n '<ul style=\"text-align:left\">'.\n '<li>название компании</li>'.\n '<li>логотип - желаельно</li>'.\n '<li>номер телефона и эмейл</li>'.\n '<li>имя контактного лица</li>'.\n '<li>контактный номер телефона</li>'.\n '<ul>';\n }\n }\n $admMsgE = new AdminMessage();\n if (isset($resulte)) {\n $admMsgE->sendDataByCron($resulte);\n }\n }\n\n }", "public function action_conversations() {\n\t\t//STEP1: Get contacts with the most recent message\n\t\t$contacts = ORM::factory('Message')->get_inbox_contacts($this->_current_user->id);\n\t\t$this->_template->set('contacts', $contacts);\n\t\t//STEP2: Return the most recent conversation to display first time page loads\n\t\t//Otherwise return conversation based on user_id param passed in url\n\t\t$user2=\"\";\n\t\tif ($this->request->param(\"id\")) {\n\t\t\t$user2 = $this->request->param(\"id\");\n\t\t} else if(count($contacts)) {\n\t\t\t$user2 = $contacts[0]['user_info']['user_id'];\n\t\t}\n\t\t$no_messages = (count($contacts)==0) ? True : False;\n\t\t$sender = ORM::factory('User', $user2);\n\t\t$conversations = ORM::factory('Message')->get_conversations($this->_current_user->id, $sender);\n\t\t$this->_template->set('page_title', 'My Conversations');\n\t\t$this->_template->set(\"conversation_info\", $sender);\n\t\t$this->_template->set(\"no_messages\", $no_messages);\n\t\t$this->_template->set(\"conversations\", $conversations);\n\t\t$this->_set_content('conversations');\n\t}", "function ppmess_change_commun_status_2($logged_user, $author_id, $post_id){\n\tglobal $wpdb;\n\t\n\t$status = 0; // when sent_to = 0 message is read, if sent_to != 0 message is not read\n\t\n\treturn $wpdb->query(\n\t\t$wpdb->prepare(\"UPDATE {$wpdb->prefix}private_messages SET sent_to = %d WHERE ( post_id = %d AND ((receiver_id = %d AND sender_id = %d) \n\t\t\tOR (receiver_id = %d AND sender_id = %d)) AND message_parent = 0 AND sent_to = %d )\", \n\t\t\t\t$status, $post_id, $logged_user, $author_id, $author_id, $logged_user, $logged_user)\n\t);\n}", "private function setCurrency()\n {\n $currency = $this->em->getRepository('ClubUserBundle:LocationConfig')->getObjectByKey('default_currency',$this->order->getLocation());\n\n $this->order->setCurrency($currency);\n $this->order->setCurrencyValue(1);\n }", "public function setAsSent()\n {\n $this->sentAt = new \\DateTime();\n }", "public function setBotMaster()\n {\n $masters = func_get_args();\n $this->_botMaster = array();\n foreach($masters AS $master) {\n $this->_botMaster[] = $master;\n }\n }", "private function setDefaults()\n {\n $defaults = config('sevDeskApi.defaults.'.lcfirst($this->objectName));\n\n foreach($defaults as $attribute => $defaultValue)\n {\n if (!isset($this->$attribute))\n $this->$attribute = $defaultValue;\n }\n }", "function setCurrentUserAsSender(){\n if( !SessionUser::isLoggedIn() ) return false;\n $this->From = SessionUser::getProperty(\"username\").\"@\".SITE_EMAILDOMAIN;\n $this->FromName = SessionUser::getProperty(\"firstname\").\" \".SessionUser::getProperty(\"lastname\").\" (\".SessionUser::getProperty(\"username\").\")\";\n }", "function setDefaultValues() {}", "public function applyDefaultValues()\n {\n $this->create_date = '2020-04-16 09:40:03';\n $this->last_update = '2020-04-16 09:40:03';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "function SetCustomVars()\r\n\t\t{\r\n\r\n\r\n\r\n\t\t\t$this->_variables['availablecountries'] = array(\"name\" => \"Continentes\",\r\n\t\t\t \"type\" => \"dropdown\",\r\n\t\t\t \"help\" => GetLang('boletoitauContinentes'),\r\n\t\t\t \"default\" => \"all\",\r\n\t\t\t \"required\" => true,\r\n\t\t\t \"options\" => GetCountryListAsNameValuePairs(),\r\n\t\t\t\t\"multiselect\" => true\r\n\t\t\t);\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_variables['desconto'] = array(\"name\" => \"Desconto em %\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => '',\r\n\t\t\t \"default\" => \"0\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\r\n\r\n\t\t\t$this->_variables['boletoitaucedente'] = array(\"name\" => \"Cedente\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauCedente'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\r\n\t\t\t$this->_variables['boletoitauagencia'] = array(\"name\" => \"Agencia\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauAgencia'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => true\r\n\t\t\t\t);\r\n\r\n\t\t\t$this->_variables['boletoitauconta'] = array(\"name\" => \"Conta\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauConta'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\t\t\r\n\t\t\t$this->_variables['boletoitaucarteira'] = array(\"name\" => \"Carteira\",\r\n\t\t\t \"type\" => \"dropdown\",\r\n\t\t\t \"help\" => GetLang('boletoitauCarteira'),\r\n\t\t\t \"default\" => \"20\",\r\n\t\t\t \"options\" => array('175' => '175', '109' => '109'),\r\n\t\t\t \"required\" => true,\r\n\t\t\t \"multiselection\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\r\n\r\n\r\n\t//_-----------------------------------------------------------------------------------------demonstrativos\r\n\t\r\n\t\t\t$this->_variables['demoum'] = array(\"name\" => \"Demonstra&ccedil;&atilde;o 1\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauDemoU'),\r\n\t\t\t \"default\" => \"REFERENTE A COMPRAS ONLINE\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\r\n\t\t\t$this->_variables['demodois'] = array(\"name\" => \"Demonstra&ccedil;&atilde;o 2\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauDemoD'),\r\n\t\t\t \"default\" => \"Duvidas e sugest&otilde;es entre em contato conosco:\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\r\n\t\t\t\t\t$this->_variables['demotres'] = array(\"name\" => \"Demonstra&ccedil;&atilde;o 3\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauDemoT'),\r\n\t\t\t \"default\" => \"[email protected] | +55 xx 0000.0000\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t//_------------------------------------------------------------------------------------------fim-demonstrativos\r\n\t\r\n\r\n\r\n\r\n\r\n\t\t\t\r\n\t\t\t$this->_variables['boletoitauinstrucaoum'] = array(\"name\" => \"Instru&ccedil;&atilde;o 1\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauInstrucaoUm'),\r\n\t\t\t \"default\" => \"Multa de R$ 3,00 por atraso.\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\r\n\t\t\t$this->_variables['boletoitauinstrucaodois'] = array(\"name\" => \"Instru&ccedil;&atilde;o 2\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauInstrucaoDois'),\r\n\t\t\t \"default\" => \"Apos o vencimento, pagavel apenas no Banco Real\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\r\n\t\t\t\t\t$this->_variables['boletoitauinstrucaotres'] = array(\"name\" => \"Instru&ccedil;&atilde;o 3\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauInstrucaoTres'),\r\n\t\t\t \"default\" => \"Fatura sujeita a protesto no SPC/SERASA\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_variables['boletoitauinstrucaoquatro'] = array(\"name\" => \"Instru&ccedil;&atilde;o 4\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauInstrucaoQuatro'),\r\n\t\t\t \"default\" => \"Juros de mora de 0,1% ao dia.\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_variables['boletoitauaceite'] = array(\"name\" => \"Aceite\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauAceite'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_variables['boletoitauespeciedoc'] = array(\"name\" => \"Esp&eacute;cie do documento\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauEspecieDoc'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\r\n\t\t\t$this->_variables['boletoitauespecie'] = array(\"name\" => \"Esp&eacute;cie de cobran&ccedil;a\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauEspecie'),\r\n\t\t\t \"default\" => \"R$\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\t\r\n\r\n\t\t\t$this->_variables['boletoitaucpfcnpj'] = array(\"name\" => \"CPF ou CNPJ do Boleto\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauCNPF'),\r\n\t\t\t \"default\" => \"\",\r\n\t\t\t \"required\" => false\r\n\t\t\t);\r\n\t\t\r\n\t\t\r\n\t\t$this->_variables['boletoitaudiasparavencimento'] = array(\"name\" => \"Dias para vencimento\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauVence'),\r\n\t\t\t \"default\" => \"10\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\t\t\r\n\r\n\r\n\t\t$this->_variables['boletoitaudv'] = array(\"name\" => \"D&iacute;gito Verificador\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => GetLang('boletoitauDV'),\r\n\t\t\t \"default\" => \"0\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\r\n\t\t\t$this->_variables['postagem'] = array(\"name\" => \"LINK de Repagamento\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => \"URL para Repagamento\",\r\n\t\t\t \"default\" => \"%%GLOBAL_ShopPath%%/modules/checkout/boletoitau/boleto_itau.php?boleto=\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t$this->_variables['imagems'] = array(\"name\" => \"IMAGEM de Repagamento\",\r\n\t\t\t \"type\" => \"textbox\",\r\n\t\t\t \"help\" => \"URL para Repagamento\",\r\n\t\t\t \"default\" => \"%%GLOBAL_ShopPath%%/modules/checkout/boletoitau/images/logo.gif\",\r\n\t\t\t \"required\" => true\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t\r\n\t$this->_variables['helptext'] = array(\"name\" => \"Mais configura&ccedil;&otilde;es\",\r\n\t\t\t \"type\" => \"textarea\",\r\n\t\t\t \"help\" => GetLang('boletoitauInst'),\r\n\t\t\t \"default\" => \"Voc&ecirc; escolheu pagar com Boleto Banc&aacute;rio do Banco Ita&uacute;.\\nPara reimprimir seu boleto clique no bot&atilde;o abaixo.<br>\",\r\n\t\t\t \"required\" => true,\r\n\t\t\t \"rows\" => 7\r\n\t\t\t);\r\n\t\t\t\r\n\t\t}", "function _reset_wp_mail_messages() {\n global $wp_test_expectations;\n \n $wp_test_expectations['pluggable']['wp_mail_messages'] = array();\n}", "protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}", "public function defaultScope(){\n\t\treturn array(\n\t\t\t'condition'=>'type = '.ITest::TYPE_KNOWLEDGE,\n\t\t);\t\n\t}", "public function syncChatList()\n\t{\n\t\t$chat = New Chats;\n\n\t\t$data = $chat->getAll(array('id'),'id','ASC',array(array('id_user_1',$this->id),array('id_user_2',$this->id,'OR')));\n\n\t\tforeach ($data as $value) {\n\t\t\t$chats[] = $value['id'];\n\t\t}\n\t\t\n\t\tforeach ($chats as $key => $value) {\n\t\t\t$chat = New Chats;\n\t\t\t$chat->set('id',$value);\n\t\t\t$chat->hydrate();\n\t\t\t$chat->countNewMsg();\n\t\t\n\t\t\t$chat_list[] = $chat;\n\t\t\t\n\t\t}\n\n\t\t$this->chats = $chat_list;\n\n\n\t}", "public function initMmI18ns()\n\t{\n\t\tif ($this->collMmI18ns === null) {\n\t\t\t$this->collMmI18ns = array();\n\t\t}\n\t}", "public function startConversation(Conversation $Conversation)\n\t{\n\t}", "public function setDefaults($defaults = array())\n {\n $content_object = $this->content_object;\n $defaults[ContentObject::PROPERTY_ID] = $content_object->get_id();\n $defaults[ContentObject::PROPERTY_MODIFICATION_DATE] = $content_object->get_modification_date();\n\n if (!$this->workspace instanceof PersonalWorkspace)\n {\n $contentObjectRelationService = new ContentObjectRelationService(new ContentObjectRelationRepository());\n $contentObjectRelation =\n $contentObjectRelationService->getContentObjectRelationForWorkspaceAndContentObject(\n $this->workspace,\n $content_object\n );\n\n if ($contentObjectRelation)\n {\n $defaults[ContentObject::PROPERTY_PARENT_ID] = $contentObjectRelation->getCategoryId();\n }\n }\n\n if (!array_key_exists(ContentObject::PROPERTY_PARENT_ID, $defaults))\n {\n $defaults[ContentObject::PROPERTY_PARENT_ID] = $content_object->get_parent_id();\n }\n\n $defaults[ContentObject::PROPERTY_TEMPLATE_REGISTRATION_ID] = $content_object->get_template_registration_id();\n\n if ($this->form_type == self::TYPE_REPLY)\n {\n $defaults[ContentObject::PROPERTY_TITLE] =\n Translation::get('ReplyShort', null, Utilities::COMMON_LIBRARIES) .\n ' ' . $content_object->get_title();\n }\n else\n {\n $defaults[ContentObject::PROPERTY_TITLE] =\n $defaults[ContentObject::PROPERTY_TITLE] == null ? $content_object->get_title() :\n $defaults[ContentObject::PROPERTY_TITLE];\n $defaults[ContentObject::PROPERTY_DESCRIPTION] = $content_object->get_description();\n }\n\n if ($content_object instanceof ForcedVersionSupport && $this->form_type == self::TYPE_EDIT)\n {\n $defaults['version'] = 1;\n }\n\n parent::setDefaults($defaults);\n }", "public function useTestMailCollector() {\n // Set up an override.\n $settings['config']['system.mail']['interface']['default'] = (object) [\n 'value' => 'test_mail_collector',\n 'required' => TRUE,\n ];\n $this->writeSettings($settings);\n }", "public function user_conversation_fun(){\n require_once REALTEO_PLUGIN_DIR . '/includes/user_conversation.php';\n }", "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 __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}", "public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}", "public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }" ]
[ "0.5138219", "0.5132209", "0.50547963", "0.50118566", "0.5008269", "0.49841768", "0.49701706", "0.48281908", "0.48183528", "0.48172984", "0.4772161", "0.47620618", "0.47489032", "0.47418034", "0.47215116", "0.47091803", "0.4700095", "0.46969905", "0.46892437", "0.46880978", "0.46705168", "0.46658447", "0.46393248", "0.46253914", "0.4598855", "0.45901543", "0.45858982", "0.45857567", "0.4568588", "0.45383427", "0.45306575", "0.45244592", "0.4519785", "0.45122492", "0.4500477", "0.4498243", "0.44752872", "0.44703752", "0.4468846", "0.44541347", "0.44509268", "0.44488278", "0.44450343", "0.44435817", "0.4442803", "0.4442612", "0.4432292", "0.44249415", "0.44219208", "0.44173333", "0.44071615", "0.44067854", "0.43984205", "0.43960473", "0.4393417", "0.43916193", "0.4383809", "0.43822554", "0.43811995", "0.43772855", "0.43696144", "0.4364087", "0.4364024", "0.43561387", "0.43545675", "0.43498114", "0.43408257", "0.43366438", "0.43307427", "0.4324443", "0.4320625", "0.43169448", "0.43162215", "0.43148956", "0.4314564", "0.43105778", "0.43105698", "0.43042266", "0.42965457", "0.42895812", "0.42862442", "0.4284834", "0.42842385", "0.428032", "0.42773816", "0.42724162", "0.42652646", "0.42613754", "0.4260133", "0.42597094", "0.4259593", "0.42584488", "0.42581728", "0.42559367", "0.42550924", "0.42549643", "0.42532465", "0.42498574", "0.42441788", "0.42440072", "0.42433074" ]
0.0
-1
Sort options of the attribute(s) based on self::OPTIONS_SORT_ORDER
public function sortOptions(ModuleDataSetupInterface $setup, array $attributes = []) { if (empty($attributes)) { $attributes = self::UNIT_ATTRIBUTE_CODES; } //iterate through given attribute_codes foreach ($attributes as $attributeCode) { $attribute = $this->attributeRepository->get(Product::ENTITY, $attributeCode); //iterate through options foreach ($attribute->getOptions() as $option) { //get sort order based on options label $sortOrder = array_search($option->getLabel(), self::OPTIONS_SORT_ORDER); $table = $setup->getTable('eav_attribute_option'); $optionId = $attribute->getSource()->getOptionId($option->getValue()); if ($optionId != '' && ! is_null($optionId)) { $setup->getConnection()->update($table, ['sort_order' => $sortOrder], 'option_id=' . $optionId); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sortOptions() {\n $options = array();\n\n foreach($this->options as $key => $option) {\n $optionTitle = $option['optionTitle'];\n $options[$optionTitle] = $option;\n }\n\n ksort($options);\n reset($options);\n\n $this->options = $options;\n }", "protected function getAllAvailableSortOrderOptions() {}", "public function get_sorting_options() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_sorting_options();\n\n }", "function elm_admin_get_order_by_options() {\n\t$options = array(\n\t\t'asc' => __('ASC', 'elm'),\n\t\t'desc' => __('DESC', 'elm')\n\t);\n\t\n\treturn $options;\n}", "protected function getAllAvailableSortDescendingOptions() {}", "function _sf_get_list_of_sort_options() {\n\t\t\n\t\t$options = array('relevant', 'oldest', 'newest', 'closest');\n\t\t\n\t\t///// IF WE HAVE RATING\n\t\tif(ddp('rating') == 'on' && ddp('rating_sortby') == 'on') { $options[] = 'ratingdesc'; $options[] = 'ratingasc'; }\n\t\t\n\t\t///// WE NEED TO GO THROUGH OUR FIELDS TO SEE IF ANY OF THEM IS A VALID OPTION\n\t\t$args = array(\n\t\t\t\t\t\t\t\n\t\t\t'post_type' => 'search_field',\n\t\t\t'meta_query' => array(\n\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'enable_sort',\n\t\t\t\t\t'value' => 'on',\n\t\t\t\t\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\n\t\t\t\t\t'key' => 'field_type',\n\t\t\t\t\t'value' => array('range', 'min_val', 'max_val'),\n\t\t\t\t\t'compare' => 'IN',\n\t\t\t\t\n\t\t\t\t)\n\t\t\t\n\t\t\t),\n\t\t\t'posts_per_page' => -1,\n\t\t\n\t\t);\n\t\t\n\t\t$sortQ = new WP_Query($args);\n\t\t\n\t\tif($sortQ->have_posts()) {\n\t\t\t\n\t\t\tforeach($sortQ->posts as $search_field) {\n\t\t\t\t\n\t\t\t\t$options[] = $search_field->post_name.'_low';\n\t\t\t\t$options[] = $search_field->post_name.'_high';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $options;\n\t\t\n\t}", "public function getSortByOptions()\n {\n return [\n self::SORT_ORDER => _t(__CLASS__ . '.ORDER', 'Order'),\n self::SORT_TITLE => _t(__CLASS__ . '.TITLE', 'Title')\n ];\n }", "public function getAttributeUsedForSortByArray()\n {\n $options = parent::getAttributeUsedForSortByArray();\n\n // add attribute for sorting by newest\n $options['entity_id'] = Mage::helper('ash_sort')->__('New Arrivals');\n\n return $options;\n }", "function sort_options( $options, $params ) {\n\n if ( FWP()->helper->facet_setting_exists( 'type', 'proximity' ) ) {\n $options['distance'] = [\n 'label' => __( 'Distance', 'fwp-front' ),\n 'query_args' => [\n 'orderby' => 'post__in',\n 'order' => 'ASC',\n ],\n ];\n }\n\n return $options;\n }", "public function get_attributes_for_select() {\n\t\tif ( empty( $this->cache[ __FUNCTION__ ] ) ) {\n\t\t\t$default_option = [\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => __( ' - Select Attribute - ', 'edgenet' ),\n\t\t\t];\n\n\t\t\t$options = array_map( function ( $att ) {\n\t\t\t\treturn [\n\t\t\t\t\t'value' => $att->id,\n\t\t\t\t\t'label' => $att->description,\n\t\t\t\t];\n\t\t\t}, edgenet()->settings->requirement_set->get_attributes() );\n\n\t\t\tusort( $options, function ( $a, $b ) {\n\t\t\t\t$a_label = strtoupper( $a['label'] );\n\t\t\t\t$b_label = strtoupper( $b['label'] );\n\t\t\t\tif ( $a_label === $b_label ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn ( $a_label < $b_label ) ? - 1 : 1;\n\t\t\t} );\n\n\t\t\tarray_unshift( $options, $default_option );\n\n\t\t\t$this->cache[ __FUNCTION__ ] = $options;\n\t\t}\n\n\t\treturn $this->cache[ __FUNCTION__ ];\n\t}", "public function toOptionArray(): array\n {\n $options = [];\n $options[] = [\n 'label' => __('Ascending'),\n 'value' => 'asc'\n ];\n $options[] = [\n 'label' => __('Descending'),\n 'value' => 'desc'\n ];\n return $options;\n }", "public function toOptionArray()\n {\n $options = [];\n foreach ($this->getAttributes() as $attribute) {\n $requiredArray = $this->getRequiredArray();\n if (in_array($attribute->getAttributeCode(), $requiredArray)) {\n $options[] = [\n \"value\" => $attribute->getAttributeCode(),\n \"label\" => $attribute->getDefaultFrontendLabel()\n ];\n }\n }\n asort($options);\n return $options;\n }", "public function get_options_list($with_choices = false) {\n\t\tif (empty(self::$sl_listing_attributes)) {\n\t\t\tself::$sl_listing_attributes = PL_Shortcode_CPT::get_listing_attributes(true);\n\t\t\tself::$sl_sort_list = array();\n\t\t\tforeach(self::$sl_listing_attributes as $args) {\n\t\t\t\tif($args['attr_type'] && $args['attr_type'] != 'checkbox') {\n\t\t\t\t\t$group = $args['group'];\n\t\t\t\t\tswitch($group) {\n\t\t\t\t\t\tcase 'metadata':\n\t\t\t\t\t\t\t$group = 'cur_data';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'custom':\n\t\t\t\t\t\t\t$group = 'uncur_data';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'rets':\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t\t$key = (empty($group) ? '' : $group.'.').$args['attribute'];\n\t\t\t\t\tself::$sl_sort_list[$key] = $args['label'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!empty(self::$sl_sort_list)) {\n\t\t\t// save the full list of sort by names so we can use on the front end\n\t\t\tupdate_option('pl_'.$this->shortcode.'_formval_sort_by_options', self::$sl_sort_list);\n\t\t}\n\t\t$this->options['sort_by_options']['options'] = self::$sl_sort_list;\n\t\t$this->options['sort_by']['options'] = self::$sl_sort_list;\t\t\n\t\treturn $this->options;\n\t}", "public function options() {\r\n return $this->hasMany('App\\Option')->orderBy('order');\r\n }", "protected function applySorting()\n\t{\n\t\t$i = 1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->sort($field, $dir === 'a' ? IDataSource::ASCENDING : IDataSource::DESCENDING);\n\t\t\t$list[$field] = array($dir, $i++);\n\t\t}\n\t\treturn $list;\n\t}", "public static function getSortOptions()\n\t{\n\t\t$sortOptions = array(\n\t\t\tJHtml::_('select.option', 'date:D:S:d1', JText::_('COM_ARTOFGM_OPTION_SORT_DATE')),\n\t\t);\n\n\t\treturn $sortOptions;\n\t}", "public function getAttributeUsedForSortByArray()\n {\n $options = ['position' => __('Position')];\n foreach ($this->getAttributesUsedForSortBy() as $attribute) {\n /* @var $attribute \\Magento\\Eav\\Model\\Entity\\Attribute\\AbstractAttribute */\n $options[$attribute->getAttributeCode()] = $attribute->getStoreLabel();\n }\n $options['popularity'] = __('Popularity');\n $options['rating_summary'] = __('Rating');\n\n return $options;\n }", "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "public function getChoicesSortData()\n {\n $out = [];\n\n // Case #0, sorted in ascending order by term, nothing is prioritized.\n $sortParams = ['type' => '_term', 'order' => 'asc', 'priorities' => []];\n $out[] = ['sortParams' => $sortParams, ['blue', 'green', 'red', 'yellow']];\n\n // Case #1, sorted in descending order by term, blue is prioritized.\n $sortParams = ['type' => '_term', 'order' => 'desc', 'priorities' => ['blue']];\n $out[] = ['sortParams' => $sortParams, ['blue', 'yellow', 'red', 'green']];\n\n // Case #2, all items prioritized, so sorting shouldn't matter.\n $sortParams = ['type' => '_term', 'order' => 'desc', 'priorities' => ['blue', 'green', 'red']];\n $out[] = ['sortParams' => $sortParams, ['blue', 'green', 'red', 'yellow']];\n\n // Case #3, sort items by count, red prioritized.\n $sortParams = ['type' => '_count', 'order' => 'desc', 'priorities' => ['red']];\n $out[] = ['sortParams' => $sortParams, ['red', 'blue', 'green', 'yellow']];\n\n // Case #3, sort items by count.\n $sortParams = ['type' => '_count', 'order' => 'asc', 'priorities' => []];\n $out[] = ['sortParams' => $sortParams, ['green', 'yellow', 'red', 'blue']];\n\n return $out;\n }", "public function options() {\n return $this->model->orderBy('name')->lists('name', 'id');\n }", "private function sortOptions($options)\n {\n if (!$values = $this->getElement()->getValue()) {\n return $options;\n }\n $valuesArray = explode(',', $values);\n $result = [];\n foreach ($valuesArray as $value) {\n foreach ($options as $option) {\n if ($option['value'] == $value) {\n $result[] = $option;\n break;\n }\n }\n }\n foreach ($options as $option) {\n if (!in_array($option['value'], $valuesArray)) {\n $result[] = $option;\n }\n }\n return $result;\n }", "private function getSortOrder()\n {\n return [\n $this->sortOrderBuilder\n ->setDirection(SortOrder::SORT_ASC)\n ->setField(JobConfig::SCHEMA_JOB_FIELD_PRIORITY)\n ->create(),\n $this->sortOrderBuilder\n ->setDirection(SortOrder::SORT_ASC)\n ->setField(JobConfig::SCHEMA_JOB_FIELD_CREATED)\n ->create()\n ];\n }", "public function getAttributeOrders($recalculate = false)\n {\n if ($this->_attributeOrders === null || $recalculate) {\n $this->_attributeOrders = [];\n if (($params = $this->params) === null) {\n $request = Yii::$app->getRequest();\n $params = $request instanceof Request ? $request->getQueryParams() : [];\n // print_r($request->getQueryParams());\n }\n /*\n print_r([\n 'sort'=>$params[$this->sortParam],\n 'order'=>$params[$this->orderParam],\n ]);\n */\n if (isset($params[$this->sortParam]) && is_scalar($params[$this->sortParam])) {\n\n $attributes = explode($this->separator, $params[$this->sortParam]);\n $orders = explode($this->separator,$params[$this->orderParam]);\n\n /*\n print_r([\n 'attributes'=>$attributes,\n 'orders'=>$orders ,\n ]);\n die(__METHOD__);\n */\n foreach ($attributes as $idx => $attribute) {\n $descending = false;\n $order = $orders[$idx];\n if($order == 'desc'){\n $descending = true ;\n }\n\n /**\n * TODO 暂时忽略掉 全部可以排序 ; attributes 的赋值在ActiveDataProvider中是很诡异的:\n * 参考: ActiveDataProvider::setSort 方法内部的实现吧!\n *\n if (isset($this->attributes[$attribute])) {\n $this->_attributeOrders[$attribute] = $descending ? SORT_DESC : SORT_ASC;\n if (!$this->enableMultiSort) {\n return $this->_attributeOrders;\n }\n }\n\n // 这段代码 可能导致 不存在的属性 出现在排序配置中 容易出bug !!\n $this->_attributeOrders[$attribute] = $descending ? SORT_DESC : SORT_ASC;\n if (!$this->enableMultiSort) {\n return $this->_attributeOrders;\n }\n **/\n\n if (isset($this->attributes[$attribute])) {\n $this->_attributeOrders[$attribute] = $descending ? SORT_DESC : SORT_ASC;\n if (!$this->enableMultiSort) {\n return $this->_attributeOrders;\n }\n }\n }\n }\n\n if (empty($this->_attributeOrders) && is_array($this->defaultOrder)) {\n $this->_attributeOrders = $this->defaultOrder;\n }\n }\n return $this->_attributeOrders;\n }", "public function setOrderingValues()\n {\n $ordering = [\n 'id' => 'ID',\n 'p_no' => 'Patient No',\n 'name' => 'Name',\n 'date' => 'Register Date',\n 'age' => 'Age',\n 'dob' => 'Date of birth',\n 'gender' => 'Gender',\n 'Blood' => 'Blood'\n ];\n\n return $ordering;\n }", "function getSortOrder() { return $this->m_sortOrder; }", "protected function prepareFixtureOptions()\n {\n $configurableOptions = [];\n $attributesData = $this->product->getConfigurableOptions()['attributes_data'];\n $countAttributes = count($attributesData);\n for ($i = 0; $i < $countAttributes; $i++) {\n $attributeKey = 'attribute_key_' . $i;\n $configurableOptions[$attributesData[$attributeKey]['frontend_label']] = [\n 'title' => $attributesData[$attributeKey]['frontend_label'],\n 'type' => $attributesData[$attributeKey]['frontend_input'],\n 'is_require' => 'Yes',\n 'options' => $this->getOptionsData($attributesData[$attributeKey]['options'])\n ];\n }\n\n return $this->sortOptions($configurableOptions);\n }", "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Create the class even if the sort field already exists'],\n ];\n }", "function qw_default_sort_options( $sort_options ) {\n\n\t$sort_options['author_id'] = array(\n\t\t'title' => 'Author',\n\t\t'description' => 'The content author ID.',\n\t\t'type' => 'author',\n\t);\n\t$sort_options['comment_count'] = array(\n\t\t'title' => 'Comment Count',\n\t\t'description' => 'Total number of comments on a piece of content.',\n\t);\n\t$sort_options['menu_order'] = array(\n\t\t'title' => 'Menu Order (for Page post_types)',\n\t\t'description' => 'Menu Order of a Page.',\n\t);\n\t$sort_options['meta_value'] = array(\n\t\t'title' => 'Meta value',\n\t\t'description' => \"Note that a 'meta_key=keyname' filter must also be present in the query. Good for sorting words, but not numbers.\",\n\t);\n\t$sort_options['meta_value_num'] = array(\n\t\t'title' => 'Meta value number',\n\t\t'description' => \"Order by numeric meta value. Also note that a 'meta_key' filter must be present in the query. This value allows for numerical sorting as noted above in 'meta_value'.\",\n\t);\n\t$sort_options['none'] = array(\n\t\t'title' => 'None',\n\t\t'description' => 'No sort order.',\n\t\t'order_options' => array(\n\t\t\t'none' => 'None',\n\t\t)\n\t);\n\t$sort_options['post__in'] = array(\n\t\t'title' => 'Post__in order',\n\t\t'description' => 'Preserve post ID order given in the post__in array.',\n\t\t'order_options' => FALSE,\n\t);\n\t$sort_options['post_date'] = array(\n\t\t'title' => 'Date',\n\t\t'description' => 'The posted date of content.',\n\t\t'type' => 'date',\n\t);\n\t$sort_options['post_ID'] = array(\n\t\t'title' => 'Post ID',\n\t\t'description' => 'The ID of the content.',\n\t\t'type' => 'ID',\n\t);\n\t$sort_options['post_modified'] = array(\n\t\t'title' => 'Date Modified',\n\t\t'description' => 'Date content was last modified.',\n\t\t'type' => 'modified',\n\t);\n\t$sort_options['post_parent'] = array(\n\t\t'title' => 'Parent',\n\t\t'description' => 'The parent post for content.',\n\t\t'type' => 'parent',\n\t);\n\t$sort_options['post_title'] = array(\n\t\t'title' => 'Title',\n\t\t'description' => 'The title of the content.',\n\t\t'type' => 'title',\n\t);\n\t$sort_options['rand'] = array(\n\t\t'title' => 'Random',\n\t\t'description' => 'Random order.',\n\t);\n\n\treturn $sort_options;\n}", "protected function getOrderByAttribute()\n {\n return $this->fetchData[self::ORDER_CLAUSE];\n }", "private function sortOptions()\r\n {\r\n $pageActions = array(); // For the result\r\n // Sort changes by file\r\n usort($this->changeAr, \"cmp\");\r\n\r\n foreach ($this->changeAr as $line) {\r\n $file = $line['file'];\r\n $action = $line['action'];\r\n if (array_key_exists($file, $pageActions)) {\r\n continue;\r\n }\r\n $pageActions[$file] = $action;\r\n }\r\n// print_r($pageActions);\r\n return $pageActions;\r\n }", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder();", "function qw_form_default_sort_order_options( $sort ) {\n\tif ( ! empty( $sort['order_options'] ) ) { ?>\n\t\t<p>\n\t\t\t<!-- sort options -->\n\t\t\t<label class=\"qw-label\">Order by <?php print $sort['title']; ?>\n\t\t\t\t:</label>\n\t\t\t<select class='qw-js-title'\n\t\t\t name=\"<?php print $sort['form_prefix']; ?>[order_value]\">\n\t\t\t\t<?php\n\t\t\t\tforeach ( $sort['order_options'] as $value => $label ) {\n\t\t\t\t\t$selected = ( $sort['values']['order_value'] == $value ) ? 'selected=\"selected\"' : '';\n\t\t\t\t\t?>\n\t\t\t\t\t<option value=\"<?php print $value; ?>\"\n\t\t\t\t\t\t<?php print $selected; ?>>\n\t\t\t\t\t\t<?php print $label; ?>\n\t\t\t\t\t</option>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</select>\n\t\t</p>\n\t\t<p class=\"description\">Select how to order the results.</p>\n\t<?php\n\t}\n}", "public function afterGetAttributeUsedForSortByArray(\n Config $catalogConfig,\n $options\n ) {\n $options[Attribute::ATTRIBUTE_NAME] = __(Attribute::ATTRIBUTE_LABEL);\n return $options;\n }", "public function getOptionsForAttribute($attributeID) {\n\t\t$options = new ArrayList();\n\t\t$variations = $this->Variations();\n\n\t\tif($variations && $variations->exists()) foreach ($variations as $variation){\n\t\t\tif($variation->isEnabled()){\n\t\t\t\t$option = $variation->getOptionForAttribute($attributeID);\n\t\t\t\tif($option){\n\t\t\t\t\t$options->push($option);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$options = $options->sort('SortOrder');\n\t\treturn $options;\n\t}", "public function getSortOrderAllowableValues()\n {\n return [\n self::SORT_ORDER_ASC,\n self::SORT_ORDER_DESC,\n ];\n }", "public function getSort () {\n $attributes = array();\n foreach($this->owner->attributes as $name => $val) {\n $attributes[$name] = array(\n 'asc' => 't.'.$name.' ASC',\n 'desc' => 't.'.$name.' DESC',\n );\n }\n $attributes['lastLogin'] = array (\n 'asc' => '(SELECT lastLogin from x2_users '.\n 'WHERE x2_users.username=t.username) ASC',\n 'desc' => '(SELECT lastLogin from x2_users '.\n 'WHERE x2_users.username=t.username) DESC',\n );\n $attributes['isActive'] = array (\n 'asc' => \n '(SELECT DISTINCT user '.\n 'FROM x2_sessions '.\n 'WHERE t.username=x2_sessions.user AND '.\n 'x2_sessions.lastUpdated > '.(time () - 900).\n ') DESC ',\n 'desc' => \n '(SELECT DISTINCT user '.\n 'FROM x2_sessions '.\n 'WHERE t.username=x2_sessions.user AND '.\n 'x2_sessions.lastUpdated > '.(time () - 900).\n ') ASC',\n );\n return $attributes;\n }", "function SetupSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->fecha_tamizaje, $bCtrl); // fecha_tamizaje\n\t\t\t$this->UpdateSort($this->id_centro, $bCtrl); // id_centro\n\t\t\t$this->UpdateSort($this->apellidopaterno, $bCtrl); // apellidopaterno\n\t\t\t$this->UpdateSort($this->apellidomaterno, $bCtrl); // apellidomaterno\n\t\t\t$this->UpdateSort($this->nombre, $bCtrl); // nombre\n\t\t\t$this->UpdateSort($this->ci, $bCtrl); // ci\n\t\t\t$this->UpdateSort($this->fecha_nacimiento, $bCtrl); // fecha_nacimiento\n\t\t\t$this->UpdateSort($this->dias, $bCtrl); // dias\n\t\t\t$this->UpdateSort($this->semanas, $bCtrl); // semanas\n\t\t\t$this->UpdateSort($this->meses, $bCtrl); // meses\n\t\t\t$this->UpdateSort($this->sexo, $bCtrl); // sexo\n\t\t\t$this->UpdateSort($this->discapacidad, $bCtrl); // discapacidad\n\t\t\t$this->UpdateSort($this->id_tipodiscapacidad, $bCtrl); // id_tipodiscapacidad\n\t\t\t$this->UpdateSort($this->resultado, $bCtrl); // resultado\n\t\t\t$this->UpdateSort($this->resultadotamizaje, $bCtrl); // resultadotamizaje\n\t\t\t$this->UpdateSort($this->tapon, $bCtrl); // tapon\n\t\t\t$this->UpdateSort($this->tipo, $bCtrl); // tipo\n\t\t\t$this->UpdateSort($this->repetirprueba, $bCtrl); // repetirprueba\n\t\t\t$this->UpdateSort($this->observaciones, $bCtrl); // observaciones\n\t\t\t$this->UpdateSort($this->id_apoderado, $bCtrl); // id_apoderado\n\t\t\t$this->UpdateSort($this->id_referencia, $bCtrl); // id_referencia\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function getSortDirAllowableValues()\r\n {\r\n return [\r\n self::SORT_DIR_ASC,\r\n self::SORT_DIR_DESC,\r\n ];\r\n }", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id); // id\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->companyname); // companyname\n\t\t\t$this->UpdateSort($this->servicetime); // servicetime\n\t\t\t$this->UpdateSort($this->country); // country\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->skype); // skype\n\t\t\t$this->UpdateSort($this->website); // website\n\t\t\t$this->UpdateSort($this->linkedin); // linkedin\n\t\t\t$this->UpdateSort($this->facebook); // facebook\n\t\t\t$this->UpdateSort($this->twitter); // twitter\n\t\t\t$this->UpdateSort($this->active_code); // active_code\n\t\t\t$this->UpdateSort($this->identification); // identification\n\t\t\t$this->UpdateSort($this->link_expired); // link_expired\n\t\t\t$this->UpdateSort($this->isactive); // isactive\n\t\t\t$this->UpdateSort($this->google); // google\n\t\t\t$this->UpdateSort($this->instagram); // instagram\n\t\t\t$this->UpdateSort($this->account_type); // account_type\n\t\t\t$this->UpdateSort($this->logo); // logo\n\t\t\t$this->UpdateSort($this->profilepic); // profilepic\n\t\t\t$this->UpdateSort($this->mailref); // mailref\n\t\t\t$this->UpdateSort($this->deleted); // deleted\n\t\t\t$this->UpdateSort($this->deletefeedback); // deletefeedback\n\t\t\t$this->UpdateSort($this->account_id); // account_id\n\t\t\t$this->UpdateSort($this->start_date); // start_date\n\t\t\t$this->UpdateSort($this->end_date); // end_date\n\t\t\t$this->UpdateSort($this->year_moth); // year_moth\n\t\t\t$this->UpdateSort($this->registerdate); // registerdate\n\t\t\t$this->UpdateSort($this->login_type); // login_type\n\t\t\t$this->UpdateSort($this->accountstatus); // accountstatus\n\t\t\t$this->UpdateSort($this->ispay); // ispay\n\t\t\t$this->UpdateSort($this->profilelink); // profilelink\n\t\t\t$this->UpdateSort($this->source); // source\n\t\t\t$this->UpdateSort($this->agree); // agree\n\t\t\t$this->UpdateSort($this->balance); // balance\n\t\t\t$this->UpdateSort($this->job_title); // job_title\n\t\t\t$this->UpdateSort($this->projects); // projects\n\t\t\t$this->UpdateSort($this->opportunities); // opportunities\n\t\t\t$this->UpdateSort($this->isconsaltant); // isconsaltant\n\t\t\t$this->UpdateSort($this->isagent); // isagent\n\t\t\t$this->UpdateSort($this->isinvestor); // isinvestor\n\t\t\t$this->UpdateSort($this->isbusinessman); // isbusinessman\n\t\t\t$this->UpdateSort($this->isprovider); // isprovider\n\t\t\t$this->UpdateSort($this->isproductowner); // isproductowner\n\t\t\t$this->UpdateSort($this->states); // states\n\t\t\t$this->UpdateSort($this->cities); // cities\n\t\t\t$this->UpdateSort($this->offers); // offers\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function ibio_facetwp_sort_options( $options, $params ) {\n\n $options['date_desc'] = array(\n 'label' => 'Date Recorded (Newest)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'recorded_date', // required when sorting by custom fields\n 'order' => 'DESC', // descending order\n )\n\n );\n $options['date_asc'] = array(\n 'label' => 'Date Recorded (Oldest)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'recorded_date', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n\n );\n /* $options['title_asc'] = array(\n 'label' => 'By Title (A-Z)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'short_title', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n );\n $options['title_desc'] = array(\n 'label' => 'By Title (Z-A)',\n 'query_args' => array(\n 'orderby' => 'meta_value', // sort by numerical custom field\n 'meta_key' => 'short_title', // required when sorting by custom fields\n 'order' => 'DESC', // descending order\n )\n );*/\n\n // hide the sort by title options\n unset ( $options['title_asc'] );\n unset ( $options['title_desc'] );\n\n $options['duration-s'] = array(\n 'label' => 'Duration (shortest first)',\n 'query_args' => array(\n 'orderby' => 'meta_value_num', // sort by numerical custom field\n 'meta_key' => 'total_duration', // required when sorting by custom fields\n 'order' => 'ASC', // descending order\n )\n );\n return $options;\n}", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tanggal); // tanggal\n\t\t\t$this->UpdateSort($this->auc_number); // auc_number\n\t\t\t$this->UpdateSort($this->start_bid); // start_bid\n\t\t\t$this->UpdateSort($this->close_bid); // close_bid\n\t\t\t$this->UpdateSort($this->lot_number); // lot_number\n\t\t\t$this->UpdateSort($this->chop); // chop\n\t\t\t$this->UpdateSort($this->grade); // grade\n\t\t\t$this->UpdateSort($this->estate); // estate\n\t\t\t$this->UpdateSort($this->sack); // sack\n\t\t\t$this->UpdateSort($this->netto); // netto\n\t\t\t$this->UpdateSort($this->open_bid); // open_bid\n\t\t\t$this->UpdateSort($this->highest_bid); // highest_bid\n\t\t\t$this->UpdateSort($this->auction_status); // auction_status\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function culturefeed_search_ui_get_sort_options_for_page($search_page) {\n\n $sort_options = variable_get('culturefeed_search_sortoptions_' . $search_page['id'], array());\n\n // Load default ones.\n if (empty($sort_options)) {\n $sort_options = $search_page['sort_options'];\n $sort_options['default'] = $search_page['sort_default'];\n }\n\n return $sort_options;\n\n}", "private function sortAdaptors()\n {\n $this->sorted = [];\n\n if (isset($this->adaptors)) {\n krsort($this->adaptors);\n $this->sorted = array_merge(...$this->adaptors);\n }\n }", "public function sortDirection();", "public function getAttributesUsedForSortBy()\n {\n parent::getAttributesUsedForSortBy();\n\n // add attribute for sorting by newest\n $attribute = Mage::getSingleton('eav/config')\n ->getAttribute('catalog_product', 'entity_id');\n $attribute->setData('frontend_label', Mage::helper('ash_sort')->__('New Arrivals'));\n $this->_usedForSortBy['entity_id'] = $attribute;\n\n return $this->_usedForSortBy;\n }", "public function SetSort()\n\t\t{\n\t\t\tif (!isset($_GET['sort']) || empty($_GET['sort'])) {\n\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t}\n\n\t\t\tswitch ($_GET['sort']) {\n\t\t\t\tcase \"featured\": {\n\t\t\t\t\t$GLOBALS['SortFeaturedSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodsortorder desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"newest\": {\n\t\t\t\t\t$GLOBALS['SortNewestSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.productid desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"bestselling\": {\n\t\t\t\t\t$GLOBALS['SortBestSellingSelected'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodnumsold desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphaasc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname asc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"alphadesc\": {\n\t\t\t\t\t$GLOBALS['SortAlphaDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodname desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"avgcustomerreview\": {\n\t\t\t\t\t$GLOBALS['SortAvgReview'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"prodavgrating desc\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"pricedesc\": {\n\t\t\t\t\t$GLOBALS['SortPriceDesc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice desc\");\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tcase \"priceasc\":\n\t\t\t\tdefault:\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SortPriceAsc'] = 'selected=\"selected\"';\n\t\t\t\t\t$this->SetSortField(\"p.prodcalculatedprice asc\");\n\t\t\t\t\t$_GET['sort'] = \"priceasc\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->_pricesort = $_GET['sort'];\n\t\t}", "public function toOptionArray()\n {\n $options = array();\n\n $attributeCollection = $this->attributeCollectionFactory->create();\n $attributeCollection->addVisibleFilter();\n $attributeCollection->addOrder('frontend_label','ASC');\n\n /**\n * @var \\Magento\\Catalog\\Model\\ResourceModel\\Eav\\Attribute $attribute *\\\n */\n foreach ($attributeCollection as $attribute)\n {\n $options[] = [\n 'value' => $attribute->getAttributeCode(),\n 'label' => $attribute->getFrontend()->getLabel() . ' (' . $attribute->getAttributeCode() . ')',\n ];\n }\n return $options;\n }", "function SetupSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = @$_GET[\"order\"];\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nombre_contacto); // nombre_contacto\n\t\t\t$this->UpdateSort($this->name); // name\n\t\t\t$this->UpdateSort($this->lastname); // lastname\n\t\t\t$this->UpdateSort($this->_email); // email\n\t\t\t$this->UpdateSort($this->address); // address\n\t\t\t$this->UpdateSort($this->phone); // phone\n\t\t\t$this->UpdateSort($this->cell); // cell\n\t\t\t$this->UpdateSort($this->created_at); // created_at\n\t\t\t$this->UpdateSort($this->id_sucursal); // id_sucursal\n\t\t\t$this->UpdateSort($this->tipoinmueble); // tipoinmueble\n\t\t\t$this->UpdateSort($this->tipovehiculo); // tipovehiculo\n\t\t\t$this->UpdateSort($this->tipomaquinaria); // tipomaquinaria\n\t\t\t$this->UpdateSort($this->tipomercaderia); // tipomercaderia\n\t\t\t$this->UpdateSort($this->tipoespecial); // tipoespecial\n\t\t\t$this->UpdateSort($this->email_contacto); // email_contacto\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function getXXXOrdering()\n\t{\n\t\treturn array('title_asc', 'title_desc');\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->tgl, $bCtrl); // tgl\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->jns_spp, $bCtrl); // jns_spp\n\t\t\t$this->UpdateSort($this->kd_mata, $bCtrl); // kd_mata\n\t\t\t$this->UpdateSort($this->urai, $bCtrl); // urai\n\t\t\t$this->UpdateSort($this->jmlh, $bCtrl); // jmlh\n\t\t\t$this->UpdateSort($this->jmlh1, $bCtrl); // jmlh1\n\t\t\t$this->UpdateSort($this->jmlh2, $bCtrl); // jmlh2\n\t\t\t$this->UpdateSort($this->jmlh3, $bCtrl); // jmlh3\n\t\t\t$this->UpdateSort($this->jmlh4, $bCtrl); // jmlh4\n\t\t\t$this->UpdateSort($this->nm_perus, $bCtrl); // nm_perus\n\t\t\t$this->UpdateSort($this->alamat, $bCtrl); // alamat\n\t\t\t$this->UpdateSort($this->npwp, $bCtrl); // npwp\n\t\t\t$this->UpdateSort($this->pimpinan, $bCtrl); // pimpinan\n\t\t\t$this->UpdateSort($this->bank, $bCtrl); // bank\n\t\t\t$this->UpdateSort($this->rek, $bCtrl); // rek\n\t\t\t$this->UpdateSort($this->nospm, $bCtrl); // nospm\n\t\t\t$this->UpdateSort($this->tglspm, $bCtrl); // tglspm\n\t\t\t$this->UpdateSort($this->ppn, $bCtrl); // ppn\n\t\t\t$this->UpdateSort($this->ps21, $bCtrl); // ps21\n\t\t\t$this->UpdateSort($this->ps22, $bCtrl); // ps22\n\t\t\t$this->UpdateSort($this->ps23, $bCtrl); // ps23\n\t\t\t$this->UpdateSort($this->ps4, $bCtrl); // ps4\n\t\t\t$this->UpdateSort($this->kodespm, $bCtrl); // kodespm\n\t\t\t$this->UpdateSort($this->nambud, $bCtrl); // nambud\n\t\t\t$this->UpdateSort($this->nppk, $bCtrl); // nppk\n\t\t\t$this->UpdateSort($this->nipppk, $bCtrl); // nipppk\n\t\t\t$this->UpdateSort($this->prog, $bCtrl); // prog\n\t\t\t$this->UpdateSort($this->prog1, $bCtrl); // prog1\n\t\t\t$this->UpdateSort($this->bayar, $bCtrl); // bayar\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function getElementSortOrder();", "function SetUpSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$fs_multijoin_v->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$fs_multijoin_v->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->id); // id\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->mount); // mount\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->path); // path\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->parent); // parent\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->deprecated); // deprecated\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->name); // name\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->snapshot); // snapshot\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->tapebackup); // tapebackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->diskbackup); // diskbackup\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->type); // type\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT); // CONTACT\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->CONTACT2); // CONTACT2\r\n\t\t\t$fs_multijoin_v->UpdateSort($fs_multijoin_v->RESCOMP); // RESCOMP\r\n\t\t\t$fs_multijoin_v->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function printSortOptions ($url) {\n print \"<p align='center'><b>Sort by:</b> \";\n foreach ($this->sort_opts as $s) {\n if ($s != $this->sort_opts[0]) {\n\t// print a separator between terms\n\tprint \" | \";\n }\n if ($s == $this->sort) {\n\tprint \"&nbsp;\" . $this->pretty_sort_opts[$s] . \"&nbsp;\";\n } else {\n\tprint \"&nbsp;<a href='$url?sort=$s'>\" . \n\t $this->pretty_sort_opts[$s] . \"</a>&nbsp;\";\n }\n }\n print \"</p>\";\n }", "public function sort($options = []) {\n\t\tif ($options instanceof Closure) {\n\t\t\t$options = array('callback' => $options);\n\n\t\t} else if (is_bool($options)) {\n\t\t\t$options = array('reverse' => $options);\n\t\t}\n\n\t\t$options = $options + array(\n\t\t\t'reverse' => false,\n\t\t\t'preserve' => true,\n\t\t\t'flags' => SORT_REGULAR,\n\t\t\t'callback' => null,\n\t\t\t'on' => 'values'\n\t\t);\n\n\t\t$flags = $options['flags'];\n\t\t$preserve = $options['preserve'];\n\n\t\t// Sort by callback\n\t\tif ($options['callback'] instanceof Closure) {\n\n\t\t\t// Sort keys by callback\n\t\t\tif ($options['on'] === 'keys') {\n\t\t\t\tuksort($this->_value, $options['callback']);\n\n\t\t\t// Sort values by callback\n\t\t\t} else {\n\t\t\t\tif ($preserve) {\n\t\t\t\t\tuasort($this->_value, $options['callback']);\n\t\t\t\t} else {\n\t\t\t\t\tusort($this->_value, $options['callback']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Sort regular\n\t\t} else {\n\n\t\t\t// Sort by keys\n\t\t\tif ($options['on'] === 'keys') {\n\t\t\t\tksort($this->_value, $flags);\n\n\t\t\t// Sort by values\n\t\t\t} else {\n\t\t\t\tif ($preserve) {\n\t\t\t\t\tasort($this->_value, $flags);\n\t\t\t\t} else {\n\t\t\t\t\tsort($this->_value, $flags);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Reverse it\n\t\tif ($options['reverse']) {\n\t\t\t$this->_value = array_reverse($this->_value, $preserve);\n\t\t}\n\n\t\treturn $this;\n\t}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->RazonSocial); // RazonSocial\r\n\t\t\t$this->UpdateSort($this->NombreContacto); // NombreContacto\r\n\t\t\t$this->UpdateSort($this->Poblacion); // Poblacion\r\n\t\t\t$this->UpdateSort($this->Id_Estado); // Id_Estado\r\n\t\t\t$this->UpdateSort($this->Telefonos); // Telefonos\r\n\t\t\t$this->UpdateSort($this->Celular); // Celular\r\n\t\t\t$this->UpdateSort($this->Maneja_Papeleta); // Maneja_Papeleta\r\n\t\t\t$this->UpdateSort($this->Maneja_Activacion_Movi); // Maneja_Activacion_Movi\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function getSortFlags()\n {\n return $this->sortFlags;\n }", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->identries); // identries\r\n\t\t\t$this->UpdateSort($this->titulo); // titulo\r\n\t\t\t$this->UpdateSort($this->id); // id\r\n\t\t\t$this->UpdateSort($this->islive); // islive\r\n\t\t\t$this->UpdateSort($this->tool_id); // tool_id\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id, $bCtrl); // id\n\t\t\t$this->UpdateSort($this->detail_jenis_spp, $bCtrl); // detail_jenis_spp\n\t\t\t$this->UpdateSort($this->no_spp, $bCtrl); // no_spp\n\t\t\t$this->UpdateSort($this->tgl_spp, $bCtrl); // tgl_spp\n\t\t\t$this->UpdateSort($this->keterangan, $bCtrl); // keterangan\n\t\t\t$this->UpdateSort($this->no_spm, $bCtrl); // no_spm\n\t\t\t$this->UpdateSort($this->tgl_spm, $bCtrl); // tgl_spm\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function &getOrderBy();", "protected function parseSortParams(): void\n {\n $sorts = $this->getSortValue();\n $withSorts = collect([]);\n\n foreach ($sorts as $sort) {\n $sortP = explode(' ', $sort);\n $sortF = $sortP[0];\n $sortD = ! empty($sortP[1]) && strtolower($sortP[1]) === 'desc' ? 'desc' : 'asc';\n\n if (strpos($sortF, '.') > 0) {\n $withSorts[$sortF] = $sortD;\n continue;\n }\n /** @scrutinizer ignore-call */\n $tableColumns = $this->getTableColumns();\n\n if (empty($sortF) || ! in_array($sortF, $tableColumns)) {\n continue;\n }\n\n $this->getBuilder()->orderBy($sortF, $sortD);\n }\n\n if ($withSorts->count() > 0) {\n $this->parseJoinSorts($withSorts);\n }\n }", "public function getSorting();", "protected function getOptions()\n {\n\t\treturn array_merge([\n\t\t\t['direction', 'd', InputOption::VALUE_OPTIONAL, 'The direction of ordering.', 'asc'],\n\t\t\t['fkCheck', null, InputOption::VALUE_OPTIONAL, 'Enable or disable \"FOREIGN_KEY_CHECKS\".', false],\n\t\t], parent::getOptions());\n }", "protected function getOptions()\n {\n $attributes = $this->getAttributes();\n $attributes['data'] = $this->getData();\n $attributes['id'] = $this->getId();\n\n $this->setDefaultOptions();\n\n $result = \\yii\\helpers\\ArrayHelper::merge($attributes, $this->options);\n\n if (!$this->visible) {\n Html::addCssStyle($result, 'display:none');\n }\n\n return $result;\n }", "public function process_admin_options() {\n\t\t$method_order = isset( $_POST['method_order'] ) ? $_POST['method_order'] : '';\n\t\t$method_priority = isset( $_POST['method_priority'] ) ? $_POST['method_priority'] : '';\n\t\t$order = array();\n\t\t$selection_priority = array();\n\n\t\tif ( is_array( $method_order ) && sizeof( $method_order ) > 0 ) {\n\t\t\t$loop = 0;\n\t\t\tforeach ( $method_order as $method_id ) {\n\t\t\t\t$order[ $method_id ] = $loop;\n\t\t\t\t$selection_priority[ $method_id ] = absint( $method_priority[ $method_id ] );\n\t\t\t\t$loop ++;\n\t\t\t}\n\t\t}\n\n\t\tupdate_option( 'woocommerce_shipping_method_selection_priority', $selection_priority );\n\t\tupdate_option( 'woocommerce_shipping_method_order', $order );\n\t}", "public static function sortables()\n {\n return ['plot_ref', 'plot_active', 'plot_percent_cultivated_land', 'plot_real_area', 'plot_start_date'];\n }", "public function getSortControlData(): array\n {\n return [\n 'options' => $this->sortOptions,\n 'order' => $this->getOrder(),\n 'sort' => $this->getSort(),\n 'type' => $this->typeKey,\n ];\n }", "public function sortAllValues($wholedata)\n {\n $adminCount = 0;\n $storeCount = 0;\n $sortedOption = [];\n $adminOptions = [];\n $storeOptions = [];\n foreach ($wholedata['attroptions'] as $key => $value) {\n $adminOptions[$key] = ucwords(strtolower($value['admin']));\n $storeOptions[$key] = ucwords(strtolower($value['store']));\n }\n\n foreach (array_unique($adminOptions) as $key => $value) {\n $sortedOption [] = $wholedata['attroptions'][$key];\n }\n\n $wholedata['attroptions'] = $sortedOption;\n return $wholedata;\n }", "public function sort()\n {\n foreach (array_keys($this->betTypes) as $type) {\n ksort($this->betTypes[$type]);\n }\n }", "public function setOrder($attribute, $dir = 'DESC')\n {\n switch ($attribute) {\n case 'wi_warehouse_id':\n case 'wi_physical_quantity':\n case 'wi_quantity_to_ship':\n case 'wi_available_quantity':\n case 'sh_range_1':\n case 'sh_range_2':\n case 'sh_range_3':\n $this->getSelect()->order($attribute . ' ' . $dir);\n break;\n case 'qty_to_order':\n $this->getSelect()->order(new \\Zend_Db_Expr($this->getQtyOrderExpression() . ' ' . $dir));\n break;\n case 'average_per_week':\n $this->getSelect()->order(new \\Zend_Db_Expr($this->getAvgPerWeekExpression() . ' ' . $dir));\n break;\n case 'run_out':\n $this->getSelect()->order(new \\Zend_Db_Expr($this->getRunOutExpression() . ' ' . $dir));\n break;\n default:\n parent::setOrder($attribute, $dir);\n break;\n }\n return $this;\n }", "function getValidSorts() {\n\treturn array(\n\t\t// field => label\n\t\t'-images.count' => 'Images (Most)',\n\t\t'images.count' => 'Images (Least)',\n\t\t'name' => 'Name (A-Z)',\n\t\t'-name' => 'Name (Z-A)',\n\t\t'parent.name' => 'City (A-Z)',\n\t\t'-parent.name' => 'City (Z-A)',\n\t\t'-height' => 'Height (Highest)',\n\t\t'height' => 'Height (Lowest)',\n\t\t'-floors' => 'Floors (Most)',\n\t\t'floors' => 'Floors (Least)',\n\t\t'-year' => 'Year (Newest)',\n\t\t'year' => 'Year (Oldest)',\n\t);\n}", "function custom_sort($sorted_by) {\r\n if (!sizeof($sorted_by->rules))\r\n $sorted_by->add(\"menuOrder\", \"ASC\");\r\n}", "public function getDefaultOrderColumns()\n {\n /* @var $model ActiveRecord */\n $model = new $this->modelClass;\n $columns = $model->getTableSchema()->columns;\n try {\n $indexes = $model->getDb()->getSchema()->findUniqueIndexes($model->getTableSchema());\n $unique = empty($indexes) ? [] : array_flip(call_user_func_array('array_merge', $indexes));\n } catch (NotSupportedException $e) {\n $unique = null;\n }\n $order = [];\n $modelAttributes = array_flip($model->attributes());\n foreach ($model->getBehaviors() as $name => $behavior) {\n if ($behavior instanceof SortableBehavior) {\n $attributes = [$behavior->attribute];\n } elseif ($behavior instanceof LabelsBehavior) {\n if ($behavior->attributes === null) {\n continue;\n }\n $attributes = $behavior->attributes;\n } else {\n continue;\n }\n\n foreach ($attributes as $attribute) {\n if (!isset($modelAttributes[$attribute])) {\n continue;\n }\n $order[$attribute] = SORT_ASC;\n if ($unique !== null && isset($unique[$attribute]) && isset($columns[$attribute])\n && !$columns[$attribute]->allowNull\n ) {\n return $order;\n }\n }\n }\n\n $order = array_merge($order, array_fill_keys($model->primaryKey(), SORT_ASC));\n\n return $order;\n }", "public function get_attribute_groups_for_select() {\n\t\tif ( empty( $this->cache[ __FUNCTION__ ] ) ) {\n\n\t\t\t$default_option = [\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => __( ' - Select Attribute Group - ', 'edgenet' ),\n\t\t\t];\n\n\t\t\t$options = array_map( function ( $group ) {\n\t\t\t\treturn [\n\t\t\t\t\t'value' => $group->id,\n\t\t\t\t\t'label' => $group->name,\n\t\t\t\t];\n\t\t\t}, edgenet()->settings->requirement_set->attribute_groups );\n\n\t\t\tusort( $options, function ( $a, $b ) {\n\t\t\t\t$a_label = strtoupper( $a['label'] );\n\t\t\t\t$b_label = strtoupper( $b['label'] );\n\t\t\t\tif ( $a_label === $b_label ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn ( $a_label < $b_label ) ? - 1 : 1;\n\t\t\t} );\n\n\t\t\tarray_unshift( $options, $default_option );\n\n\t\t\t$this->cache[ __FUNCTION__ ] = $options;\n\t\t}\n\n\t\treturn $this->cache[ __FUNCTION__ ];\n\t}", "private function options($dataset) {\n\t\n\t\t// Shortcut to the current params:\n\t\t$params = $this->controller->params;\n\t\t\n\t\t// Check if any options are set, else set an empty array to prevent errors when merging with defaults:\n\t\t$options = isset($this->options[$dataset]) ? $this->options[$dataset] : array();\n\t\t\n\t\t// Merge the options with the defaults, so all needed keys are set:\n\t\t$options = array_merge($this->defaults, $options);\n\t\t\n\t\t// Check if the session needs to be used and if the session contains a set of options:\n\t\tif ($options['session'] && $session = $this->session->read('DataSort.' . $dataset)) {\n\t\t\t\n\t\t\t// The session contains options, use these instead:\n\t\t\t$options = $session;\n\n\t\t}\n\t\t\n\t\t// Check if the fields option is set and whether it contains the primary key:\n\t\tif (isset($options['fields']) && !in_array($this->model->primaryKey, $options['fields']) && !in_array($this->model->alias . '.' . $this->model->primaryKey, $options['fields'])) {\n\t\t\n\t\t\t// The primary key isn't set in field, appending it:\n\t\t\t$options['fields'][] = $this->model->alias . '.' . $this->model->primaryKey;\n\t\t\t\n\t\t}\n\t\t\n\t\t// Check if the page matches the current option set and if the direction is set:\n\t\tif (isset($params['named']['dataset']) && isset($params['named']['datasort']) && $dataset == $params['named']['dataset']) {\n\t\t\t\n\t\t\t// Check if the named parameter for the sort value is set:\n\t\t\tif (isset($params['named']['datafield'])) {\n\t\t\t\t\n\t\t\t\t// Change the order to what is given in the named parameters:\n\t\t\t\t$options['order'] = array($params['named']['datafield'] => $params['named']['datasort']);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the named parameter for limit is set and if it contains an array of ids:\n\t\t\tif (isset($params['named']['datascope']) && is_array($ids = explode('|', $params['named']['datascope'])) ) {\n\t\t\t\n\t\t\t\t// Replace the conditions to only get the ids in the limit:\n\t\t\t\t$options['conditions'] = array($this->model->alias . '.' . $this->model->primaryKey => $ids);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Check if the session needs to be used:\n\t\t\tif ($options['session']) {\n\t\t\t\n\t\t\t\t// Write the options to the session:\n\t\t\t\t$this->session->write('DataSort.' . $dataset, $options);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Return the ajusted array of options:\n\t\treturn $options;\n\t\t\n\t}", "private function sort()\r\n\t{\r\n\t\t// sort menu\r\n\t\t$menuOrder = array();\r\n\t\t$menuOrderNames = array();\r\n\t\tforeach ($this->items as $key => $row)\r\n\t\t{\r\n\t\t\t$menuOrder[$key] = !is_null($row->order) ? $row->order : 9999;\r\n\t\t\t$menuOrderNames[$key] = $key;\r\n\t\t}\r\n\t\tarray_multisort($menuOrder, SORT_ASC, $menuOrderNames, SORT_ASC, $this->items);\r\n\t}", "protected function getSelectOptions()\n\t{\n\t\t$arrReturn = array();\n\t\t$arrFields = deserialize( $this->get('defaultMulti') );\n\t\tif( empty($arrFields) )\n\t\t{\n\t\t\t$arrFields = array('rating','tstamp','helpful','not_helpful');\n\t\t}\n\t\t\n\t\tforeach($arrFields as $f)\n\t\t{\n\t\t\t$arrReturn[$f.'[asc]'] \t= $GLOBALS['TL_LANG']['MSC']['ratings_filter'][$f]['asc'];\n\t\t\t$arrReturn[$f.'[desc]'] = $GLOBALS['TL_LANG']['MSC']['ratings_filter'][$f]['desc'];\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function asort() {}", "public function prepareSortableFields()\n {\n if (!$this->getAvailableOrders()) {\n $this->setAvailableOrders($this->_getConfig()->getAttributeUsedForSortByArray());\n }\n $cedAvailableOrders = $this->getAvailableOrders();\n if (!$this->getSortBy()) {\n if ($defaultSortBy = $this->_getConfig()->getDefaultSortBy()) {\n if (isset($cedAvailableOrders[$defaultSortBy])) {\n $this->setSortBy($defaultSortBy);\n }\n }\n }\n return $this;\n }", "protected function get_sort_order() {\n return 111;\n }", "function SetUpSortOrder() {\n\t\tglobal $scholarship_package;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$scholarship_package->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$scholarship_package->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_package_id); // scholarship_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->start_date); // start_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->end_date); // end_date\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->status); // status\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->annual_amount); // annual_amount\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->grant_package_grant_package_id); // grant_package_grant_package_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->sponsored_student_sponsored_student_id); // sponsored_student_sponsored_student_id\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type); // scholarship_type\n\t\t\t$scholarship_package->UpdateSort($scholarship_package->scholarship_type_scholarship_type); // scholarship_type_scholarship_type\n\t\t\t$scholarship_package->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "protected function getOptions()\n\t{\n\t\t// Accepted modifiers\n\t\t$hash = md5($this->element);\n\n\t\tif (!isset(static::$options[$hash]))\n\t\t{\n\t\t\tstatic::$options[$hash] = parent::getOptions();\n\n\t\t\t$options = array();\n\t\t\t$limits = $this->defaultLimits;\n\n\t\t\t// Limits manually specified\n\t\t\tif (isset($this->element['limits']))\n\t\t\t{\n\t\t\t\t$limits = explode(',', $this->element['limits']);\n\t\t\t}\n\n\t\t\t// User wants to add custom limits\n\t\t\tif (isset($this->element['append']))\n\t\t\t{\n\t\t\t\t$limits = array_unique(array_merge($limits, explode(',', $this->element['append'])));\n\t\t\t}\n\n\t\t\t// User wants to remove some default limits\n\t\t\tif (isset($this->element['remove']))\n\t\t\t{\n\t\t\t\t$limits = array_diff($limits, explode(',', $this->element['remove']));\n\t\t\t}\n\n\t\t\t// Order the options\n\t\t\tasort($limits);\n\n\t\t\t// Add an option to show all?\n\t\t\t$showAll = isset($this->element['showall']) ? ($this->element['showall'] == \"true\") : true;\n\n\t\t\tif ($showAll)\n\t\t\t{\n\t\t\t\t$limits[] = 0;\n\t\t\t}\n\n\t\t\tif (!empty($limits))\n\t\t\t{\n\t\t\t\tforeach ($limits as $value)\n\t\t\t\t{\n\t\t\t\t\t$options[] = (object) array(\n\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t'text' => ($value != 0) ? JText::_('J' . $value) : JText::_('JALL')\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tstatic::$options[$hash] = array_merge(static::$options[$hash], $options);\n\t\t\t}\n\t\t}\n\n\t\treturn static::$options[$hash];\n\t}", "public function getSortBy();", "protected function _getBrowseDefaultSort()\n {\n return array('added', 'd');\n }", "function get_control_order() {\n $this->control_order_by->OP_[option]->set(array_merge(array(\n '' => ''\n ), $this->caption_fields));\n return $this->control_order_by->get_tag();\n }", "protected function sortDataArray() {}", "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->created_time); // created_time\r\n\t\t\t$this->UpdateSort($this->message); // message\r\n\t\t\t$this->UpdateSort($this->link); // link\r\n\t\t\t$this->UpdateSort($this->type); // type\r\n\t\t\t$this->UpdateSort($this->caption); // caption\r\n\t\t\t$this->UpdateSort($this->description); // description\r\n\t\t\t$this->UpdateSort($this->name); // name\r\n\t\t\t$this->UpdateSort($this->source); // source\r\n\t\t\t$this->UpdateSort($this->from); // from\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "public function orderBy() {\n $this->_orderBy = \"\";\n foreach ($this->_columns as $tableName => $table) {\n if (array_key_exists('order_bys', $table)) {\n foreach ($table['order_bys'] as $fieldName => $field) {\n $this->_orderBy[] = $field['dbAlias'];\n }\n }\n }\n $this->_orderBy = \"ORDER BY \" . implode(', ', $this->_orderBy) . \" \";\n }", "function SetUpSortOrder() {\n\t\tglobal $patient_detail;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$patient_detail->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$patient_detail->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$patient_detail->UpdateSort($patient_detail->DetailNo); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->PatientID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyDate); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyTime); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Modality); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->BodyPartExamined); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->ProtocolName); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Status); // Field \n\t\t\t$patient_detail->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->userlevelid); // userlevelid\n\t\t\t$this->UpdateSort($this->userlevelname); // userlevelname\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setElementSortOrder($attribte, $direction);", "public function toOptionArray()\n {\n return [\n ['value' => 'none', 'label' => __('Default - As they come from Instagram')],\n ['value' => 'most-recent', 'label' => __('Newest to oldest')],\n ['value' => 'least-recent', 'label' => __('Oldest to newest')],\n ['value' => 'most-liked', 'label' => __('Highest # of likes to lowest')],\n ['value' => 'least-liked', 'label' => __('Lowest # likes to highest')],\n ['value' => 'most-commented', 'label' => __('Highest # of comments to lowest')],\n ['value' => 'least-commented', 'label' => __('Lowest # of comments to highest')],\n ['value' => 'random', 'label' => __('Random order')]\n ];\n }", "protected function _options() {\n\t\t\t$options['Actionrole']['role_id'] = $this->Actionrole->Role->find('list', array('order' => 'name', 'conditions' => array('actif' => 1)));\n\t\t\t$options['Actionrole']['categorieactionrole_id'] = $this->Actionrole->Categorieactionrole->find('list', array('order' => 'name'));\n\n\t\t\treturn $options;\n\t\t}", "public function getSortOrder()\n {\n return $this->sortOrder;\n }", "public function getSortOrder()\n {\n return $this->sortOrder;\n }", "public function getSortOrder()\n {\n return $this->sortOrder;\n }", "protected function getOptions()\n {\n return [\n ['method', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by method.'],\n\n ['name', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by name.'],\n\n ['path', null, InputOption::VALUE_OPTIONAL, 'Filter the routes by path.'],\n\n ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes.'],\n\n ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (host, method, uri, name, action, middleware) to sort by.', 'uri'],\n ];\n }", "public static function processWebformTableSelectSort(&$element, FormStateInterface $form_state, &$complete_form) {\n $value = is_array($element['#value']) ? $element['#value'] : [];\n\n // Add validate callback that extracts the associative array of options.\n $element += ['#element_validate' => []];\n array_unshift($element['#element_validate'], [get_called_class(), 'validateWebformTableSelectOrder']);\n\n $element['#tree'] = TRUE;\n\n if (count($element['#options']) > 0) {\n if (!isset($element['#default_value']) || $element['#default_value'] === 0) {\n $element['#default_value'] = [];\n }\n\n // Place checked options first.\n $options = [];\n foreach ($value as $checked_option_key) {\n if (isset($element['#options'][$checked_option_key])) {\n $options[$checked_option_key] = $element['#options'][$checked_option_key];\n unset($element['#options'][$checked_option_key]);\n }\n }\n $options += $element['#options'];\n $element['#options'] = $options;\n\n // Set delta and default weight.\n $delta = count($element['#options']);\n $weight = 0;\n\n // Create a checkbox and weight for each item in #options in such a way\n // that the value of the webform_tableselect_order element behaves as if\n // it had been of type checkboxes with weight.\n foreach ($element['#options'] as $key => $choice) {\n // Do not overwrite manually created children.\n if (!isset($element[$key])) {\n if ($title = TableSelect::getTableSelectOptionTitle($choice)) {\n $checkbox_title = $title;\n $weight_title = new TranslatableMarkup('Weight for @title', ['@title' => $title]);\n }\n else {\n $checkbox_title = '';\n $weight_title = '';\n }\n\n $element[$key]['checkbox'] = [\n '#type' => 'checkbox',\n '#title' => $checkbox_title,\n '#title_display' => 'invisible',\n '#return_value' => $key,\n '#default_value' => isset($value[$key]) ? $key : NULL,\n '#attributes' => $element['#attributes'],\n '#ajax' => isset($element['#ajax']) ? $element['#ajax'] : NULL,\n ];\n $element[$key]['weight'] = [\n '#type' => 'weight',\n '#title' => $weight_title,\n '#title_display' => 'invisible',\n '#delta' => $delta,\n '#default_value' => $weight++,\n '#attributes' => [\n 'class' => ['table-sort-weight'],\n ],\n ];\n }\n }\n }\n else {\n $element['#value'] = [];\n }\n\n // Enable tabledrag.\n $element['#tabledrag'] = [\n [\n 'action' => 'order',\n 'relationship' => 'sibling',\n 'group' => 'table-sort-weight',\n ],\n ];\n\n return $element;\n }" ]
[ "0.76776123", "0.71275425", "0.68757313", "0.6867762", "0.6743747", "0.67381907", "0.6723236", "0.66895103", "0.654879", "0.6361041", "0.6355159", "0.63350993", "0.62891144", "0.6225007", "0.6208161", "0.6181618", "0.6172408", "0.6109331", "0.604209", "0.6031998", "0.6005601", "0.59415424", "0.593459", "0.5909894", "0.59070444", "0.59057987", "0.59035003", "0.5892447", "0.5892318", "0.5877973", "0.587758", "0.587758", "0.587758", "0.5871524", "0.5870295", "0.584444", "0.58277196", "0.5820573", "0.58175945", "0.57831526", "0.57720536", "0.5745265", "0.5737953", "0.5736734", "0.57360125", "0.57218087", "0.57197773", "0.57050884", "0.5691412", "0.56910706", "0.56790245", "0.5675337", "0.5669106", "0.566718", "0.5663951", "0.56513625", "0.56264246", "0.5619761", "0.5617801", "0.5601343", "0.5599533", "0.55978316", "0.5590885", "0.55687296", "0.5542713", "0.55395585", "0.55377454", "0.5533316", "0.55324215", "0.5525174", "0.5524408", "0.54928654", "0.5490509", "0.548871", "0.54881066", "0.54873717", "0.5478383", "0.5476439", "0.5469447", "0.54617345", "0.546147", "0.54408175", "0.5436135", "0.5431787", "0.54088426", "0.54087746", "0.5406801", "0.54057765", "0.54046214", "0.54037046", "0.5399919", "0.53937113", "0.5389708", "0.53847873", "0.53836983", "0.5382095", "0.5382095", "0.5382095", "0.53818804", "0.5372496" ]
0.71040255
2
Generates a menu bar for a user.
public function user($user) { //pr($user); $this->template = 'display'; $menu = []; $menu[] = [ 'title' => $user['name'], 'url' => ['controller' => 'profiles', 'action' => 'show', $user['id']], 'options' => [] ]; $menu[] = [ 'title' => 'Sign Out', 'url' => ['controller' => 'users', 'action' => 'logout'], 'options' => [] ]; $this->set('menu', $menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "function usermin_createmenuitems()\n{\n $menubar['user'] = array(\"href\" => \"?user\", \"label\" => \"My Details\");\n $menubar['history'] = array(\"href\" => \"?history\", \"label\" => \"My History\");\n $menubar['logout'] = array(\"href\" => \"?logoff\", \"label\" => \"Logoff\");\n return $menubar;\n}", "function login_menu() {\n $asf = CAsdf::Instance();\n if($asf->user['isAuthenticated']) {\n $items = \"<a href='\" . create_url('user/profile') . \"'><img class='gravatar' src='\" . get_gravatar(20) . \"' alt=''> \" . $asf->user['acronym'] . \"</a> \";\n if($asf->user['hasRoleAdministrator']) {\n $items .= \"<a href='\" . create_url('acp') . \"'>acp</a> \";\n }\n $items .= \"<a href='\" . create_url('user/logout') . \"'>logout</a> \";\n } else {\n $items = \"<a href='\" . create_url('user/login') . \"'>login</a> \";\n }\n return \"<nav id='login-menu'>$items</nav>\";\n}", "public function makeMenu() {}", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "function login_menu()\n\t{\n\t\t$menu=\"\";\n\t\t$bap=CBapelsin::instance();\n\t\t\n\t\tif($bap->user->isAuthenticated())\n\t\t{\n\t\t\t$user=$bap->user->getUserProfile();\n\t\t\t$menu=\"\";\n\t\t\tif($bap->config['login_menu'][\"show_gravatar\"])\n\t\t\t\t$menu.=\"<a href='http://gravatar.com/site/signup/'><img class='gravatar' src='\".get_gravatar(20).\"'></a>\";\n\t\t\t\n\t\t\tif($bap->config['login_menu']['profile']['label']==\"__profile\")\n\t\t\t\t$label=$user['acronym'];\n\t\t\telse\n\t\t\t\t$label=$bap->config['login_menu']['profile']['label'];\n\t\t\t\n\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['profile']['src'])}'>{$label}</a> \";\n\t\t\tif($bap->user->isAdministrator())\n\t\t\t{\n\t\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['acp']['src'])}'>{$bap->config['login_menu']['acp']['label']}</a> \";\n\t\t\t}\n\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['logout']['src'])}'>{$bap->config['login_menu']['logout']['label']}</a>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$menu=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['login']['src'])}'>{$bap->config['login_menu']['login']['label']}</a>\";\n\t\t}\t\t\n\t\tif(isset($bap->config['show_login_menu']) && isset($bap->config['show_login_menu']))\n\t\t\treturn $menu;\n\t\telse \n\t\t\treturn \"\";\n\t}", "function build_menubar() {\n // get the menu bar data from config\n $i = $this->config->item('menu_choices');\n $t = $i['menudata'];\n $this->data['menudata'] = $t;\n\n // check if anyone is logged in\n if ($this->session->userdata('username')) {\n // if so, display logout button\n $this->data['welcome_txt'] = 'Welcome, ' . $this->session->userdata('username');\n $this->data['login_submit_txt'] = 'Logout';\n $this->data['login_btn_appear'] = 'none';\n $this->data['login_action'] = 'logout';\n } else {\n // if no one is logged in, display the login box\n $this->data['welcome_text'] = '';\n $this->data['login_submit_txt'] = 'Login';\n $this->data['login_btn_appear'] = 'initial';\n $this->data['login_action'] = 'login';\n }\n\n // parse the menu bar\n $this->data['menubar'] = $this->parser->parse('_menubar', $this->data, true); //$this->config->item('menu_choices')\n }", "function dokan_header_user_menu() {\n global $current_user;\n $user_id = $current_user->ID;\n $nav_urls = dokan_get_dashboard_nav();\n\n dokan_get_template_part( 'global/header-menu', '', array( 'current_user' => $current_user, 'user_id' => $user_id, 'nav_urls' => $nav_urls ) );\n}", "static function user_menu($menu, $theme) {\n $user = identity::active_user();\n if ($user->guest) {\n // disable the default login\n $menu->remove('user_menu_login');\n // add ours\n $menu->append(Menu::factory(\"link\")\n ->id(\"user_menu_openid\")\n ->css_id(\"g-openid-menu\")\n ->url(url::site(\"openid\"))\n ->label(t(\"Login\")));\n }\n }", "function make_navigation_bar($user_entity, $page_name = NULL)\n{\n global $options;\n echo \"<div id='navigation'>\\n\";\n\n if (isset($options['captureui_addrs'])) {\n make_app_addrs_list();\n }\n\n // User is already logged in, so\n // - access user information and display welcome message\n // - display 'home', 'editprofile', and 'logout' links.\n\n if (isset($user_entity)) {\n if (isset($user_entity['stat']) && $user_entity['stat'] == 'ok') {\n if (isset($_COOKIE['app'])) {\n echo \"<span id='app_name'>\" . $_COOKIE['app'] . \"</span>&nbsp;\";\n }\n $user_entity = $user_entity['result'];\n\n if ($page_name != \"home\")\n echo \"<a href='.' id='home'>Home</a>\";\n\n echo \"Hello, \" . $user_entity['displayName'] . \"\";\n\n print '&nbsp;|&nbsp;';\n\n if ($options['edit_profile_with_fancybox']) {\n echo '<a href=\"profile_with_token_refresh.php\" id=\"profile_link\" class=\"iframe\">Edit Profile</a>';\n }\n else {\n if ($page_name != \"editprofile\") {\n echo \"<a href='editprofile.php' id='edit_profile'>Edit Your Profile</a>\";\n } else {\n echo \"Edit Your Profile\";\n }\n }\n\n // if ($page_name != \"rawprofile\") {\n // echo \"&nbsp;|&nbsp; <a href='rawprofile.php' id='raw_profile'>View Capture Profile</a>\";\n // } else {\n // echo \"&nbsp;|&nbsp; View Capture Profile\";\n // }\n\n if ($page_name != \"public_profile\") {\n echo \"&nbsp;|&nbsp; <a href='public_profile.php' id='public_profile'>View Public Profile</a>\";\n } else {\n echo \"&nbsp;|&nbsp; View Public Profile\";\n }\n } else {\n debug_out(\"*** Bad entity!<br>\\n\");\n debug_raw_data($user_entity);\n }\n\n if (isset($options['sso_server'])) {\n echo \"&nbsp;|&nbsp; <a href='#' id='logout' onClick='sso_logout()'>Sign Out</a>\";\n } else {\n echo \"&nbsp;|&nbsp; <a href='logout.php' id='logout'>Sign Out</a>\";\n }\n }\n\n // User is not logged in, so display signin link\n else {\n make_signin_link();\n }\n echo \"</div>\\n\";\n}", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "protected function generateModuleMenu() {}", "public function getUserMenu() {\n $event = new BuildUserMenuEvent();\n $this->trigger(self::EVENT_BUILD_USER_MENU, $event);\n $menu = [];\n foreach ($event->items as $block => $items) {\n foreach ($items as $item) {\n $menu[] = $item;\n }\n }\n return $menu;\n }", "function do_menu() {\n print \"\n <a href=\\\"member-index.php\\\">Home</a> |\n <a href=\\\"display-comment.php\\\">Display All Comments</a> |\n <a href=\\\"add-comment.php\\\">Add Comment</a> |\n <a href=\\\"edit-comment.php\\\">Edit Comment</a> |\n <a href=\\\"delete-comment.php\\\">Delete Comment</a> |\n <a href=\\\"logout.php\\\">Logout</a> \n <HR>\n \";\n }", "function doMenu() {\r\n\t\tglobal $casError;\r\n\t\tif ( !current_user_can('edit_users') ) {\r\n\t\t\twp_die(__( 'You do not have sufficient permissions to access this page.'));\r\n\t\t}\r\n\t\techo '<div class=\"wrap\">';\r\n\t\techo '<h2>Add CAS Users</h2>';\r\n\t\techo '<p>Enter a comma seperated list of either email addresses or Kerberos Usernames of the users your want to add.</p>';\r\n\t\techo '<form method=\"post\" name=\"createuser\" id=\"createuser\" action=\"admin.php?page=casUsers\">';\r\n\t\techo '<div class=\"casLabel\"><label>Add By Email: </label></div>\r\n\t\t\t\t<div class=\"casField\"><input size=\"100\" name=\"email\" type=\"text\" id=\"email\" value=\"\"></div>\r\n\t\t\t\t<div class=\"casButton\"><input type=\"submit\" name=\"subemail\" id=\"subemail\" class=\"button button-primary\" value=\"Add via Email Addresses\"></div>\r\n\t\t\t\t<br/><div class=\"clear\"></div><br/>\r\n\t\t\t\t<div class=\"casLabel\"><label>Add By Username: </label></div>\r\n\t\t\t\t<div class=\"casField\"><input size=\"100\" name=\"uname\" type=\"text\" id=\"uname\" value=\"\"></div>\r\n\t\t\t\t<div class=\"casButton\"><input type=\"submit\" name=\"subuname\" id=\"subuname\" class=\"button button-primary\" value=\"Add via Kerberos Name\"></p></div>';\r\n\t\techo '</form>';\r\n\t\techo '</div>';\r\n\t}", "public function getMenuItems() {\n\n $url = $this->urlHelper;\n $items = [];\n\n //Links Visible always to everyone logged in or not.\n //default Home page - no login required. \n\n /* $items[] = [\n 'id' => 'home',\n 'label' => 'Home',\n 'link' => $url('home')\n ]; */\n\n //add links here for pages that will be visible for all users logged-in or not.\n //you must adjust User\\Module.php (~line 85) onDispatch method to ignore calls for \n //the associated Controller and action or you will end up with an infinite loop.\n /*\n $items[] = [\n 'id' => 'about',\n 'label' => 'About',\n 'link' => $url('about')\n ];\n */\n\n $user = $this->authManager->getLoggedInUser();\n\n //BEGIN Authentication/Rendering Logic\n // Display \"Login\" menu item for not authorized user only. On the other hand,\n // display \"Admin\" and \"Logout\" menu items only for authorized users and any other links \n // that should be visible by logged-in users.\n if (!$user) {\n\n $items[] = [\n 'id' => 'login',\n 'label' => 'Sign in',\n 'link' => $url('login'),\n 'float' => 'right'\n ];\n } else {\n\n //render Customers link for all users with sales_attr_id value in users table\n if (!empty($user->getSales_attr_id())) {\n $items[] = [\n 'id' => 'customers',\n 'label' => 'Customers',\n 'data-ffm-salesperson' => $user->getFullName(),\n 'float' => 'static',\n 'link' => $url('customer', ['action' => 'view', 'id' => $user->getSales_attr_id()])\n ];\n }\n //only display admin drop down for admin users.\n $isAdmin = $this->authManager->isAdmin();\n if ($isAdmin) {\n $items[] = [\n 'id' => 'admin',\n 'label' => '<i class=\"ion-gear-a\"></i>',\n 'float' => 'right',\n 'dropdown' => [\n [\n 'id' => 'users',\n 'label' => 'Manage Users',\n 'link' => $url('users')\n ]\n ]\n ];\n }\n\n $settingsDropDownManageAccount = [\n 'id' => 'manage_account',\n 'label' => 'Manage Account',\n 'link' => $url('users', ['action' => 'edit', 'id' => $user->getId()])\n ];\n\n $settingsDropDownViewAccount = [\n 'id' => 'view_account',\n 'label' => 'View Account',\n 'link' => $url('application', ['action' => 'settings'])\n ];\n\n $settingsDropDownLogout = [\n 'id' => 'logout',\n 'label' => 'Logout',\n 'link' => $url('logout')\n ];\n\n $settingsDropDown = [];\n\n //only add the Manage Account link for Admins.\n if ($isAdmin) {\n $settingsDropDown[] = $settingsDropDownManageAccount;\n }\n\n $settingsDropDown[] = $settingsDropDownViewAccount;\n\n $settingsDropDown[] = $settingsDropDownLogout;\n\n $items[] = [\n 'id' => 'settings',\n 'label' => '<i class=\"ion-person\"></i>' . $user->getUsername(),\n 'float' => 'right',\n 'dropdown' => $settingsDropDown\n ];\n\n $loggedInItems = $this->getLoggedInItems();\n\n if ($loggedInItems)\n array_merge($items, $loggedInItems);\n\n // add items to right of settings in top right corner only for logged-in users here\n //Show Salespeople link only to Admin users\n if ($isAdmin) {\n\n $items[] = [\n 'id' => 'salespeople',\n 'label' => 'Salespeople',\n 'float' => 'static',\n 'link' => $url('salespeople', ['action' => 'index']),\n ];\n }\n }\n\n return $items;\n }", "public function menuItems()\n\t{\n\t\treturn array(\n array('label'=>$this->labelMenu!==null?$this->labelMenu:Yii::t('app','Generator'), 'icon'=>'fa fa-code', 'url'=>'#','items'=>$this->getMyselfMenu(),'visible'=>Yii::app()->getModule('users')->check('root')),\n );\n\t}", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "function control_custom_menus() {\n\n\t// Check if the menu exists\n\t$menu_exists = wp_get_nav_menu_object( 'secondary' );\n\n\t// If it doesn't exist, let's create it.\n\tif( !$menu_exists){\n\t\t$menu_id = wp_create_nav_menu( 'secondary' );\n\n\t\t$user = wp_get_current_user();\n\n\t\t// Set up default menu items\n\t\t$menu_author_id = wp_update_nav_menu_item($menu_id, 0, array(\n\t\t\t'menu-item-title' => __( $user->display_name ),\n\t\t\t'menu-item-url' => get_author_posts_url( $user->ID ),\n\t\t\t'menu-item-status' => 'publish'));\n\n\t\t// Set up default menu items\n\t\t$menu_logout_id = wp_update_nav_menu_item($menu_id, 0, array(\n\t\t\t'menu-item-title' => __( 'Logout' ),\n\t\t\t'menu-item-parent-id' => $menu_author_id,\n\t\t\t'menu-item-url' => wp_logout_url(),\n\t\t\t'menu-item-status' => 'publish'));\n\n\t}\n}", "public function createProfileMenu()\r\n {\r\n $menu = $this->factory->createItem('root', [\r\n 'childrenAttributes' => ['class' => 'vertical medium-horizontal menu']\r\n ]);\r\n\r\n $menu->addChild(\r\n $this->translator->trans('navigation.profile.main', [], 'MinervaAppBundle'),\r\n ['route' => 'fos_user_profile_show']\r\n );\r\n\r\n $menu->addChild(\r\n $this->translator->trans('navigation.profile.battlenet', [], 'MinervaAppBundle'),\r\n ['route' => 'minerva_user_battlenet_overview']\r\n );\r\n\r\n return $menu;\r\n }", "function minorite_menu_tree__user_menu(array $variables) {\n $links = '';\n $options = '';\n global $user;\n\n if ($user->uid) {\n // TODO: add this as a menu link.\n $text = t('Welcome !first_name', array('!first_name' => $user->name));\n $options .= '<option>' . l($text, 'user', array('html' => TRUE)) . '</option>';\n }\n\n foreach (explode(\"\\n\", $variables['tree']) as $leaf) {\n substr($leaf, 0, 2) === '<l' ? $links .= $leaf . \"\\n\" : $options .= $leaf;\n }\n\n if (!empty($options)) {\n // TODO: Refactor this with theme_select()!\n $change = 'onchange=\"location = this.options[this.selectedIndex].value;\"';\n $select = '<select name=\"user-menu\" id=\"user-menu\" tabindex=\"0\" class=\"custom-select-user\" ' . $change . '>' . $options . '</select>';\n $select_span = '<span class=\"custom-select-user-wrapper\">' . $select . '</span>';\n $label = '<label for=\"user-menu\" class=\"visuallyhidden\">' . t('User menu') . \"</label>\\n\";\n $legend = '<legend class=\"visuallyhidden\">' . 'Menu utilisateur (naviguer avec les flêches hauts et bas)' . \"</legend>\\n\";\n $links .= '<li><fieldset>' . $legend . $label . $select_span . '</fieldset></li>';\n }\n\n return '<ul class=\"nav user-access-menu\">' . $links . \"</ul>\\n\";\n}", "public function Menu() {\n $user_role = get_option('oxi_addons_user_permission');\n $role_object = get_role($user_role);\n $first_key = '';\n if (isset($role_object->capabilities) && is_array($role_object->capabilities)) {\n reset($role_object->capabilities);\n $first_key = key($role_object->capabilities);\n } else {\n $first_key = 'manage_options';\n }\n add_submenu_page('oxi-addons', 'Elementor Addons', 'Elementor Addons', $first_key, 'oxi-el-addons', [$this, 'oxi_addons_elementors']);\n }", "function display_user_menu()\r\n{\r\n?>\r\n<hr>\r\n<a href=\"member.php\">Inicio</a> &nbsp;|&nbsp;\r\n<a href=\"add_bm_form.php\">Ad.EN</a> &nbsp;|&nbsp;\r\n<?\r\n // only offer the delete option if bookmark table is on this page\r\n global $bm_table;\r\n\r\n global $bm_displayed; // 2013.11.18 Gustaf - Verifica usuario tiene bookmarks para seleccionar.\r\n if($bm_table==true && $bm_displayed == true) // 2013.11.18 Gustaf - Actualizado\r\n // if($bm_table==true)\r\n echo \"<a href='#' onClick='bm_table.submit();'>Borrar EN</a>&nbsp;|&nbsp;\";\r\n else\r\n echo \"<font color='#cccccc'>Borrar EN</font>&nbsp;|&nbsp;\";\r\n?>\r\n<a href=\"change_passwd_form.php\">Cambiar contraseña</a>\r\n<br>\r\n<a href=\"recommend.php\">Recomendarme URLs</a> &nbsp;|&nbsp;\r\n<a href=\"logout.php\">Logout</a>\r\n<hr>\r\n\r\n<?\r\n}", "public function index()\n {\n $data = $this->user->getUserData();\n $data['title'] = 'Menu Management';\n $data['menu'] = $this->menu->getMenuByUser($data['role_id']);\n $data['submenu'] = $this->menu->getAllSubmenu();\n $this->template->load('menu/menuManagement', $data, 'menu/JS_menu');\n }", "function userBuddyPressMenu() {\n global $bp;\n\n $simplecart_user_link = $bp->loggedin_user->domain . $bp->simplecart_user->slug . '/';\n\n /* Add 'SimpleCart Store' to the main navigation */\n bp_core_add_nav_item(__(SCLNG_MENU_USER, SC_DOMAIN), $bp->simplecart_user->slug, false, false);\n /* Set a specific sub nav item as the default when the top level item is clicked */\n bp_core_add_nav_default($bp->simplecart_user->slug, 'sc_user_cart', SC_BPID_CART);\n /* Create two sub nav items for this component */\n bp_core_add_subnav_item($bp->simplecart_user->slug, SC_BPID_USER_INFO, __(SCLNG_MENU_USER_INFO, SC_DOMAIN), $simplecart_user_link, 'sc_user_info');\n bp_core_add_subnav_item($bp->simplecart_user->slug, SC_BPID_CART, __(SCLNG_MENU_USER_CART, SC_DOMAIN), $simplecart_user_link, 'sc_user_cart', false, bp_is_home());\n bp_core_add_subnav_item($bp->simplecart_user->slug, SC_BPID_HISTORY, __(SCLNG_MENU_USER_HISTORY, SC_DOMAIN), $simplecart_user_link, 'sc_user_history', false, bp_is_home());\n bp_core_add_subnav_item($bp->simplecart_user->slug, SC_BPID_FAVORITE, __(SCLNG_MENU_USER_FAVORITE, SC_DOMAIN), $simplecart_user_link, 'sc_user_favorite', false, bp_is_home());\n\n /* Only execute the following code if we are actually viewing this component */\n if ($bp->current_component == $bp->simplecart_user->slug) {\n if (bp_is_home()) {\n /* If the user is viewing their own profile area set the title to \"My Simple Cart\" */\n $bp->bp_options_title = __(SCLNG_MENU_USER, SC_DOMAIN);\n }\n else {\n /* If the user is viewing someone elses profile area, set the title to \"[user fullname]\" */\n $bp->bp_options_avatar = bp_core_get_avatar($bp->displayed_user->id, 1);\n $bp->bp_options_title = $bp->displayed_user->fullname;\n }\n }\n }", "public function adminMenu()\n\t{\n\t\t$this->app['events']->listen('routes.finish', function()\n\t\t{\n\t\t\tif (! $user = $this->app['auth']->user() ) return;\n\n\t\t\t$menu = $this->app['menu']->menu('admin-header-nav');\n\t\t\t\t$menu->setAttributes(array('class' => 'eight columns'));\n\n\t\t\t$usersMenu = $menu->item('users', 'Users');\n\t\t\t\t$usersMenu->item('manage-users', 'Manage users', route('admin.user.index'));\n\n\t\t\t$profileMenu = $menu->item('user', $user->name, route('admin.profile'));\n\t\t\t\t$profileMenu->item('logout', 'Log Out', route('logout'));\n\t\t});\n\t}", "protected function menus()\n {\n\n }", "function lihatMenuBar(){\n $outlet= $this->session->userdata('outlet');\n $data['menu_bar'] = $this->m_staff->tampilMenuBar($outlet)->result();\n $this->load->view('staff/v_lihatMenuBar', $data);\n $this->load->view('layouts/footer');\n }", "public static function userMenu($menu_order){\n\t\tglobal $session;\n\t\t$array_final = array();\n\t\t$user_permissions = $session->checkPageTypePermission(\"view\", $session->checkPagePermission(\"ranking\", $_SESSION['user_name']));\n\t\tif ($session->checkPageViewPermission(\"ranking\", $_SESSION['user_perfil'], $user_permissions)){\n\t\t\tarray_push($array_final, array(\n\t\t\t\t\"LabelIcon\" => \"fa fa-trophy\",\n\t\t\t\t\"LabelItem\" => 'Ranking',\n\t\t\t\t\"LabelUrl\" => 'ranking',\n\t\t\t\t\"LabelTarget\" => '_self',\n\t\t\t\t\"LabelPos\" => $menu_order));\n\n\t\t\tarray_push($array_final, array(\n\t\t\t\t\"LabelIcon\" => \"fa fa-user\",\n\t\t\t\t\"LabelItem\" => strTranslate(\"My_profile\"),\n\t\t\t\t\"LabelUrl\" => 'profile',\n\t\t\t\t\"LabelTarget\" => '_self',\n\t\t\t\t\"LabelClass\" => 'hidden-md hidden-lg',\n\t\t\t\t\"LabelPos\" => 90));\n\n\t\t\tarray_push($array_final, array(\n\t\t\t\t\"LabelIcon\" => \"fa fa-power-off\",\n\t\t\t\t\"LabelItem\" => strTranslate(\"Logout\"),\n\t\t\t\t\"LabelUrl\" => 'logout',\n\t\t\t\t\"LabelTarget\" => '_self',\n\t\t\t\t\"LabelClass\" => 'hidden-md hidden-lg',\n\t\t\t\t\"LabelPos\" => 94));\n\t\t}\n\n\t\t$user_permissions = $session->checkPageTypePermission(\"view\", $session->checkPagePermission(\"mygroup\", $_SESSION['user_name']));\n\t\tif ($session->checkPageViewPermission(\"mygroup\", $_SESSION['user_perfil'], $user_permissions)){\n\t\t\tif ($_SESSION['user_perfil'] == 'admin' || $_SESSION['user_perfil'] == 'responsable'){\n\t\t\t\tarray_push($array_final, array(\n\t\t\t\t\t\"LabelIcon\" => \"fa fa-users\",\n\t\t\t\t\t\"LabelItem\" => strTranslate(\"My_team\"),\n\t\t\t\t\t\"LabelUrl\" => 'mygroup',\n\t\t\t\t\t\"LabelTarget\" => '_self',\n\t\t\t\t\t\"LabelClass\" => 'hidden-md hidden-lg',\n\t\t\t\t\t\"LabelPos\" => 92));\n\t\t\t}\n\t\t}\n\n\t\t$user_permissions = $session->checkPageTypePermission(\"view\", $session->checkPagePermission(\"admin\", $_SESSION['user_name']));\n\t\tif ($session->checkPageViewPermission(\"admin\", $_SESSION['user_perfil'], $user_permissions)){\n\t\t\tif ($_SESSION['user_perfil'] == 'admin'){\n\t\t\t\tarray_push($array_final, array(\n\t\t\t\t\t\"LabelIcon\" => \"fa fa-gear\",\n\t\t\t\t\t\"LabelItem\" => strTranslate(\"Administration\"),\n\t\t\t\t\t\"LabelUrl\" => 'admin',\n\t\t\t\t\t\"LabelTarget\" => '_self',\n\t\t\t\t\t\"LabelClass\" => 'hidden-md hidden-lg',\n\t\t\t\t\t\"LabelPos\" => 93));\n\t\t\t}\n\t\t}\n\n\n\t\treturn $array_final;\n\t}", "public function getMenu()\r\n {\r\n $auth = $this->session->get('auth');\r\n if ($auth) {\r\n $this->_headerMenu['navbar-right']['session'] = array(\r\n 'caption' => 'Log Out',\r\n 'action' => 'end'\r\n );\r\n } else {\r\n unset($this->_headerMenu['navbar-left']['invoices']);\r\n }\r\n\r\n $controllerName = $this->view->getControllerName();\r\n foreach ($this->_headerMenu as $position => $menu) {\r\n echo '<div class=\"nav-collapse\">';\r\n echo '<ul class=\"nav navbar-nav ', $position, '\">';\r\n foreach ($menu as $controller => $option) {\r\n if ($controllerName == $controller) {\r\n echo '<li class=\"active\">';\r\n } else {\r\n echo '<li>';\r\n }\r\n echo $this->tag->linkTo($controller . '/' . $option['action'], $option['caption']);\r\n echo '</li>';\r\n }\r\n echo '</ul>';\r\n echo '</div>';\r\n }\r\n\r\n }", "protected function registerMenu()\n {\n }", "public function userDashboardMenuBlocNavAction(){\n\n \treturn $this->render('UserBundle:Includes:ModulesLeft/user_dashboard_menu_bloc_nav.html.twig');\n }", "public function showMenu() {\n return view('user.menu'); \n }", "public function menuHTML() {\n return '<div class=\"menu\">\n <ul>\n <li><a href=\"index.php\">User Mangement</a></li>\n <li><a href=\"new-user.php\">Add New User</a></li>\n <li><a href=\"downloads.php\">Downloads</a></li>\n <li><a href=\"logout.php\">Log out</a></li>\n </ul>\n </div>';\n }", "public function actionIndex()\n {\n $service = new MenuService();\n $menus = $service->getAuthorizedBackendMenusByUserId(Yii::$app->getUser()->getId());\n return $this->renderPartial('index', [\n \"menus\" => $menus,\n 'identity' => Yii::$app->getUser()->getIdentity(),\n ]);\n }", "static function iniPage($username, $menu ){\r\n\t\t\t?>\r\n\t\t\t\r\n\t\t\t<div class=\"header navbar navbar-inverse navbar-fixed-top\">\r\n\t\t\t\t<!-- BEGIN TOP NAVIGATION BAR -->\r\n\t\t\t\t<div class=\"navbar-inner\">\r\n\t\t\t\t\t<div class=\"container-fluid\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::logo(); ?>\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::menuToggler(); ?>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<!-- BEGIN TOP NAVIGATION MENU -->\t\t\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::topNavegationMenu(); ?>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN NOTIFICATION DROPDOWN -->\t\r\n\t\t\t\t\t\t\t<?php //echo GuiNotificationBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END NOTIFICATION DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN INBOX DROPDOWN -->\r\n\t\t\t\t\t\t\t<?php //echo GuiInboxBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END INBOX DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- BEGIN TODO DROPDOWN -->\r\n\t\t\t\t\t\t\t<?php //echo GuiTaskBarHelper::show(); ?>\r\n\t\t\t\t\t\t\t<!-- END TODO DROPDOWN -->\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<!-- Display user dropdown -->\r\n\t\t\t\t\t\t\t<?php \r\n\t\t\t\t\t\t\t\techo GuiUserDropdownHelper::show($username); \r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\t\t\t<?php echo GuiHeaderHelper::endTopNavegationMenu(); ?>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- END TOP NAVIGATION BAR -->\r\n\t\t\t</div>\r\n\t\t\t<!-- END HEADER -->\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t<!-- BEGIN CONTAINER -->\r\n\t\t\t<div class=\"page-container row-fluid\">\r\n\t\t\t\t<!-- BEGIN SIDEBAR -->\r\n\t\t\t\t<?php GuiLeftHelper::initLeftPanel(); ?>\r\n\t\t\t\t\t<?php GuiLeftHelper::showSearchForm(); ?>\t\r\n\t\t\t\t\t<?php echo $menu; ?>\t\r\n\t\t\t\t<?php GuiLeftHelper::endLeftPanel(); ?>\r\n\t\t\t\t\r\n\t\t\t\t<!-- END SIDEBAR -->\r\n\t\t<?php\r\n\t}", "public function run() {\n $data = array('project' => $this->getProject(),\n 'sprint' => $this->getSprint());\n $this->render('widget_user_menu', array('data' => $data));\n }", "private function menu() {\n // Array Map: Key(Menu Elements) => Array(Bold, Not Dynamic tag)\n if(isset($_SESSION['isAdmin'])) {\n $data['menu'] = [\n 'dashboard' => [false, false],\n 'general' => [false, false],\n 'weather' => [false, false],\n 'themes' => [false, false],\n 'languages' => [false, false],\n 'info_pages' => [false, false],\n 'ads' => [false, false],\n 'password' => [false, false],\n 'logout' => [false, true]\n ];\n } else {\n $data['menu'] = [\n 'login' => [false, false],\n ];\n }\n\n // If on the current route, enable the Bold flag\n $data['menu'][$this->url[1]][0] = true;\n\n return $this->view->render($data, 'admin/menu');\n }", "protected function makeActionMenu() {}", "function favorites_topbar_menu ($hook, $type, $return, $params) {\n\t$user = elgg_get_logged_in_user_entity();\n\n\t$return[] = ElggMenuItem::factory(array(\n\t\t'name' => 'favorites',\n\t\t'text' => elgg_echo('favorites:own'),\n\t\t'href' => \"favorites/{$user->username}\",\n\t\t'priority' => 100,\n\t));\n\n\treturn $return;\n}", "public static function wpa_add_menu() {\n add_menu_page('Main Menu','Home','manage_options','Sub-menu');\n add_submenu_page('Sub-menu','User List','User List','manage_options','menu-list',array( __CLASS__,'wpa_page_file_path'));\n add_submenu_page('Sub-menu','Add User','Add User','manage_options','menu-add',array(__CLASS__,'wpa_page_file_path'));\n }", "public function handle()\n\t{\n\t\t$acl = App::acl();\n\t\t$menu = App::menu();\n\t\t$translator = App::make('translator');\n\n\t\t// Add menu when logged-user user has authorization to\n\t\t// `manage users`\n\t\tif ($acl->can('manage-users'))\n\t\t{\n\t\t\t$menu->add('users')\n\t\t\t\t->title($translator->trans('orchestra/foundation::title.users.list'))\n\t\t\t\t->link(handles('orchestra/foundation::users'));\n\t\t}\n\n\t\t// Add menu when logged-in user has authorization to\n\t\t// `manage orchestra`\n\t\tif ($acl->can('manage-orchestra'))\n\t\t{\n\t\t\t$menu->add('extensions', '>:home')\n\t\t\t\t->title($translator->trans('orchestra/foundation::title.extensions.list'))\n\t\t\t\t->link(handles('orchestra/foundation::extensions'));\n\n\t\t\t$menu->add('settings')\n\t\t\t\t->title($translator->trans('orchestra/foundation::title.settings.list'))\n\t\t\t\t->link(handles('orchestra/foundation::settings'));\n\t\t}\n\n\t\t// If user aren't logged in, we should stop at this point,\n\t\t// Resources only be available to logged-in user.\n\t\tif (Auth::guest()) return;\n\n\t\t$resources = Resources::all();\n\n\t\t// Resources menu should only be appended if there is actually\n\t\t// resources to be displayed.\n\t\tif ( ! empty($resources))\n\t\t{\n\t\t\t$menu->add('resources', '>:extensions')\n\t\t\t\t->title(trans('orchestra/foundation::title.resources.list'))\n\t\t\t\t->link(handles('orchestra/foundation::resources'));\n\n\t\t\tforeach ($resources as $name => $option)\n\t\t\t{\n\t\t\t\tif (false === value($option->visible)) continue;\n\n\t\t\t\t$menu->add($name, '^:resources')\n\t\t\t\t\t->title($option->name)\n\t\t\t\t\t->link(handles(\"orchestra/foundation::resources/{$name}\"));\n\t\t\t}\n\t\t}\n\t}", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "function get_loginbar($menu)\n{\n\t$html = \"<nav class='loginbar'>\";\n\tforeach($menu['items'] as $item)\n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t\n\t\tif(!isset($_SESSION['user']) && $item['url'] == 'logout.php')\n\t\t{\n\t\t}\n\t\telse if(isset($item['url']))\n\t\t{\n\t\t\t$html .= \"<a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\";\n\t\t}\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "function addMenu()\n{\n add_menu_page (\"Members and Email\", \"Members / Email\", 4, \"members-email-1\", \"MeMenu\" );\n add_submenu_page(\"members-email-1\", \"Email List\", \"Email\", 4, \"members-email-sub-1\", \"MeMenuSub1\");\n add_submenu_page(\"members-email-1\", \"Tracking\", \"Tracking Scripts\", 4, \"tracking-scripts-1\", \"MeMenuSub2\");\n\n\n}", "function at_try_menu()\n{\n add_menu_page('signup_list', //page title\n 'Sign Up List', //menu title\n 'manage_options', //capabilities\n 'Signup_List', //menu slug\n Signup_list //function\n );\n}", "function registrar_menu() {\nregister_nav_menu('menuprincipal', __('Menu Principal'));\n}", "function getUserBarInfo() {\r\n if (isUserLogged()) {\r\n if (isUserAdmin()) {\r\n echo '<a href=\"user.php\">User: ' . $_SESSION['user'] . \"</a>\";\r\n } else {\r\n echo 'User: ' . $_SESSION['user'];\r\n }\r\n echo ' | <a href=\"purchase.php\">Basket</a>';\r\n } else {\r\n echo '<a href=\"login.php\">Sign in/Register</a>';\r\n }\r\n }", "public function uultra_internal_user_menu_options()\r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$modules = $this->uultra_get_user_navigator_for_membership($this->mIsPaidMembership);\r\n\t\t\r\n\t\t$html = ' <ul class=\"uultra_u_dashboard_main_menu\">';\t\t\r\n\t\t\r\n\t\t\tforeach($modules as $key => $module)\r\n\t\t\t{\r\n\t\t\t\t$slug = $module['slug'];\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif($module['visible']==1)\r\n\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$html .= '<li>'.$xoouserultra->userpanel->get_user_backend_menu_new($module).'</li>';\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t$html .= ' </ul>';\r\n\t\t\r\n\t\treturn $html;\r\n\t\t\t\t\r\n\t}", "function accountswitcher_usercpmenu()\n{\n\tglobal $db, $mybb, $lang, $templates, $theme, $usercpmenu;\n\n\t// Show the button if the user can use the Enhanced Account Switcher or the user is attached to an account\n\tif ($mybb->usergroup['as_canswitch'] == 1 || $mybb->user['as_uid'] != 0)\n\t{\n\t\t$lang->load(\"accountswitcher\");\n\n\t\t$usercpmenu .= eval($templates->render('accountswitcher_usercp_nav'));\n\t}\n}", "protected function _menu() {\n\t\t// Get count of ham comments\n\t\t$ham = Sprig::factory('blog_comment', array('state'=>'ham'))->load(NULL, FALSE)->count();\n\t\t$ham = ($ham > 0) ? ' ['.$ham.']' : '';\n\n\t\t// Get count of queued comments\n\t\t$queued = Sprig::factory('blog_comment', array('state'=>'queued'))->load(NULL,FALSE)->count();\n\t\t$queued = ($queued > 0) ? ' ['.$queued.']' : '';\n\n\t\t// Get count of spam comments\n\t\t$spam = Sprig::factory('blog_comment', array('state'=>'spam'))->load(NULL,FALSE)->count();\n\t\t$spam = ($spam > 0) ? ' ['.$spam.']' : '';\n\n\t\treturn View::factory('blog/admin/menu')\n\t\t\t->set('links', array(\n\t\t\t\t'Approved Comments'.$ham => $this->request->uri(array('action' => 'approved')),\n\t\t\t\t'Moderation Queue'.$queued => $this->request->uri(array('action' => 'queue')),\n\t\t\t\t'Spam Comments'.$spam => $this->request->uri(array('action' => 'spam')),\n\t\t\t));\n\t}", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "function mkRegisterMenu() {\n \n register_nav_menu('primary', 'Main Menu');\n \n }", "function register_my_menu() {\n register_nav_menu('header-menu',__( 'Header Menu' ));\n}", "function display_user_menu()\r\n{\r\n?>\r\n<hr>\r\n<a href=\"selena.php\">Home</a> &nbsp;|&nbsp;\r\n<!--<a href=\"add_bm_form.php\">Add BM</a> &nbsp;|&nbsp; -->\r\n<?\r\n // only offer the delete option if bookmark table is on this page\r\n global $bm_table;\r\n if($bm_table==true)\r\n echo \"<a href='#' onClick='bm_table.submit();'>Delete BM</a>&nbsp;|&nbsp;\"; \r\n else\r\n echo \"<font color='#cccccc'>Delete BM</font>&nbsp;|&nbsp;\"; \r\n?>\r\n<a href=\"change_passwd_form.php\">Изменить пароль</a>\r\n<br>\r\n<!--<a href=\"recommend.php\">Recommend URLs to me</a> &nbsp;|&nbsp;-->\r\n<a href=\"logout.php\">Выход</a> \r\n<hr>\r\n\r\n<?\r\n}", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "public static function printMenu() {\n echo \"<li\"; if($_GET['module'] == \"\" \n\t\t \t\t\t\t|| $_GET['module'] == \"index\" \n\t\t\t\t\t\t|| $_GET['module'] == \"handler\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"./\\\">Home</a></li>\";\n\t\t if(isset($_SESSION['user'])){\n\t\t\t $user = new User();\n\t\t\t $user = $_SESSION['user'];\n\t\t\t if($user->isLoggedIn()){\n\t\t\t \t$output = \"\";\n\t\t\t \tif($user->getUnreadCount() > 0)\n\t\t\t \t\t$output = \"(<img src=\\\"images/mail.unread.png\\\" alt=\\\"Message inbox\\\" width=\\\"10px\\\" heigth=\\\"10px\\\" border=\\\"0\\\">\".$user->getUnreadCount().\")\";\n\t\t\t\t echo \"<li\"; if($_GET['module'] == \"me\" || $_GET['module'] == \"device\" || ($_GET['module'] == \"app\" && $_GET['action'] == \"manage\") || $_GET['module'] == \"group\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=me\\\">My Stuff</a></li>\n\t\t\t\t <li\"; if($_GET['module'] == \"user\" \n\t\t\t\t\t\t&& $_GET['profile'] != \"true\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=user\\\">Users</a></li>\n\t\t\t\t <li\"; if(($_GET['module'] == \"app\" && $_GET['action'] != \"manage\" ) || $_GET['module'] == \"forum\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=app\\\">Browse Apps</a></li>\n\t\t\t\t <li\"; if($_GET['module'] == \"msg\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=msg\\\">Messages $output</a></li>\";\n\t\t\t\techo \"<li><a href=\\\"?module=handler&action=logout\\\" style=\\\"color: #FF7A0F;\\\">Logout</a></li>\";\n\t\t\t\tif($user->isAdmin())\n\t\t\t\t\techo \"<li><a href=\\\"admin/\\\" style=\\\"color: #FF7A0F;\\\">Admin</a></li>\";\n\t\t\t }\n\t\t\t} else {\n\t\t\t\t echo \"<li\"; if($_GET['module'] == \"started\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=started\\\">Getting started</a></li>\n\t\t\t\t <li\"; if($_GET['module'] == \"about\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=about\\\">About Us</a></li>\n\n\t\t\t\t <li\"; if($_GET['module'] == \"registration\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=registration\\\">Register</a></li>\n\t\t\t\t <li\"; if($_GET['module'] == \"login\"){ echo \" class=\\\"selected\\\"\";} echo \"><a href=\\\"?module=login\\\" style=\\\"color: #FF7A0F;\\\">Login</a></li>\";\n\t\t\t}\n\t\t}", "public function navigation_user(){\r\n $current_user = wp_get_current_user();\r\n if ( $current_user->display_name ) {\r\n $name = $current_user->display_name;\r\n } else {\r\n $name = esc_html__( 'Welcome!', 'woolentor-pro' );\r\n }\r\n $name = apply_filters( 'woolentor_profile_name', $name );\r\n ?>\r\n <div class=\"woolentor-user-area\">\r\n <div class=\"woolentor-user-image\">\r\n <?php echo get_avatar( $current_user->user_email, 125 ); ?>\r\n </div>\r\n <div class=\"woolentor-user-info\">\r\n <span class=\"woolentor-username\"><?php echo esc_attr( $name ); ?></span>\r\n <span class=\"woolentor-logout\"><a href=\"<?php echo esc_url( wp_logout_url( get_permalink() ) ); ?>\"><?php echo esc_html__( 'Logout', 'woolentor-pro' ); ?></a></span>\r\n </div>\r\n </div>\r\n <?php\r\n\r\n }", "protected function viewMenu(){\n\t\t$userStatus = $_SESSION[\"user_status\"];\n\t\t\n\t\t// menus\n\t\t$menu = false;\n\t\tif ($userStatus > 2){\n\t\t\t$menu = true;\n\t\t}\n\t\treturn $menu;\n\t}", "public function setMenu() {\n $loged_in = false;\n if (isset($_COOKIE['query_key']) && isset($_COOKIE['rememberme'])) {\n $loged_in = explode(\"@\", Token::verifyToken());\n }\n $menu = \"\n <nav class='navbar navbar-inverse navbar-fixed-top' role='navigation'>\n <div class='container'>\n <div class='navbar-header'>\n <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#menu_bar' >\n <span class='sr-only'>Toggle navigation</span>\n <span class='icon-bar' style='background-color: black;'></span>\n <span class='icon-bar' style='background-color: black;'></span>\n <span class='icon-bar' style='background-color: black;'></span>\n </button>\n <a class='navbar-brand' ><img src='assets/images/logo.png' height='30px'></a>\n </div>\n\n <div class='collapse navbar-collapse' id='menu_bar' >\n <ul class='nav navbar-nav navbar-right' >\";\n if ($loged_in == false) {\n $menu .=\" <li>\n <a href='./login' >Login</a>\n </li>\n <li>\n <a href='./signup' >Signup</a>\n </li>\";\n } else {\n $menu .= \" \n <li>\n <a>Welcome \" . $loged_in[0] . \"</a>\" .\n \"</li>\n <li>\n <a href='./posts' >Posts</a>\n </li>\n <li>\n <a href='./change' >Change Password</a>\n </li>\n <li>\n <a href='./user-logout' >logout</a>\n </li>\";\n }\n\n $menu .=\"</ul>\n </div>\n </div>\n</nav>\n<div style='height:100px;width:100%;position:relative;'></div>\n\";\n return $menu;\n }", "public function index()\n {\n $data = $this->user->getUserData();\n $data['title'] = 'Submenu Management';\n $data['allMenu'] = $this->db->select('id', 'menu')->get('user_menu')->result_array();\n $data['menu'] = $this->menu->getMenuByUser($data['role_id']);\n $data['submenu'] = $this->menu->getAllSubmenu();\n $this->template->load('menu/submenuManagement', $data, 'menu/JS_submenu');\n }", "public function generateDatatableMenu()\n {\n $this->datatables->select('menu, id');\n $this->datatables->from('user_menu');\n $this->datatables->add_column('action', '<a href=\"menu/editMenu/$1\" class=\"badge badge-warning\" id=\"edit-menu\" data-toggle=\"modal\" data-target=\"#menu-modal\">Edit</a> <a href=\"menu/deleteMenu/$1\" class=\"badge badge-danger\" id=\"delete-menu\">Delete</a>', 'id');\n echo $this->datatables->generate();\n }", "public function liababyMenuLinks() {\n\n\t\tif(Session::getSess('logged') == false) {\n\t\t\t$this->liababyMenuLinks .= '\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/regUser\" title=\"\" subtitle=\"Присъедини се\">Регистрация</a></li>\n\t\t\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logIn\" title=\"\" subtitle=\"Влез в сайта\" class=\"last\">Вход</a></li>\n\t\t\t';\n\t\t} else {\n\t\t\t$username = $this->setUrl('userNameDisplay');\n\t\t\t$this->liababyMenuLinks .= '\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/userProfile/'. $username .'\" title=\"\" subtitle=\"вашият профил\">Профил</a></li>\n\t\t<li><a href=\"'. $this->dataInfo['BASE_URL'] .'user/logOut\" title=\"\" subtitle=\"от профила\" class=\"last\">Изход</a></li>\n\t\t\t';\n\t\t}\n\t}", "public function render() {\n\t\t$this->addJavascriptToBackend();\n\t\t$this->addCssToBackend();\n\t\t$title = $GLOBALS['LANG']->getLL('toolbaritem', true);\n\n\t\t\t// toolbar item icon\n\t\t$menu[] = '<a href=\"#\" class=\"toolbar-item\"\">';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-role\" disabled=\"disabled\" value=\"' . tx_newspaper_Workflow::getRoleTitle(tx_newspaper_workflow::getRole()) . '\" />';\n\t\t$menu[] = '<input type=\"text\" id=\"tx-newspaper-role-counter\" disabled=\"disabled\" value=\"' . $this->docsAssignedToRole . '\" />';\n\t\t$menu[] = '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], t3lib_extMgm::extRelPath($this->extkey) . '/mod_role/newspaper.png', 'width=\"23\" height=\"16\"').' alt=\"' . $title . '\" title=\"' . $title . '\" /></a>';\n\t\t$menu[] = '</a>';\n\n\t\t\t// toolbar item menu and initial content\n\t\t$menu[] = '<div class=\"toolbar-item-menu\" style=\"display: none;\">';\n\t\t$menu[] = $this->renderMenu();\n\t\t$menu[] = '</div>';\n\n\t\treturn implode(\"\\n\", $menu);\n\t}", "protected function addGrantedUserMenu(ItemInterface $menu)\r\n {\r\n \t$user = $this->securityContext->getToken()->getUser();\r\n \t\r\n \t$menu->addChild('account', array(\r\n \t\t'route' => 'sylius_account_profile',\r\n \t\t'attributes' => array(\r\n \t\t\t'class' => 'account'\r\n \t\t)\r\n \t))->setLabel(\"mi cuenta\");\r\n \t\r\n \tif($this->securityContext->isGranted('ROLE_SYLIUS_ADMIN'))\r\n \t{\r\n\t \t$menu->addChild('admin', array(\r\n\t \t\t\t'route' => 'sylius_backend_index',\r\n\t \t\t\t'attributes' => array(\r\n\t \t\t\t\t\t'class' => 'admin'\r\n\t \t\t\t),\r\n\t \t\t\t'linkAttributes' => array(\r\n\t \t\t\t\t'target' => '_blank'\r\n\t \t\t\t)\r\n\t \t))->setLabel(\"administrador\");\r\n \t}\r\n \t\r\n \t$menu->addChild('logout', array(\r\n \t\t\t'route' => 'fos_user_security_logout',\r\n \t\t\t'attributes' => array(\r\n \t\t\t\t\t'class' => 'logout'\r\n \t\t\t)\r\n \t))->setLabel(\"salir\");\r\n \t\r\n \t$menu->addChild('user', array(\r\n \t\t\t'route' => 'sylius_account_profile',\r\n \t\t\t'attributes' => array(\r\n \t\t\t\t\t'class' => 'user'\r\n \t\t\t)\r\n \t))->setLabel(\"Hola \".$user->getShortedName().\"!\");\r\n }", "function albums_menu( $request ) {\r\n // so we have a menu item if we have both a user, and are in the first sub\r\n // once we decend in to albums, we don't show this button\r\n $user = \\Profile\\profileHandler::getProfileId( $request );\r\n\r\n if ($user) {\r\n $path = $request->getRequestVars();\r\n\r\n //print_r($path);\r\n // create home folder\r\n $mainurl = \"/albums/{$user->username}\";\r\n $urls['albums']['url'] = $mainurl;\r\n //if (end($path) == $user->username) {\r\n //$urls['albums']['selected'] = 1;\r\n //}\r\n\r\n // get album path to generate nav screen\r\n if ($request->getResource() == 'albums') {\r\n\r\n $album = new \\AlbumObject();\r\n $items = $album->initAlbumByPath( $path )->getPathItems();\r\n array_shift($items);\r\n \r\n // show remaining folders\r\n $mainurl = \"/albums/{$user->username}\";\r\n foreach ($items as $item) {\r\n $mainurl .= \"/\". urlencode($item->get('name'));\r\n $urls[$item->get('displayname')]['url'] = $mainurl;\r\n }\r\n }\r\n if (!empty($items)) {\r\n $urls[end($items)->get('displayname')]['selected'] = 1;\r\n }\r\n return $urls;\r\n \r\n } \r\n\r\n}", "public function actionIndex()\n {\n $user = User::findOne(\\Yii::$app->user->id);\n $userVendor = User::findOne($user->vendorId);\n $vendorMenu = User::getVendorDefaultMenu($userVendor);\n \n $vendorCategories = MenuCategories::find()->where('isArchived = 0 and vendorId = '.$user->vendorId.' order by sorting asc')->all();\n \n return $this->render('index', ['menu' => $vendorMenu, 'vendorCategories' => $vendorCategories]);\n }", "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter',\n\t\t\tarray( $this, 'display_submenu_page' ),\n\t\t\t6\n\t\t);\n\t}", "function makeNav($active,$AdminEdit,$userObj)\r\n{\r\n $navArray = array(\r\n \"Resume Archive\" => \"ResumeArchive.php\",\r\n \"Address\" => \"AddressEdit.php\",\r\n \"Phone\" => \"PhoneEdit.php\",\r\n \"Job\" => \"JobEdit.php\",\r\n \"Help/Info\" => \"help.html\",\r\n \"Admin\" => \"Admin.php\"\r\n \r\n );\r\n \r\n \r\n //if they are not an admin delete the admin link\r\n if(!$userObj->isAdmin)\r\n {\r\n unset( $navArray[\"Admin\"]);\r\n }\r\n \r\n //if they are a guest then remove the multiple resume capability and admin link\r\n if($userObj->isGuest)\r\n {\r\n unset($navArray[\"Admin\"]);\r\n unset($navArray[\"Resume Archive\"]);\r\n $navArray = array(\"Create Resume\" => \"ResumeEdit.php\") + $navArray;\r\n \r\n }\r\n \r\n //BUILDS THE MENU\r\n //sets the begining of the menu\r\n $result = \"\r\n <!--Menu-->\r\n <div id='cssmenu'>\r\n <ul>\";\r\n \r\n \r\n //iterates through the array and adds additional items\r\n foreach ($navArray as $key => $value) \r\n { \r\n \r\n $selection = ($active == $value) ? \" class='active'\" : \"\";\r\n $result = $result . \"<li $selection><a href='$value'><span>$key</span></a></li>\";\r\n }\r\n //add closing brace\r\n $result = $result . \" \r\n </ul>\r\n </div>\";\r\n \r\n return $result;//return the nave menu\r\n}", "public function configureUserMenu(UserInterface $user): UserMenu\n {\n // user menu with some menu items already created (\"sign out\", \"exit impersonation\", etc.)\n // if you prefer to create the user menu from scratch, use: return UserMenu::new()->...\n return parent::configureUserMenu($user)\n // use the given $user object to get the user name\n ->setName('The unique ' . $user->getDuckName())\n // use this method if you don't want to display the user image\n ->displayUserAvatar(false)\n // you can use any type of menu item, except submenus\n ->addMenuItems([\n MenuItem::linkToUrl('Back to the mare', 'fa fa-water', '/quacks')\n ]);\n }", "public function menu(){\n $data=[];\n $data['title']=\"Menu || Admin Panel\";\n $data['menuList'] = $this->header->selectMenuheader();\n $data['userlistAll'] = $this->header->userlistAll();\n $this->load->view(\"header\", $data); //100% need\n\n $selectMenu['selectMenu'] = $this->header->selectMenu();\n $this->load->view('menu', $selectMenu); //important\n\n $this->load->view(\"footer\");\n }", "public function index() {\n\t\t//\n\t\t$user = Auth::user ();\n\t\t$amService = new AuthMenuService ();\n\t\t$menus = $amService->getAllMenus ( $user );\n\t\treturn view ( \"systemsettings.menu\" )->withMenus ( $menus );\n\t}", "function get_menu()\r\n {\r\n $extra_items = array();\r\n $create = array();\r\n $create['title'] = Translation :: get('Send');\r\n $create['url'] = $this->get_personal_message_creation_url();\r\n $create['class'] = 'type_compose';\r\n $extra_items[] = $create;\r\n\r\n $temp_replacement = '__FOLDER__';\r\n $url_format = $this->get_url(array(\r\n Application :: PARAM_ACTION => PersonalMessengerManager :: ACTION_BROWSE_MESSAGES,\r\n PersonalMessengerManager :: PARAM_FOLDER => $temp_replacement));\r\n $url_format = str_replace($temp_replacement, '%s', $url_format);\r\n $user_menu = new PersonalMessengerMenu($this->get_folder(), $url_format, $extra_items);\r\n\r\n if ($this->get_action() == self :: ACTION_CREATE_PUBLICATION)\r\n {\r\n $user_menu->forceCurrentUrl($create['url'], true);\r\n }\r\n\r\n $html = array();\r\n $html[] = '<div style=\"float: left; width: 15%;\">';\r\n $html[] = $user_menu->render_as_tree();\r\n $html[] = '</div>';\r\n\r\n return implode($html, \"\\n\");\r\n }", "function userTabs($user_id, $selected) {\n\t\tglobal $HTML;\n\n\t\t$_ = '';\n\t\t\n\t\t$_ .= '<ul class=\"tabs\">';\n\t\t\t$_ .= $HTML->link(\"Profile\", \"/janitor/admin/user/edit/\".$user_id, array(\"wrapper\" => \"li.profile\".($selected == \"profile\" ? \".selected\" : \"\")));\n\n\t\t\tif(defined(\"SITE_ITEMS\") && SITE_ITEMS):\n\t\t\t\t$_ .= $HTML->link(\"Content\", \"/janitor/admin/user/content/\".$user_id, array(\"wrapper\" => \"li.content\".($selected == \"content\" ? \".selected\" : \"\")));\n\n\t\t\t\t// readstates not available for guest user\n\t\t\t\t// if($user_id != 1):\n\t\t\t\t// \t$_ .= $HTML->link(\"Readstates\", \"/janitor/admin/user/readstates/\".$user_id, array(\"wrapper\" => \"li.readstates\".($selected == \"readstates\" ? \".selected\" : \"\")));\n\t\t\t\t// endif;\n\n\t\t\tendif;\n\n\t\t\t// maillist not available for guest user\n\t\t\tif(defined(\"SITE_SIGNUP\") && SITE_SIGNUP && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Maillists\", \"/janitor/admin/user/maillists/\".$user_id, array(\"wrapper\" => \"li.maillist\".($selected == \"maillists\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\t\n\t\t\t// orders not available for guest user\n\t\t\tif(defined(\"SITE_SHOP\") && SITE_SHOP && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Orders\", \"/janitor/admin/user/orders/\".$user_id, array(\"wrapper\" => \"li.orders\".($selected == \"orders\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// subscriptions not available for guest user\n\t\t\tif(defined(\"SITE_SUBSCRIPTIONS\") && SITE_SUBSCRIPTIONS && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Subscriptions\", \"/janitor/admin/user/subscription/list/\".$user_id, array(\"wrapper\" => \"li.subscriptions\".($selected == \"subscriptions\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t\t// membership not available for guest user\n\t\t\tif(defined(\"SITE_MEMBERS\") && SITE_MEMBERS && $user_id != 1):\n\t\t\t\t$_ .= $HTML->link(\"Membership\", \"/janitor/admin/user/membership/view/\".$user_id, array(\"wrapper\" => \"li.membership\".($selected == \"membership\" ? \".selected\" : \"\")));\n\t\t\tendif;\n\n\t\t$_ .= '</ul>';\n\t\t\n\t\treturn $_;\n\t}", "function render_menu($arrMenu, $slot = \"left\") {\n if (!empty($arrMenu)) {\n foreach ($arrMenu as $menuobj) {\n $path = trim($menuobj['path'], \"/\");\n\n if (PageAccessManager::GetPageAccess($path) == 'AUTHORIZED') {\n\n if (empty($menuobj['submenu'])) {\n ?>\n <b-nav-item to=\"/<?php echo ($path); ?>\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n </b-nav-item>\n <?php\n } else {\n $smenu = $menuobj['submenu'];\n ?>\n <b-nav-item-dropdown right>\n <template slot=\"button-content\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n <?php if (!empty($smenu)) { ?><i class=\"caret\"></i><?php } ?>\n </template>\n <?php\n if (!empty($smenu)) {\n render_submenu($smenu);\n }\n ?>\n </b-nav-item-dropdown>\n <?php\n }\n }\n }\n }\n}", "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "public function getMenu();", "function createNavBar($data, $displayGreeting = false, $helpLink = ''){\n\nglobal $base_url;\n\nprint \"<table width=100% class=\\\"yellowBorder\\\">\";\nprint \"<tr class=\\\"lightYellow\\\"><td width=10%>\"; //<b>NavBar : </b>\";\n\n$items = explode(\"|\", $data);\n\n$array_count = count($items);\n\nfor($i = 0; $i < $array_count; $i++){\n $piece = explode(\":\", $items[$i]);\n\n if($i == $array_count - 1){\n print \"<b>$piece[1]</b>\";\n }\n else{\n print \"<a class=\\\"menuLink\\\" href=\\\"$piece[0]\\\">$piece[1]</a>\";\n print \" > \";\n }\n}\nprint \"</td>\";\n\nif($displayGreeting){\n print \"<td align=center width=80%>\";\n print \"<b>Welcome \" . $_SESSION[\"fullname\"] . \"</b>\";\n print \"</td>\";\n}\n\nprint \"<td width=10% align=\\\"right\\\"><a class=menuLink target=\\\"_blank\\\" href=\\\"$base_url/help.php#$helpLink\\\">Help</a> :: <a class=\\\"menuLink\\\" href=\\\"$base_url/logout.php\\\">logout</a>\";\nprint \"</td></tr></table>\";\n}", "public function onNavigationBar($event) {\n if ($this->user) {\n // add the profile links\n Navigation::addBar('default', array('title' => 'View Profile', 'slug' => 'account/profile', 'icon' => 'cog'));\n\n // add the admin links\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addBar('default', array('title' => 'View Logs', 'slug' => 'logviewer', 'icon' => 'wrench'));\n Navigation::addBar('default', array('title' => 'Caching', 'slug' => 'caching', 'icon' => 'tachometer'));\n Navigation::addBar('default', array('title' => 'CloudFlare', 'slug' => 'cloudflare', 'icon' => 'cloud'));\n Navigation::addBar('default', array('title' => 'Queuing', 'slug' => 'queuing', 'icon' => 'random'));\n }\n\n // add the view users link\n if (Sentry::getUser()->hasAccess('mod')) {\n Navigation::addBar('default', array('title' => 'View Users', 'slug' => 'users', 'icon' => 'user'));\n }\n\n // add the create user link\n if (Sentry::getUser()->hasAccess('admin')) {\n Navigation::addBar('default', array('title' => 'Create User', 'slug' => 'users/create', 'icon' => 'star'));\n }\n\n // add the create page link\n if (Sentry::getUser()->hasAccess('edit')) {\n Navigation::addBar('default', array('title' => 'Create Page', 'slug' => 'pages/create', 'icon' => 'pencil'));\n }\n\n // add the create post link\n if (Config::get('cms.blogging')) {\n if (Sentry::getUser()->hasAccess('blog')) {\n Navigation::addBar('default', array('title' => 'Create Post', 'slug' => 'blog/posts/create', 'icon' => 'book'));\n }\n }\n\n // add the create event link\n if (Config::get('cms.events')) {\n if (Sentry::getUser()->hasAccess('edit')) {\n Navigation::addBar('default', array('title' => 'Create Event', 'slug' => 'events/create', 'icon' => 'calendar'));\n }\n }\n }\n }", "function favorites_user_hover_menu ($hook, $type, $return, $params) {\n\t$user = $params['entity'];\n\n\t$return[] = ElggMenuItem::factory(array(\n\t\t'name' => 'favorites',\n\t\t'text' => elgg_echo('favorites'),\n\t\t'href' => \"favorites/{$user->username}\",\n\t));\n\n\treturn $return;\n}", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function configureUserMenu(UserInterface $user): UserMenu\n {\n // user menu with some menu items already created (\"sign out\", \"exit impersonation\", etc.)\n // if you prefer to create the user menu from scratch, use: return UserMenu::new()->...\n return parent::configureUserMenu($user)\n // use the given $user object to get the user name\n ->setName($user->getUsername())\n // use this method if you don't want to display the name of the user\n ->displayUserName(false)\n\n // you can use any type of menu item, except submenus\n ->addMenuItems([\n MenuItem::section(),\n MenuItem::linkToLogout('Logout', 'fa fa-sign-out'),\n ]);\n }", "function setup_menus() {\n\n\telgg_unregister_menu_item('topbar', 'elgg_logo');\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'logo',\n\t\t'href' => false,\n\t\t'text' => elgg_view('page/elements/topbar_logo'),\n\t\t'item_class' => 'name',\n\t\t'section' => 'title-area',\n\t));\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'toggle',\n\t\t'href' => '#',\n\t\t'text' => '<span>' . elgg_echo('menu') . '</span>',\n\t\t'item_class' => 'toggle-topbar menu-icon',\n\t\t'priority' => 900,\n\t\t'section' => 'title-area',\n\t));\n\n\tif (elgg_is_admin_logged_in()) {\n\t\t$counter = '';\n\t\t$admin_notices = elgg_get_entities(array(\n\t\t\t'types' => 'object',\n\t\t\t'subtypes' => 'admin_notice',\n\t\t\t'count' => true\n\t\t));\n\t\tif ($admin_notices) {\n\t\t\t$counter = '<span class=\"messages-new\">' . $admin_notices . '</span>';\n\t\t}\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'administration',\n\t\t\t'href' => 'admin',\n\t\t\t'text' => elgg_view_icon('dashboard') . elgg_echo('admin') . $counter,\n\t\t\t'priority' => 100,\n\t\t\t'section' => 'alt',\n\t\t));\n\t}\n}", "function custom_adminbar_menu( $meta = TRUE ) { \n global $wp_admin_bar; \n if ( !is_user_logged_in() ) { return; } \n if ( !is_super_admin() || !is_admin_bar_showing() ) { return; } \n $wp_admin_bar->add_menu( array( \n 'id' => 'custom_menu', \n 'title' => __( 'Menu Name', 'tabula-rasa' ), \n 'href' => 'http://google.com/', \n 'meta' => array( target => '_blank' ) ) \n ); \n}", "public function createCustomerMenu()\n {\n Event::listen('customer.menu.create', function () {\n return Menu::create(function ($menu) {\n Event::fire('customer.menu.build', $menu);\n });\n });\n\n Event::listen('customer.menu.build', function ($menu) {\n $menu->add('profile', 'Profile', 'customer.profile.index', 1);\n\n $menu->add('orders', 'Orders', 'customer.orders.index', 2);\n\n $menu->add('address', 'Address', 'customer.address.index', 3);\n\n $menu->add('reviews', 'Reviews', 'customer.reviews.index', 4);\n\n $menu->add('wishlist', 'Wishlist', 'customer.wishlist.index', 5);\n });\n }", "public function createBackendMenu(){\n\t\tadd_menu_page( 'Stackoverflow', 'Stackoverflow', 'manage_options', 'stackoverflowStats', array($this, 'settingsPage') );\n\t}", "function make_page_header($uname){\n\t//greeting user and logout link\n\techo \"<div>\";\n\techo \"<div align=\\\"left\\\"><b>Welcome User: \".$uname.\"!</b></div>\";\n\techo \"<div align=\\\"right\\\">\".form_open('loguser/log_out').\"<b>\".form_submit('','Log-out Medisys','').form_close().\"</b></div>\";\n\techo \"</div>\";\n\techo \"<a href=\\\"/medisys\\\">Main Menu</a>\";\n\n}", "function PrintMenu()\n\t{\n\t\tglobal $refreshpage;\n\t\t\n\t\techo '<ul class=\"nav nav-pills no-margin-left\">\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displaydefaults', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-home bigger-120\"></i> </a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayform', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displayform\">\n\t\t\t\t\t\t<i class=\" ace-icon fa fa-plus\"></i> '.AdminPhrase('create_form_but').'\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayresponses', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page. '&amp;action=displayresponses\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-comment\"></i> '.AdminPhrase('disp_responses') . '</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayrecipient'. 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displayrecipient\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-plus\"></i> '.AdminPhrase('create_recipient_but').'</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displaysettings', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displaysettings\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-wrench\"></i> '.AdminPhrase('settings').'</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"hr hr-8\"></div>\n\t\t\t<div class=\"space-20\"></div>';\n\t}", "public static function showMenuItem() {\n $title = __('Login History', 'simple-login-history');\n add_menu_page($title, $title, 'manage_options', 'simple_login_history_show_list', 'SimpleLoginHistory::showList', 'dashicons-welcome-learn-more', 81);\n }", "public function navbar() {\n global $CFG;\n $navbar = $this->page->navbar;\n if (!isloggedin() || isguestuser()) {\n $items = $navbar->get_items();\n foreach ($items as $i) {\n if ($i->type == navbar::NODETYPE_LEAF && $i->key == 'courses') {\n $i->action = new moodle_url($CFG->wwwroot . '/theme/savoir/pages/opencatalog.php');\n }\n }\n }\n return $this->render_from_template('core/navbar', $navbar);\n }", "function build_navBar()\n\t{\n\t\t$activeUser = $_SESSION['active_user'];\n\t\techo '<nav class=\"navbar navbar-inverse navbar-fixed-top\">';\n\t\techo '<div class=\"container-fluid\">';\n\t\techo '<div class=\"navbar-header\">';\n\t\techo '<button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">';\n\t\techo '<span class=\"sr-only\">Toggle navigation</span>';\n\t\techo '<span class=\"icon-bar\"></span>';\n\t\techo '<span class=\"icon-bar\"></span>';\n\t\techo '<span class=\"icon-bar\"></span>';\n\t\techo '</button>';\n\t\techo '<a class=\"navbar-brand\" href=\"#\" style=\"font-family: titleFont;\">INFINITY</a>';\n\t\techo '</div>';\n\t\techo '<div id=\"navbar\" class=\"navbar-collapse collapse\">';\n\t\techo '<ul class=\"nav navbar-nav navbar-right\">';\n\t\techo '<li><a href=\"home.php\">Dashboard</a></li>';\n\t\techo '<li class=\"dropdown\">';\n\t\techo '<a href=\"workouts.php\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">Workouts <span class=\"caret\"></span></a>';\n\t\techo '<ul class=\"dropdown-menu\" role=\"menu\">';\n\t\techo '<li><a href=\"workouts.php\">My Workouts</a></li>';\n\t\techo '<li><a href=\"workoutLog.php\">My Log</a></li>';\n\t\techo '<li class=\"divider\"></li>';\n\t\techo '<li><a href=\"#\">Create Workout</a></li>';\n\t\techo '<li><a href=\"#\">Record Workout</a></li>';\n\t\techo '</ul>';\n\t\techo '</li>';\n\t\techo '<li class=\"dropdown\">';\n\t\techo '<a href=\"groups.php\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">Groups <span class=\"caret\"></span></a>';\n\t\techo '<ul class=\"dropdown-menu\" role=\"menu\">';\n\t\techo '<li><a href=\"groups.php\">My Groups</a></li>';\n\t\techo '<li><a href=\"createGroup.php\">Create Group</a></li>';\n\t\techo '</ul>';\n\t\techo '</li>';\n\t\techo '<li class=\"dropdown\">';\n\t\techo '<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">Messages &nbsp;<span class=\"badge\">'.check_for_messages($activeUser).'</span></a>';\n\t\techo '<ul class=\"dropdown-menu\" role=\"menu\">';\n\t\tbuild_mini_inbox();\n\t\techo '<li><a href=\"messages.php\">Go to Inbox</a></li>';\n\t\techo '</ul>';\n\t\techo '</li>';\n\t\techo '<li class=\"dropdown\">';\n\t\techo '<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">Settings <span class=\"caret\"></span></a>';\n\t\techo '<ul class=\"dropdown-menu\" role=\"menu\">';\n\t\techo '<li><a href=\"settings.php\">Update Profile</a></li>';\n\t\techo '<li><a href=\"#\">Privacy</a></li>';\n\t\techo '<li><a href=\"#\">Help</a></li>';\n\t\techo '<li class=\"divider\"></li>';\n\t\techo '<li><a href=\"#\">Logout</a></li>';\n\t\techo '</ul>';\n\t\techo '</li>';\n\t\techo '</ul>';\n\t\techo '</div>';\n\t\techo '</div>';\n\t\techo '</nav>';\t\n\t}", "public function menu() {\n $data['menus'] = $this->allmenus();\n $this->load->view('Dashboard/header');\n $this->load->view('Menu/menu', $data);\n $this->load->view('Dashboard/footer');\n }" ]
[ "0.74969244", "0.74969244", "0.74969244", "0.74969244", "0.74969244", "0.74969244", "0.72681683", "0.6962246", "0.6826908", "0.67375594", "0.66924936", "0.669186", "0.669186", "0.6691475", "0.6654989", "0.66179216", "0.6614304", "0.6546831", "0.6546616", "0.652338", "0.65201885", "0.65099055", "0.65089405", "0.6505147", "0.6502285", "0.646938", "0.64619166", "0.6457278", "0.6429256", "0.64132744", "0.6396644", "0.639445", "0.6388504", "0.6377414", "0.63552815", "0.63466215", "0.63269824", "0.6308804", "0.6306419", "0.62981516", "0.6291134", "0.62847984", "0.626718", "0.6259412", "0.6259041", "0.6253094", "0.62493426", "0.62476015", "0.6244878", "0.6215482", "0.6204531", "0.619745", "0.61941254", "0.61662084", "0.6162879", "0.616039", "0.61433655", "0.613703", "0.6119616", "0.6117039", "0.6112224", "0.61059344", "0.6092063", "0.6086248", "0.6082372", "0.6077016", "0.6077015", "0.60730356", "0.6070859", "0.6060211", "0.60552984", "0.60546064", "0.6054325", "0.6045348", "0.6027787", "0.60233366", "0.6020146", "0.60174567", "0.60137606", "0.6011094", "0.60066074", "0.6004021", "0.5989691", "0.59775037", "0.59746903", "0.5967125", "0.59662825", "0.5961179", "0.59610766", "0.5960791", "0.5949904", "0.5938576", "0.59376806", "0.5936647", "0.59292746", "0.59273064", "0.59250826", "0.59132177", "0.5911839", "0.5910122", "0.59064865" ]
0.0
-1
Generates a menu bar for a visitor.
public function visitor() { $this->template = 'display'; $menu = []; $this->set('menu', $menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "public function makeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "public function writeMenu() {}", "private function menu()\n {\n $data['links'] = ['create', 'read', 'update', 'delete'];\n\n return $this->view->render($data, 'home/menu');\n }", "function do_menu() {\n print \"\n <a href=\\\"member-index.php\\\">Home</a> |\n <a href=\\\"display-comment.php\\\">Display All Comments</a> |\n <a href=\\\"add-comment.php\\\">Add Comment</a> |\n <a href=\\\"edit-comment.php\\\">Edit Comment</a> |\n <a href=\\\"delete-comment.php\\\">Delete Comment</a> |\n <a href=\\\"logout.php\\\">Logout</a> \n <HR>\n \";\n }", "function makeMenu($what)\n{\n global $language;\n if($what==\"header\") {\n echo \"<a href=\\\"index.php?action=home\\\" target=\\\"main\\\"><div align=\\\"center\\\"><img border=\\\"0\\\" src=\\\"\".AdminMenuLogoLocation.\"\\\"></a></div>\\r\\n\";\n echo \"<table width=\\\"100%\\\" border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"5\\\">\\r\\n\";\n }\n if($what==\"separator\") {\n echo \"<tr><td></td></tr>\\r\\n\";\n }\n if($what==\"footer\") {\n echo \"<tr><td><hr></td></tr>\\r\\n\";\n echo \"</table>\\r\\n\";\n }\n}", "public function create_menu()\n\t{\n\t\t$obj = $this; // PHP 5.3 doesn't allow $this usage in closures\n\n\t\t// Add main menu page\n\t\tadd_menu_page(\n\t\t\t'Testimonials plugin', // page title\n\t\t\t'Testimonials', // menu title\n\t\t\t'manage_options', // minimal capability to see it\n\t\t\t'jststm_main_menu', // unique menu slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('main_menu'); // render main menu page template\n\t\t\t},\n\t\t\tplugins_url('images/theater.png', dirname(__FILE__)), // dashboard menu icon\n\t\t\t'25.777' // position in the dahsboard menu (just after the Comments)\n\t\t);\n\t\t// Add help page\n\t\tadd_submenu_page(\n\t\t\t'jststm_main_menu', // parent page slug\n\t\t\t'Testimonials plugin help', // page title\n\t\t\t'What is this?', // menu title\n\t\t\t'manage_options', // capability\n\t\t\t'jststm_help', // slug\n\t\t\tfunction() use ($obj){\n\t\t\t\t$obj->render('help_page');\n\t\t\t}\n\t\t);\n\t}", "protected function menus()\n {\n\n }", "protected function _menu() {\n\t\t// Get count of ham comments\n\t\t$ham = Sprig::factory('blog_comment', array('state'=>'ham'))->load(NULL, FALSE)->count();\n\t\t$ham = ($ham > 0) ? ' ['.$ham.']' : '';\n\n\t\t// Get count of queued comments\n\t\t$queued = Sprig::factory('blog_comment', array('state'=>'queued'))->load(NULL,FALSE)->count();\n\t\t$queued = ($queued > 0) ? ' ['.$queued.']' : '';\n\n\t\t// Get count of spam comments\n\t\t$spam = Sprig::factory('blog_comment', array('state'=>'spam'))->load(NULL,FALSE)->count();\n\t\t$spam = ($spam > 0) ? ' ['.$spam.']' : '';\n\n\t\treturn View::factory('blog/admin/menu')\n\t\t\t->set('links', array(\n\t\t\t\t'Approved Comments'.$ham => $this->request->uri(array('action' => 'approved')),\n\t\t\t\t'Moderation Queue'.$queued => $this->request->uri(array('action' => 'queue')),\n\t\t\t\t'Spam Comments'.$spam => $this->request->uri(array('action' => 'spam')),\n\t\t\t));\n\t}", "public function navbar() {\n global $CFG;\n $navbar = $this->page->navbar;\n if (!isloggedin() || isguestuser()) {\n $items = $navbar->get_items();\n foreach ($items as $i) {\n if ($i->type == navbar::NODETYPE_LEAF && $i->key == 'courses') {\n $i->action = new moodle_url($CFG->wwwroot . '/theme/savoir/pages/opencatalog.php');\n }\n }\n }\n return $this->render_from_template('core/navbar', $navbar);\n }", "public function getMenu()\r\n {\r\n $auth = $this->session->get('auth');\r\n if ($auth) {\r\n $this->_headerMenu['navbar-right']['session'] = array(\r\n 'caption' => 'Log Out',\r\n 'action' => 'end'\r\n );\r\n } else {\r\n unset($this->_headerMenu['navbar-left']['invoices']);\r\n }\r\n\r\n $controllerName = $this->view->getControllerName();\r\n foreach ($this->_headerMenu as $position => $menu) {\r\n echo '<div class=\"nav-collapse\">';\r\n echo '<ul class=\"nav navbar-nav ', $position, '\">';\r\n foreach ($menu as $controller => $option) {\r\n if ($controllerName == $controller) {\r\n echo '<li class=\"active\">';\r\n } else {\r\n echo '<li>';\r\n }\r\n echo $this->tag->linkTo($controller . '/' . $option['action'], $option['caption']);\r\n echo '</li>';\r\n }\r\n echo '</ul>';\r\n echo '</div>';\r\n }\r\n\r\n }", "private function menu() {\n // Array Map: Key(Menu Elements) => Array(Bold, Not Dynamic tag)\n if(isset($_SESSION['isAdmin'])) {\n $data['menu'] = [\n 'dashboard' => [false, false],\n 'general' => [false, false],\n 'weather' => [false, false],\n 'themes' => [false, false],\n 'languages' => [false, false],\n 'info_pages' => [false, false],\n 'ads' => [false, false],\n 'password' => [false, false],\n 'logout' => [false, true]\n ];\n } else {\n $data['menu'] = [\n 'login' => [false, false],\n ];\n }\n\n // If on the current route, enable the Bold flag\n $data['menu'][$this->url[1]][0] = true;\n\n return $this->view->render($data, 'admin/menu');\n }", "function print_menu() {\n\tprint \"<table>\\n\";\n\tprint \"<tr>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"<td class=menu>\\n\";\n\tprint \"<a target=_top href=adminview.php>Admin View</a>\";\n\tprint \"</td>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"<td class=menu>\\n\";\n\tprint \"<a target=_top href=domainview.php>Domain View</a>\";\n\tprint \"</td>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"<td class=menu>\\n\";\n\tprint \"<a target=_top href=virtualview.php>Virtual View</a>\";\n\tprint \"</td>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"<td class=menu>\\n\";\n\tprint \"<a target=_top href=newadmin.php>New Admin</a>\";\n\tprint \"</td>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"<td class=menu>\\n\";\n\tprint \"<a target=_top href=newdomain.php>New Domain</a>\";\n\tprint \"</td>\\n\";\n\tprint \"<td width=8>&nbsp;</td>\\n\";\n\tprint \"</tr>\\n\";\n\tprint \"</table>\\n\";\n}", "function compileMenu() {\n\t\tglobal $page;\n\t\tSession::setMenu($page->getNavigationItems(0));\n\t}", "protected function registerMenu()\n {\n }", "protected function makeActionMenu() {}", "public function renderMenu()\n {\n echo \"<ul class=\\\"sidebar-menu\\\">\\n\";\n foreach ($this->_menus as $menu) {\n if (count($menu->subMenu()) == 0) {\n echo \"<li \".$this->is_li_class_active($menu->getLinks()).\">\\n\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \"<i class=\\\"\".$menu->getIcon().\"\\\"></i> <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \"</a>\\n\";\n echo \"</li>\\n\";\n } else {// we are in the case of a treeview\n echo \"<li class=\\\"treeview\".$this->is_treeview_Opened($menu->getLinks()).\"\\\">\";\n echo \"<a href=\\\"\".SystemURLs::getRootPath() . \"/\" . $menu->getUri().\"\\\">\\n\";\n echo \" <i class=\\\"\".$menu->getIcon().\"\\\"></i>\\n\";\n echo \" <span>\".gettext($menu->getTitle()).\"</span>\\n\";\n echo \" <i class=\\\"fa fa-angle-left pull-right\\\"></i>\\n\";\n if (count($menu->getBadges()) > 0) {\n foreach ($menu->getBadges() as $badge) {\n if ($badge['id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" id=\\\"\".$badge['id'].\"\\\">\".$badge['value'].\"</small>\\n\";\n } else if ($badge['data-id'] != ''){\n echo \"<small class=\\\"\".$badge['class'].\"\\\" data-id=\\\"\".$badge['data-id'].\"\\\">\".$badge['value'].\"</small>\\n\"; \n } else {\n echo \"<small class=\\\"\".$badge['class'].\"\\\">\".$badge['value'].\"</small>\\n\";\n }\n }\n }\n echo \"</a>\\n\";\n echo \"<ul \".$this->is_treeview_menu_open($menu->getLinks()).\">\\n\";\n $this->addSubMenu($menu->subMenu());\n echo \"</ul>\\n\";\n echo \"</li>\\n\";\n } \n }\n echo \"</ul>\\n\";\n }", "protected function generateModuleMenu() {}", "function build_menubar() {\n // get the menu bar data from config\n $i = $this->config->item('menu_choices');\n $t = $i['menudata'];\n $this->data['menudata'] = $t;\n\n // check if anyone is logged in\n if ($this->session->userdata('username')) {\n // if so, display logout button\n $this->data['welcome_txt'] = 'Welcome, ' . $this->session->userdata('username');\n $this->data['login_submit_txt'] = 'Logout';\n $this->data['login_btn_appear'] = 'none';\n $this->data['login_action'] = 'logout';\n } else {\n // if no one is logged in, display the login box\n $this->data['welcome_text'] = '';\n $this->data['login_submit_txt'] = 'Login';\n $this->data['login_btn_appear'] = 'initial';\n $this->data['login_action'] = 'login';\n }\n\n // parse the menu bar\n $this->data['menubar'] = $this->parser->parse('_menubar', $this->data, true); //$this->config->item('menu_choices')\n }", "function login_menu() {\n $asf = CAsdf::Instance();\n if($asf->user['isAuthenticated']) {\n $items = \"<a href='\" . create_url('user/profile') . \"'><img class='gravatar' src='\" . get_gravatar(20) . \"' alt=''> \" . $asf->user['acronym'] . \"</a> \";\n if($asf->user['hasRoleAdministrator']) {\n $items .= \"<a href='\" . create_url('acp') . \"'>acp</a> \";\n }\n $items .= \"<a href='\" . create_url('user/logout') . \"'>logout</a> \";\n } else {\n $items = \"<a href='\" . create_url('user/login') . \"'>login</a> \";\n }\n return \"<nav id='login-menu'>$items</nav>\";\n}", "function createNavBar($data, $displayGreeting = false, $helpLink = ''){\n\nglobal $base_url;\n\nprint \"<table width=100% class=\\\"yellowBorder\\\">\";\nprint \"<tr class=\\\"lightYellow\\\"><td width=10%>\"; //<b>NavBar : </b>\";\n\n$items = explode(\"|\", $data);\n\n$array_count = count($items);\n\nfor($i = 0; $i < $array_count; $i++){\n $piece = explode(\":\", $items[$i]);\n\n if($i == $array_count - 1){\n print \"<b>$piece[1]</b>\";\n }\n else{\n print \"<a class=\\\"menuLink\\\" href=\\\"$piece[0]\\\">$piece[1]</a>\";\n print \" > \";\n }\n}\nprint \"</td>\";\n\nif($displayGreeting){\n print \"<td align=center width=80%>\";\n print \"<b>Welcome \" . $_SESSION[\"fullname\"] . \"</b>\";\n print \"</td>\";\n}\n\nprint \"<td width=10% align=\\\"right\\\"><a class=menuLink target=\\\"_blank\\\" href=\\\"$base_url/help.php#$helpLink\\\">Help</a> :: <a class=\\\"menuLink\\\" href=\\\"$base_url/logout.php\\\">logout</a>\";\nprint \"</td></tr></table>\";\n}", "function render_menu($arrMenu, $slot = \"left\") {\n if (!empty($arrMenu)) {\n foreach ($arrMenu as $menuobj) {\n $path = trim($menuobj['path'], \"/\");\n\n if (PageAccessManager::GetPageAccess($path) == 'AUTHORIZED') {\n\n if (empty($menuobj['submenu'])) {\n ?>\n <b-nav-item to=\"/<?php echo ($path); ?>\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n </b-nav-item>\n <?php\n } else {\n $smenu = $menuobj['submenu'];\n ?>\n <b-nav-item-dropdown right>\n <template slot=\"button-content\">\n <?php echo (!empty($menuobj['icon']) ? $menuobj['icon'] : null); ?> \n <?php echo $menuobj['label']; ?>\n <?php if (!empty($smenu)) { ?><i class=\"caret\"></i><?php } ?>\n </template>\n <?php\n if (!empty($smenu)) {\n render_submenu($smenu);\n }\n ?>\n </b-nav-item-dropdown>\n <?php\n }\n }\n }\n }\n}", "public function createMenu()\n {\n\t\t$count = mysql_query(\"SELECT count(*) FROM view_orders \n\t\t\t\t\t\t\t WHERE status >= '\".Status::open.\"' AND status <= '\".Status::ready.\"' AND products_type_id = '1'\n\t\t\t\t\t\t\t GROUP BY bar_time\");\n\t\t\n\t\t$menu = \"<a href='?action=orders'><li>Bestellungen <div id='count_orders' class='count'>\".mysql_num_rows($count).\"</div></li></a> \\n\";\n\t\t$menu .= \"<a href='?action=articleManagement'><li>ProduktList</li></a> \\n\";\n\t\t$menu .= \"<a href='?action=callWaiter&seat_id=\". Backend::KITCHEN_SEAT .\"'><li>Kellner rufen</li></a> \\n\";\n\t\t$menu .= \"<a href='?action=orders'><li>Uhrzeit: \".date('H:i').\"</li></a> \\n\";\n\t\treturn parent::createMenu($menu);\n }", "protected function _menu()\n\t{\n\t\tif (ee()->view->disabled('ee_menu'))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tee()->view->cp_main_menu = ee()->menu->generate_menu();\n\t}", "public function menu( )\n {\n\n if( $this->view->isType( View::SUBWINDOW ) )\n {\n $view = $this->view->newWindow('WebfrapMainMenu', 'Default');\n }\n else if( $this->view->isType( View::MAINTAB ) )\n {\n $view = $this->view->newMaintab('WebfrapMainMenu', 'Default');\n $view->setLabel('Explorer');\n }\n else\n {\n $view = $this->view;\n }\n\n $view->setTitle('Webfrap Main Menu');\n\n $view->setTemplate( 'webfrap/menu/modmenu' );\n\n $modMenu = $view->newItem( 'modMenu', 'MenuFolder' );\n $modMenu->setData( DaoFoldermenu::get('webfrap/root',true) );\n\n }", "function get_navbar($menu) \n{\n\t$html = \"<nav class='navbar'>\\n\";\n\tforeach($menu['items'] as $item) \n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t$html .= \"<p><a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\\n</p>\";\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "function usermin_createmenuitems()\n{\n $menubar['user'] = array(\"href\" => \"?user\", \"label\" => \"My Details\");\n $menubar['history'] = array(\"href\" => \"?history\", \"label\" => \"My History\");\n $menubar['logout'] = array(\"href\" => \"?logoff\", \"label\" => \"Logoff\");\n return $menubar;\n}", "function show_my_menus(){\n register_nav_menu('mainmenu', 'Huvudmeny');\n register_nav_menu('footermenu', 'Sociala medier');\n register_nav_menu('sidemenu', 'Sidomeny');\n register_nav_menu('blogsidepage', 'Blogg sidomeny sidor');\n register_nav_menu('blogsidearchive', 'Blogg sidomeny arkiv');\n register_nav_menu('blogsidecategory', 'Blogg sidomeny kategorier');\n}", "public static function GenerateNavbar($menu)\n\t\t{\n\t\t\t$default = array(\n\t\t\t\t'id' => null,\n\t\t\t\t'class' => null,\n\t\t\t\t'wrapper' => 'nav',\n\t\t\t\t'create_url' => function ($url) {\n\t\t\t\t\treturn $url;\n\t\t\t\t},\n\t\t\t);\n\t\t\t\n\t\t\t$menu = array_replace_recursive($default, $menu);\n\t\t\t\n\t\t\t// Function to create urls\n\t\t\t$createUrl = $menu['create_url'];\n\t\t\t\n\t\t\t// Create the ul li menu from the array, use an anonomous recursive function that returns an array of values.\n\t\t\t$createMenu = function ($items, $callback) use (&$createMenu, $createUrl) \n\t\t\t{\n\t\t\t\t$html = null;\n\t\t\t\t$hasItemIsSelected = false;\n\t\t\t\t\n\t\t\t\tforeach ($items as $item) \n\t\t\t\t{\n\t\t\t\t\t// has submenu, call recursivly and keep track on if the submenu has a selected item in it.\n\t\t\t\t\t$submenu = null;\n\t\t\t\t\t$selectedParent = null;\n\t\t\t\t\t$hasSubmenu \t= null; \n\t\t\t\t\t\n\t\t\t\t\tif (isset($item['submenu'])) \n\t\t\t\t\t{\n\t\t\t\t\t\t$hasSubmenu = \" &#9662;\";\n\t\t\t\t\t\tlist($submenu, $selectedParent) = $createMenu($item['submenu']['items'], $callback);\n\t\t\t\t\t\t$selectedParent = $selectedParent ? \"selected-parent \" : null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (isset($item['url']))\n\t\t\t\t\t\t// Check if the current menuitem is selected\n\t\t\t\t\t\t$selected = $callback($item['url']) ? \"selected \" : null;\n\t\t\t\t\telse\n\t\t\t\t\t\t$selected = NULL; \n\t\t\t\t\t\n\t\t\t\t\t// Is there a class set for this item, then use it\n\t\t\t\t\t$class = isset($item['class']) && ! is_null($item['class']) ? $item['class'] : null;\n\t\t\t\t\t\n\t\t\t\t\t// Prepare the class-attribute, if used\n\t\t\t\t\t$class = ($selected || $selectedParent || $class) ? \" class='{$selected}{$selectedParent}{$class}' \" : null;\n\t\t\t\t\t\n\t\t\t\t\t// Add the menu item\n\t\t\t\t\t$url = isset($item['url']) ? $createUrl($item['url']) : NULL;\n\t\t\t\t\tif (!isset($item['show']) || $item['show'] == TRUE)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($url)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$active = (basename($_SERVER['REQUEST_URI']) == $url || (strtok($url,'?') == basename($_SERVER['PHP_SELF']) && $hasSubmenu) ? '' : '');\n\t\t\t\t\t\t\tif ($active == '▸ ') \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($hasSubmenu)\n\t\t\t\t\t\t\t\t\tself::$parent = $item; \n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tself::$child = $item; \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$html .= \"\\n<li{$class}>$active<a href='{$url}' title='{$item['title']}'>{$item['text']}{$hasSubmenu}</a>{$submenu}</li>\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$html .= \"\\n<li{$class}>{$item['text']}{$hasSubmenu}{$submenu}</li>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// To remember there is selected children when going up the menu hierarchy\n\t\t\t\t\tif ($selected) {\n\t\t\t\t\t\t$hasItemIsSelected = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Return the menu\n\t\t\t\treturn array(\"\\n<ul>$html</ul>\\n\", $hasItemIsSelected);\n\t\t\t};\n\t\t\t\n\t\t\t// Call the anonomous function to create the menu, and submenues if any.\n\t\t\tlist($html, $ignore) = $createMenu($menu['items'], $menu['callback']);\n\t\t\t\n\t\t\t\n\t\t\t// Set the id & class element, only if it exists in the menu-array\n\t\t\t$id = isset($menu['id']) ? \" id='{$menu['id']}'\" : null;\n\t\t\t$class = isset($menu['class']) ? \" class='{$menu['class']}'\" : null;\n\t\t\t$wrapper = $menu['wrapper'];\n\t\t\t\n\t\t\treturn \"\\n<{$wrapper}{$id}{$class}>{$html}</{$wrapper}>\\n\";\n\t\t}", "public function formNavBar(){\n $lang = 'en'; //<--- Assessment 1: 2 - Basic variable type, scope (only accessible in this method)\n if($this->locale === 'hi'){\n $lang = 'hi';\n }\n echo \"<div class='ui inverted menu'>\n <a class='\".$this->home.\" item'\n href='../../pages/landingPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"Home\"].\n \"</a>\n <a class='\".$this->viewPosts.\" item' \n href='../../pages/viewAllPosts/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"View-Posts\"].\n \"</a>\n <a class='\".$this->myPosts.\" item' \n href='../../pages/viewUserPosts/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"User-Posts\"].\n \"</a>\n <a class='\".$this->newPost.\" item' \n href='../../pages/newPost/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"New-Post\"].\n \"</a>\n <div class='right menu'>\";\n\n\n if($this->session==='Login')\n {\n echo \"<a class='\".$this->login.\" item'\n href='../../pages/loginPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][$this->session].\n \"</a>\";\n }\n else {\n echo \"<a class='\".$this->login.\" item'\n href='?logout=1'>\".\n $this->ini_array[$this->locale][$this->session].\n \"</a>\";\n }\n\n\n if(!(isset($_SESSION['loggedIn'])&&($_SESSION['loggedIn']))){\n echo \"<a class='\".$this->register.\" item' \n href='../../pages/registrationPage/\".$lang.\".php'>\".\n $this->ini_array[$this->locale][\"Register\"].\n \"</a>\";\n }\n echo \"</div>\n </div>\";\n }", "Public function Anavbar(){\n\t\n\t}", "protected function navbar()\n\t{\n\t\tif($this->action->Id == 'show')\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\treturn parent::navbar();\n\t}", "public function getMenu()\n{\n $lang=$this->translation;\n foreach($this->_headerMenu as $hmenukey => $hmenu){\n foreach($hmenu as $hkey=>$hval){\n $this->_headerMenu[$hmenukey][$hkey]['caption']=$lang->_($hkey);\n }\n }\n $auth = $this->session->get('auth');\n if ($auth) {\n $this->_headerMenu['navbar-right']['oturum'] = array(\n 'caption' => $lang->_('logout'),\n 'action' => 'bitir'\n );\n\n } else {\n unset($this->_headerMenu['navbar-left']['islemler']);\n unset($this->_headerMenu['navbar-left']['r4t']);\n unset($this->_headerMenu['navbar-left']['hesap']);\n }\n\n $controllerName = $this->view->getControllerName();\n foreach ($this->_headerMenu as $position => $menu) {\n echo '<div class=\"nav-collapse\">';\n echo '<ul class=\"nav navbar-nav ', $position, '\">';\n foreach ($menu as $controller => $option) {\n if ($controllerName == $controller) {\n echo '<li class=\"active\">';\n } else {\n echo '<li>';\n }\n if ($controller=='admin'){\n if(($auth) and ($auth['auth']==0)){\n echo $this->tag->linkTo($controller . '/' . $option['action'], $option['caption']);\n }}else{\n echo $this->tag->linkTo($controller . '/' . $option['action'], $option['caption']);\n }\n echo '</li>';\n }\n\n echo '</ul>';\n echo '</div>';\n }\n\n }", "public function index()\n {\n $this->title .= ' view';\n $this->vars = array_add($this->vars, 'menu', $this->rep->make());\n }", "public function menuItems()\n\t{\n\t\treturn array(\n array('label'=>$this->labelMenu!==null?$this->labelMenu:Yii::t('app','Generator'), 'icon'=>'fa fa-code', 'url'=>'#','items'=>$this->getMyselfMenu(),'visible'=>Yii::app()->getModule('users')->check('root')),\n );\n\t}", "function getMenuItems()\n {\n $this->menuitem(\"xp\", \"\", \"main\", array(\"xp.story\", \"admin\"));\n $this->menuitem(\"stories\", dispatch_url(\"xp.story\", \"admin\"), \"xp\", array(\"xp.story\", \"admin\"));\n }", "public function getMenu();", "public function userDashboardMenuBlocNavAction(){\n\n \treturn $this->render('UserBundle:Includes:ModulesLeft/user_dashboard_menu_bloc_nav.html.twig');\n }", "function showMenu() {\n echo '<p><a href=\"cat4rent.php\">Home</a> | ' .\n '<a href=\"cats.php\">All Cats</a> | ' .\n '<a href=\"addCat.php\">Add a cat</a> | ' .\n '<a href=\"customers.php\">Customers</a> | ' .\n '<a href=\"addCustomer.php\">Add Customer</a></p>';\n}", "public function navbar() {\n $items = $this->page->navbar->get_items();\n $breadcrumbs = array();\n foreach ($items as $item) {\n $item->hideicon = true;\n $breadcrumbs[] = $this->render($item);\n }\n $divider = '<span class=\"divider\">/</span>';\n $list_items = '<li>'.join(\" $divider</li><li>\", $breadcrumbs).'</li>';\n $title = '<span class=\"accesshide\">'.get_string('pagepath').'</span>';\n return $title . \"<ul class=\\\"breadcrumb\\\">$list_items</ul>\";\n }", "public function render() {\n\n\n return $this->makeMenu();\n\n\n }", "function getSideBar(){\r\n $barContent = \"\";\r\n \r\n if(!isUserLoggedIn())\r\n {\r\n $barContent .= '<BR/><HR><img src=\"spartan_logo.gif\" width=\"100%\"></img><HR>';\r\n $barContent .= '<blockquote><p>Please login . . .</p></blockquote><HR><BR/>';\r\n }\r\n else\r\n {\r\n\t\t$barContent .= '<HR><ul class=\"nav nav-pills nav-stacked\">';\r\n\t\t$barContent .= \t\t'<li><font color=\"black\"><B>Menu</B></font></li>';\r\n\t\t$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"MyHome()\">&nbsp;<i class=\"glyphicon glyphicon-home\"></i>&nbsp;&nbsp;Home</a> </li>';\r\n\t\t//$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"myGraph()\">&nbsp;<i class=\"icon-list\"></i>Tran</a> </li>';\r\n\t\t//$barContent .= \t\t'<li> <A HREF=\"#\" onClick=\"MyInfo()\">&nbsp;<i class=\"glyphicon glyphicon-user\"></i>&nbsp;&nbsp;Profile</a> </li>';\r\n\t\t$barContent .= '<li> <A HREF=\"#\" onClick=\"MyInfo()\">&nbsp;<i class=\"glyphicon glyphicon-user\"></i>&nbsp;&nbsp;Profile</a> </li>';\r\n $barContent .= '<li> <A HREF=\"#\" onClick=\"readlogfile()\">&nbsp;<i class=\"glyphicon glyphicon-road\"></i>&nbsp;&nbsp;Mail Log</a> </li>';\r\n\r\n $barContent .= '</ul>';\r\n \r\n $barContent .= '<HR><ul class=\"nav nav-list\">';\r\n $barContent .= \t'<li><font color=\"black\"><B>Event Menu</B></font></li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(0)\">&nbsp;<i class=\"glyphicon glyphicon-eye-open\"></i>&nbsp;&nbsp;View</a> </li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(1)\">&nbsp;<i class=\"glyphicon glyphicon-plus\"></i>&nbsp;&nbsp;Create</a> </li>';\r\n $barContent .= \t'<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(2)\">&nbsp;<i class=\"glyphicon glyphicon-list-alt\"></i>&nbsp;&nbsp;View Multi</a> </li>';\r\n\t$barContent .= '<li> <A HREF=\"#\" onClick=\"eventsButtonHandler(3)\">&nbsp;<i class=\"glyphicon glyphicon-tower\"></i>&nbsp;&nbsp;Multi Create</a> </li>';\r\n\t$barContent .= '</ul><HR>';\r\n\r\n $barContent .= '<img src=\"spartan_logo.gif\" width=\"90%\"></img>';\r\n $barContent .= '<HR/>';\r\n }\r\n\r\n return $barContent;\r\n}", "function register_menu() {\n\n register_nav_menu('header-menu',__('Header Menu'));\n\n}", "function register_my_menu() {\n register_nav_menu('header-menu',__( 'Header Menu' ));\n}", "public function menuHTML() {\n return '<div class=\"menu\">\n <ul>\n <li><a href=\"index.php\">User Mangement</a></li>\n <li><a href=\"new-user.php\">Add New User</a></li>\n <li><a href=\"downloads.php\">Downloads</a></li>\n <li><a href=\"logout.php\">Log out</a></li>\n </ul>\n </div>';\n }", "function lihatMenuBar(){\n $outlet= $this->session->userdata('outlet');\n $data['menu_bar'] = $this->m_staff->tampilMenuBar($outlet)->result();\n $this->load->view('staff/v_lihatMenuBar', $data);\n $this->load->view('layouts/footer');\n }", "function ppNavbar ($menuitems, $selected='', $parms='') {\n global $_CONF;\n\n $navbar = new Template($_CONF['path_layout'] . 'navbar');\n $navbar->set_file (array (\n 'navbar' => 'navbar.thtml',\n 'menuitem' => 'menuitem.thtml',\n ));\n $navbar->set_var ('xhtml', XHTML);\n for ($i=1; $i <= count($menuitems); $i++) {\n $parms = explode( \"=\",current($menuitems) );\n $navbar->set_var( 'link', current($menuitems));\n if (key($menuitems) == $selected) {\n $navbar->set_var( 'cssactive', 'id=\"active\"');\n $navbar->set_var( 'csscurrent','id=\"current\"');\n } else {\n $navbar->set_var( 'cssactive', '');\n $navbar->set_var( 'csscurrent','');\n }\n $navbar->set_var( 'label', key($menuitems));\n $navbar->parse( 'menuitems', 'menuitem', true );\n next($menuitems);\n }\n $navbar->parse ('output', 'navbar');\n $retval = $navbar->finish($navbar->get_var('output'));\n return $retval;\n}", "function Menu_Rendering($menu) {\r\n}", "function menu() {\n\t\tob_start();\n\t\tinclude('templates/menu.php');\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}", "public function mainMenu() {\n return $this->render(\"mainMenu.twig\", []);\n }", "public function addMenuItem() {\n add_menu_page(__('Visual Chat', 'WP_Visual_Chat'), 'Visual Chat', 'visual_chat', 'vcht-console', array($this, 'viewChatBackend'), 'dashicons-format-chat');\n }", "function Outputmenu($page) {\n \n \n// the dummy container menu is used to have a fake menu behind the original one to keep every div floating in any direction in line and without overlapping\n echo' <div class=\"dummycontainermenu\">';\n echo' <div class=\"logo\">\n <a href=\"index.php\"><img src=\"\\Coursework1PaulLucianCosareanu\\Images\\Logo.png\" alt=\"Italian Trulli\"></a>\n \n </div>\n </div>'; \n\n// container menu is the container in which the actual menu and the logo is placed\n echo' <div class=\"containermenu\">';\n// logo is the container of the logo and the a href within the container is the actual logo populating the container\n echo' <div class=\"logo\">\n\n <a href=\"index.php\"><img src=\"\\Coursework1PaulLucianCosareanu\\Images\\Logo.png\" alt=\"Italian Trulli\"></a>\n \n </div>';\n\n// the class menu is a container in which the buttons/ links towards all the other pages are displayed\n echo' <div class=\"menu\">';\n\n $pathimagex=\"/Coursework1PaulLucianCosareanu/Images/\"; //the path of the images, problems with writing, php took certain symbols combined as commands\n $linkNames = array(\"Home\", \"Details\", \"Ranking\", \"Game\", \"Contact\", \"User\"); //array of Link names, the names which are displayed in the menu\n $linkAddresses = array(\"index.php\", \"DescriptionPage.php\", \"RankingPage.php\", \"GamePage.php\", \"ContactPage.php\");//array of the main pages\n $iconNames = array(\"Home\", \"Details\", \"Ranking\", \"Game\", \"Contact\"); // second part of the path of the images, these images are the icons within the menu\n\n //Output navigation\n for ($x = 0; $x < count($linkNames); $x++) {\n //algorith for output navigation short description\n if($linkNames[$x]!=\"User\"){ //for every x going from 0 to the number of link names, important x< link names total\n echo '<a '; //if the linknames are different than \"user\",starts printing the menu up to the user but not including the User. then if the link name is the same with the $page which is parsed\n if ($linkNames[$x] == $page) { //from anymainpage.php then it takes the class selected,meaning that if you press the home button for example\n echo 'class=\"selected\" '; //the color of the text will become black because you are situated on that page, it clears out after you visit another page,\n } //after everything is printed and the array[x] takes the user value, the user dropdown code is printed\n \n \n // output icons in specific menu buttons, the algorith checks if the name of the link is the same with the name of the icon, if yes then prints\n for($y=0; $y<count($iconNames); $y++){ \n if($linkNames[$x] == $iconNames[$y]){ \n echo 'href=\"'.$linkAddresses[$x].'\"><img class=\"test\" src=\"'.$pathimagex.$iconNames[$y].'.png\"> ' . $linkNames[$x] . '</a>';\n }\n }\n // end of output icons in specific menu buttons \n\n // if linkname is user then the dropdown html with it's according icon is printed\n }else if($linkNames[$x]==\"User\"){\n echo'<div class=\"dropdown\" >\n <button class=\"dropbtn\" id=\"dropdown1\" style=\"display:inline\"><img class=\"test\" src=\"\\Coursework1PaulLucianCosareanu\\Images\\User.png\">User</button>\n <div class=\"dropdown-content\">\n <a href=\"Login.php\">Log In</a>\n <a href=\"Register.php\">Register</a>\n </div>\n </div>';\n echo'<div class=\"dropdown\" >\n <button class=\"dropbtn\" id=\"dropdown2\" style=\"display:none;\"><img class=\"test\" src=\"\\Coursework1PaulLucianCosareanu\\Images\\User.png\" style=\"float:left\";><div id=\"username\" style=\"float:left\";>User</div></button>\n <div class=\"dropdown-content\">\n <a href=\"index.php\" onclick=\"logoutuser()\">Log Out</a>\n </div>\n </div>';\n\n } \n }\n echo'</div>';\n echo'</div>\n <script src=\"./Javascript/Loggedinout.js\" type=\"text/javascript\"></script>';\n}", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "public function menu() {\n $data['menus'] = $this->allmenus();\n $this->load->view('Dashboard/header');\n $this->load->view('Menu/menu', $data);\n $this->load->view('Dashboard/footer');\n }", "function mkRegisterMenu() {\n \n register_nav_menu('primary', 'Main Menu');\n \n }", "protected function buildMenuArray() {}", "function login_menu()\n\t{\n\t\t$menu=\"\";\n\t\t$bap=CBapelsin::instance();\n\t\t\n\t\tif($bap->user->isAuthenticated())\n\t\t{\n\t\t\t$user=$bap->user->getUserProfile();\n\t\t\t$menu=\"\";\n\t\t\tif($bap->config['login_menu'][\"show_gravatar\"])\n\t\t\t\t$menu.=\"<a href='http://gravatar.com/site/signup/'><img class='gravatar' src='\".get_gravatar(20).\"'></a>\";\n\t\t\t\n\t\t\tif($bap->config['login_menu']['profile']['label']==\"__profile\")\n\t\t\t\t$label=$user['acronym'];\n\t\t\telse\n\t\t\t\t$label=$bap->config['login_menu']['profile']['label'];\n\t\t\t\n\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['profile']['src'])}'>{$label}</a> \";\n\t\t\tif($bap->user->isAdministrator())\n\t\t\t{\n\t\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['acp']['src'])}'>{$bap->config['login_menu']['acp']['label']}</a> \";\n\t\t\t}\n\t\t\t$menu.=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['logout']['src'])}'>{$bap->config['login_menu']['logout']['label']}</a>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$menu=\"<a href='{$bap->request->createUrl($bap->config['login_menu']['login']['src'])}'>{$bap->config['login_menu']['login']['label']}</a>\";\n\t\t}\t\t\n\t\tif(isset($bap->config['show_login_menu']) && isset($bap->config['show_login_menu']))\n\t\t\treturn $menu;\n\t\telse \n\t\t\treturn \"\";\n\t}", "public function actionIndex()\n {\n $user = User::findOne(\\Yii::$app->user->id);\n $userVendor = User::findOne($user->vendorId);\n $vendorMenu = User::getVendorDefaultMenu($userVendor);\n \n $vendorCategories = MenuCategories::find()->where('isArchived = 0 and vendorId = '.$user->vendorId.' order by sorting asc')->all();\n \n return $this->render('index', ['menu' => $vendorMenu, 'vendorCategories' => $vendorCategories]);\n }", "function menuFlow() {\n\t\tincludeFile('templates/mainmenu');\n\t\techo PHP_EOL;\n\t}", "function get_loginbar($menu)\n{\n\t$html = \"<nav class='loginbar'>\";\n\tforeach($menu['items'] as $item)\n\t{\n\t\tif(basename($_SERVER['SCRIPT_FILENAME']) == $item['url'])\n\t\t{\n\t\t\t$item['class'] .= ' selected'; \n\t\t}\n\t\t\n\t\tif(!isset($_SESSION['user']) && $item['url'] == 'logout.php')\n\t\t{\n\t\t}\n\t\telse if(isset($item['url']))\n\t\t{\n\t\t\t$html .= \"<a href='{$item['url']}' class='{$item['class']}'>{$item['text']}</a>\";\n\t\t}\n\t}\n\t$html .= \"</nav>\";\n\treturn $html;\n}", "function drawMenu($menus)\n{\n global $rootPath;\n $menuId = 0;\n $input = \"\";\n $index = 0;\n\n while ($input !== \"quit\") {\n write(\"\\e[H\\e[J\"); //clear screen\n writeLine(str_repeat(\"=\", 100));\n writeLine(\"TINA4 - MENU ({$rootPath})\");\n writeLine(str_repeat(\"=\", 100));\n\n if ($menuId !== 0) {\n $found = false;\n foreach ($menus as $mid => $menu) {\n if ($menuId === $menu[\"id\"]) {\n $prompt = call_user_func($menu[\"menuCode\"], $index, $input, null);\n $index = $prompt[\"index\"];\n if ($index === 0) {\n $menuId = 0;\n } else {\n $input = readLn($prompt[\"prompt\"]);\n $found = true;\n }\n }\n }\n if (!$found) {\n $menuId = 0;\n }\n } else {\n foreach ($menus as $id => $menu) {\n if (!isset($menu[\"show\"])) {\n $menu[\"show\"] = true;\n }\n if ($menu[\"show\"]) {\n writeLine(($menu[\"id\"]) . \".) \" . $menu[\"description\"]);\n }\n\n }\n $input = readLn(\"Choose menu option or type \\\"quit\\\" to Exit:\");\n $menuId = (int)$input;\n }\n }\n}", "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "private function mountBar(){\n\t\t$bar = self::$menu;\n\t\t$fullBar = new HTMLTable();\n\t\t//$fullBar->border=\"1\";\n\t\t$fullBar->cellpadding=\"0\";\n\t\t$fullBar->cellspacing=\"0\";\n\t\t$fullBar->style=\"height:30px\";\n\t\t$anTrItem = $fullBar->insertRow();\n\t\t$id = 0;\n\t\twhile($bar->hasNext()){\n\t\t\t$anUl = new HTMLElement(\"ul\");\n\t\t\t$anUl->id =\"nav_\" . $id++;\n\t\t\t$anUl->onmouseover = \"activateMenu('\".$anUl->id.\"'); \";//passa o mouuse ativa o menu\n\t\t\t$item = $bar->getNext();\n\t\t\t$anUl->appendChild($item->getOutput());\n\t\t\tif($this->direction ==\"V\"){\n\t\t\t\t$anTrItem = $fullBar->insertRow();\n\t\t\t}\n\t\t\t$anTdItem=$anTrItem->insertCell($anUl);\n\t\t\t$anTdItem->appendChild($this->getHorizNeed());\n\t\t\t$anTdItem->valign=\"top\";\n\t\t}\n\t\treturn $fullBar;\n\t}", "function PrintMenu()\n\t{\n\t\tglobal $refreshpage;\n\t\t\n\t\techo '<ul class=\"nav nav-pills no-margin-left\">\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displaydefaults', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-home bigger-120\"></i> </a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayform', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displayform\">\n\t\t\t\t\t\t<i class=\" ace-icon fa fa-plus\"></i> '.AdminPhrase('create_form_but').'\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayresponses', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page. '&amp;action=displayresponses\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-comment\"></i> '.AdminPhrase('disp_responses') . '</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displayrecipient'. 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displayrecipient\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-plus\"></i> '.AdminPhrase('create_recipient_but').'</a>\n\t\t\t\t</li>\n\t\t\t\t<li role=\"presentation\" ' . iif($this->_action == 'displaysettings', 'class=\"active\"') . '>\n\t\t\t\t\t<a class=\"\" href=\"'.$this->_page.'&amp;action=displaysettings\">\n\t\t\t\t\t\t<i class=\"ace-icon fa fa-wrench\"></i> '.AdminPhrase('settings').'</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"hr hr-8\"></div>\n\t\t\t<div class=\"space-20\"></div>';\n\t}", "public function output()\n {\n echo \"<{$this->container} class='{$this->class}'>\";\n echo $this->menuHtml;\n echo \"</{$this->container}>\";\n }", "function menus();", "public function buildMenu() {\n $content = array();\n\n $headers = array(\n t(\"Menu keuze\"),\n t(\"Functie\"), \n );\n $rows[] = array(\n t(\"<b>Tabel beheer</b>\"),\n t(\"\"),\n );\n $rows[]= array(\n t(\"<a href= ezac/leden/>Leden administratie</a>\"),\n t(\"Inzage en wijzigen leden informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/leden/update>Lid toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw lid\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/>Vloot administratie</a>\"),\n t(\"Inzage en wijzigen vloot informatie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/kisten/update>Kist toevoegen</a>\"),\n t(\"Invoeren gegevens nieuw vliegtuig\"),\n );\n $rows[] = array(\n t(\"<b>Startadministratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts>Startadministratie</a>\"),\n t(\"Overzicht startadministratie\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/starts/create/>Start invoer</a>\"),\n t(\"Invoeren nieuwe start\"),\n );\n $rows[] = array(\n t(\"<b>Voortgang / Bevoegdheden administratie</b>\"),\n t(\"\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Overzicht</a>\"),\n t(\"Overzicht VBA gegevens\"),\n );\n $rows[] = array(\n t(\"<a href= ezac/vba>Invoeren</a>\"),\n t(\"Invoeren verslagen en bevoegdheden\"),\n );\n\n $table = array(\n '#type' => 'table',\n '#caption' => t(\"EZAC administratie hoofdmenu\"),\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('Geen gegevens beschikbaar.'),\n '#sticky' => TRUE,\n '#prefix' => '<div id=\"menu-div\">',\n '#suffix' => '</div>',\n '#weight' => 2,\n );\n\n return $table;\n }", "public function run() {\n\t\t\n\t\techo CHtml::openTag('nav', $this->htmlOptions);\n\t\techo '<div class=\"' . $this->getContainerCssClass() . '\">';\n\t\t\n\t\techo '<div class=\"navbar-header\">';\n\t\tif($this->collapse) {\n\t\t\t$this->controller->widget('booster.widgets.TbButton', array(\n\t\t\t\t'label' => '<span class=\"icon-bar\"></span><span class=\"icon-bar\"></span><span class=\"icon-bar\"></span>',\n\t\t\t\t'encodeLabel' => false,\n\t\t\t\t'htmlOptions' => array(\n\t\t\t\t\t'class' => 'navbar-toggle',\n\t\t\t\t\t'data-toggle' => 'collapse',\n\t\t\t\t\t'data-target' => '#'.self::CONTAINER_PREFIX.$this->id,\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t}\n\t\t\n\t\tif ($this->brand !== false) {\n\t\t\tif ($this->brandUrl !== false) {\n\t\t\t\tif($this->toggleSideBar){\n\t\t\t\t\techo \t\t\n\t\t\t\t\t'<button id=\"sidebar-toggle\">\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t<span class=\"icon-bar\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t\techo CHtml::openTag('a', $this->brandOptions) . $this->brand . '</a>';\n\t\t\t} else {\n\t\t\t\tunset($this->brandOptions['href']); // spans cannot have a href attribute\n\t\t\t\techo CHtml::openTag('span', $this->brandOptions) . $this->brand . '</span>';\n\t\t\t}\n\t\t}\n\t\techo '</div>';\n\t\t\n\t\techo '<div class=\"collapse navbar-collapse\" id=\"'.self::CONTAINER_PREFIX.$this->id.'\">';\n\t\tforeach ($this->items as $item) {\n\t\t\tif (is_string($item)) {\n\t\t\t\techo $item;\n\t\t\t} else {\n\t\t\t\tif (isset($item['class'])) {\n\t\t\t\t\t$className = $item['class'];\n\t\t\t\t\tunset($item['class']);\n\n\t\t\t\t\t$this->controller->widget($className, $item);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo '</div></div></nav>';\n\n\t\t$this->registerClientScript();\n\t}", "public function createBackendMenu(){\n\t\tadd_menu_page( 'Stackoverflow', 'Stackoverflow', 'manage_options', 'stackoverflowStats', array($this, 'settingsPage') );\n\t}", "public function afficheMenu()\r\n\t\t{\r\n\t\t//appel de la vue du menu\r\n\t\trequire 'Vues/menu.php';\r\n\t\t}", "function eval_guide_menu() {\n\twp_nav_menu(array(\n\t\t'container'\t\t\t=> false,\t\t\t\t\t\t\t// Remove nav container\n\t\t'menu_id'\t\t\t=> 'evaluation-guide-nav',\t\t\t// Adding custom nav id\n\t\t'menu_class'\t\t=> 'vertical menu accordion-menu',\t// Adding custom nav class\n\t\t'items_wrap'\t\t=> '<ul id=\"%1$s\" class=\"%2$s\" data-accordion-menu data-submenu-toggle=\"true\">%3$s</ul>',\n\t\t'theme_location'\t=> 'evaluation-guide',\t\t\t\t// Where it's located in the theme\n\t\t'depth'\t\t\t\t=> 5,\t\t\t\t\t\t\t\t// Limit the depth of the nav\n\t\t'fallback_cb'\t\t=> false,\t\t\t\t\t\t\t// Fallback function (see below)\n\t\t'walker'\t\t\t=> new MX_TOPBAR_MENU_WALKER()\n\t));\n}", "public function getMenuGenerator() : MenuGenerator;", "function soho_menu_tree__header_menu($variables){\n return '<ul class=\"menu\" id=\"menu-main-menu\">' . $variables['tree'] . '</ul>';\n \n}", "public function create_nav($option) {\n\t\t// <li><a href=\"index.php?navButton=stats\">All Stats</a></li>\n\t\t// will also add class=current to highlight current page on nav bar\n\t\t\n\t\t$array = array(\n\t\t\t\t\"All Stats\" => array(\"index.php?navButton=stats\",\"\"),\n\t\t\t\t\"Guess Game\" => array(\"index.php?navButton=guessgame\",\"\"),\n\t\t\t\t\"Rock Paper Scissors\" => array(\"index.php?navButton=rps\",\"\"),\n\t\t\t\t\"Frogs\" => array(\"index.php?navButton=frogs\",\"\"),\n\t\t\t\t\"Profile\" => array(\"index.php?navButton=profile\",\"\"),\n\t\t\t\t\"Logout\" => array(\"index.php?navButton=logout\",\"\"),\n\t\t);\n\t\tif ($option != \"\") {$array[$option][1] = 'class=\"current\"';}\n\t\t$nav=\"\";\n\t\t$nav .= '<nav>';\n\t\t$nav .= '<ul>';\n\t\tforeach ($array as $key=>$value) {\n\t\t\t\tif ($key == $option) {\n\t\t\t\t\t$nav .= '<li> <a ' . $value[1] . 'href=\"' . $value[0] . '\" style=\"color:gray;\">' . $key . '</a> </li>';\n\t\t\t\t} else {\n\t\t\t\t\t$nav .= '<li> <a ' . $value[1] . 'href=\"' . $value[0] . '\">' . $key . '</a> </li>';\n\t\t\t\t}\n\t\t}\n\n\t\t$nav .= '</ul>';\n\t\t$nav .= '</nav>';\n\t \n\t\techo $nav;\n\t}", "public function makeMenu(){\n\n //Label & class definition\n $idDiv = \"sub-menu\";\n $classUl = \"menu\";\n $classLi = \"stdanimation1_2\";\n $classSpan = \"stdanimation1_2\";\n $classA = \"stdanimation1_4\";\n\n //array mit link, icon, label\n // mit i übersetzen\n $naviArray[] = array(\"link\" => \"index.php?view=home\", \"icon\" => \"icon_house_alt\", \"label\" => \"Home\" );\n $naviArray[] = array(\"link\" => \"index.php?view=profile\", \"icon\" => \"icon_profile\", \"label\" => \"Profile\" );\n $naviArray[] = array(\"link\" => \"index.php?view=categories\", \"icon\" => \"icon_tag\", \"label\" => \"Categories\" );\n $naviArray[] = array(\"link\" => \"index.php?view=shoppingcart\", \"icon\" => \"icon_cart\", \"label\" => \"Shopping Cart\" );\n $naviArray[] = array(\"link\" => \"index.php?view=wishlist\", \"icon\" => \"icon_gift\", \"label\" => \"Wishlist\" );\n $naviArray[] = array(\"link\" => \"index.php?view=hotlist\", \"icon\" => \"icon_grid-2x2\", \"label\" => \"Hotlist\" );\n\n\n $linkList = \"\";\n\n //create a list item for every array found\n foreach($naviArray as $navipoint){\n //do translation\n $navipoint[\"label\"] = i($navipoint[\"label\"]);\n\n $linkList .= '\n <li class=\"'.$classLi.'\">\n <span class=\"'.$classSpan.' '.$navipoint[\"icon\"].'\"></span>\n <a class=\"'.$classSpan.'\" href=\"'.$navipoint[\"link\"].'\">'.$navipoint[\"label\"].'</a>\n </li>\n ';\n }\n\n $html = \"\";\n $html = '<div id=\"'.$idDiv.'\">\n <ul class=\"'.$classUl.'\">\n '.$linkList.'\n </ul>\n </div>';\n\n return $html;\n\n\n\n /*\n return '<div id=\"sub-menu\">\n <ul class=\"menu\">\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_house_alt\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=home\">Home</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_profile\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=profile\">Profil</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_tag\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=categorie\">Kategorien</a>\n </li>\n <li class=\"stdanimation\">\n <span class=\"stdanimation1_2 icon_cart\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shoppingcart\" >Shopping Cart</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_gift\"></span>\n <a class=\"stdanimation1_4\" href=\"index.php?view=shop\">Ipsum</a>\n </li>\n <li class=\"stdanimation1_4\">\n <span class=\"stdanimation1_4 icon_grid-2x2\"></span>\n <a class=\"stdanimation1_4\">Doloret</a>\n </li>\n </ul>\n </div>';\n*/\n}", "public function addToMenu()\n\t{\n\t\t$content = sprintf(\n\t\t\t\"$%s = (\\$user->hasPermission(%d)) ? new Link(route('report.%s'), _('%s %s %s')) : new Node();\",\n\t\t\tcamel_case(str_replace('.', '_', $this->class)),\n\t\t\t$this->permission,\n\t\t\t$this->route,\n\t\t\t$this->class,\n\t\t\t$this->sufix,\n\t\t\t'TODO'\n\t\t);\n\n\t\treturn parent::addToMenu($content);\n\t}", "function template_navigation() {\n\t\t$_ENV['menu'] = array();\n\t\t$_ENV['menu']['Main'] = _URL_;\n\t\tModule::includes('menus');\n\t\t$_ENV['menu']['Preferences'] = '?module=prefs';\n\t\t$_ENV['menu']['Logout'] = '?logout=true';\n\n\t\t$buffer = '<ul><li><h2>';\n\t\t$buffer .= array_key_exists('Menu',$_ENV['imgs']['menu']) \n\t\t\t? '<img src=\"'.$_ENV['imgs']['menu']['Menu'].'\" border=\"0\" /> ' : ' ';\n\t\t$buffer .= ' Main Menu</h2><ul>';\n\t\tforeach ($_ENV['menu'] as $module => $items) {\n\t\t\tif (is_array($items)) {\n\t\t\t\t$buffer .= '<li><a href=\"#\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.'</a><ul>';\n\t\t\t\tforeach ($items as $label => $url) {\n\t\t\t\t\t$buffer .= '<li><a href=\"'.$url.'\">';\n\t\t\t\t\t$buffer .= array_key_exists($label,$_ENV['imgs']['menu'])\n\t\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$label].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t\t$buffer .= $label.'</a></li>';\n\t\t\t\t}\n\t\t\t\t$buffer .= '</ul></li>';\n\t\t\t} else {\n\t\t\t\t$buffer .= '<li><a href=\"'.$items.'\">';\n\t\t\t\t$buffer .= array_key_exists($module,$_ENV['imgs']['menu'])\n\t\t\t\t\t? '<img src=\"'.$_ENV['imgs']['menu'][$module].'\" border=\"0\" /> ' : ' ';\n\t\t\t\t$buffer .= $module.' </a></li>';\n\t\t\t}\t\n\t\t}\n\t\t$buffer .= '</ul></li></ul>';\n\t\treturn $buffer;\n\t}", "public function add_menus()\n {\n }", "function makeMenu($menu){\n $output='';\n $list = '<ul>'. PHP_EOL;\n $listClose = '</ul>'. PHP_EOL;\n foreach ($menu as $key => $items) {\n $output.='<li class=\"menu\"> <a href ='.$key.'>'.$items.'</a></li>'. PHP_EOL;\n }\n $finalMenu = $list . $output . $listClose;\n return $finalMenu;\n}", "function menu($lan,$pag){\n\t$who = '\"../quienes-somos/\" class=\"boton-men\"';\n\t$noti = '\"../noticias/\" class=\"boton-men\"';\n\t$marc = '\"../nuestras-marcas/\" class=\"boton-men\"';\n\t$cat = '\"../catalogo/\" class=\"boton-men\"';\n\t$mult = '\"../multimedia/\" class=\"boton-men\"';\n\t$cont = '\"../contacto/\" class=\"boton-men\"';\n\t$empl = '\"../empleos/\" class=\"boton-men\"';\n\t//coloca la linea inferior del menu de la seccion actual y quita el vinculo\n\tif ($pag == 'who'){\n\t\t$who = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'noti'){\n\t\t$noti = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'noticia'){\n\t\t$noti = '\"../noticias/\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'marc'){\n\t\t$marc = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'cat'){\n\t\t$cat = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'mult'){\n\t\t$mult = '\"../multimedia/\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'cont'){\n\t\t$cont = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\tif ($pag == 'empl'){\n\t\t$empl = '\"\" class=\"boton-men\" style=\"border-bottom: 4px solid #D0D0D0; height:41px;\"';\n\t}\n\t//ESPANOL\n\tif ($lan == ''){\n\t\t//vinculos cuando se esta en home\n\t\tif ($pag == 'home'){\n\t\t\techo '<!-- BOTONES -->\n\t\t\t\t<a href=\"empleos/\" class=\"boton-men\"'.$empl.' >Empleos</a>\n\t\t\t\t<a href=\"contacto/\" class=\"boton-men\"'.$cont.' >Contacto</a>\n\t\t\t\t<a href=\"multimedia/\" class=\"boton-men\"'.$mult.' >Multimedia</a>\n\t\t\t\t<a href=\"catalogo/\" class=\"boton-men\"'.$cat.' >Catálogos</a>\n\t\t\t\t<a href=\"nuestras-marcas/\" class=\"boton-men\"'.$marc.' >Nuestras Marcas</a>\n\t\t\t\t<a href=\"noticias/\" class=\"boton-men\"'.$noti.' >Noticias</a>\n\t\t\t\t<a href=\"quienes-somos/\" class=\"boton-men\"'.$who.' >Quienes Somos</a>\n\t\t\t\t<!-- BOTONES -->';\n//\t\t\t\t<a href=\"catalogo/catalogo.pdf\" target=\"_blank\" class=\"boton-men\" >Catálogo</a>\n\t\t}\n\t\t//vinculos en el resto de la pagina\n\t\telse{\n\t\t\techo '<!-- BOTONES -->\n\t\t\t\t<a href='.$empl.' >Empleos</a>\n\t\t\t\t<a href='.$cont.' >Contacto</a>\n\t\t\t\t<a href='.$mult.' >Multimedia</a>\n\t\t\t\t<a href='.$cat.' >Catálogos</a>\n\t\t\t\t<a href='.$marc.' >Nuestras Marcas</a>\n\t\t\t\t<a href='.$noti.' >Noticias</a>\n\t\t\t\t<a href='.$who.' >Quienes Somos</a>\n\t\t\t\t<a href=\"../\" class=\"boton-men\" >Inicio</a>\n\t\t\t\t<!-- BOTONES -->';\n\t\t}\n\t}\n\t//ingles\n\telse{\n\t\techo '<!-- BOTONES -->\n\t\t\t<td><div class=\"bot\"><a href=\"index.php\"><li><div class=\"botones\">HOME</div></li></a></div></td>\n\t\t\t<td><div class=\"bot\"><a href=\"rally.php\"><li'.$rall.'><div class=\"botones\">RALLY</div></li></a></div></td>\n <td><div class=\"bot\"><a href=\"catalogo.php\"><li'.$cat.'><div class=\"botones\">CATALOG</div></li></a></div></td>\n <td><div class=\"bot\"><a href=\"contacto.php\"><li'.$cont.'><div class=\"botones\">CONTACT</div></li></a></div></td>\n <td><div class=\"bot\"><a href=\"distribuidores.php\"><li'.$dis.'><div class=\"botones\">DEALERS</div></li></a></div></td>\n <!-- BOTONES -->';\n\t}\n}", "public function setMenu() {\n $loged_in = false;\n if (isset($_COOKIE['query_key']) && isset($_COOKIE['rememberme'])) {\n $loged_in = explode(\"@\", Token::verifyToken());\n }\n $menu = \"\n <nav class='navbar navbar-inverse navbar-fixed-top' role='navigation'>\n <div class='container'>\n <div class='navbar-header'>\n <button type='button' class='navbar-toggle' data-toggle='collapse' data-target='#menu_bar' >\n <span class='sr-only'>Toggle navigation</span>\n <span class='icon-bar' style='background-color: black;'></span>\n <span class='icon-bar' style='background-color: black;'></span>\n <span class='icon-bar' style='background-color: black;'></span>\n </button>\n <a class='navbar-brand' ><img src='assets/images/logo.png' height='30px'></a>\n </div>\n\n <div class='collapse navbar-collapse' id='menu_bar' >\n <ul class='nav navbar-nav navbar-right' >\";\n if ($loged_in == false) {\n $menu .=\" <li>\n <a href='./login' >Login</a>\n </li>\n <li>\n <a href='./signup' >Signup</a>\n </li>\";\n } else {\n $menu .= \" \n <li>\n <a>Welcome \" . $loged_in[0] . \"</a>\" .\n \"</li>\n <li>\n <a href='./posts' >Posts</a>\n </li>\n <li>\n <a href='./change' >Change Password</a>\n </li>\n <li>\n <a href='./user-logout' >logout</a>\n </li>\";\n }\n\n $menu .=\"</ul>\n </div>\n </div>\n</nav>\n<div style='height:100px;width:100%;position:relative;'></div>\n\";\n return $menu;\n }", "protected function getMenu() {\n $lMethods = $this->allcsvfilelist();\n natcasesort($lMethods);\n \n $lInherited = get_class_methods('CCor_Cnt');\n $lMenu = new CHtm_Vmenu(lan('sys-doc.menu'));\n foreach ( $lMethods as $lMethod ) {\n if (substr($lMethod, 0, 3) != 'act')\n continue;\n /*\n * if (substr ( $lMethod, 3, 1 ) == 'S')\n * continue;\n */\n if (in_array($lMethod, $lInherited))\n continue;\n \n $lAct = substr($lMethod, 3);\n $lMenu->addItem($lMethod, 'index.php?act=sys-doc.' . strtolower($lAct), $lAct);\n }\n \n $lMenu->setKey('act' . ucfirst($this->mAct));\n return $lMenu;\n }", "public function menu(){\n $data=[];\n $data['title']=\"Menu || Admin Panel\";\n $data['menuList'] = $this->header->selectMenuheader();\n $data['userlistAll'] = $this->header->userlistAll();\n $this->load->view(\"header\", $data); //100% need\n\n $selectMenu['selectMenu'] = $this->header->selectMenu();\n $this->load->view('menu', $selectMenu); //important\n\n $this->load->view(\"footer\");\n }", "function navbar()\r\n {\r\n }", "public function modMenu() {}", "public function modMenu() {}", "public function modMenu() {}", "function getMenu($links, $vertical) {\n $key=null;$mean=null;\n echo \"<ul>\";\n if($vertical) {\n foreach ($links as $key => $mean) {\n echo \"<li><a href='$mean'>$key</li>\";\n }\n } else {\n foreach ($links as $key => $mean) {\n echo \"<li style='display:inline; margin-right: 10px;'><a href='$mean'>$key</li>\";\n }\n }\n echo \"</ul>\";\n }", "function create_nav_bar()\n{\n $menus = array\n (\n 'Project' => array\n (\n array('label' => 'Create Project', 'url' => 'create_project.php'),\n array('label' => 'Search Projects', 'url' => 'search_projects.php')\n ),\n 'Experiment' => array\n (\n array('label' => 'Create Experiment', 'url' => 'create_experiment.php'),\n array('label' => 'Search Experiments', 'url' => 'search_experiments.php')\n ),\n 'Help' => array\n (\n array('label' => 'Report Issue', 'url' => '#'),\n array('label' => 'Request Feature', 'url' => '#')\n )\n );\n\n $selfExplode = explode('/', $_SERVER['PHP_SELF']);\n\n\n\n // nav bar and left-aligned content\n\n echo '<nav class=\"navbar navbar-default navbar-static-top\" role=\"navigation\">\n <div class=\"container-fluid\">\n <!-- Brand and toggle get grouped for better mobile display -->\n <div class=\"navbar-header\">\n <button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#bs-example-navbar-collapse-1\">\n <span class=\"sr-only\">Toggle navigation</span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n <span class=\"icon-bar\"></span>\n </button>\n <a class=\"navbar-brand\" href=\"index.php\" title=\"PHP Gateway with Airavata\">PGA</a>\n </div>\n\n <!-- Collect the nav links, forms, and other content for toggling -->\n <div class=\"collapse navbar-collapse\" id=\"bs-example-navbar-collapse-1\">\n <ul class=\"nav navbar-nav\">';\n\n\n foreach ($menus as $label => $options)\n {\n isset($_SESSION['loggedin']) && $_SESSION['loggedin']? $disabled = '' : $disabled = ' class=\"disabled\"';\n\n echo '<li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">' . $label . '<span class=\"caret\"></span></a>\n <ul class=\"dropdown-menu\" role=\"menu\">';\n\n foreach ($options as $option)\n {\n $id = strtolower(str_replace(' ', '-', $option['label']));\n\n $option['url'] == $selfExplode[2]? $active = ' class=\"active\"' : $active = '';\n\n echo '<li' . $active . $disabled . '><a href=\"' . $option['url'] . '\" id=' . $id . '>' . $option['label'] . '</a></li>';\n }\n\n echo '</ul>\n </li>';\n }\n\n\n echo '</ul>\n\n <ul class=\"nav navbar-nav navbar-right\">';\n\n\n\n\n\n // right-aligned content\n\n if (isset($_SESSION['username']))\n {\n (USER_STORE === \"USER_API\" && !isset($_SESSION['excede_login'])) ? $link = \"user_profile.php\" : $link = \"index.php\";\n echo '<li><a href=\"' . $link . '\"><span class=\"glyphicon glyphicon-user\"></span> ' . $_SESSION['username'] . '</a></li>';\n }\n\n if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'])\n {\n echo '<li><a href=\"logout.php\"><span class=\"glyphicon glyphicon-log-out\"></span> Log out</a></li>';\n }\n elseif ($selfExplode[2] == 'login.php')\n {\n echo '<li><a href=\"create_account.php\"><span class=\"glyphicon glyphicon-user\"></span> Create account</a></li>';\n }\n elseif ($selfExplode[2] == 'create_account.php')\n {\n echo '<li><a href=\"login.php\"><span class=\"glyphicon glyphicon-log-in\"></span> Log in</a></li>';\n }\n elseif ($selfExplode[2] == 'index.php')\n {\n echo '<li><a href=\"create_account.php\"><span class=\"glyphicon glyphicon-user\"></span> Create account</a></li>';\n echo '<li><a href=\"login.php\"><span class=\"glyphicon glyphicon-log-in\"></span> Log in</a></li>';\n }\n\n\n echo '</ul>\n </div><!-- /.navbar-collapse -->\n </div><!-- /.container-fluid -->\n </nav>';\n}", "function displayMenus($links){\n\t\techo '<div class = \"Menus\">';\n\t\techo '<div class = \"largespacer\"></div>';\n\n\t\t//use a horizontal list\n\t\techo '<ul class = \"Menu\">';\n\t\n\t\tforeach ($links as $link) {\n\n\t\t\techo '<li class=\"Menu\">';\n\t\t\techo '<form name = \"' . $link . '\" method=\"post\" action = \"' . str_replace('Home', 'index', str_replace(' ', '', $link)) . '.php\">';\n\t\t\techo '<button class = \"Menu\" type=\"submit\">'. $link .'</button>';\n\t\t\techo '</form>';\n\t\t\techo '</li><span class = \"MenuSpacer\"><br /></span>';\n\t\t}\n\t\t\n\n\t\techo '</ul>';\n\t\techo '</div>';\n\t}", "static function getNavBar()\r\n {\r\n //Get the Message Amount\r\n $user = self::getCurrentUser();\r\n \r\n if ($user !== NULL)\r\n {\r\n $messages = self::filterMessage('AND', 'idUserTo', $user->getId(), 'seen', 0); \r\n }\r\n else\r\n {\r\n $messages = NULL;\r\n }\r\n \r\n $amount = 0;\r\n $nav = \"\";\r\n\r\n if ($messages !== NULL)\r\n {\r\n $amount = sizeof($messages);\r\n }\r\n\r\n if ($_SESSION[\"user_type\"] == 'A')\r\n {\r\n $nav = '<nav class=\"navbar navbar-inverse navbar-fixed-top\">\r\n <div class=\"container\">\r\n <div class=\"navbar-header\">\r\n <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">\r\n <span class=\"sr-only\">Toggle navigation</span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n </button>\r\n <a class=\"navbar-brand\" href=\"main.php\" id=\"headerLanguage\">^Welcome To^ N.A.O</a>\r\n </div>\r\n <div id=\"navbar\" class=\"navbar-collapse collapse\">\r\n <ul class=\"nav navbar-nav navbar-right\">\r\n <li><a href=\"main.php\">^Home^</a></li>\r\n <li><a href=\"userContact.php\">^Messages (' . strval($amount) . ') ^</a></li>\r\n <li class=\"dropdown\">\r\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">^Go To Menu^<span class=\"caret\"></span></a>\r\n <ul class=\"dropdown-menu\" role=\"menu\">\r\n <li><a href=\"baptismMenu.php\">^Baptism^</a></li>\r\n <li><a href=\"communionMenu.php\">^Communion^</a></li>\r\n <li><a href=\"confirmationMenu.php\">^Confirmation^</a></li>\r\n <li><a href=\"marriageMenu.php\">^Marriage^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"defuntionMenu.php\">^Defuntion^</a></li>\r\n <li><a href=\"proofMenu.php\">^Proof^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"churchMenu.php\">^Church^</a></li>\r\n <li><a href=\"rectorMenu.php\">^Rector^</a></li>\r\n <li><a href=\"userMenu.php\">^User^</a></li>\r\n </ul>\r\n </li>\r\n <li class=\"dropdown\">\r\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">^Insert New Registry^<span class=\"caret\"></span></a>\r\n <ul class=\"dropdown-menu\" role=\"menu\">\r\n <li><a href=\"baptismInsertion.php\">^Baptism^</a></li>\r\n <li><a href=\"communionInsertion.php\">^Communion^</a></li>\r\n <li><a href=\"confirmationInsertion.php\">^Confirmation^</a></li>\r\n <li><a href=\"marriageInsertion.php\">^Marriage^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"defuntionInsertion.php\">^Defuntion^</a></li>\r\n <li><a href=\"proofInsertion.php\">^Proof^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"churchInsertion.php\">^Church^</a></li>\r\n <li><a href=\"rectorInsertion.php\">^Rector^</a></li>\r\n <li><a href=\"userInsertion.php\">^User^</a></li>\r\n </ul>\r\n </li>\r\n <li><a href=\"config.php\">^Config^</a></li>\r\n <li><a href=\"#\" onclick=\"logout();\">^Logout^</a></li>\r\n </ul>\r\n </div>\r\n </div>\r\n </nav>';\r\n }\r\n else //is G\r\n {\r\n $nav = '<nav class=\"navbar navbar-inverse navbar-fixed-top\">\r\n <div class=\"container\">\r\n <div class=\"navbar-header\">\r\n <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">\r\n <span class=\"sr-only\">Toggle navigation</span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n <span class=\"icon-bar\"></span>\r\n </button>\r\n <a class=\"navbar-brand\" href=\"main.php\" id=\"headerLanguage\">^Welcome To^ N.A.O</a>\r\n </div>\r\n <div id=\"navbar\" class=\"navbar-collapse collapse\">\r\n <ul class=\"nav navbar-nav navbar-right\">\r\n <li><a href=\"main.php\">^Home^</a></li>\r\n <li><a href=\"userContact.php\">^Messages (' . strval($amount) . ') ^</a></li>\r\n <li class=\"dropdown\">\r\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">^Go To Menu^<span class=\"caret\"></span></a>\r\n <ul class=\"dropdown-menu\" role=\"menu\">\r\n <li><a href=\"baptismMenu.php\">^Baptism^</a></li>\r\n <li><a href=\"communionMenu.php\">^Communion^</a></li>\r\n <li><a href=\"confirmationMenu.php\">^Confirmation^</a></li>\r\n <li><a href=\"marriageMenu.php\">^Marriage^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"defuntionMenu.php\">^Defuntion^</a></li>\r\n <li><a href=\"proofMenu.php\">^Proof^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"churchMenu.php\">^Church^</a></li>\r\n <li><a href=\"rectorMenu.php\">^Rector^</a></li>\r\n <li><a href=\"userMenu.php\">^User^</a></li>\r\n </ul>\r\n </li>\r\n <li class=\"dropdown\">\r\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\">^Insert New Registry^<span class=\"caret\"></span></a>\r\n <ul class=\"dropdown-menu\" role=\"menu\">\r\n <li><a href=\"baptismInsertion.php\">^Baptism^</a></li>\r\n <li><a href=\"communionInsertion.php\">^Communion^</a></li>\r\n <li><a href=\"confirmationInsertion.php\">^Confirmation^</a></li>\r\n <li><a href=\"marriageInsertion.php\">^Marriage^</a></li>\r\n <li class=\"divider\"></li>\r\n <li><a href=\"defuntionInsertion.php\">^Defuntion^</a></li>\r\n <li><a href=\"proofInsertion.php\">^Proof^</a></li>\r\n </ul>\r\n </li>\r\n <li><a href=\"config.php\">^Config^</a></li>\r\n <li><a href=\"#\" onclick=\"logout();\">^Logout^</a></li>\r\n </ul>\r\n </div>\r\n </div>\r\n </nav>';\r\n }\r\n\r\n return $nav;\r\n }", "public function generateNavi()\n {\n // Connect to the model\n $doors = new Door;\n $doors = $doors->get();\n\n $config = new Config;\n if(isset($_GET['userId']))\n {\n $userId = $_GET['userId'];\n }\n else\n {\n $userId = $config->defaultUser.';';\n }\n\n if(isset($_GET['doorId']))\n {\n $this->activeDoor = $_GET['doorId'];\n }\n else\n {\n $this->activeDoor = $config->defaultDoor;\n }\n foreach($doors as $door)\n {\n if($door->door_id == $this->activeDoor) { $active = \"active\"; } else { $active = \"\"; }\n echo '<a href=\"?doorId='.$door->door_id.'&userId='.$userId.'\"><div class=\"col-xs-4 naviEntry '.$active.'\">'.$door->door_name.'</div></a>';\n }\n }" ]
[ "0.77258295", "0.77258295", "0.77258295", "0.77258295", "0.77258295", "0.77258295", "0.7027807", "0.7024289", "0.7023488", "0.7023488", "0.7023199", "0.6821798", "0.67724943", "0.6675809", "0.66277003", "0.65984225", "0.6596611", "0.65319145", "0.65227485", "0.65160555", "0.6501519", "0.64761716", "0.647236", "0.6441912", "0.6423549", "0.64182425", "0.63893783", "0.6354879", "0.6309462", "0.6301222", "0.63003474", "0.6289757", "0.62865555", "0.6271457", "0.6265061", "0.6265048", "0.6216823", "0.62136215", "0.62044877", "0.6203618", "0.62027335", "0.6200743", "0.6198133", "0.61966556", "0.6175201", "0.6168216", "0.6167426", "0.6161377", "0.616071", "0.6159928", "0.6159872", "0.6147073", "0.61420405", "0.61309475", "0.6118552", "0.61125255", "0.6105478", "0.60986906", "0.60953605", "0.6084177", "0.6083669", "0.60836107", "0.6073838", "0.60590315", "0.60575265", "0.6052396", "0.6050289", "0.6049932", "0.60467106", "0.6045729", "0.60451484", "0.6025018", "0.60183614", "0.60181385", "0.6005799", "0.6003318", "0.5995958", "0.5988252", "0.5986427", "0.5985446", "0.5985318", "0.597717", "0.59719497", "0.5971252", "0.5969609", "0.59676594", "0.5966966", "0.5953428", "0.59496415", "0.594809", "0.5939827", "0.5937927", "0.593733", "0.5936921", "0.5935092", "0.5928859", "0.59239656", "0.5922645", "0.5920518", "0.5918306" ]
0.68105584
12
Returns the static model of the specified AR class.
public static function model($className = __CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($class = __CLASS__)\n\t{\n\t\treturn parent::model(get_called_class());\n\t}", "static public function model($className = __CLASS__)\r\n {\r\n return parent::model($className);\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return CActiveRecord::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className=__CLASS__)\n {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }", "public static function model($className = __CLASS__) {\n return parent::model($className);\n }" ]
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424" ]
0.0
-1
Busco pago y envio de la fecha
public function getPea($inicio, $fin) { $criteria = new CDbCriteria(); $p = -1; $e = -1; if ($this->GCCP_Id == 11) { $p = 30; //credito parley-king $e = 31; //debito parley-king if (isset($this->gCCA)) { if ($this->gCCA->GCCA_Tv == 'pos') { $p = '30,0'; $e = '31,1'; } } else { $p = '30,0'; $e = '31,1'; } } else if ($this->GCCP_Id == 12) { $p = 32; //credito recargas-king $e = 33; //debito recargas-king } else if ($this->GCCP_Id == 1) { $p = 0; $e = 1; } $criteria->select = "SUM( CASE WHEN (GCUA_Id in (" . $p . ") ) THEN GCCS_Monto ELSE 0 END) as Pagos, SUM( CASE WHEN (GCUA_Id in (" . $e . ") ) THEN GCCS_Monto ELSE 0 END) as Envios"; if (isset($this->GCCA_Id)) $criteria->condition = 'GCCA_Id = ' . $this->GCCA_Id . ' and GCCD_Id = ' . $this->GCCD_Id . ' and GCCS_Status =1 and GCCS_Currency = "' . $this->GCCE_Currency . '" and GCCS_Fecha BETWEEN "' . $inicio . '" AND "' . $fin . '"'; else if ($this->gCCD->GCCU_Id == 2 ) $criteria->condition = 'GCCD_Id = ' . $this->GCCD_Id . ' and GCCS_Status =1 and GCCS_Currency = "' . $this->GCCE_Currency . '" and GCCS_Fecha BETWEEN "' . $inicio . '" AND "' . $fin . '"'; else $criteria->condition = 'GCCA_Id is null and GCCD_Id = ' . $this->GCCD_Id . ' and GCCS_Status =1 and GCCS_Currency = "' . $this->GCCE_Currency . '" and GCCS_Fecha BETWEEN "' . $inicio . '" AND "' . $fin . '"'; return Gccs::model()->find($criteria); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}", "public function get_facturas(Request $request){\n $currentPage = $request->input('pagina_actual');\n $limit = $request->input('limit');\n\n $tipo=\"\";\n if (($request->exists('fecha_inicio')&&$request->exists('fecha_fin'))&&$request->input('fecha_inicio')!=null&&$request->input('fecha_fin')!=null) {\n //------------------------------ fecha inicio -----------------\n $fecha_inicio=explode('T', $request->input('fecha_inicio'));\n $fecha_inicio=(string)$fecha_inicio[0];\n //-------------------------------fecha fin ------------------ \n $fecha_fin=explode('T', $request->input('fecha_fin'));\n $fecha_fin=$fecha_fin[0];\n $tipo=\"por_fecha\";\n };\n if (($request->exists('fecha_inicio')&&$request->input('fecha_inicio')!=null)&&$request->exists('ordenarPor')&&$request->input('ordenarPor')!=null) {\n //------------------------------ fecha inicio -----------------\n $fecha_inicio=explode('T', $request->input('fecha_inicio'));\n $fecha_inicio=(string)$fecha_inicio[0];\n //-------------------------------fecha fin ------------------ \n $fecha_fin=explode('T', $request->input('fecha_fin'));\n $fecha_fin=$fecha_fin[0];\n $tipo=\"por_fecha_ordenar\";\n };\n if ($request->exists('filter')&&$request->input('filter')!=null) {\n $tipo=\"por_palabra\"; \n };\n if ((!$request->exists('fecha_inicio')&&$request->exists('ordenarPor'))&&$request->input('ordenarPor')!=null) {\n $tipo=\"por_filtro\"; \n };\n switch ($tipo) {\n case 'por_fecha':\n $resultado=$this->facturas->where('id_sucursal',$this->id_sucursal)\n ->where('fecha_emision','>=',$fecha_inicio)\n ->where('fecha_emision','<=',$fecha_fin)->get();\n break;\n case 'por_fecha_ordenar':\n $resultado=$this->facturas->where('id_sucursal',$this->id_sucursal)\n ->where('fecha_emision','>=',$fecha_inicio)\n ->where('fecha_emision','<=',$fecha_fin)\n ->orderBy($request->input('ordenarPor'),'DESC')->get();\n break;\n case 'por_palabra':\n $resultado = $this->facturas->search($request->input('filter'))->get();\n break;\n case 'por_filtro':\n $resultado=$this->facturas->where('id_sucursal',$this->id_sucursal)\n ->orderBy('fecha_emision','DESC')->get();\n break;\n default:\n $resultado=$this->facturas->where('id_sucursal',$this->id_sucursal)->orderBy('fecha_emision','DESC')->get();\n break;\n }\n\n foreach ($resultado as $key => $value) {\n $resultado[$key]['url']=config('global.appnext').'/public/xml?iddocumento='.$resultado[$key]['id_factura'].'&token='.$request->input('token');\n // $resultado[$key]['url']='http://servicios.nextbook.ec/public/xml?iddocumento='.$resultado[$key]['id_factura'].'&token='.$request->input('token');\n }\n\n $resultado=$this->cambiar_tipo_documento($resultado);\n $resultado=$this->funciones->paginarDatos($resultado,$currentPage,$limit);\n\n return response()->json(['respuesta' => $resultado], 200);\n }", "public function getDataPagamento()\n {\n return $this->dataPagamento ?? date('Y-m-d');\n }", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "function fecha($usuario, $password, $operador, $id, $folioCliente){\n $respuesta = checkOrder($usuario, $password, $operador, $id, $folioCliente);\n //$respuesta = checkOrder($usuario, $password, $operador, $id, $folioCliente);\n $Fecha = $respuesta['TopUpResult']['date'];\n //echo $Fecha;\n return $Fecha;\n}", "public function querypago(Request $request)\n {\n $factura = $request->get('numfac');\n $fecini = $request->get('fecini');\n $fecfin = $request->get('fecfin');\n $ident = $request->get('ident');\n $raw = \"\";\n if(($fecini!=\"\")&&($fecfin!=\"\"))\n $fecha = 2;\n if(($fecini!=\"\")&&($fecfin==\"\"))\n $fecha = 1;\n if(($fecini==\"\")&&($fecfin==\"\"))\n $fecha = 0;\n if($factura!=\"\")\n $raw = \"factura_cab.numfac = \".$factura;\n if($ident!=0){\n if($raw != \"\")\n $raw.=\" and \";\n $raw.=\" factura_cab.cod_ent = \".$ident;\n }\n\n if(($fecha==2)&&($raw!=\"\")){\n $listpago = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->join('tipo_pago','pagos.tipopago','=','tipo_pago.id')\n ->select('factura_cab.numfac as Factura','fecfac', 'fecpago','NOM_ENT','nomtipo','valpago','estfac')\n ->whereBetween('fecpago',[$fecini,$fecfin])\n ->whereRaw($raw)\n ->orderBy('factura_cab.numfac', 'desc')\n ->get();\n }\n if(($fecha==2)&&($raw==\"\")){\n $listpago = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->join('tipo_pago','pagos.tipopago','=','tipo_pago.id')\n ->select('factura_cab.numfac as Factura','fecfac as Fecha_Factura', 'fecpago as Fecha_Pago','NOM_ENT as Entidad','nomtipo as Tipo de Pago','valpago as Valor','estfac')\n ->whereBetween('fecpago',[$fecini,$fecfin])\n ->orderBy('factura_cab.numfac', 'desc')\n ->get();\n }\n if(($fecha==1)&&($raw!=\"\")){\n $listpago = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->join('tipo_pago','pagos.tipopago','=','tipo_pago.id')\n ->select('factura_cab.numfac as Factura','fecfac', 'fecpago','NOM_ENT','nomtipo','valpago','estfac')\n ->where('fecpago',$fecini)\n ->whereRaw($raw)\n ->orderBy('factura_cab.numfac', 'desc')\n ->get();\n }\n if(($fecha==1)&&($raw==\"\")){\n $listpago = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->join('tipo_pago','pagos.tipopago','=','tipo_pago.id')\n ->select('factura_cab.numfac as Factura','fecfac', 'fecpago','NOM_ENT','nomtipo','valpago','estfac')\n ->where('fecpago',$fecini)\n ->orderBy('factura_cab.numfac', 'desc')\n ->get();\n }\n if(($fecha==0)&&($raw!=\"\")){\n $listpago = Pago::join('factura_cab', 'factura_cab.numfac', '=', 'pagos.numfac')\n ->join('entidades','entidades.COD_ENT','=','factura_cab.cod_ent')\n ->join('tipo_pago','pagos.tipopago','=','tipo_pago.id')\n ->select('factura_cab.numfac as Factura','fecfac as Fecha_Factura', 'fecpago','NOM_ENT','nomtipo','valpago','estfac')\n ->whereRaw($raw)\n ->orderBy('factura_cab.numfac', 'desc')\n ->get();\n }\n \n //dd($listpago);\n if(($fecha==0)&&($raw==\"\")){\n return redirect()->back()->withInput()->withErrors('No realizó ningun filtro');\n }\n\n else{\n\n $numreg = count($listpago); \n $numreg ++;\n $rango = \"A1:G\".$numreg;\n\n Excel::create('Informe Pagos', function($excel) use ($listpago,$rango) {\n \n $excel->sheet('Pagos', function($sheet) use ($listpago,$rango) {\n \n //$products = Product::all();\n \n $sheet->fromArray($listpago);\n\n // Set black background\n $sheet->row(1, function($row) {\n\n // call cell manipulation methods\n $row->setBackground('#45A9E3');\n\n });\n\n // Set border for range\n $sheet->setBorder($rango, 'thin');\n\n $sheet->setAutoFilter();\n \n });\n })->export('xls');\n }\n\n }", "public function pagomesalum(Request $request)\n {\n $hoy = Carbon::now();\n $today = $hoy->format('Y-m-d');\n $mesactual = $hoy->format('m');\n\n //id del alumno\n $id = $request->id_alum;\n //sacamos informacion de nivel por el costo \n $infoa = Alumnos::where('id', $id)->first();\n $nivel = Nivel::find($infoa->nivel);\n $costoN = $nivel->costo;\n $Pagoinscripcion = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 1)->first();\n $Pagocolegiatura = Pagos::where('id_usuario', $infoa->id)->where('id_nivel', $infoa->nivel)->where('tipo', 2)->orderBy('id', 'desc')->first();\n $montoInscripcion = $Pagoinscripcion->monto;\n if ($Pagocolegiatura != null) {\n $montoColegiatura = $Pagocolegiatura->monto;\n $idPagoColegiatura = $Pagocolegiatura->id;\n $idEstatusp = $Pagocolegiatura->estatus;\n $ultimoM = $Pagocolegiatura->mes;\n } else {\n $montoColegiatura = null;\n $idPagoColegiatura = null;\n $idEstatusp = null;\n $ultimoM = null;\n }\n $idPagoInscripcion = $Pagoinscripcion->id;\n $primer_pago = Carbon::createFromFormat('d/m/Y', $nivel->finicio)->format('m');\n\n $ultimo_pago = Carbon::createFromFormat('d/m/Y', $nivel->ffin)->format('m');\n\n //calculando meses de nivel\n $start = date($nivel->finicio);\n $inicio = 'd/m/Y';\n\n $end = date($nivel->ffin);\n $fin = 'd/m/Y';\n\n $finicio = Carbon::createFromFormat($inicio, $start);\n $ffin = Carbon::createFromFormat($fin, $end);\n\n $meses = $finicio->diffInMonths($ffin) + 1;\n\n $CostoC = $meses * $costoN;\n // //sacamos registro del ultimo pago\n // $info = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',2)->orderBy('id','desc')->first();\n\n // // $info2 = Pagos::where('id_usuario',$id)->where('id_nivel',$nivel->id)->where('tipo',1)->orderBy('id','desc')->first();\n\n\n // if($info == null){\n // $numeroinf = 0;\n // }else{\n // $numeroinf = 1;\n // }\n\n // if($numeroinf != 0){\n // $mp = Carbon::parse($info->fecha_pago);\n // $mes_pago = $mp->format('m');\n // }\n\n\n //lo que el usuario teclea\n $abono = $request->pago;\n $inscripcionR = $request->debeinsc;\n // si el abono es igual ala colegiatura le pone estatus 1 si no 2\n // if($abono == $costoN){\n // $estatus = 1; \n // }else{\n // $estatus = 2;\n // }\n\n\n ///////////////////////////////////////////////////////// pago nuevo\n\n if ($inscripcionR == null) {\n } else {\n $this->inscripcionupdate($inscripcionR, $montoInscripcion, $idPagoInscripcion, $mesactual, $today, $id, $nivel->id);\n //si no se captura colegiatura\n }\n\n $this->abonoupdate($abono, $montoColegiatura, $idPagoColegiatura, $idEstatusp, $mesactual, $ultimoM, $today, $id, $nivel->id, $CostoC, $primer_pago, $ultimo_pago, $costoN);\n\n\n\n\n\n\n ///////////////////////////////////////////////////////// pago anterior\n // //pagar primer mes si solo pago inscripcion detecta si algun dato tipo colegiatura\n // if($numeroinf != 0){\n // // si cuando paga es el mismo mes\n // if($info->mes == $mesactual){\n // //y ya esta pagado crea registros de siguiente mes correspondiente\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }// si no esta pagado hace condiciones\n // else{ \n // ////////////////////////////////////////////// \n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back();\n // }\n // ///////////////////////////////////////\n // }// si no es del mismo mes crea la siguiente dependiente del mes\n // else{\n // if($mes_pago == $mesactual && $mes_pago != $info->mes){\n // if($info->estatus == 1){\n // //si abonado es igual actualiza a 1\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $info->mes+1,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a sts 1 y la diferencia crea registro del siguiente mes\n // if ($abono>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }else{//\n // //si el monto que tenia mas el abonado es igual actualiza a 1\n // if(($abono+$info->monto)==$costoN){\n\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es menor actualiza monto\n // if(($abono+$info->monto)<$costoN){\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'monto' => ($abono+$info->monto)));\n\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n // return back();\n // }else\n // // si el monto que tenia mas el abonado es mayor actualiza a 1 y la diferencia crea registro del siguiente mes\n // if (($abono+$info->monto)>$costoN) {\n // $pagoupdate = array_merge($request->all(),array(\n // 'fecha_pago' => $today,\n // 'estatus'=>1,\n // 'monto' => $costoN));\n // $pag = Pagos::find($info->id);\n // $pag->update($pagoupdate);\n\n // $faltante = $costoN - $info->monto;\n // $abonado2 = $abono - $faltante;\n // if(is_int($abonado2/$costoN) == true){\n // $mesesApagar = $abonado2/$costoN;\n // $meses_corridos = $info->mes + 1;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abonado2/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n // //si abonado 2 es menor ala colegitura solo se agrega el reg del lo restante si no agrega registros de meses +\n // if($abonado2<$costoN){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $abonado2,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info->id_usuario,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info->mes+$i+1,\n // 'tipo' => 2]); \n // }\n // }\n // }\n\n // }\n // }\n // return back(); \n // }//\n\n // }else{\n // //pago mes normal correspondiente\n // Pagos::create(\n // ['id_usuario' => $id,\n // 'id_nivel' => $info->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $hoy->format('m'),\n // 'tipo' => 2]);\n // return back();\n // }\n // }\n // }else{\n // //si no crea registro del primer mes de colegiatura\n // //si el curso ya empezo y paga un mes despues o dependiendo guarda el mes que entra\n // if($primer_pago >= $mesactual){\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $primer_pago,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abono%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+($numeroMeses-1),\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n\n // }else{\n // if(($abono)==$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si el abono es menor crea con estatus 2\n // if(($abono)<$costoN){\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => $estatus,\n // 'monto' => $abono,\n // 'mes' => $mesactual,\n // 'tipo' => 2]);\n // return back();\n // }else\n // // si abono es mayor crea a 1 y la diferencia crea registro del siguiente mes\n // if (($abono)>$costoN) {\n\n // if(is_int($abono/$costoN) == true){\n // $mesesApagar = $abono/$costoN;\n // $meses_corridos = $info2->mes;\n // for ($i=0; $i < $mesesApagar ; $i++) { \n // $aux = 0;\n\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $meses_corridos + $i,\n // 'tipo' => 2]);\n // $aux++;\n // }\n // }else{\n\n // $mesesApagarC= explode(\".\", $abono/$costoN);\n // $numeroMeses = $mesesApagarC[0]+1;\n\n // for ($i=0; $i < $numeroMeses; $i++) { \n // if($i == ($numeroMeses-1)){\n // $residuo = $abonado2%$costoN;\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 2,\n // 'monto' => $residuo,\n // 'mes' => $info2->mes+$numeroMeses,\n // 'tipo' => 2]);\n // }else{\n // Pagos::create(\n // ['id_usuario' => $info2->id_usuario,\n // 'id_nivel' => $info2->id_nivel,\n // 'fecha_pago' => $today,\n // 'estatus' => 1,\n // 'monto' => 500,\n // 'mes' => $info2->mes+$i,\n // 'tipo' => 2]); \n // }\n // }\n // }\n // }\n // return back();\n // }\n // }\n ////////////////////////////////////////////////// fin pago anterior\n }", "public function listado(Request $request)\n {\n Carbon::setLocale('es');\n setlocale(LC_TIME, config('app.locale'));\n //si el submit button es el que tiene \"value\"='pdf' \n //es decir, si quiero exportar a pdf\n if($request->get('aceptar') == 'pdf'){\n //seteamos el médico y la fecha para buscar los turnos\n $request->get('medico_id_sel')? $medico = Medico::findOrFail($request->get('medico_id_sel')) : $medico = Medico::first();\n $request->get('fecha')? $fecha = Carbon::createFromFormat('d-m-Y', $request->get('fecha')) : $fecha = new Carbon();\n\n //buscamos los turnos correspondientes al médico y fecha dados (o todos)\n if($request->get('medico_id_sel') != 0){\n $turnos = Turno::where('medico_id', '=', $medico->id)->whereIn('paciente_id', function($query){\n $query->select(DB::raw('id'))\n ->from('pacientes')\n ->whereRaw('pacientes.confirmado = 1');\n })->whereDate('fecha', '=', $fecha->startOfDay())->orderBy('hora')->get();\n }else{\n $turnos = Turno::whereIn('paciente_id', function($query){\n $query->select(DB::raw('id'))\n ->from('pacientes')\n ->whereRaw('pacientes.confirmado = 1');\n })->whereDate('fecha', '=', $fecha->startOfDay())->orderBy('hora')->get();\n }\n\n //preparamos el pdf con una vista separada (para evitar errores de markup validation)\n $pdf = \\PDF::loadView('pdf.listado_turnos', ['medico' => $medico, 'turnos' => $turnos, 'fecha' => $fecha, 'medico_id' => $request->get('medico_id_sel')]);\n\n //iniciamos la descarga\n return $pdf->download('listado_turnos.pdf');\n //si el submit button es el que tiene el \"value\"='buscar'\n }else{\n //preparamos los médico en formato arreglo para el dropdown en la vista\n $medicos = Medico::select('id', DB::raw('concat(apellido, \", \", nombre) as apellido'))->orderBy('apellido')->lists('apellido', 'id')->prepend('--Todos--', '0');\n\n //seteamos el medico_id y la fecha según los inputs e la vista o con valores por defecto\n $request->get('medico_id_sel')? $medico_id = $request->get('medico_id_sel') : $medico_id = 0;\n $request->get('fecha')? $fecha = Carbon::createFromFormat('d-m-Y', $request->get('fecha')) : $fecha = new Carbon();\n\n\n //buscamos los turnos correspondientes al médico y fecha dados (o todos)\n if($request->get('medico_id_sel') != 0){\n $turnos = Turno::with('paciente')->with('especialidad')->with('medico')->where('medico_id', '=', $medico_id)->whereIn('paciente_id', function($query){\n $query->select(DB::raw('id'))\n ->from('pacientes')\n ->whereRaw('pacientes.confirmado = 1');\n })->whereDate('fecha', '=', $fecha->startOfDay())->orderBy('hora')->get();\n }else{\n $turnos = Turno::with('paciente')->with('especialidad')->with('medico')->whereIn('paciente_id', function($query){\n $query->select(DB::raw('id'))\n ->from('pacientes')\n ->whereRaw('pacientes.confirmado = 1');\n })->whereDate('fecha', '=', $fecha->startOfDay())->orderBy('hora')->get(); \n }\n\n return view('turnos.listado', ['medicos' => $medicos, 'turnos' => $turnos, 'medico_id' => $medico_id, 'fecha' => $fecha]);\n }\n }", "public function pagos(Request $request){\n /* Creating a query to the database, but not executing it. */\n $pagos = PensionFondoPago::where('fondo_id','=',$this->id);\n if($request->fechaIni != '')\n /* Adding a filter to the query. */\n $pagos = $pagos->whereBetween('fecha_movimiento', [$request->fechaIni, $request->fechaFin]);\n /* Adding a filter to the query, and then executing it. */\n $pagos = $pagos->orderBy('fecha_movimiento','desc')->paginate(10);\n return $pagos;\n }", "public function lista_busca_registros_fecha($fecha_inicial, $fecha_final){\n\n $conectar= parent::conexion();\n\n \n $date_inicial = $_POST[\"fecha_inicial\"];\n $date = str_replace('/', '-', $date_inicial);\n $fecha_inicial = date(\"Y-m-d\", strtotime($date));\n \n $date_final = $_POST[\"fecha_final\"];\n $date = str_replace('/', '-', $date_final);\n $fecha_final = date(\"Y-m-d\", strtotime($date));\n\n \n \n $sql= \"SELECT * FROM compras WHERE fecha_compra>=? and fecha_compra<=? \";\n\n\n\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->bindValue(2,$fecha_final);\n $sql->execute();\n return $result = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n }", "function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new FacturaVenta();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode('|', $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode('|', $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (!isset($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}", "public function cadastrar() \n{\n //DEFINIR A DATA\n $this->data = date(\"Y:m:d H:i:s\");\n \n //INSERIR A VAGA NO BANCO\n\n //ATRIBUIR O ID NA VAGA DA INSTANCIA\n\n //RETORNAR SUCESSO\n\n}", "public function trie_par_date($date_ajout){\n $marque_page = [];\n if($date_ajout==0){\n $query = $this->db->prepare('SELECT date_a, date_m, description, id_utilisateur, note, somme, logo_choisi, id_marque_page, titre, url, createur FROM ajoute_modifie, marque_page WHERE id_marque_page = id AND createur=1 ORDER BY date_a DESC');\n }else{\n $query = $this->db->prepare('SELECT date_a, date_m, description, id_utilisateur, note, somme, logo_choisi, id_marque_page, titre, url, createur FROM ajoute_modifie, marque_page WHERE id_marque_page = id AND createur=1 AND date_a >= ( CURDATE() - INTERVAL '.$date_ajout.' DAY ) ORDER BY date_a DESC');\n }\n $query->execute();\n\n while ($donnees = $query->fetch(PDO::FETCH_ASSOC)){\n $marque_page[] = $donnees;\n }\n return $marque_page;\n }", "public function get_datos_ventas_cargo($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from corte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_pago='Cargo Automatico' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function get_recibos_contado($mes_recibo,$ano_recibo){\n $conectar=parent::conexion();\n parent::set_names();\n\n $mes=$_POST[\"mes_recibo\"];\n $ano=$_POST[\"ano_recibo\"]; \n $fecha= ($ano.\"-\".$mes.\"%\");\n\n if($mes=='todos'){\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where v.tipo_venta='Contado';\";\n $sql=$conectar->prepare($sql); \n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n }else{\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where fecha like ? and v.tipo_venta='Contado';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha); \n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}\n}", "public function porPeriodo(Request $request, String $fechaIni, $fechaFin, $estados)\n {\n $jwtAth = new JwtAuth();\n $token = $request->header('Authorization', null);\n $checkToken = $jwtAth->checkToken($token);\n if ($checkToken) {\n\n $explodedEstados = explode(\",\", $estados);\n $arrayNumberEstados = array();\n foreach ($explodedEstados as $ex) {\n array_push($arrayNumberEstados, intval($ex));\n }\n\n $facturas = DB::select(\"select id_cliente,cliente,ciudad_cliente,estado_cliente,calle,codigo_postal,count(id_cliente) as total_facturas from \n (SELECT ai.number as factura_id, rp.id as id_cliente, rp.name as cliente, ai.city as ciudad_cliente, rcs.name as estado_cliente,rp.street as calle, rp.zip as codigo_postal \n FROM account_invoice ai \n INNER JOIN res_partner rp \n ON ai.partner_id = rp.id \n INNER JOIN res_country_state rcs \n ON rp.state_id = rcs.id \n INNER JOIN account_invoice_line ail \n ON ail.invoice_id = ai.id \n INNER JOIN product_product pp \n ON ail.product_id = pp.id \n where ai.create_date >= :fechaIni \n and ai.create_date <= :fechaFin \n and ai.type = 'out_invoice' \n and ai.number is not null \n \".($estados==='TODOS'?'':'and rcs.id in('.implode(',',$arrayNumberEstados).') ').\" \n group by ai.number, rp.id,rp.name,ai.city,rcs.name,rp.street,rp.zip) as facturas \n group by id_cliente, cliente,ciudad_cliente,estado_cliente,calle,codigo_postal \n ORDER BY cliente ASC\", ['fechaIni' => date(\"Y-m-d\", strtotime($fechaIni)),'fechaFin' => date(\"Y-m-d\", strtotime($fechaFin))]);\n \n return $facturas;\n } else {\n return \"usuario NO autenticado\";\n }\n }", "public function modificarFechaVista() /// modifica fecha a dia mes año\n\t{\n\t\t$fecha = $_GET['fecha'];\n\t\t$fecha = strtotime($fecha);\n\t\t$nuevafecha = date('d-m-Y', $fecha);\n\t\treturn response()->json($nuevafecha);\n\t}", "public function progresoventaAction(){\r\n //$fecha= $request->get('fecha');\r\n //$empleados=$this->verificarComision(null,$fecha);\r\n return array(\r\n //'empleados' => $empleados,\r\n //'fecha' => $fecha,\r\n );\r\n }", "function procesar_cambio ($datos){\n //validamos que no exista otro periodo, para ello tomamos la fecha actual y obtenemos todos los periodo \n //que existen con sus respectivos dias y verificamos que el espacio que se quiere cargar no este ocupado en esos \n //dias\n \n }", "public function datosNomina(Request $request)\n\t{\n\t\t$semana = $request->input(\"semana\");\n\t\t$year = $request->input(\"year\"); //en ingles para no sonar obsceno\n\n\t\t//Obtener la fecha en la que inicia y termina la semana seleccionada\n\t\t$fecha1 = new DateTime();\n\t\t$fecha1->setISODate($year,$semana,1);\n\t\t$fecha1 = $fecha1->format('Y-m-d');\n\n\t\t$fecha2 = new DateTime();\n\t\t$fecha2->setISODate($year,$semana,7);\n\t\t$fecha2 = $fecha2->format('Y-m-d');\n\n\t\t//declarar el query en formato SQL para cada uno de los parametros, como un string\n\t\t//el string siguiente seria \"fecha BETWEEN CAST('{fecha1}' AS DATE) AND CAST('{fecha2}' AS DATE)\"\n\t\t$queryFechas = \"fecha BETWEEN CAST('\" . $fecha1 . \"' AS DATE) AND CAST('\" . $fecha2 . \"' AS DATE)\";\n\n\t\t$checadas = Checada::whereRaw($queryFechas)->get();\n\t\t$empleados = Empleado::where('contratable',true)->get();\n\t\t$clientes = Cliente::all();\n\t\t$turnos = Turno::all();\n\t\t$comedores = Comedor::where('semana',$semana)->get();\n\t\t$descuentos = Descuento::where('semana',$semana)->get();\n\t\t$reembolsos = Reembolso::where('semana',$semana)->get();\n\t\t$tipo_descuento = TipoDescuento::all();\n \n// $checadas = array();\n// foreach(Checada::whereRaw($queryFechas)->paginate(10) as $checada){\n// $empleado = Empleado::find($checada->idEmpleado);\n// $cliente = Cliente::find($checada->idCliente);\n// $turno = Turno::find($checada->idTurno);\n// $comedores = Comedor::where('fecha',$checada->fecha)->where('idEmpleado',$checada->idEmpleado)->get();\n// $descuentos = Descuento::where('fecha',$checada->fecha)->where('empleado',$checada->idEmpleado)->get();\n// $reembolsos = Reembolso::where('fecha',$checada->fecha)->where('empleado',$checada->idEmpleado)->get();\n// $ch = [\n// 'fecha' => $checada->fecha,\n// 'idEmpleado' => $checada->idEmpleado,\n// 'ap_paterno' => $empleado->ap_paterno,\n// 'ap_materno' => $empleado->ap_materno,\n// 'nombres' => $empleado->nombres,\n// 'no_cuenta' => $empleado->no_cuenta,\n// 'cliente' => $cliente->nombre,\n// 'horas_ordinarias' => $checada->horas_ordinarias,\n// 'horas_extra' =>$checada->horas_extra,\n// ];\n// array_push($checadas,$checada);\n// }\n\n\t\treturn view('nomina/resultados')->with('checadas',$checadas)->with('empleados',$empleados)->with('clientes',$clientes)->with('turnos',$turnos)->with('comedores',$comedores)->with('descuentos',$descuentos)->with('reembolsos',$reembolsos)->with('tipo_descuentos',$tipo_descuento)->with('fecha1',$fecha1)->with('fecha2',$fecha2)->with('semana',$semana);\n\t}", "public function pendientePago(Request $request){\n if($request->isMethod('post')){\n $reglaDatos = array(\n 'id' => 'required',\n 'motoristaid' => 'required'\n );\n\n $mensajeDatos = array(\n 'id.required' => 'El id revisador es requerido.',\n 'motoristaid.required' => 'El motorista id es requerido.'\n );\n\n $validarDatos = Validator::make($request->all(), $reglaDatos, $mensajeDatos );\n\n if($validarDatos->fails())\n {\n return [\n 'success' => 0,\n 'message' => $validarDatos->errors()->all()\n ];\n }\n\n if(Revisador::where('id', $request->id)->first()){\n\n // estas ordenes ya fueron revisadas\n $noquiero = DB::table('ordenes_revisadas')->get();\n\n $pilaOrden = array();\n foreach($noquiero as $p){\n array_push($pilaOrden, $p->ordenes_id);\n }\n\n $orden = DB::table('motorista_ordenes AS mo')\n ->join('ordenes AS o', 'o.id', '=', 'mo.ordenes_id')\n ->select('o.id', 'mo.motoristas_id', 'o.precio_total', 'o.precio_envio', 'o.fecha_5',\n 'o.servicios_id', 'o.estado_8', 'o.fecha_7', 'o.pago_a_propi', 'o.tipo_pago')\n ->where('mo.motoristas_id', $request->motoristaid)\n ->where('o.estado_6', 1) // ordenes que motorista inicio la entrega\n ->where('o.estado_8', 0) // no canceladas\n ->whereNotIn('o.id', $pilaOrden) // filtro para no ver ordenes revisadas\n ->get();\n\n $dinero = 0;\n foreach($orden as $o){\n\n if($o->fecha_7 == null){\n $o->fecha_orden = \"Sin completar aun\";\n }else{\n $o->fecha_orden = date(\"h:i A d-m-Y\", strtotime($o->fecha_7));\n }\n\n\n // Obtener lo que se pagara a PROPIETARIO\n\n $data = Servicios::where('id', $o->servicios_id)->first();\n\n $comision = ($o->precio_total * $data->comision) / 100;\n $o->comision = $data->comision;\n\n $propi = $o->precio_total - $comision;\n\n // OBTENER LO QUE SE COBRO AL CLIENTE\n\n $cliente = $o->precio_total + $o->precio_envio;\n\n // credi puntos\n if($o->tipo_pago == 1){\n $cliente = 0;\n }\n\n // RESTAR PARA OBTENER LA DIFERENCIA\n $dinero = $dinero + ($cliente - $propi);\n\n $cliente = number_format((float)$cliente, 2, '.', '');\n $o->cliente = $cliente;\n }\n\n // sumar ganancia de esta fecha\n $totalcobro = number_format((float)$dinero, 2, '.', '');\n\n\n return ['success' => 1, 'orden' => $orden, 'debe' => $totalcobro];\n }\n }\n }", "public function generar_link_pago()\n {\n\n $items = array();\n $ids = '';\n if (Input::get('id'))\n {\n $pago = Pago::find(Input::get('id'));\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $pago->id;\n array_push($items, $item);\n }\n else\n {\n $pagos = Auth::user()->userable->pagos->filter(function($pago) {\n return $pago->pagado == false;\n });\n\n foreach ($pagos as $pago) {\n\n $item = array(\n \"title\" => $pago->nombre,\n \"description\" => $pago->descripcion,\n \"quantity\" => 1,\n \"currency_id\" => \"MEX\",\n \"unit_price\" => doubleval($pago->monto)\n );\n $ids = $ids . $pago->id . \"-\";\n array_push($items, $item);\n }\n }\n\n if (Config::get('params.prueba_pago'))\n {\n $referer = Url::route('obtener_pago_prueba');\n }\n else\n {\n $referer = Request::header('referer');\n }\n\n $preference_data = array(\n \"items\" => $items,\n \"payer\" => array(\n \"name\" => Auth::user()->userable->nombre,\n \"email\" => Auth::user()->email,\n ),\n \"back_urls\" => array(\n \"success\" => $referer,\n \"failure\" => $referer,\n \"pending\" => $referer,\n ),\n \"external_reference\" => $ids,\n );\n\n $preference = $this->checkout->generar_preferencia($preference_data);\n if (isset($preference))\n {\n $link = $preference['response'][Config::get('payment.init_point')];\n return Redirect::away($link);\n }\n else\n {\n Session::flash('error', 'Ocurrio un error al tratar de generar el pago.');\n return Redirect::back();\n }\n }", "public function progresoventaajaxAction(Request $request)\r\n {\r\n $fecha= $request->get('fecha');\r\n \r\n $time = new \\DateTime('01-'.$fecha);\r\n \r\n $timestamp = $time->getTimestamp(); // Unix timestamp\r\n \r\n //var_dump($timestamp);\r\n \r\n $fecha = $time->format('Y-m'); // 2003-10-16\r\n \r\n //var_dump($time);\r\n //$fecha = date('Y-m',$time);\r\n //var_dump($fecha);\r\n $empleados=$this->verificarComision(null,$fecha);\r\n \r\n //var_dump($empleados);\r\n \r\n return array(\r\n 'empleados' => $empleados,\r\n 'fecha' => $fecha,\r\n );\r\n }", "public function cambioEstado($servicios) {\n $hoy = getdate();\n $fecha = $hoy['year'] . '-' . $hoy['mon'] . '-' . $hoy['mday'] . ' ' . $hoy['hours'] . ':' . $hoy['minutes'] . ':' . $hoy['seconds'];\n $fecha = strtotime($fecha);\n $servicios_por_recoger = collect([]);\n if (count($servicios) > 0) {\n foreach ($servicios as $item) {\n $fecha_servicio = strtotime($item->fechafin);\n if ($fecha >= $fecha_servicio) {\n if ($item->estado == 'ENTREGADO') {\n $item->estado = \"RECOGER\";\n $item->save();\n }\n\n $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n $operacion = $horas / 24;\n $dia = floor($operacion);\n $operacion = ($operacion - $dia) * 24;\n $horas = floor($operacion);\n $operacion = ($operacion - $horas) * 60;\n $minutos = floor($operacion);\n $str = '';\n if ($dia > 0) {\n $str = '<strong>' . $dia . '</strong> Dia(s) </br>';\n }\n\n if ($horas > 0) {\n $str .= '<strong>' . $horas . '</strong> Hora(s)</br>';\n }\n if ($minutos > 0) {\n $str .= '<strong>' . $minutos . '</strong> Minuto(s)</br>';\n }\n\n $item->tiempo = $str;\n\n $servicios_por_recoger[] = $item;\n } elseif ($item->estado == \"RECOGER\") {\n// $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n// $minutos = '0.' . explode(\".\", $horas)[1];\n// $horas = floor($horas);\n// $minutos = floor($minutos * 60);\n $item->tiempo = \"Tiene permiso para recoger antes de tiempo\";\n $servicios_por_recoger[] = $item;\n }\n }\n }\n return $servicios_por_recoger;\n }", "public function get_recibos_print($mes_recibo,$ano_recibo,$empresa_recibo){\n $conectar=parent::conexion();\n parent::set_names();\n\n $mes=$_POST[\"mes_recibo\"];\n $ano=$_POST[\"ano_recibo\"]; \n $fecha= ($ano.\"-\".$mes.\"%\");\n\n $sql=\"select r.fecha,r.numero_recibo,r.numero_venta,r.abono_act,r.paciente,r.empresa,r.id_recibo,v.tipo_pago from ventas as v inner join recibos as r on v.numero_venta=r.numero_venta where fecha like ? and r.empresa=? AND v.tipo_pago='Descuento en Planilla';\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->bindValue(2,$empresa_recibo);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function mostrarTablaVerPagoServicios(){\n\n $inicio = $_GET[\"inicio\"]; \n $fin = $_GET[\"fin\"];\n\n $pagoservicios = ControladorServicios::ctrVerPagoServicios($inicio,$fin);\t\n if(count($pagoservicios)>0){\n\n $datosJson = '{\n \"data\": [';\n\n\n for($i = 0; $i < count($pagoservicios); $i++){\n //convirtiendo fecha datetime a date por cadena\n $fecha=substr($pagoservicios[$i][\"fecha\"],0,10);\n\n if($pagoservicios[$i][\"t1\"] == '0'){\n $t1 = '';\n }else{\n $t1 = $pagoservicios[$i][\"t1\"];\n } \n\n if($pagoservicios[$i][\"t2\"] == '0'){\n $t2 = '';\n }else{\n $t2 = $pagoservicios[$i][\"t2\"];\n } \n\n if($pagoservicios[$i][\"t3\"] == '0'){\n $t3 = '';\n }else{\n $t3 = $pagoservicios[$i][\"t3\"];\n } \n\n if($pagoservicios[$i][\"t4\"] == '0'){\n $t4 = '';\n }else{\n $t4 = $pagoservicios[$i][\"t4\"];\n } \n\n if($pagoservicios[$i][\"t5\"] == '0'){\n $t5 = '';\n }else{\n $t5 = $pagoservicios[$i][\"t5\"];\n } \n\n if($pagoservicios[$i][\"t6\"] == '0'){\n $t6 = '';\n }else{\n $t6 = $pagoservicios[$i][\"t6\"];\n } \n\n if($pagoservicios[$i][\"t7\"] == '0'){\n $t7 = '';\n }else{\n $t7 = $pagoservicios[$i][\"t7\"];\n } \n\n if($pagoservicios[$i][\"t8\"] == '0'){\n $t8 = '';\n }else{\n $t8 = $pagoservicios[$i][\"t8\"];\n } \n \n $datosJson .= '[\n \"'.$pagoservicios[$i][\"cod_sector\"].\" - \".$pagoservicios[$i][\"nom_sector\"].'\",\n \"'.$pagoservicios[$i][\"guia\"].'\",\n \"'.$fecha.'\",\n \"'.$pagoservicios[$i][\"codigo\"].'\",\n \"'.$pagoservicios[$i][\"modelo\"].'\",\n \"'.$pagoservicios[$i][\"nombre\"].'\",\n \"'.$pagoservicios[$i][\"cod_color\"].'\",\n \"'.$pagoservicios[$i][\"color\"].'\",\n \"'.$t1.'\",\n \"'.$t2.'\",\n \"'.$t3.'\",\n \"'.$t4.'\",\n \"'.$t5.'\",\n \"'.$t6.'\",\n \"'.$t7.'\",\n \"'.$t8.'\",\n \"'.$pagoservicios[$i][\"total_docenas\"].'\",\n \"'.$pagoservicios[$i][\"precio_doc\"].'\",\n \"'.$pagoservicios[$i][\"total_soles\"].'\"\n ],'; \n }\n\n $datosJson=substr($datosJson, 0, -1);\n\n $datosJson .= '] \n\n }';\n\n echo $datosJson;\n }else{\n\n echo '{\n \"data\":[]\n }';\n return;\n\n }\n }", "function primer_dia_periodo_anio($anio) {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where anio=\".$anio;\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n }", "public function getPaginas($OficialiaDto, $param, $estado) {\n $inicia = false;\n $orden = \" \";\n $campos = \" a.cveAdscripcion, a.desAdscripcion, o.cveOficialia, o.desOficilia, o.cveDistrito, d.desDistrito, o.cveMunicipio, m.desMunicipio, e.cveEstado, e.desEstado \";\n $orden .= \" o inner join tbladscripciones a on a.cveAdscripcion = o.cveAdscripcion \";\n $orden .= \" left join tblmunicipios m on m.cveMunicipio = o.cveMunicipio \";\n $orden .= \" left join tbldistritos d on d.cveDistrito = o.cveDistrito \";\n $orden .= \" left join tblestados e on e.cveEstado = d.cveEstado AND e.cveEstado = m.cveMunicipio \";\n $orden .= \" where a.activo = 'S' \";\n $orden .= \" AND o.activo = 'S' \";\n if ($estado != \"\")\n $orden .= \" AND e.cveEstado = \" . $estado . \" \";\n if ($OficialiaDto->getCveMunicipio() != \"\")\n $orden .= \" AND o.cveMunicipio = \" . $OficialiaDto->getCveMunicipio() . \" \";\n if ($OficialiaDto->getCveDistrito() != \"\")\n $orden .= \" AND o.cveDistrito = \" . $OficialiaDto->getCveDistrito() . \" \";\n if ($OficialiaDto->getDesOficilia() != \"\")\n $orden .= \" AND o.desOficilia like '%\" . $OficialiaDto->getDesOficilia() . \"%' \";\n $OficialiaDao = new OficialiaDAO();\n $param[\"paginacion\"] = false;\n $oficialia = new OficialiaDTO();\n $numTot = $OficialiaDao->selectOficialia($oficialia, $orden, null, null, \" count(o.cveOficialia) as totalCount \");\n $Pages = (int) $numTot[0]['totalCount'] / $param[\"cantxPag\"];\n $restoPages = $numTot[0]['totalCount'] % $param[\"cantxPag\"];\n $totPages = $Pages + (($restoPages > 0) ? 1 : 0);\n\n $json = \"\";\n $json .= '{\"type\":\"OK\",';\n $json .= '\"totalCount\":\"' . $numTot[0]['totalCount'] . '\",';\n $json .= '\"data\":[';\n $x = 1;\n\n if ($totPages >= 1) {\n for ($index = 1; $index <= $totPages; $index++) {\n\n $json .= \"{\";\n $json .= '\"pagina\":' . json_encode(utf8_encode($index)) . \"\";\n $json .= \"}\";\n $x++;\n if ($x <= ($totPages )) {\n $json .= \",\";\n }\n }\n $json .= \"],\";\n $json .= '\"pagina\":{\"total\":\"\"},';\n $json .= '\"total\":\"' . ($index - 1) . '\"';\n $json .= \"}\";\n } else {\n $json .= \"]}\";\n }\n return $json;\n }", "public function buscar(Request $param){ \n $query = Pagorecibido::OrderBy('idPagoRecibido','ASC'); // Ordenamos los pagos por este medio\n\n if (isset($param->idPagoRecibido)){\n $query->where(\"pagorecibido.idPagoRecibido\",$param->idPagoRecibido);\n }\n\n if (isset($param->idTrabajo)){\n $query->where(\"pagorecibido.idTrabajo\",$param->idTrabajo);\n }\n\n if (isset($param->idPago)){\n $query->where(\"pagorecibido.idPago\",$param->idPago);\n }\n\n if (isset($param->monto)){\n $query->where(\"pagorecibido.monto\",$param->monto);\n }\n\n if (isset($param->metodo)){\n $query->where(\"pagorecibido.metodo\",$param->metodo);\n }\n\n if (isset($param->tarjeta)){\n $query->where(\"pagorecibido.tarjeta\",$param->tarjeta);\n }\n\n if (isset($param->fechapago)){\n $query->where(\"pagorecibido.fechapago\",$param->fechapago);\n }\n\n if (isset($param->fechaaprobado)){\n $query->where(\"pagorecibido.fechaaprobado\",$param->fechaaprobado);\n }\n\n if (isset($param->eliminado)){\n $query->where(\"pagorecibido.eliminado\",$param->eliminado);\n }\n\n $listaPagos= $query->get(); // Hacemos el get y seteamos en lista\n return json_encode($listaPagos);\n }", "function getCuentaMovimiento (Request $request, $Cuenta_id) {\n $page = $request->input('page');\n if ($page) {\n $cuenta_pagos = cuenta_pagos::where('cuenta_id','=', $Cuenta_id)\n ->orderBy('fecha_pago','desc')\n ->paginate(8);\n } else {\n $cuenta_pagos = cuenta_pagos::where('cuenta_id','=', $Cuenta_id)\n ->orderBy('fecha_pago','desc')\n ->get();\n }\n return $cuenta_pagos;\n }", "public function paginar_get(){\n\n $this->load->helper('paginacion');\n\n $pagina = $cliente_id = $this->uri->segment(3); // parametro #3\n $por_pagina = $cliente_id = $this->uri->segment(4); // parametro #4\n\n $campos = array('id','nombre','telefono1'); // campos de la tabla\n\n $respuesta = paginar_todo( 'clientes', $pagina, $por_pagina, $campos ); // helper\n $this->response( $respuesta ); // imprime el resultado de lo que se obtuvo\n }", "public function pendienteEncargoPago(Request $request){\n if($request->isMethod('post')){\n $reglaDatos = array(\n 'id' => 'required',\n 'motoristaid' => 'required'\n );\n\n $mensajeDatos = array(\n 'id.required' => 'El id revisador es requerido.',\n 'motoristaid.required' => 'El motorista id es requerido.'\n );\n\n $validarDatos = Validator::make($request->all(), $reglaDatos, $mensajeDatos );\n\n if($validarDatos->fails())\n {\n return [\n 'success' => 0,\n 'message' => $validarDatos->errors()->all()\n ];\n }\n\n\n if(Revisador::where('id', $request->id)->first()){\n\n // estas ordenes ya fueron revisadas\n $noquiero = DB::table('ordenes_encargo_revisadas')->get();\n\n $pilaOrden = array();\n foreach($noquiero as $p){\n array_push($pilaOrden, $p->ordenes_encargo_id);\n }\n\n $orden = DB::table('motorista_ordenes_encargo AS mo')\n ->join('ordenes_encargo AS o', 'o.id', '=', 'mo.ordenes_encargo_id')\n ->select('o.id', 'o.fecha_3', 'mo.motoristas_id', 'o.precio_subtotal',\n 'o.precio_envio', 'o.pago_a_propi', 'o.estado_3', 'o.tipo_pago')\n ->where('mo.motoristas_id', $request->motoristaid)\n ->where('o.estado_2', 1) // ordenes que motorista inicio la entrega\n ->whereNotIn('o.id', $pilaOrden) // filtro para no ver ordenes encargo revisadas\n ->get();\n\n $totalcobro = 0;\n\n foreach($orden as $o){\n\n $fecha3 = \"\";\n if($o->estado_3 == 0){\n $fecha3 = \"Encargo no completado\";\n }else{\n $fecha3 = date(\"h:i A d-m-Y\", strtotime($o->fecha_3)); // fecha completo la orden\n }\n $o->fecha_3 = $fecha3;\n\n $pagoa = \"\";\n\n if($o->pago_a_propi == 1){\n\n $pagoa = \"Pago a propietario: $\" . $o->precio_subtotal;\n\n if($o->tipo_pago == 0){\n $info = -$o->precio_subtotal + ($o->precio_subtotal + $o->precio_envio);\n $totalcobro = $totalcobro + $info;\n $o->precio_total = number_format((float)$info, 2, '.', '');\n }else{\n // CREDI PUNTOS\n $totalcobro = $totalcobro - $o->precio_subtotal;\n\n $o->precio_total = number_format((float)0, 2, '.', '');\n }\n\n }else{\n // no se le paga a servicio\n\n $cobro = $o->precio_subtotal + $o->precio_envio;\n $o->precio_total = number_format((float)$cobro, 2, '.', '');\n\n if($o->tipo_pago == 0){\n $totalcobro = $totalcobro + $cobro;\n } else{\n $totalcobro = $totalcobro + 0;\n }\n }\n\n $o->pagoa = $pagoa;\n\n }\n\n // sumar ganancia de esta fecha\n $totalcobro = number_format((float)$totalcobro, 2, '.', '');\n\n return ['success' => 1, 'orden' => $orden, 'debe' => $totalcobro];\n }\n }\n }", "function objetivos_mes(){\r\n \r\n $data['sistema'] = $this->sistema;\r\n \r\n $dia = $this->input->post(\"dia\"); \r\n $mes = $this->input->post(\"mes\"); \r\n $anio = $this->input->post(\"anio\");\r\n \r\n $fecha = date(\"Y-m-d H:i:s\", strtotime($anio.\"-\".$mes.\"-\".$dia));\r\n\r\n $primer_dia = 1;\r\n $ultimo_dia = $this->getUltimoDiaMes($anio,$mes);\r\n \r\n //$fecha_inicial = date(\"Y-m-d H:i:s\", strtotime($anio.\"-\".$mes.\"-\".$primer_dia) );\r\n //$fecha_final = date(\"Y-m-d H:i:s\", strtotime($anio.\"-\".$mes.\"-\".$ultimo_dia) );\r\n \r\n $fecha_inicial = $anio.\"-\".$mes.\"-01\";\r\n //$fecha_final = $anio.\"-\".$mes.\"-31\";\r\n $fecha_final = $anio.\"-\".$mes.\"-\".$ultimo_dia;\r\n // --------------------------------------------------------------------------------------------\r\n $sql_objetivos = \"SELECT u.usuario_nombre, u.`usuario_imagen`, aux.`tipousuario_descripcion`, e.`estado_color`, e.estado_descripcion, o.*\r\n FROM `objetivo` AS o\r\n LEFT JOIN usuario AS u ON o.usuario_id = u.`usuario_id`\r\n LEFT JOIN estado AS e ON o.`estado_id` = e.estado_id\r\n LEFT JOIN (\r\n SELECT u.`usuario_id`, t.tipousuario_descripcion \r\n FROM usuario AS u, tipo_usuario AS t\r\n WHERE u.`tipousuario_id` = t.`tipousuario_id`\r\n ) AS aux ON o.`usuario_id` = aux.usuario_id\r\n WHERE o.`usuario_id` = u.usuario_id\";\r\n //echo $sql_objetivos;\r\n $objetivos = $this->db->query($sql_objetivos)->result_array();\r\n // --------------------------------------------------------------------------------------------\r\n $sql_ventas_mes = \"SELECT if(sum(d.detalleven_total)>0, round(sum(d.detalleven_total),2), 0) AS total_mes, u.usuario_id\r\n FROM usuario AS u\r\n LEFT JOIN objetivo AS o ON o.usuario_id = u.usuario_id\r\n LEFT JOIN estado AS e ON u.`estado_id` = e.`estado_id`\r\n LEFT JOIN tipo_usuario AS t ON t.`tipousuario_id` = u.`tipousuario_id`\r\n left join detalle_venta as d on d.`usuario_id` = u.`usuario_id`\r\n left join venta as v on v.`usuario_id`=o.usuario_id\r\n WHERE o.usuario_id = u.usuario_id AND\r\n v.venta_id = d.venta_id AND \r\n v.venta_fecha >= '\".$fecha_inicial.\"' AND \r\n v.venta_fecha <= '\".$fecha_final.\"' AND \r\n v.usuario_id = u.usuario_id\r\n GROUP BY u.usuario_nombre \r\n order by u.usuario_nombre\r\n \";\r\n/* $sql_ventas_mes = \"SELECT if(sum(d.detalleven_total) > 0, round(sum(d.detalleven_total), 2), 0) AS total_mes, u.usuario_id\r\n FROM\r\n usuario u, detalle_venta d, venta v\r\n\r\n WHERE\r\n v.venta_id = d.venta_id AND \r\n v.venta_fecha >= '\".$fecha_inicial.\"' AND \r\n v.venta_fecha <= '\".$fecha_final.\"' AND \r\n v.usuario_id = u.usuario_id\r\n GROUP BY\r\n u.usuario_id\r\n ORDER BY\r\n u.usuario_nombre\";\r\n*/ \r\n //echo $sql_ventas_mes;\r\n $ventas_mes = $this->db->query($sql_ventas_mes)->result_array();\r\n // --------------------------------------------------------------------------------------------\r\n $sql_ventas_dia = \"SELECT if(sum(d.detalleven_total)>0, round(sum(d.detalleven_total),2), 0) AS total_dia, u.usuario_id\r\n FROM usuario AS u\r\n LEFT JOIN objetivo AS o ON o.usuario_id = u.usuario_id\r\n LEFT JOIN estado AS e ON u.`estado_id` = e.`estado_id`\r\n LEFT JOIN tipo_usuario AS t ON t.`tipousuario_id` = u.`tipousuario_id`\r\n left join detalle_venta as d on d.`usuario_id` = u.`usuario_id`\r\n left join venta as v on v.`usuario_id`=o.usuario_id\r\n WHERE o.usuario_id = u.usuario_id AND\r\n v.venta_id = d.venta_id AND \r\n v.venta_fecha = '\".$fecha.\"' AND \r\n v.usuario_id = u.usuario_id\r\n GROUP BY u.usuario_nombre \r\n order by u.usuario_nombre\r\n \";\r\n/* $sql_ventas_dia = \"SELECT \r\n if(sum(d.detalleven_total) > 0, round(sum(d.detalleven_total), 2), 0) AS total_dia,\r\n u.usuario_id\r\n FROM\r\n usuario u, venta v, detalle_venta d\r\n WHERE\r\n v.venta_fecha = '\".$fecha.\"' and\r\n v.venta_id = d.venta_id and\r\n v.usuario_id = u.usuario_id\r\n GROUP BY\r\n u.usuario_id\r\n ORDER BY\r\n u.usuario_nombre\";*/\r\n \r\n //echo $sql_ventas_dia;\r\n $ventas_dia = $this->db->query($sql_ventas_dia)->result_array();\r\n // // --------------------------------------------------------------------------------------------\r\n $sql_pedidos_mes = \"SELECT if(count(p.`pedido_total`)>0, COUNT(p.`pedido_total`),0) as pedido_mes, u.usuario_id\r\n FROM pedido as p\r\n LEFT JOIN venta as v on p.pedido_id = v.`pedido_id`\r\n LEFT JOIN usuario as u on p.`usuario_id` = u.usuario_id\r\n left join objetivo as o on p.`usuario_id` = o.`usuario_id`\r\n where v.`entrega_id` = 2\r\n and p.`pedido_fecha` >= '\".$fecha_inicial.\"'\r\n and p.pedido_fecha <= '\".$fecha_final.\"'\r\n and p.`regusuario_id` = o.usuario_id\r\n group by u.usuario_nombre\r\n ORDER by u.usuario_nombre\";\r\n \r\n \r\n/* $sql_pedidos_mes = \"SELECT \r\n if(count(p.pedido_total) > 0, COUNT(p.pedido_total), 0) AS pedido_mes, u.usuario_id\r\n\r\n FROM\r\n pedido p, venta v, detalle_venta d, usuario u\r\n\r\n WHERE\r\n v.entrega_id = 2 AND \r\n p.pedido_fecha >= '\".$fecha_inicial.\"' AND \r\n p.pedido_fecha <= '\".$fecha_final.\"' AND \r\n p.pedido_id = v.pedido_id and\r\n d.venta_id = v.venta_id and\r\n u.usuario_id = v.usuario_id\r\n\r\n GROUP BY\r\n\r\n u.usuario_id\r\n\r\n ORDER BY\r\n\r\n u.usuario_nombre\";*/\r\n //echo $sql_pedidos_mes;\r\n \r\n $pedidos_mes = $this->db->query($sql_pedidos_mes)->result_array();\r\n // // --------------------------------------------------------------------------------------------\r\n $sql_pedidos_dia = \"SELECT IF(COUNT(p.`pedido_id`)>0, COUNT(p.`pedido_id`),0) as pedido_dia, u.usuario_id\r\n FROM pedido AS p\r\n LEFT JOIN venta as v on p.pedido_id = v.`pedido_id`\r\n LEFT JOIN usuario AS u ON p.`usuario_id` = u.usuario_id\r\n LEFT JOIN objetivo AS o ON p.`usuario_id` = o.`usuario_id`\r\n WHERE date(p.`pedido_fecha`) = '\".$fecha.\"'\r\n AND p.`regusuario_id` = o.usuario_id\r\n GROUP BY u.usuario_nombre\r\n ORDER BY u.usuario_nombre\r\n \";\r\n //echo $sql_pedidos_dia;\r\n \r\n $pedidos_dia = $this->db->query($sql_pedidos_dia)->result_array();\r\n \r\n $data = array(\r\n \"objetivos\" => $objetivos,\r\n \"ventas_dia\" => $ventas_dia,\r\n \"ventas_mes\" => $ventas_mes,\r\n \"pedidos_dia\" => $pedidos_dia,\r\n \"pedidos_mes\" => $pedidos_mes\r\n );\r\n echo json_encode($data);\r\n }", "function procesar_carga ($datos){\n \n if(strcmp($datos['tipo'], \"Definitiva\")==0){\n $this->s__dia=$datos['dia_semana'];\n \n //if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'])){\n //if($this->existe_definitiva($datos)){\n $secuencia= recuperar_secuencia('asignacion_id_asignacion_seq');\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_definitiva($datos);\n //agregamos el equipo de catedra si existe\n if(count($this->s__docentes_seleccionados)>0){\n foreach($this->s__docentes_seleccionados as $clave=>$docente){\n $catedra=array(\n 'id_asignacion' => $secuencia,\n 'nro_doc' => $docente['nro_doc'],\n 'tipo_doc' => $docente['tipo_doc']\n );\n \n $this->dep('datos')->tabla('catedra')->nueva_fila($catedra);\n $this->dep('datos')->tabla('catedra')->sincronizar();\n $this->dep('datos')->tabla('catedra')->resetear();\n }\n }\n //}\n// else{\n// $mensaje=\" Está intentando solapar asignaciones \";\n// //$mensaje=\"Error Horario Repetido {$this->s__error}\";\n// toba::notificacion()->agregar(utf8_d_seguro($mensaje));\n// }\n// }\n// else{\n// $mensaje=\" La hora de inicio debe ser menor a la hora de fin \";\n// toba::notificacion()->agregar($mensaje);\n// }\n }\n else{\n if($this->validar_datos($datos['hora_inicio'], $datos['hora_fin'], $datos['fecha_inicio'], $datos['fecha_fin'])){\n if($this->existe_periodo($datos)){\n $this->registrar_asignacion($datos);\n $this->registrar_asignacion_periodo($datos);\n }\n else{\n $mensaje=\" Está intentando solapar asignaciones \";\n toba::notificacion()->agregar(utf8_decode($mensaje), $nivel);\n }\n }\n else{\n $mensaje=\" Datos inconsistentes en la fecha u hora \";\n toba::notificacion()->agregar($mensaje, $nivel);\n }\n }\n }", "function accion__grabar_periodo_evaluacion()\n {\n $anio_academico_hash = $this->validate_param('anio_academico_hash', 'post', validador::TIPO_TEXTO);\n $periodo_hash = $this->validate_param('periodo_hash', 'post', validador::TIPO_TEXTO);\n\n if (kernel::request()->isPost()) \n {\n try \n {\n $parametros = array();\n $parametros['anio_academico'] = $this->decodificar_anio_academico($anio_academico_hash);\n $parametros['periodo'] = $this->decodificar_periodo($periodo_hash, $parametros['anio_academico']);\n \n $periodos = $this->get_periodos_evaluacion($anio_academico_hash, $periodo_hash);\n\n foreach ($periodos as $periodo)\n {\n $parametros['orden'] = $periodo['ORDEN'];\n $daterange = 'daterange_'.$periodo['ORDEN'];\n $intervalo = $this->validate_param(\"$daterange\", 'post', validador::TIPO_TEXTO);\n $intervalo = explode('-', $intervalo);\n $parametros['fecha_inicio'] = $intervalo[0];\n\t\t\t\t\t$parametros['fecha_fin'] = $intervalo[1];\n if ($parametros['fecha_inicio'] != '' && $parametros['fecha_fin'] != '')\n {\n\t\t\t\t\t\t//Periodo de examen con suspension de clases (orden = 4)\n\t\t\t\t\t\tif ($parametros['orden'] == 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//hay que validar los dias de clase del periodo guardado con anteriordad\n\t\t\t\t\t\t\t$periodo_old = catalogo::consultar('evaluaciones_parciales', 'get_periodo', $parametros);\n\t\t\t\t\t\t\tif (isset($periodo_old['FECHA_INICIO']) && isset($periodo_old['FECHA_FIN']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$param['fecha_inicio'] = $periodo_old['FECHA_INICIO'];\n\t\t\t\t\t\t\t\t$param['fecha_fin'] = $periodo_old['FECHA_FIN'];\n $param['valido'] = 'S';\n kernel::log()->add_debug('set_validez_clases: ', $param);\n\t\t\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_validez_clases', $param);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//hay que ivalidar los dias de clase para que no compute la asitencia\n\t\t\t\t\t\t\t$parametros['valido'] = 'N';\n\t\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_validez_clases', $parametros);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcatalogo::consultar('evaluaciones_parciales', 'set_periodos_evaluacion', $parametros);\n }\n }\n \n $this->grabar_periodo_solicitud_fechas($parametros['anio_academico'], $parametros['periodo']);\n $this->grabar_fecha_ctr_correlat($parametros['anio_academico'], $parametros['periodo']);\n $mensaje = 'Se actualizaron correctamente los perí­odos de evaluación correspondientes al '.$parametros['periodo'].' del año '.$parametros['anio_academico'].'.';\n $this->set_anio_academico($anio_academico_hash);\n $this->set_periodo($periodo_hash);\n $this->set_mensaje($mensaje);\n }\n catch (\\Exception $e) \n {\n $mensaje = 'Error en la actualización.';\n $this->set_anio_academico($anio_academico_hash);\n $this->set_periodo($periodo_hash);\n $this->set_mensaje($e->getMessage().' - '.$mensaje);\n }\n }\n }", "public function fecha();", "function listarTotalesPeriodoAgencia(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERAGTOT_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\n $this->setParametro('id_periodo_venta','id_periodo_venta','int4');\n\n $this->capturaCount('total_credito_mb','numeric');\n $this->capturaCount('total_credito_me','numeric');\n $this->capturaCount('total_boletos_mb','numeric');\n $this->capturaCount('total_boletos_usd','numeric');\n $this->capturaCount('total_comision_mb','numeric');\n $this->capturaCount('total_comision_usd','numeric');\n $this->capturaCount('total_debito_mb','numeric');\n $this->capturaCount('total_debito_usd','numeric');\n $this->capturaCount('total_neto_mb','numeric');\n $this->capturaCount('total_neto_usd','numeric');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta_agencia','int4');\n $this->captura('codigo_periodo','varchar');\n $this->captura('id_agencia','int4');\n $this->captura('medio_pago','varchar');\n $this->captura('mes','varchar');\n $this->captura('gestion','varchar');\n $this->captura('id_periodo_venta','int4');\n $this->captura('fecha_ini','varchar');\n $this->captura('fecha_fin','varchar');\n $this->captura('moneda_restrictiva','varchar');\n $this->captura('codigo_int','varchar');\n $this->captura('nombre','varchar');\n $this->captura('fecha_ini2','varchar');\n $this->captura('fecha_fin2','varchar');\n $this->captura('estado','varchar');\n $this->captura('total_credito_mb','numeric');\n $this->captura('total_credito_me','numeric');\n $this->captura('total_boletos_mb','numeric');\n $this->captura('total_boletos_usd','numeric');\n $this->captura('total_comision_mb','numeric');\n $this->captura('total_comision_usd','numeric');\n $this->captura('total_debito_mb','numeric');\n $this->captura('total_debito_usd','numeric');\n $this->captura('total_neto_mb','numeric');\n $this->captura('total_neto_usd','numeric');\n $this->captura('monto_mb','numeric');\n $this->captura('monto_usd','numeric');\n $this->captura('billetes','text');\n\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function pagar()\n\t{\n\t\tif ( ! $this->Auth->user() )\n\t\t{\n\t\t\t$this->Session->write('Flujo.loginPending', array('controller' => 'reservas', 'action' => 'add'));\n\t\t\t$this->redirect(array('controller' => 'usuarios', 'action' => 'login'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba que existan productos en el carro\n\t\t */\n\t\t$productos\t\t\t= $this->Carro->productos('reserva');\n\t\tif ( empty($productos['reserva']) )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'add'));\n\t\t}\n\n\t\t/**\n\t\t * Comprueba si existe una compra en proceso\n\t\t */\n\t\tif ( ( $id = $this->Session->read('Flujo.Reserva.compra_id') ) && $this->Reserva->DetalleCompra->Compra->pendiente($id) )\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->id\t\t\t= $id;\n\t\t}\n\n\t\t/**\n\t\t * Guarda la compra en estado pendiente\n\t\t */\n\t\t$compra\t\t\t\t= $this->Reserva->DetalleCompra->Compra->registrarCarro($productos, null, 0, true);\n\t\t$this->Session->write('Flujo.Reserva.compra_id', $compra['Compra']['id']);\n\n\t\t/**\n\t\t * Si existe error al guardar la compra, devuelve al usuario a la pagina de resumen\n\t\t * para reintentar la operacion\n\t\t */\n\t\tif ( ! $compra )\n\t\t{\n\t\t\t$this->redirect(array('action' => 'resumen'));\n\t\t}\n\n\t\t/**\n\t\t * Verifica si es necesario pasar por webpay\n\t\t */\n\t\tif ( $compra['Compra']['total'] )\n\t\t{\n\t\t\t/**\n\t\t\t * Datos necesarios para comenzar el flujo con webpay\n\t\t\t */\n\t\t\t$webpay\t\t\t= array(\n\t\t\t\t'gateway'\t\t\t=> Router::url($this->Transbank->cgiPath['pago'], true),\n\t\t\t\t'oc'\t\t\t\t=> $compra['Compra']['id'],\n\t\t\t\t'monto'\t\t\t\t=> sprintf('%d00', $compra['Compra']['total']),\n\t\t\t\t'exito'\t\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'exito'), true),\n\t\t\t\t'fracaso'\t\t\t=> Router::url(array('controller' => 'reservas', 'action' => 'fracaso'), true)\n\t\t\t);\n\n\t\t\t$this->layout\t\t= 'ajax';\n\t\t\t$this->set(compact('webpay'));\n\t\t}\n\n\t\t/**\n\t\t * Si la reserva no tiene seleccion de productos, pasa al detalle de reserva\n\t\t */\n\t\telse\n\t\t{\n\t\t\t$this->Reserva->DetalleCompra->Compra->cambiarEstado($compra['Compra']['id'], 'PAGADO', null, true, false);\n\t\t\t$this->redirect(array('action' => 'exito', $compra['Compra']['id']));\n\t\t}\n\t}", "function contratos_por_fecha_inicial($fecha, $fecha1, $fecha2){\n $sql =\n \"SELECT\n c.Numero,\n c.Objeto,\n c.Lugar,\n c.Acta_Inicio,\n c.Fecha_Acta_Inicio,\n c.Fecha_Vencimiento,\n c.Plazo,\n c.Valor_Inicial,\n e.Estado,\n t.Nombre AS Contratista,\n c.Fecha_Inicial \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.$fecha BETWEEN '$fecha1' AND '$fecha2' \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')} \n ORDER BY\n c.Numero ASC\";\n\n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }", "public function get_datos_ventas_cobros_contado($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from\ncorte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_venta='Contado' AND tipo_ingreso='Venta' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function agenda_liste_paginer($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $separateur='&nbsp;|&nbsp;', $ancre=NULL, $tri='normal') {\n\tstatic $count_page = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_page;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\n\t$pagination = NULL;\n\tif ($count_evt == 0)\n\t\treturn $pagination;\n\n\tif ($ancre)\n\t\t$pagination .= '<a class=\"ancre\" name=\"pagination_'.$ancre.'\" id=\"pagination_'.$ancre.'\"></a>';\n\t\t\n\t// Determination de l'annee choisie si l'agenda est saisonnier\t\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\tif (intval($debut_saison) != 1) {\n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\t}\n\n\n\t$annee_courante = 0;\n\t$nouvelle_annee = FALSE;\n\t$count_page = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif (($filtre == '-1') || \n\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t(($filtre != '-1') && ($filtre != '0') && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t$annee_redac = $evenements[$j]['saison'];\n\t\t\t$annee_evt = $evenements[$j]['annee'];\n\t\t\t$mois_evt = $evenements[$j]['mois'];\n\t\t\tif ($annee_redac != $annee_courante) {\n\t\t\t\t$nouvelle_annee = TRUE;\n\t\t\t\t$count_page += 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$nouvelle_annee = FALSE;\n\t\t\t}\n\n\t\t\tif ($nouvelle_annee) {\n\t\t\t\tif ($annee_courante != 0) {\n\t\t\t\t\t$pagination .= $separateur;\n\t\t\t\t}\n\t\t\t\tif ($annee_redac == $annee_choisie) {\n\t\t\t\t\t$pagination .= '<span class=\"on\">'.$evenements[$j]['lien_page'].'</span>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$arg_option = NULL;\n\t\t\t\t\tif ($filtre != '-1') $arg_option = '&amp;categorie='.$filtre;\n\t\t\t\t\tif ($ancre) $arg_option .= '#pagination_'.$ancre;\n\t\t\t\t\tif (intval($debut_saison) != 1) $annee_evt = (intval($mois_evt) < intval($debut_saison)) ? strval(intval($annee_evt)-1) : $annee_evt;\n\t\t\t\t\t$pagination .= '<a class=\"ajax\" href=\"spip.php?page=agenda&amp;id_rubrique='.$contexte_aff['id_rubrique'].'&amp;annee='.$annee_evt.'&amp;mois='.$debut_saison.$arg_option.'\">'.$evenements[$j]['lien_page'].'</a>';\n\t\t\t\t}\n\t\t\t$annee_courante = $annee_redac;\n\t\t\t}\n\t\t}\n\t}\n\treturn $pagination;\n}", "function fetch_datebetwine_paiement_filtre()\n\t{\n\t $output = '';\n\t $query = '';\n\t $total;\n\t $jour1 =$this->input->post('jour1');\n\t $jour2 =$this->input->post('jour2');\n\t if($jour1 > $jour2)\n\t {\n\t $data = $this->crud_model->fetch_data_paiement_date($jour2, $jour1);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour2, $jour1);\n\t }\n\t else{\n\t $data = $this->crud_model->fetch_data_paiement_date($jour1, $jour2);\n\t $total = $this->crud_model->fetch_sum_data_paiement_date($jour1, $jour2);\n\t }\n\n\t $money = $this->crud_model->fetch_data_paiement_date_montant($jour1, $jour2);\n\t \n\n\t $pdf_link ='<a class=\"btn btn-outline-warning pull-right mt-2 mb-2\" \n\t href=\"'.base_url().'admin/pdf_liste_facture/'.$jour1.'/'.$jour2.' \"><i class=\"fa fa-print mr-1\"></i> PDF</a>';\n\t \n\t $output .= '\n\n\t <div align=\"right\" class=\"pull-right mb-2\">\n\t \n\t '.$pdf_link.'\n\t </div>\n\t \n\t <table class=\"table-striped table-bordered nk-tb-list nk-tb-ulist dataTable no-footer\" data-auto-responsive=\"true\" id=\"user_data\" role=\"grid\" aria-describedby=\"DataTables_Table_1_info\">\n\t <theader>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Imprimer</th>\n\t \n\t \n\t </tr>\n\t <theader>\n\t <tbody>\n\t ';\n\t foreach($data->result() as $row)\n\t {\n\t if ($row->etat_reservation ==0) {\n\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-dark btn-sm btn-circle valider\"><i class=\"fa fa-check text-white\"></i> </a>\n\t \n\t ';\n\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\t }\n\t else{\n\t $etat_reservation = '\n\t \n\t <a type=\"button\" href=\"'.base_url().'admin/pdf_billet/'.$row->codeReservation.'\" class=\"btn btn-primary btn-circle btn-sm print\"><i class=\"fa fa-print\"></i></a>\n\t ';\n\n\t $link = '<a href=\"tel:'.$row->telephone.'\" class=\"text-primary\"><i class=\"fa fa-phone\"></i></a>\n\t <input type=\"checkbox\" name=\"tel\" value=\"'.$row->telephone.'\" class=\"tels mr-1 delete_checkbox\">\n\t &nbsp;\n\t <a href=\"javascript:void(0);\" idreservation=\"'.$row->idreservation.'\" class=\"btn btn-success btn-circle btn-sm\"><i class=\"fa fa-check text-white\"></i></a>\n\t ';\n\t }\n\t \n\n\t $etat ='<span class=\"badge badge-warning\"><i class=\"fa fa-user\"></i> Client </span>';\n\n\n\t $email = '<a href=\"mailto:'.$row->email.'\" class=\"text-primary\"><i class=\"fa fa-google mr-1\"></i> '.$row->email.'</a>\n\t \n\t ';\n\n\t \n\t $output .= '\n\t <tr>\n\t <td>'.$link.'</td>\n\t <td><img src=\"'.base_url().'upload/photo/'.$row->image.'\" class=\"table-user-thumb\" style=\"border-radius: 50%; width: 50px; height: 30px;\" /></td>\n\n\t <td>'.substr($row->first_name.' '.$row->last_name, 0,20).'...</td>\n\n\t <td>'.$row->nomMatch.'</td>\n\t <td>'.$etat.'</td>\n\t <td>'.nl2br(substr(date(DATE_RFC822, strtotime($row->jour)), 0, 23)).'</td>\n\t <td>'.$row->heure.'</td>\n\n\t <td>'.$row->nomStade.' <br>'.$row->nomPlace.'</td>\n\n\t <td>'.$etat_reservation.'</td>\n\t \n\t </tr>\n\t ';\n\n\t }\n\n\t $output .='\n\t <tr>\n\t <td colspan=\"8\">Montant total </td>\n\t <td><h4>'.$total.'$</h4></td>\n\t \n\t </tr>\n\t \n\t ';\n\t $output .= '\n\t <tbody>\n\t <tfooter>\n\t <tr>\n\t <th width=\"5%\">Selectionner</th>\n\t <th width=\"5%\">Avatar</th>\n\t <th width=\"20%\">Nom complet</th>\n\t <th width=\"15%\">Rencontre</th>\n\t <th width=\"10%\">Statut</th>\n\t <th width=\"20%\">Jour</th>\n\t <th width=\"5%\">Heure</th>\n\t <th width=\"10%\">Place</th>\n\n\t <th width=\"10%\">Action</th>\n\t \n\t \n\t </tr>\n\t <tfooter>\n\t </table>';\n\t echo $output;\n\t}", "public function dias_del_mes(){\n \n $fecha= date('Y-m-d');\n return; date('t',strtotime($fecha));\n \n}", "public function buscarFecha($fecha) {\n\t\t$visita = $this->findOneByFecha($fecha);\n\t\treturn $visita;\n\t}", "public function servicios(){\n $anio = date(\"Y\",strtotime(date(\"Y-m-d\").\"- 1 month\"));\n $mes = date(\"m\",strtotime(date(\"Y-m-d\").\"- 1 month\"));\n\n $consulta_popular= DB::select('SELECT vehiculos.idvehiculo,\n COUNT(*) as cantidad FROM alquilers \n INNER JOIN vehiculos ON vehiculos.idvehiculo = alquilers.id_vehiculo\n WHERE YEAR(alquilers.fecha_recogida) = ?\n AND MONTH(alquilers.fecha_recogida) = ?\n GROUP BY id_vehiculo ORDER BY cantidad DESC LIMIT ?',[$anio,$mes,1]);\n\n try{\n $idpopular = $consulta_popular['0']->idvehiculo;\n }catch (\\Exception $ex) {\n $idpopular = 1;\n }\n \n $popular = app\\Vehiculo::where('idvehiculo','=',$idpopular)->get();\n $sucursales = App\\Sucursal::all();\n //return $popular;\n setlocale(LC_TIME, 'es_ES');\n $fecha = DateTime::createFromFormat('!m', $mes);\n $mes = strftime(\"%B\", $fecha->getTimestamp());\n return view('servicios',compact('sucursales','popular','anio','mes'));\n}", "public function get_pedido_por_fecha($cedula,$fecha_inicial,$fecha_final){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n \n $date_inicial = $_POST[\"datepicker\"];\n $date = str_replace('/', '-', $date_inicial);\n $fecha_inicial = date(\"Y-m-d\", strtotime($date));\n\n \n $date_final = $_POST[\"datepicker2\"];\n $date = str_replace('/', '-', $date_final);\n $fecha_final = date(\"Y-m-d\", strtotime($date));\n\n\n $sql=\"select * from detalle_compras where cedula_proveedor=? and fecha_compra>=? and fecha_compra<=? and estado='1';\";\n\n \n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1,$cedula);\n $sql->bindValue(2,$fecha_inicial);\n $sql->bindValue(3,$fecha_final);\n $sql->execute();\n\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n \n\n }", "function asignar_pago_adelantado($acceso,$id_contrato){\n\t$cable=conexion();\n\t$acceso1=conexion();\n\t$cable->objeto->ejecutarSql(\"select id_pago,costo_cobro,id_cont_serv from vista_pago_ser where id_contrato='$id_contrato' and id_serv='ZZZ00001'\");\n\twhile($row=row($cable)){\n\t\n\t\t$id_pago=trim($row['id_pago']);\n\t\t$id_cont_serv_deuda=trim($row['id_cont_serv']);\n\t\t$monto_pago=trim($row['costo_cobro'])+0;\n\t\t\n\t\t//echo \"<br>:$id_pago:$monto_pago:$id_cont_serv_deuda\";\n\t\t//echo \"<br>:select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and costo_cobro>0 order by tipo_serv ,fecha_inst:<br>\";\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$acceso1->objeto->ejecutarSql(\"select tipo_costo,id_cont_serv,(((cant_serv * costo_cobro)-descu) - pagado ) as costo from vista_contratodeu where id_contrato='$id_contrato' and status_con_ser='DEUDA' and (((cant_serv * costo_cobro)-descu) - pagado )>0 order by tipo_serv ,fecha_inst\");\n\t\twhile($row=row($acceso1)){\n\t\t\t$id_cont_serv=trim($row['id_cont_serv']);\n\t\t\t$tipo_costo=trim($row['tipo_costo']);\n\t\t\t$costo=trim($row['costo'])+0;\n\t\t\t//echo \"<br>id_cont_serv:$id_cont_serv:costo:$costo<br>\";\n\t\t\tif($monto_pago>=$costo){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$costo' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$costo')\");\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=$monto_pago-$costo;\n\t\t\t}\n\t\t\telse if($monto_pago>0){\n\t\t\t\t$id_select=$id_select.\"=@$id_cont_serv\";\n\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato_servicio_deuda Set apagar=0, pagado=pagado+'$monto_pago' where id_cont_serv='$id_cont_serv'\");\n\t\t\t\t\n\t\t\t\t$cable->objeto->ejecutarSql(\"select costo_cobro_serv from pago_factura where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\tif($row=row($cable)){\n\t\t\t\t\t$costo_cobro_serv1=trim($row['costo_cobro_serv'])+0;\n\t\t\t\t\t//echo \"<BR>ENTRO ACT<BR>update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv';\";\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=costo_cobro_serv+$costo_cobro_serv1 where id_pago='$id_pago' and id_cont_serv='$id_cont_serv'\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pago_factura(id_pago,id_cont_serv,costo_cobro_serv) values ('$id_pago','$id_cont_serv','$monto_pago')\");\n\t\t\t\t}\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set status_con_ser='PAGADO' where id_cont_serv='$id_cont_serv' and ((cant_serv * costo_cobro)-descu)=pagado\");\n\t\t\t\t$monto_pago=0;\n\t\t\t}\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"select id_pago from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t$row=row($acceso);\n\t\t$id_pago_ade=trim($row['id_pago']);\n\t\t\t//echo \"<br>:$monto_pago:<br>\";\n\t\tif($monto_pago>0){\n\t\t\t$acceso->objeto->ejecutarSql(\"update pago_factura set costo_cobro_serv=$monto_pago where id_cont_serv='$id_cont_serv_deuda' \");\n\t\t\t$acceso->objeto->ejecutarSql(\"update contrato_servicio_deuda set costo_cobro=$monto_pago, pagado=$monto_pago where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t\n\t\t\tactualizar_monto_pago($acceso,$id_pago_ade);\n\t\t}else{\n\t\t\t\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pago_factura where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from contrato_servicio_deuda where id_cont_serv='$id_cont_serv_deuda'\");\n\t\t\t//echo \"delete from pagos where id_pago='$id_pago_ade'<br><br>\";\n\t\t\t$acceso->objeto->ejecutarSql(\"delete from pagos where id_pago='$id_pago_ade'\");\n\t\t}\n\n\t}//while inicial\n}", "public function Comprobarpago($pago) {\n $user = Session::getSession(\"User\");\n if (null != $user) {\n\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n $response = $this->db->select1(\"*\", 'pagos', $where, null);\n if (is_array($response)) {\n $response = $response['results'];\n //A qui cargaremos los datos a actualizar \n $value = \"Pago = :Pago, Estatus = :Estatus, Fecha_pago = :Fecha_pago, Proxima_fecha = :Proxima_fecha\";\n $where = \" WHERE Id_pago = '$pago->Id_pago'\";\n //Comprobamos si tenemos datos \n if (0 == count($response)) {\n echo 'Datos erroneos del sistema';\n } else {\n\n $array = array(\n $pago->Pago,\n $pago->Estatus,\n //La fecha actualmente que se esta pagando\n $pago->Fecha_pago,\n //La proxima fecha a que se va a pagar apartir de la ultima fecha que se pago \n $pago->Proxima_fecha,\n );\n\n // print_r($array);\n $data = $this->db->update(\"pagos\", $array, $value, $where);\n // $data = false;\n if (is_bool($data)) {\n //Correcion de datos tengo que agregar un ID\n $value = \"(`Nombre`, `Mes_pago`, `Cantidad`, `Fecha_pagada`, `Folio`)VALUES (:Nombre, :Mes_pago, :Cantidad, :Fecha_pagada, :Folio)\";\n $array = array(\n $pago->Nombre,\n $pago->Mes,\n $pago->Pago,\n $pago->Fecha_pago,\n $pago->Folio\n );\n // print_r($array);\n $data2 = $this->db->insert1(\"catalogo_pagos\", $array, $value);\n\n if (is_bool($data2)) {\n return 0;\n } else {\n return $data2;\n }\n } else {\n\n return $data;\n }\n }\n }\n }\n }", "function primer_dia_periodo() {\n\n $sql=\"select fecha_inicio from mocovi_periodo_presupuestario where actual=true\";\n $resul=toba::db('designa')->consultar($sql);\n return $resul[0]['fecha_inicio'];\n \n }", "function infoEntregas0800($page = 1,$order = 'DTINI DESC'){\n \n //Filtros Where's : D - Data , S - String, T - Tipo Ocorrência, Te - Tempo de Entrega, Emp - Código da empresa de Entrega\n $whereD = (String) null;\n $whereS = (String) null;\n $whereT = (String) null;\n $whereTe = (String) null;\n $whereEmp = (String) null;\n $where = (String) null;\n $sqlPagination = (String) null;\n $get = $this->input->get();\n \n if(isset($get['sqlPagination'])){\n $sqlPagination = $get['sqlPagination'] ;\n }\n \n //Verifica se existe paginação ou se é um novo filtro\n if(empty(trim($sqlPagination))){\n //Where com as String, Filtro like\n $whereS = $this->getFiltroWhereString($get);\n\n //Where com as Datas da ocorrências - (Inicio e Fim)\n $whereD = $this->getFiltroDate($get,$whereS)? $this->getFiltroDate($get,$whereS) : $whereS;\n\n //Where com os Tipo de Ocorrência 1- Inicio de Entrega 3- Entrega Normal 5- Problema na Entrega\n $whereT = $this->getFiltroTipoOcorrencia($get, $whereD)? $this->getFiltroTipoOcorrencia($get, $whereD) :$whereD ; \n\n //Where com o tempo de demora da Entrega \n $whereTe = $this->getFiltroTempoEntrega($get,$whereT)? $this->getFiltroTempoEntrega($get,$whereT) : $whereT;\n\n //Where pelas empresas de entrega \n $whereEmp = $this->getFiltroEmpresa($get,$whereTe)? $this->getFiltroEmpresa($get,$whereTe) : $whereTe;\n\n //Where Pelas Taxas TDE ou TDA\n $where = $this->getFiltroTiposTaxa($get,$whereEmp)? $this->getFiltroTiposTaxa($get,$whereEmp) : $whereEmp ;\n\n\n if($this->verifica_gatilho('FILTRO_CENTRAL')){\n \n if(!empty($this->input->get()['CDEMPRESA'])){\n\n foreach($this->input->get()['CDEMPRESA'] as $k => $cdEmp){\n \n if($k == 0){\n $empresa = $cdEmp;\n }else{\n $empresa .= \",$cdEmp\"; \n }\n \n }\n $where .= \" AND CDEMPRESADESTINO in ($empresa) \";\n }\n\n }else{\n $where .= \" AND CDEMPRESADESTINO = {$this->sessao['filial']} \";\n }\n\n\n if($where == \"1 = 1\"){\n $this->dados['sqlPagination'] = \"\";\n }else{\n $this->dados['sqlPagination'] = base64_encode($where);\n }\n \n }else{\n $where = base64_decode($sqlPagination);\n $this->dados['sqlPagination'] = base64_encode($where);\n }\n \n \n $this->db->query(\"ALTER SESSION SET NLS_DATE_FORMAT = 'DD/MM/YYYY HH24:MI:SS'\");\n $lista = $this->infoentregas0800_model->getAllEntregas()\n ->setWhere($where)\n ->paginateOracle($page,10,$order)\n ->go();\n \n $rowcount = $this->infoentregas0800_model->getAllEntregas()\n ->setWhere($where)\n ->count()\n ->go(); \n \n $this->db->query(\"ALTER SESSION SET NLS_DATE_FORMAT = 'DD/MM/YYYY HH24:MI:SS'\");\n $this->dados['filtro'] = (!empty($get['filtro'])) ? $get['filtro'] : array();\n $this->dados['titulo'] = 'Central de Entregas';\n $this->dados['lista'] = $lista;\n $this->dados['total'] = $rowcount;\n $this->dados['filiais'] = $this->softran_oracle->empresas();\n $this->dados['FILTRO_CENTRAL'] = $this->verifica_gatilho('FILTRO_CENTRAL');\n\t \n //Metodo Utilizado para relizar a paginação\n $this->dados['paginacao'] = $this->configurePagination(10, $rowcount, \"cce_entregas0800/infoEntregas0800\") ;\n\n $this->render('infoEntregas0800');\n\n }", "public function fechaVigencia() // funcion que suma fecha usada para años biciestos\n\t{\n\n\t\t$fecha = $_GET['fecha'];\n\t\t$nuevafecha = strtotime('+365 day', strtotime($fecha));\n\t\t$nuevafecha = date('Y-m-d', $nuevafecha);\n\t\treturn $nuevafecha;\n\t}", "public function index()\n {\n $now=Carbon::now();\n $start = new Carbon('first day of this month');\n $end = new Carbon('last day of this month');\n $contrato_expira=DB::table('contratos')->whereBetween('data_proximo_pagamento',[$start,$end])->where('status',1)->count();\n $saude_expira=DB::table('saudes')->whereBetween('data_proximo_pagamento',[$start,$end])->count();\n\n $start_next = new Carbon('first day of next month');\n $end_next = new Carbon('last day of next month');\n\n $contrato_expira_next=DB::table('contratos')->whereBetween('data_proximo_pagamento',[$start_next,$end_next])->where('status',1)->count();\n $saude_expira_next=DB::table('saudes')->whereBetween('data_proximo_pagamento',[$start_next,$end_next])->where('status',1)->count();\n $totalcontrato_expira_next=$contrato_expira_next+$saude_expira_next;\n\n\n $cliente = Cliente::all();\n \n\n \n\n $clientes = Cliente::where('cliente_tipo','individual')->where('status',1)->get();\n\n $nu_aniversarios=0;\n\n foreach($clientes as $key => $cliente){ \n if(Carbon::parse($cliente->cliente_data_nascimento)->isBirthday(carbon::today()))\n { \n $nu_aniversarios = $nu_aniversarios+1; \n }\n\n }\n\n \n $data = Prospecao::get()->groupBy('tipo_ramo')->where('status',1)->map(function ($item) {\n return count($item);\n });\n\n $chart = new grafico;\n $chart->labels($data->keys());\n $chart->title('Tipo de Prospeção');\n $chart->dataset('Nº', 'pie', $data->values())->options([\n 'color' => [\n '#e74c3c','#2ecc71','#f39c12', '#3498d8','#9b59b6','#34495e','#ebdef0','#f5b7b1',\n ],\n ]);\n\n $emidiodata = Contrato::join('consultors','contratos.consultor','consultors.id')->where('status',1)->get()->groupby('nome_consultor')->map(function ($item) {\n // Return the number of persons\n return count($item);\n\n });\n\n\n \n $emidio = new grafico;\n $emidio->labels($emidiodata->keys());\n $emidio->title('Nº de Contratos por Consultores');\n $emidio->dataset('Consultores', 'bar', $emidiodata->values());\n \n \n $data_seguradora = Contrato::join('seguradoras','contratos.nome_seguradora','seguradoras.id')->where('status',1)->get()->groupby('nome_seguradora')->map(function ($item) {\n // Return the number of persons\n return count($item);\n\n });\n \n $graf_seguradora = new grafico;\n $graf_seguradora->labels($data_seguradora->keys());\n $graf_seguradora->title('Nº de Contratos por Seguradora');\n $graf_seguradora->dataset('Contratos', 'bar', $data_seguradora->values());\n\n $lebels_category_month=Contrato::select(DB::raw('date_format(data_inicio, \"%Y-%m\") as \"date\"')) \n ->orderby('data_inicio','asc')\n ->where('status',1)\n ->get()\n ->groupBy('date');\n\n $data_premio=Contrato::select(DB::raw('date_format(data_inicio, \"%Y-%m\") as \"date\"'),'premio_simples') \n ->orderby('data_inicio','asc')\n ->where('status',1)\n ->get()\n ->groupBy('date')\n ->map(function ($item, $key) {\n return $this->sumItemPremio($item);\n }); \n $data_comissao=Contrato::select(DB::raw('date_format(data_inicio, \"%Y-%m\") as \"date\"'),'comissao') \n ->orderby('data_inicio','asc')\n ->where('status',1)\n ->get()\n ->groupBy('date')\n ->map(function ($item, $key) {\n return $this->sumItemComissao($item);\n });\n $category_month = new grafico;\n $category_month->labels($lebels_category_month->keys());\n $category_month->title('Performace Mensal');\n $category_month->dataset('Premio Simples', 'line', $data_premio->values());\n $category_month->dataset('Comissão', 'line', $data_comissao->values());\n\n\n $perf_contratos=Contrato::select(DB::raw('date_format(data_inicio, \"%Y-%m\") as \"date\"')) \n ->orderby('data_inicio','asc')\n ->where('status',1)\n ->get()\n ->groupBy('date')\n ->map(function ($item) {\n // Return the number of persons\n return count($item);\n });\n\n $category_month_perf = new grafico;\n $category_month_perf->labels($lebels_category_month->keys());\n $category_month_perf->title('Performace Mensal Contratos');\n $category_month_perf->dataset('Nº contratos', 'line', $perf_contratos->values());\n\n\n\n\n $prospecao = Prospecao::all();\n $segurado = Segurado::all();\n $contrato = Contrato::all()->where('status',1)->where('data_proximo_pagamento','>=',$now);\n\n $avisos30=AvisoCobrancaView::expirarMore()->count();\n $avisosNotificar=AvisoCobrancaView::expirar()->count();\n \n $drafts=Email::where('status',1)->count();\n \n\n return view('admin.home.index',compact('drafts','avisos30','avisosNotificar','prospecao','segurado','contrato','emidio','chart','cliente','nu_aniversarios','contrato_expira','saude_expira','graf_seguradora','category_month','totalcontrato_expira_next','category_month_perf'));\n }", "public function fechaPostagem ()\n {\n // Busca numero da PLP nos parametros\n $this->load->model(\"M_Sigep\");\n $cliente = $this->M_Sigep->getIdPlpCliente();\n if ( $cliente == false )\n die (\"Falha ao recuperar ID PLP Cliente.\");\n\n // Busca todas as etiquetas que não foram enviadas ainda aos Correios\n $etiquetas = $this->M_Sigep->buscar(\"SELECT a.*,b.* FROM tb_pedido a, tb_pedido_servico b WHERE a.fgenviado = 'N' AND a.idPedido = b.idPedido\");\n if ( !$etiquetas )\n die (\"Falha ao recuperar as etiquetas que não foram enviadas.\");\n\n $codigos = array();\n for ($i = 0; $reg = $etiquetas->fetch(); $i++)\n $codigos[$i] = $reg->codigoobjetoect;\n\n $sigep = $this->sigep->fechaPLP( $codigos, $cliente->idplpcliente);\n if ( !empty($sigep['msgErro']) )\n die (\"Erro no método fechaPostagem: \".$sigep[\"msgErro\"]);\n else {\n // Corrige todos os pedidos marcando que ja foram enviados\n $this->M_Sigep->corrigeFlagPedidos($codigos);\n // Incrementa o numero do ID PLP Cliente\n $this->M_Sigep->corrigeIdPlpCliente();\n } \n }", "public static function rptVentaCajero($datos){\n\n $user = auth()->user();\n $fecha = date(\"Y-m-d\");\n $hora = date(\"H:i:s\");\n $fecha = $fecha.' '.$hora;\n $generador = ucfirst($user->name);\n $inicio = date('Y-m-d', strtotime($datos['data']['inicio']));\n $final = date('Y-m-d', strtotime($datos['data']['final']));\n $cajero = $datos['data']['cajero'];\n $sucursal = $datos['data']['sucursal'];\n $order ='VENTAS.FECALTAS';\n $dir = 'ASC';\n\n // OBTENER DATOS \n\n $ventaCajero = Cajero::obtenerDatos($datos['data'], $order, $dir); \n\n //INICIAR VARIABLES\n \n \n \n $intervalo = $inicio.'/'.$final;\n $total = 0;\n $c_rows = 0;\n $articulos = [];\n $limite = 35;\n $totalPagado = 0;\n\n\n // INICIAR MPDF \n\n $mpdf = new \\Mpdf\\Mpdf([\n 'margin_left' => 20,\n 'margin_right' => 20,\n 'margin_top' => 16,\n 'margin_bottom' => 10,\n 'margin_header' => 5,\n 'margin_footer' => 10\n ]);\n\n $mpdf->SetDisplayMode('fullpage');\n\n foreach ($ventaCajero as $key => $value) {\n\n $total = $total + $value->TOTAL;\n $iva = $iva + $value->IVA;\n $subtotal = $subtotal + $value->SUBTOTAL;\n $nombre = mb_strtolower($value->CLIENTE);\n $vendedor = mb_strtolower($value->VENDEDOR);\n $nombre = substr($nombre,0,27);\n $articulos[$c_rows]['NOMBRE'] = utf8_decode(utf8_encode(ucwords($nombre)));\n $articulos[$c_rows]['CODIGO'] = $value->ID;\n $fecha = substr($value->FECHA,0,-9);\n $articulos[$c_rows]['FECHA'] = $fecha;\n $articulos[$c_rows]['CAJERO'] = utf8_decode(utf8_encode(ucwords($cajero)));\n $articulos[$c_rows]['TOTAL'] = Common::formato_precio($value->TOTAL, $candec);\n\n // CREAR HOJA \n\n $articulos[$c_rows]['SALTO'] = false;\n\n if($c_rows == $limite){\n \n $articulos[$c_rows]['SALTO'] = true;\n $limite = $limite + 42;\n }\n\n $c_rows = $c_rows + 1;\n }\n\n $namefile = 'reporteVentaCajero'.time().'.pdf';\n $data['c_rows'] = $c_rows;\n $data['fecha'] = $fecha;\n $data['generador'] = $generador;\n $data['intervalo'] = $intervalo;\n $data['total'] = Common::formato_precio($total, $candec);\n\n $html = view('pdf.rptVentaCajero', $data)->render();\n\n $mpdf->WriteHTML($html);\n\n // CREAR HOJA \n\n $mpdf->SetProtection(array('print'));\n $mpdf->SetTitle(\"ReporteVentaCajero\");\n\n // DESCARGAR ARCHIVO PDF \n\n $mpdf->Output();\n\n\n /* --------------------------------------------------------------------------------- */\n }", "public function index()\n {\n\n //consome API cotação\n\n function get_page($url) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, True);\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1');\n $return = curl_exec($curl);\n curl_close($curl);\n return $return;\n }\n\n $contents = json_decode(get_page('http://api.promasters.net.br/cotacao/v1/valores?moedas=USD&alt=json'), true);\n\n $cotacoes = $contents['valores'];\n\n $existePerfil = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->get();\n\n if (count($existePerfil) > 0) {\n $valorRenda = Perfil::select(\"valorRenda\")->where('idUser', Auth::user()->id)->first()->valorRenda;\n } else {\n $valorRenda = 0;\n }\n\n $existePoupanca = Poupanca::where('idUser', Auth::user()->id)->get();\n if (count($existePoupanca) > 0) {\n $poupancas = Poupanca::where('idUser', Auth::user()->id)->get();\n } else {\n $poupancas = \"\";\n }\n \n //movimentação\n $existeEntradaSaida = EntradaSaida::where('idUser', Auth::user()->id)->get();\n \n $date = date('Y-m');\n $dateStart = date($date.'-01');\n $dateEnd = date($date.'-t');\n\n if(count($existeEntradaSaida) > 0) {\n $movimentacoes = EntradaSaida::where('idUser', Auth::user()->id)\n ->where('data', '>=', $dateStart)\n ->where('data', '<=', $dateEnd)->get();\n \n $entradas = 0;\n $saidas = 0;\n \n foreach ($movimentacoes as $value) {\n if ($value['tipo'] == 1) {\n $entradas = $value['valor']+$entradas;\n $entradas++;\n } else {\n $saidas = $value['valor'];\n $saidas++;\n }\n }\n \n } else {\n $movimentacoes = \"\";\n $entradas = 0;\n $saidas = 0;\n $sobra = 0;\n }\n\n \n\n $totalEntrada = $valorRenda + $entradas;\n $sobra = $totalEntrada - $saidas;\n \n return view('home', ['cotacoes' => $cotacoes, \n 'valorRenda' => $valorRenda, \n 'poupancas'=> $poupancas,\n 'totalEntrada' => $totalEntrada,\n 'saidas' => $saidas,\n 'sobra' => $sobra,\n 'movimentacoes' => $movimentacoes]);\n }", "public function graficDate(Registro $registro)\n {\n //\n }", "public function porClientePeriodo(Request $request, $cliente, String $fechaIni, String $fechaFin, $estados)\n {\n $jwtAth = new JwtAuth();\n $token = $request->header('Authorization', null);\n $checkToken = $jwtAth->checkToken($token);\n if ($checkToken) {\n\n$explodedEstados = explode(\",\", $estados);\n$arrayNumberEstados = array();\nforeach ($explodedEstados as $ex) {\n array_push($arrayNumberEstados, intval($ex));\n}\n\n $facturas = DB::select(\"SELECT ai.number as factura_id, rp.id as id_cliente, rp.name as cliente, ai.city as ciudad_cliente, rcs.name as estado_cliente, ai.amount_total monto,ai.create_date fecha\n FROM account_invoice ai\n INNER JOIN res_partner rp\n ON ai.partner_id = rp.id\n INNER JOIN res_country_state rcs\n ON rp.state_id = rcs.id\n INNER JOIN account_invoice_line ail\n ON ail.invoice_id = ai.id\n INNER JOIN product_product pp\n ON ail.product_id = pp.id\n where ai.create_date >= :fechaIni\n and ai.create_date <= :fechaFin\n and ai.type = 'out_invoice'\n and ai.number is not null\n and rp.id = :cliente \n \".($estados==='TODOS'?'':'and rcs.id in('.implode(',',$arrayNumberEstados).') ').\" \n group by ai.number, rp.id,rp.name,ai.city,rcs.name,ai.amount_total,ai.create_date\n ORDER BY cliente ASC\", ['fechaIni' => date(\"Y-m-d\", strtotime($fechaIni)),'fechaFin' => date(\"Y-m-d\", strtotime($fechaFin)),'cliente' => $cliente]);\n \n return $facturas;\n } else {\n return \"usuario NO autenticado\";\n }\n }", "public function falla28_busqueda_fecha(){\n\t\t \n\t\t\t \n\t\t\t // Fecha que ingreso el usuario en formato DIA/MES/AÑO\n\t\t\t $fecha28 = date('Y-m-d',strtotime('-28 days', strtotime($_POST['fecha'])));\n\t\t\t \t$fecha33 = date('Y-m-d',strtotime('-33 days', strtotime($_POST['fecha'])));\n\t\t \n\t\t\t //Abre el mixer\n\t\t\t\t$datos_mixer = Mixer::where('Fecha_de_Carga','<=' ,$fecha28)\n\t\t\t\t\t\t\t ->where('Fecha_de_Carga','>=' ,$fecha33)\n\t\t\t\t\t\t\t ->groupBy('Numero_Carga')\t\n\t\t\t\t ->get();\n\t\t\t\t\n\t\t\t\t//Abre fallas con otro nombre . para comparar unicamente \n\t\t\t\t$datos_falla = Falla28::where('Fecha_Moldeo','<=',$fecha28)\n\t\t ->where('Fecha_Moldeo','>=' ,$fecha33)\n\t\t ->groupBy('Numero_Carga')\t\n\t\t\t\t ->get();\n\t\t \n\t\t \t\n\t\t\t\treturn view('falla28' , array(\n\t\t\t\t\t'mixer' => $datos_mixer ,\n\t\t\t\t\t'fecha_busqueda' => $_POST['fecha'] ,\n\t\t\t\t\t'comparaensayo' => $datos_falla \n\t\t\t\t\t//'res_nominal' => $res_nominal\n\n\t\t\t\t\t ));\n\n\t\t \n\t\t\t }", "function listarPeriodoVenta(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_PERVEN_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n\n //Definicion de la lista del resultado del query\n $this->captura('id_periodo_venta','int4');\n $this->captura('id_gestion','int4');\n $this->captura('mes','varchar');\n $this->captura('estado','varchar');\n $this->captura('nro_periodo_mes','int4');\n $this->captura('fecha_fin','date');\n $this->captura('fecha_ini','date');\n $this->captura('tipo_periodo','varchar');\n $this->captura('medio_pago','varchar');\n $this->captura('tipo_cc','varchar');\n $this->captura('estado_reg','varchar');\n $this->captura('id_usuario_ai','int4');\n $this->captura('id_usuario_reg','int4');\n $this->captura('usuario_ai','varchar');\n $this->captura('fecha_reg','timestamp');\n $this->captura('fecha_mod','timestamp');\n $this->captura('id_usuario_mod','int4');\n $this->captura('usr_reg','varchar');\n $this->captura('usr_mod','varchar');\n $this->captura('desc_periodo','text');\n $this->captura('fecha_pago','date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function insertarFecha($Fecha_pago) {\n\n // Obtenemos los datos de los clientes \n // $.Fecha_pago[0] obtengo el id_cliente \n $where = \" WHERE Id_cliente = \" . $Fecha_pago[0];\n\n $response = $this->db->select1(\"*\", 'pagos', $where, null);\n //Si response es un array \n if (is_array($response)) {\n $response = $response['results'];\n \n //A qui cargamos los datos nuevos\n $value = \"Id_cliente = :Id_cliente, Fecha_pago = :Fecha_pago\";\n\n $where = \" WHERE Id_cliente = \" . $Fecha_pago[0];\n\n\n if (0 == count($response)) {\n\n\n $data = $this->db->update(\"pagos\", $Fecha_pago, $value, $where);\n if (is_bool($data)) {\n return 0;\n } else {\n return $data;\n }\n } else {\n $data = $this->db->update(\"pagos\", $Fecha_pago, $value, $where);\n if (is_bool($data)) {\n return 0;\n } else {\n return $data;\n }\n }\n }\n }", "function anuncio_a_colocar_en_portada($anuncios_n5){\n //obtenemos el id y la url de la foto principal del anuncio con fecha de hoy\n //inincializamos las variables\n $id_anuncio = 0;\n $url_foto_anuncio = '';\n $localidad = '';\n $precio = 0;\n $anuncio_hoy = 0;\n\n $fecha_hoy = getdate();\n #var_dump($fecha_hoy[0]);\n //comprobamos qué anuncio tiene la fecha de hoy, que será el buscado para\n //colocar en portda\n $diferencia = 24*3600;\n for ($i=0; $i < count($anuncios_n5); $i++) {\n #var_dump($anuncios_n5[$i]['fecha_anuncio']);\n $dif = $anuncios_n5[$i]['fecha_anuncio'] - $fecha_hoy[0];\n if($dif < $diferencia) {\n $diferencia = $dif;\n $anuncio_hoy = $i;\n }\n }\n //pasamos al anuncio los datos id y url\n $anuncio = $anuncios_n5[$anuncio_hoy];\n //devolvemos el anuncio que se debe colocar en la portada y su foto\n #var_dump($anuncio);\n #die();\n echo json_encode($anuncio);\n $dbh = null;\n}", "public function verPagosUsuario($id){\n $local = Local_User::findorfail($id);\n\n //Validación Encargado, Premium, Bloqueado\n $locales = Local_User::where('user_id', Auth::user()->id)\n ->where('estado', '!=', 'Desvinculado')\n ->where('local_id', $local->local_id)\n ->where('rol', 'Encargado')\n ->first();\n\n if (empty($locales)) {\n session()->flash('danger', 'Usted no tiene privilegios suficientes.');\n return redirect()->action('HomeController@index');\n }elseif($locales->Local->cuenta != 'Premium'){\n session()->flash('danger', 'Opción sólo para locales premium.');\n return redirect()->action('UsuarioController@empaques', ['id' => $local->local_id]);\n }elseif($locales->Local->estado == 'Bloqueado'){\n session()->flash('danger', 'El local se encuentra temporalmente bloqueado.');\n return redirect()->action('UsuarioController@misLocales');\n }\n //fin validación\n\n\n\n $pagos = Pago::where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->paginate(10);\n\n\n if($pagos->count() == 0) {\n session()->flash('danger', 'Aún no se registran pagos');\n return redirect()->route('usuario.local.empaques', ['id' => $local->local_id]);\n //return redirect()->action('UsuarioController@misLocales');\n }else{\n //Query para obtener la última fecha pagada\n $lastPagoHasta = Pago::select('pagoHasta')->where('local_user_id', $id)->orderBy('pagoHasta', 'desc')->take(1)->get();\n\n //editamos la fecha\n $lastPagoHasta = $lastPagoHasta[0]['pagoHasta'] . ' 00:00:00';\n\n //verificamos si la persona tomó un turno después de la última fecha pagada\n $deuda=Planilla_Turno_User::where('local_user_id', $id)->where('created_at', '>', $lastPagoHasta)->count();\n\n //si count es arriba de 0 es porque tomó un turno y aún no paga\n if($deuda > 0 && $local->Local->cuenta == 'Premium'){\n $deuda = \"Si\";\n }else{\n $deuda = \"No\";\n }\n\n $meses = array('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic');\n $months = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');\n\n foreach ($pagos as $pago){\n $pago->fechaPago= date('d-m-Y', strtotime($pago->fechaPago));\n $pago->pagoDesde= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoDesde)));\n $pago->pagoHasta= str_replace($months, $meses, date('d-M-Y', strtotime($pago->pagoHasta)));\n }\n return view ('usuario.ver-pagos')\n ->with('pagos', $pagos)\n ->with('local', $local)\n ->with('deuda', $deuda);\n }\n }", "function listarSolicitudObligacionPago()\r\n {\r\n $this->procedimiento = 'tes.ft_solicitud_obligacion_pago_sel';\r\n $this->transaccion = 'TES_SOOBPG_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_obligacion_pago', 'int4');\r\n $this->captura('id_proveedor', 'int4');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('tipo_obligacion', 'varchar');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('moneda', 'varchar');\r\n $this->captura('obs', 'varchar');\r\n $this->captura('porc_retgar', 'numeric');\r\n $this->captura('id_subsistema', 'int4');\r\n $this->captura('nombre_subsistema', 'varchar');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('desc_funcionario1', 'text');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('porc_anticipo', 'numeric');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('nombre_depto', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n $this->captura('fecha', 'date');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('tipo_cambio_conv', 'numeric');\r\n $this->captura('id_gestion', 'integer');\r\n $this->captura('comprometido', 'varchar');\r\n $this->captura('nro_cuota_vigente', 'numeric');\r\n $this->captura('tipo_moneda', 'varchar');\r\n $this->captura('total_pago', 'numeric');\r\n $this->captura('pago_variable', 'varchar');\r\n $this->captura('id_depto_conta', 'integer');\r\n $this->captura('total_nro_cuota', 'integer');\r\n $this->captura('fecha_pp_ini', 'date');\r\n $this->captura('rotacion', 'integer');\r\n $this->captura('id_plantilla', 'integer');\r\n $this->captura('desc_plantilla', 'varchar');\r\n $this->captura('ultima_cuota_pp', 'numeric');\r\n $this->captura('ultimo_estado_pp', 'varchar');\r\n $this->captura('tipo_anticipo', 'varchar');\r\n $this->captura('ajuste_anticipo', 'numeric');\r\n $this->captura('ajuste_aplicado', 'numeric');\r\n $this->captura('monto_estimado_sg', 'numeric');\r\n $this->captura('id_obligacion_pago_extendida', 'integer');\r\n $this->captura('desc_contrato', 'text');\r\n $this->captura('id_contrato', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('uo_ex', 'varchar');\r\n //Funcionario responsable de el plan de pagos\r\n $this->captura('id_funcionario_responsable', 'integer');\r\n $this->captura('desc_fun_responsable', 'text');\r\n\r\n $this->captura('id_conformidad', 'int4');\r\n $this->captura('conformidad_final', 'text');\r\n $this->captura('fecha_conformidad_final', 'date');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('fecha_fin', 'date');\r\n $this->captura('observaciones', 'varchar');\r\n $this->captura('fecha_certificacion_pres', 'date');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function historyCliente(Request $request)\n {\n $cliente=Cliente::find($request->cliente_id);\n if(isset($request->hasta) && isset($request->desde)){\n $ventas=$cliente->ventas->where('fecha','>=',$request->desde)->where('fecha','<=',$request->hasta);\n $tipo=1;\n $desde=date(\"d/m/Y\", strtotime($request->desde));\n $hasta=date(\"d/m/Y\", strtotime($request->hasta));\n }else if(isset($request->fecha)){\n $tipo=2;\n \n $ventas=$cliente->ventas->where('fecha',$request->fecha);\n $fecha=date(\"d/m/Y\", strtotime($request->fecha));\n }else{\n $ventas=$cliente->ventas;\n $tipo=0;\n }\n\n $config=Config::first();\n // return $ventas; \n $pdf=PDF::loadview('pdf.historial_cliente',compact('cliente','config','ventas','desde','hasta','fecha','tipo'));\n #$pdf->setPaper(array(0,0,285,10000)); \n return $pdf->stream('Historial-'.$cliente->empresa.'.pdf');\n\n \n }", "function getPagosanteriores() {\n $where = \" WHERE 1\";\n $array = \"\";\n\n $columns = \"`Clave_catalogo`, `Nombre`, `Email`, `Cantidad`, `Fecha_pagada`, `Id_pago` \";\n $response = $this->db->select3($columns, 'catalogo_pagos', $where, $array);\n return $response;\n }", "function formatear_fecha($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\n\t\t/* Generamos el formato */\n\t\t$temp = $dia.\"/\".$mes.\"/\".$anno.\" (\".$hora.\":\".$minuto.\")\";\n\t\t\n\t\treturn $temp;\n\t}", "public function Consulta()\n\t{\n $this->vista = 1;\n //formeamos las fechas de inicio y fin\n\t\t$fi = Carbon::parse($this->fecha_ini)->format('Y-m-d').' 00:00:00';\n\t\t$ff = Carbon::parse($this->fecha_fin)->format('Y-m-d').' 23:59:59';\n\n if($this->fecha_ini > $this->fecha_fin)\n \t{\n \t\t$this->emit('msg-warning', 'Falta rango de fechas o rango de fechas no válido, por favor revise las fechas ingresadas.');\n }\n\n //si no se selecciono ningin paciente emitimos un mensaje de error;\n\t\t\t\n //buscamos al paciente\n $paciente = Paciente::where('id',$this->pacienteselected)->get();\n //iteramos para asignar a las variables declaradas\n foreach ($paciente as $p) {\n $this->nombre = $p->name.' '.$p->last_name;\n $this->ci = $p->nro_ci;\n $this->edad = Carbon::parse($p->date_nac)->age;\n }\n //buscamos las solicitudes del paciente en dichas fechas\n $this->solicitudes = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->get();\n //Sacamos el total de ingresos por pacient\n $this->total = Solicitud::where('pacient',$this->pacienteselected)->whereBetween('created_at',[$fi,$ff])->sum('pago');\n \n\t\t\n }", "function verOfertas(){//cambiar a getOfertas\n $conex=Conexion::getInstance(); \n $sql=\"SELECT *, DATE_FORMAT(fechaFin, '%d/%m/%Y') AS fechaF, DATE_FORMAT(fecha_creacion, '%d/%m/%Y') AS fechaC FROM ofertas\";\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt = $conex->dbh->prepare($sql);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n // Excecute\n $stmt->execute();\n // Acumulamos los resultados\n $ofertas=[];\n while ($row = $stmt->fetch()){\n \n //$ofertas[]= $row['descripcion'];\n $ofertas[$row['id_oferta']]=['id'=> $row['id_oferta'],'descripcion'=>$row['descripcion'],'contacto'=>$row['contacto'],\n 'telefono'=>$row['telefono'], 'email'=>$row['email'], 'direccion'=>$row['direccion'],\n 'poblacion'=>$row['poblacion'],'cp'=>$row['cp'],'provincia'=>$row['provincia'],\n 'estado'=>$row['estado'],'fechaInicial'=>$row['fechaC'],'fechaFin'=>$row['fechaF'],\n 'psicologo'=>$row['psicologo'],'candidato'=>$row['candidato'],'observaciones'=>$row['observaciones']];\n }\n return $ofertas;\n}", "public function getListado(Request $request){\n //estado_2 = pagado, orden_0 = desendente\n //estado_1 = emitido, orden_1 = asendente\n //estado_0 = vencido\n $estado = $request->input('estado');\n $orden = $request->input('orden');\n \n if ($orden == '0') {\n $test = DB::select('\n SELECT f.factura_numero, e.empresa_razonsocial, (CAST(now() as date) - f.factura_fvencimiento) as calc \n from tbl_empresa as e \n inner join tbl_factura as f \n on e.empresa_cod = \n f.factura_cliente_cod \n where f.factura_estado = ? order by calc desc'\n , [$estado]);\n return $test;\n } \n else \n if ($orden == '1') {\n $test = DB::select('\n SELECT f.factura_numero, \n e.empresa_razonsocial, (CAST(now() as date) - f.factura_fvencimiento) as calc \n from tbl_empresa as e \n inner join tbl_factura as f \n on e.empresa_cod = f.factura_cliente_cod where f.factura_estado = ? \n and f.factura_femision >= (CAST(now() as date) - 200)\n order by calc asc', [$estado]);\n return $test;\n }\n }", "public function getFormaPago();", "public function BuscarCreditosFechas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tventas.idventa, ventas.codventa, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, abonoscreditos.fechaabono, SUM(abonoscreditos.montoabono) as abonototal, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.emailcliente, cajas.nrocaja\n\tFROM\n\t(ventas LEFT JOIN abonoscreditos ON ventas.codventa=abonoscreditos.codventa) LEFT JOIN clientes ON \n\tclientes.codcliente=ventas.codcliente LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND ventas.tipopagove ='CREDITO' GROUP BY ventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN CREDITOS DE VENTAS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public static function pesquisaTodos($request){\n $externa = \"https://www.seminovosbh.com.br/resultadobusca/index/\";\n\n //Filtro veículo\n if($request->veiculo == \"carro\")\n $externa .= \"veiculo/carro/\";\n if($request->veiculo == \"moto\")\n $externa .= \"veiculo/moto/\";\n if($request->veiculo == \"caminhao\")\n $externa .= \"veiculo/caminhao/\";\n \n //Filtro estado de conservação\n if($request->estado_conservacao == \"0km\")\n $externa .= \"estado-conservacao/0km/\";\n if($request->estado_conservacao == \"seminovo\")\n $externa .= \"estado-conservacao/seminovo/\";\n\n //Filtro de marca e modelo\n $externa .= \"marca/\".$request->marca.\"/\";\n $externa .= \"modelo/\".$request->modelo.\"/\";\n\n //Filtro de cidade\n if(isset($request->cidade))\n $externa .= \"cidade/\".$request->cidade.\"/\";\n \n //Filtro de valores\n if(isset($request->valor1) && isset($request->valor2))\n $externa .= \"valor1/\".$request->valor1.\"/valor2/\".$request->valor2.\"/\";\n \n //Filtro de anos\n if(isset($request->ano1) && isset($request->ano2))\n $externa .= \"ano1/\".$request->ano1.\"/ano2/\".$request->ano2.\"/\";\n \n //Filtro de tipo de usuário\n if($request->usuario == \"particular\")\n $externa .= \"usuario/particular/\";\n else if($request->usuario == \"revenda\")\n $externa .= \"usuario/revenda/\";\n else \n $externa .= \"usuario/todos/\";\n \n //Maior quantidade de registros possíveis\n $externa .= \"qtdpag/50/\";\n\n //Escolhe a página\n if(isset($request->pagina))\n $externa .= \"pagina/\".$request->pagina.\"/\";\n \n //Extrai os dados da página e retira deles a lista de carros resultante\n $resultados = file_get_contents($externa);\n $resultados_filtro = explode('<dd class=\"titulo-busca\">', $resultados);\n unset($resultados_filtro[0]);\n\n //Pega a quantidade total de páginas da consulta\n $aux1 = explode('<strong class=\"total\">', $resultados);\n $aux2 = explode('</strong>', $aux1[1]);\n $totalPaginas = $aux2[0];\n\n //Cria o array que será utilizado como retorno e informa na primeira posição qual a quantidade de páginas para o usuário navegar entre os resultados\n $compilado = array();\n $compilado[0] = array(\"totalpaginas\" => $totalPaginas);\n $i = 1;\n\n //Para cada resultado, separa-se o título e o código do anúncio para utilizar no outro endpoint \n foreach($resultados_filtro as $resultado){\n $resto = explode('</dd>', $resultado);\n $linha = $resto[0];\n\n $arrayCodigo = explode('/', $linha);\n $codigo = $arrayCodigo[1].\"/\".$arrayCodigo[2].\"/\".$arrayCodigo[3].\"/\".$arrayCodigo[4].\"/\".$arrayCodigo[5].\"/\";\n\n $aux1 = explode('<h4>', $linha);\n $aux2 = explode('</h4>', $aux1[1]);\n $titulo = strip_tags($aux2[0]);\n\n $compilado[$i] = array(\"codigo\"=> $codigo, \"titulo\" => $titulo);\n $i++;\n }\n\n return response()->json($compilado, 200);\n }", "public function index(Request $request)\n {\n $diaAnterior = Carbon::now('America/Bogota')->subDay()->toDateTimeString();\n $diaActual = Carbon::now('America/Bogota')->toDateTimeString();\n\n $buscar = $request->buscar;\n $criterio = $request->criterio;\n $id_empresa = $request->session()->get('id_empresa');\n \n if ($buscar==''){\n $cajas = Cajas::where('id_empresa','=',$id_empresa)->orderBy('id', 'desc')->paginate(15);\n }\n else{\n $cajas = Cajas::where('id_empresa','=',$id_empresa)->where($criterio, 'like', '%'. $buscar . '%')->orderBy('id', 'desc')->paginate(15);\n }\n\n if(!empty($cajas))\n {\n foreach($cajas as $c)\n {\n $c['estado_caja'] = '0';\n $c['tiempo_caja'] = '0000-00-00 00:00:00';\n $c['usuario_caja'] = '';\n\n $sql = \"SELECT cajas_cierres.id, cajas_cierres.id_caja, cajas_cierres.vr_inicial, cajas_cierres.obs_inicial, cajas_cierres.vr_gastos, cajas_cierres.obs_gastos, cajas_cierres.vr_software, cajas_cierres.vr_final, cajas_cierres.estado, cajas_cierres.usu_crea, cajas_cierres.id_empresa, cajas_cierres.created_at, cajas_cierres.updated_at, users.usuario as nom_usuario FROM cajas_cierres,users WHERE id_caja=\".$c->id.\" AND cajas_cierres.usu_crea=users.id ORDER BY id desc LIMIT 1\";\n $cierres = DB::select($sql);\n\n if(!empty($cierres))\n {\n $c['estado_caja'] = $cierres[0]->estado;\n $c['tiempo_caja'] = $cierres[0]->created_at;\n $c['usuario_caja'] = $cierres[0]->nom_usuario;\n }\n }\n }\n \n\n return [\n 'pagination' => [\n 'total' => $cajas->total(),\n 'current_page' => $cajas->currentPage(),\n 'per_page' => $cajas->perPage(),\n 'last_page' => $cajas->lastPage(),\n 'from' => $cajas->firstItem(),\n 'to' => $cajas->lastItem(),\n ],\n 'cajas' => $cajas\n ];\n }", "public function pago_pendiente()\n\t{\n\t\t$sql = \"SELECT pagos.* FROM pagos WHERE pagos.fecha_cobro <= NOW() AND pagos.status <> 2 AND pagos.alumno_id = {$this->userId} AND periodo <> 0;\";\n\t\t$this->Util()->DB()->setQuery($sql);\n\t\t$resultado = $this->Util()->DB()->GetResult();\n\t\t$pagoPendiente = false;\n\t\tforeach ($resultado as $item) {\n\t\t\tif ($item['status'] == 3) {\n\t\t\t\t$fecha_limite = date(\"Y-m-d\", strtotime($item['fecha_limite'] . \"+ \" . ($item['tolerancia'] - 1) . \" days\"));\n\t\t\t} else {\n\t\t\t\t$fecha_limite = $item['fecha_limite'];\n\t\t\t}\n\t\t\tif ($fecha_limite < date('Y-m-d')) {\n\t\t\t\t$pagoPendiente = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $pagoPendiente;\n\t}", "public function buscar_comprobante_venta_3($anio ,$mes ,$fech1 ,$fech2 ,$tipodocumento) {\n //CPC_TipoDocumento => F factura, B boleta\n //CPC_total => total de la FACTURA o BOLETA CPC_FechaRegistro BETWEEN '20121201' AND '20121202'\n\n $where=\"\";\n //----------\n if($anio!=\"--\" && $mes ==\"--\"){// SOLO AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"'\";\n }\n if($anio!=\"--\" && $mes !=\"--\" ){// MES Y AÑO\n $where=\"AND YEAR(CPC_FechaRegistro)='\" . $anio . \"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n if($anio==\"--\" && $mes !=\"--\"){//MES CON AÑO ACTUAL\n $where=\"AND YEAR(CPC_FechaRegistro)=' \".date(\"Y\").\"' AND MONTH(CPC_FechaRegistro)='\" . $mes .\"'\";\n }\n\n //-----------------\n \n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2==\"--\"){//FECHA INICIAL\n $where=\"AND CPC_FechaRegistro > '\" . $fech1 . \"'\";\n }\n if($anio==\"--\" && $mes ==\"--\" && $fech1!=\"--\" && $fech2!=\"--\" ){//FECHA INICIAL Y FECHA FINAL\n $where=\"AND CPC_FechaRegistro >= '\" . $fech1 . \"' AND CPC_FechaRegistro <= '\" . $fech2 . \"'\";\n }\n \n \n //------------\n\n \n $wheretdoc= \"\";\n if($tipodocumento !=\"--\")\n $wheretdoc= \" AND CPC_TipoDocumento='\".$tipodocumento.\"' \";\n\n \n\n $sql = \" SELECT com.*,CONCAT(pe.PERSC_Nombre , ' ', pe.PERSC_ApellidoPaterno, ' ', pe.PERSC_ApellidoMaterno) as nombre , MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_persona pe on pe.PERSP_Codigo = cl.PERSP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo=com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\n \n UNION \n SELECT com.* ,EMPRC_RazonSocial as nombre ,MONED_Simbolo from cji_comprobante com\n inner join cji_cliente cl on cl.CLIP_Codigo = com.CLIP_Codigo\n inner join cji_empresa es on es.EMPRP_Codigo = cl.EMPRP_Codigo\n inner JOIN cji_moneda m ON m.MONED_Codigo = com.MONED_Codigo \n WHERE CPC_TipoOperacion='V' \".$wheretdoc.$where.\"\";\n\n //echo $sql;\n $query = $this->db->query($sql);\n if ($query->num_rows > 0) {\n foreach ($query->result() as $fila) {\n $data[] = $fila;\n }\n return $data;\n }\n return array();\n }", "public function index()\n { \n if($_GET && isset($_GET['contato'])){\n $contatos = Contato::whereRaw(\"nome = '\".$_GET['contato'].\"'\")->Paginate(10);\n } else {\n $contatos = Contato::Paginate(10);\n }\n\n foreach ($contatos->all() as $key => $value) {\n if($value->data_nasc != null && $value->data_nasc != \"0000-00-00\"){\n $data_nasc = $value->data_nasc;\n $contatos[$key]->data_nasc_fmt = date(\"d/m/Y\", strtotime($data_nasc));\n } else {\n $contatos[$key]->data_nasc_fmt = \"---\";\n }\n }\n\n return view('contato.index', compact('contatos'));\n }", "public function mostrarReporte(Request $request)\n\t{\n\t\t$semana = $request->input(\"semana\");\n\t\t$year = $request->input(\"year\"); //en ingles para no sonar obsceno\n\n\t\t//Obtener la fecha en la que inicia y termina la semana seleccionada\n\t\t$fecha1 = new DateTime();\n\t\t$fecha1->setISODate($year,$semana,1);\n\t\t$fecha1 = $fecha1->format('Y-m-d');\n\n\t\t$fecha2 = new DateTime();\n\t\t$fecha2->setISODate($year,$semana,7);\n\t\t$fecha2 = $fecha2->format('Y-m-d');\n\n\t\t//declarar el query en formato SQL para cada uno de los parametros, como un string\n\t\t//el string siguiente seria \"fecha BETWEEN CAST('{fecha1}' AS DATE) AND CAST('{fecha2}' AS DATE)\"\n\t\t$queryFechas = \"fecha BETWEEN CAST('\" . $fecha1 . \"' AS DATE) AND CAST('\" . $fecha2 . \"' AS DATE)\";\n\n\t\t//crear el query para el numero de empleado y designar la etiqueta del filtro\n\t\tif($request->input('empleado') == 'null') $queryEmpleado = \"\"; //string vacio si no se define un empleado\n\t\telse {\n\t\t\t$empleado = EmpleadoCt::find($request->input('empleado'));\n\t\t\t$queryEmpleado = \" AND idEmpleado = '\" . $request->input('empleado') . \"'\";\n\t\t}\n\n\t\t$query = $queryFechas . $queryEmpleado;\n\n\t\t$checadas = ChecadaCt::whereRaw($query)->get();\n\n\t\t$empleados = array();\n\n\t\t$reporte = [\n\t\t'empleados' => array(),\n\t\t'dias' => array(),\n\t\t'total_dias' => 0,\n\t\t'total_horas' => 0,\n\t\t'total_horas_extra' => 0,\n\t\t'total_prestamos' => 0,\n\t\t'total_descuentos' => 0\n\t\t];\n\n\t\tfor($i = 1; $i <= 7; $i++){ //obtener el dia del mes en el que cae cada dia de la semana\n\t\t\t$fecha = new DateTime();\n\t\t\t$fecha->setISODate($year,$semana,$i);\n\t\t\t$reporte['dias'][$i]['dia'] = $fecha->format('d');\n\t\t\t$reporte['dias'][$i]['personas'] = 0;\n\t\t}\n\n\t\tforeach($checadas as $checada){\n\t\t\t$empleado = EmpleadoCt::where('idEmpleadoCt', $checada->idEmpleadoCt)->first(); //obtener al empleado\n\t\t\tarray_push($empleados, $empleado);\n\t\t}\n\n\t\t$empleados = array_unique($empleados); //eliminar empleados repetidos\n\n\t\tforeach($empleados as $empleado){\n\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt] = [\n\t\t\t'ap_paterno' => $empleado->ap_paterno,\n\t\t\t'ap_materno' => $empleado->ap_materno,\n\t\t\t'nombre' => $empleado->nombres,\n\t\t\t'area' => AreaCt::where('idAreaCt', $empleado->area)->first()->nombre,\n\t\t\t'no_cuenta' => $empleado->no_cuenta,\n\t\t\t'checadas' => array(),\n\t\t\t'horas_extra' => 0,\n\t\t\t'horas_ordinarias' => 0,\n\t\t\t'descuentos' => 0,\n\t\t\t'prestamos' => 0];\n\n\t\t\t//obtener todas las checadas correspondientes al empleado\n\t\t\tfor($i = 1; $i <= 7; $i++){ //agregar todas las checadas de la semana\n\t\t\t\t$fecha = new DateTime();\n\t\t\t\t$fecha->setISODate($year,$semana,$i);\n\t\t\t\t$fecha = $fecha->format('Y-m-d');\n\t\t\t\t$checadasDelDia = ChecadaCt::where('fecha',$fecha)->where('idEmpleadoCt',$empleado->idEmpleadoCt)->get();\n\t\t\t\t//generar nueva checada que no se guarda en BD pero se envia a la vista\n\t\t\t\t$checadaDelDia = new ChecadaCt([\n\t\t\t\t\t'idEmpleadoCt' => $empleado->idEmpleadoCt,\n\t\t\t\t\t'fecha' => $fecha,]);\n\n\t\t\t\t//obtener los descuentos y prestamos de cada empleado\n\t\t\t\t$descuentos = DescuentoCt::where('empleado',$empleado->idEmpleadoCt)->where('fecha',$fecha)->get();\n\t\t\t\tforeach($descuentos as $descuento){\n\t\t\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt]['descuentos'] += $descuento->monto;\n\t\t\t\t\t$reporte['total_descuentos'] += $descuento->monto;\n\t\t\t\t}\n\n\t\t\t\t$prestamos = Prestamo::where('empleado',$empleado->idEmpleadoCt)->where('fecha',$fecha)->get();\n\t\t\t\tforeach($prestamos as $prestamo){\n\t\t\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt]['prestamos'] += $prestamo->monto;\n\t\t\t\t\t$reporte['total_prestamos'] += $prestamo->monto;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//sumarle las horas de todas las checadas de ese dia\n\t\t\t\tforeach($checadasDelDia as $ch){\n\t\t\t\t\t$checadaDelDia->hora_entrada += $ch->hora_entrada;\n\t\t\t\t\t$checadaDelDia->hora_salida += $ch->hora_salida;\n\t\t\t\t\t$checadaDelDia->horas_ordinarias += $ch->horas_ordinarias;\n\t\t\t\t\t$checadaDelDia->horas_extra += $ch->horas_extra;\n\t\t\t\t}\n\n\t\t\t\t//enviar un valor nulo si no nhay checada en ese dia\n\t\t\t\tif(ChecadaCt::where('fecha',$fecha)->where('idEmpleadoCt',$empleado->idEmpleadoCt)->first() == null){\n\t\t\t\t\t$checadaDelDia = null;\n\t\t\t\t}\n\n\t\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt]['checadas'][$i] = $checadaDelDia;\n\n\t\t\t\t//sumar las horas trabajadas por cada checada\n\t\t\t\tif($checadaDelDia != null){\n\t\t\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt]['horas_extra'] += $checadaDelDia->horas_extra;\n\t\t\t\t\t$reporte['empleados'][$empleado->idEmpleadoCt]['horas_ordinarias'] += $checadaDelDia->horas_ordinarias;\n\t\t\t\t\t$reporte['dias'][$i]['personas'] += 1;\n\t\t\t\t\t$reporte['total_horas'] += $checadaDelDia->horas_ordinarias;\n\t\t\t\t\t$reporte['total_horas_extra'] =+ $checadaDelDia->horas_extra;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$empleados = EmpleadoCt::all();\n\t\t$parametros = ['empleados' => $empleados, \"reporte\" => $reporte, 'semana' => $request->input('semana'), 'fecha1' => $fecha1, 'fecha2' => $fecha2];\n\t\treturn view('empleados_ct/reporte_ct')->with('parametros',$parametros);\n\t}", "public function indexAction(Request $request)\n {\n \n $em = $this->getDoctrine()->getManager();\n\n /*$dateact = date('Y-m-d');\n $dql = \"SELECT a FROM ChecRegBundle:Asistencia a ORDER BY a.create_at DESC\";\n $query = $em->createQuery($dql);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query, // query NOT result \n $request->query->getInt('page', 1)//page number,\n 5//limit per page\n );\n */\n \n $data['title'] = 'Reporte de Asistencia Gráfico';\n //$data['pagination'] = $pagination;\n \n return $this->render('ChecRegBundle:RepAsistenciaOne:index.html.twig', $data);\n }", "function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "public function findServiseDate(Request $request )\n {\n $request->validate([\n 'id'=>'required',\n 'brojDana'=>'required',\n ]);\n\n $id=$request->id;\n $brojDana=$request->brojDana;\n if($brojDana>0)\n {\n $dateStart=CarInfoResource::findNextFreeDate($id,$brojDana);\n $dateEnd=date('Y-m-d', strtotime($dateStart.\" + $brojDana days\"));\n\n return view('kriticni.zakaziServis2',[\"id\"=>$id,\"dateStart\"=>$dateStart,\"dateEnd\"=>$dateEnd]);\n }\n else\n {\n return $this->kriticni();\n }\n }", "public function index() {\n $anuncio = new anuncios();\n //$usuario = new usuario();\n \n // $pag = \"inicial\";\n // $result = \"\";\n // if (isset($_GET['pag']) && !empty($_GET['pag'])){\n // $pag=$_GET['pag'];\n // }\n // if (isset($_GET['result']) && !empty($_GET['result'])){\n // $result=$_GET['result'];\n // }\n \n $refat = 1;\n $qtdPag = 2;\n if (isset($_GET['refat']) && !empty($_GET['refat'])){\n $refat = $_GET['refat'];\n }\n \n if (isset($_GET['filtros'])){\n $filtros = $this->iniciarFiltros($_GET['filtros']);\n if (!empty($filtros['categoria'])){\n $anuncio->setIDCategoria($filtros['categoria']);\n }\n if (!empty($filtros['preco'])){\n $preco = explode(\"-\", $filtros['preco']);\n //print_r($preco);\n $anuncio->setValor($preco);\n }\n if (!empty($filtros['estado'])){\n $anuncio->setEstado($filtros['estado']);\n }\n } else {\n $filtros = $this->iniciarFiltros();\n }\n \n //$filtros = array(\n // 'categoria' => '',\n // 'preco' => '',\n // 'estado' => ''\n //);\n \n //if (isset($_GET['filtros'])){\n // $filtros = $_GET['filtros'];\n // if (!empty($filtros['categoria'])){\n // $anuncio->setIDCategoria($filtros['categoria']);\n // }\n // if (!empty($filtros['preco'])){\n // $preco = explode(\"-\", $filtros['preco']);\n // //print_r($preco);\n // $anuncio->setValor($preco);\n // }\n // if (!empty($filtros['estado'])){\n // $anuncio->setEstado($filtros['estado']);\n // }\n //}\n \n $result = $anuncio->selecionarALLAnuncios($refat, $qtdPag);\n if ($anuncio->numRows() == 1){\n $result = array();\n $result[] = $anuncio->result();\n }\n \n $resultQTD = $anuncio->getQTDAnuncios();\n $totAnuncios = $resultQTD['qtd'];\n \n //$categorias = $cat->selecionarAllCategorias();\n //if ($cat->numRows() == 1){\n // $categorias = array();\n // $categorias[] = $cat->result();\n //}\n \n //$usuario->selecionarALLUser();\n //$totUsuarios = $usuario->numRows();\n \n //$totalPag = ceil($totAnuncios / $qtdPag);\n \n $dados = $this->getTemplateDados();\n $dados[\"refat\"] = $refat;\n $dados[\"filtros\"] = $filtros;\n $dados[\"result\"] = $result;\n //$dados[\"categorias\"] = $categorias;\n $dados[\"totAnuncios\"] = $totAnuncios;\n //$dados[\"totUsuarios\"] = $totUsuarios;\n $dados[\"totalPag\"] = ceil($totAnuncios / $qtdPag);\n \n $this->loadTemplate(\"inicial\", $dados);\n }", "public function recibir_notificacion_prueba()\n {\n Log::info('PagosController.recibir_notificacion_prueba entrada de datos');\n\n if (Request::isMethod('POST'))\n {\n //Recibimos el status por correo y lo ponemos en la url para que crear el pago\n $exref = Input::get('exref');\n $status = Input::get('status');\n\n $response = array(\"external_reference\" => $exref, \"status\" => $status);\n if (isset($response))\n {\n\n $external_reference = $response['external_reference'];\n $status = $response['status'];\n\n $ids = explode(\"-\", rtrim($external_reference, \"-\"));\n\n foreach ($ids as $id) {\n $pago = Pago::find($id);\n if ($status == \"approved\")\n {\n $pago->pagado = true;\n $pago->status = $status;\n $pago->metodo = \"Mercado Pago\";\n }\n else\n {\n $pago->status = $status;\n }\n $pago->update();\n }\n $email = $pago->cliente->user->email;\n $nombre = $pago->cliente->nombre;\n\n switch ($status) {\n case 'approved':\n Mail::queue('emails.publicacion_contenido_pago', array(), function($message) use ($email, $nombre) {\n $message->to($email, $nombre)->subject('Publicación de contenido en Sphellar');\n });\n echo \"cambios realizados\";\n break;\n case \"cenceled\":\n Mail::queue('emails.pago_cancelado', array(), function($message) use ($email, $nombre) {\n $message->to($email, $nombre)->subject('Pago cancelado');\n });\n break;\n default:\n\n echo \"status diferente a aprobado\";\n break;\n }\n }\n else\n {\n Log::error('PagosController.obtenerIPNMercadoPago No se recibio informacion de pago ID:' . $id);\n echo \"no recibido\";\n }\n }\n else\n {\n\n return View::make('pagos.index');\n }\n }", "function IniciarPago($NumeroFactura,$MontoBase,$MontoImpuestos,$MontoEnvio,$MontoManejo,$MontoSeguro,$MontoDescuento,$Moneda){\n\t\tif (!_PayPal::$MiToken){\n\t\t\terror_log(\"_PayPal::IniciarPago() Error : Primero debe obetener un Token\");\n\t\t\treturn false;\n\t\t}\n\t\t$MontoAPagar = ($MontoBase + $MontoImpuestos + $MontoEnvio + $MontoManejo + $MontoSeguro) - $MontoDescuento;\n\t\t$lasOpc = $this->CrearArrayOpciones(\n\t\t\t\t\t\"Authorization: Bearer \" . _PayPal::$MiToken\n\t\t\t\t\t);\n\t\t$lasOpc[CURLOPT_URL] = _PayPal::$URLPago;\n\t\t$lasOpc[CURLOPT_POSTFIELDS] = json_encode(Array(\n\t\t\t\t\t\t\t\"intent\" => \"sale\"\n\t\t\t\t\t\t\t,\"payer\" => Array(\n\t\t\t\t\t\t\t\t\t// \"payment_method\" => \"paypal\"\n\t\t\t\t\t\t\t\t\t\"payment_method\" => \"CREDIT_CARD\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t,\"transactions\" => Array(\n\t\t\t\t\t\t\t\t\t\tArray(\n\t\t\t\t\t\t\t\t\t\t\t\"amount\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"total\" => $MontoAPagar\n\t\t\t\t\t\t\t\t\t\t\t\t\t,\"currency\" => $Moneda\n\t\t\t\t\t\t\t\t\t\t\t\t\t,\"details\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"subtotal\" => $MontoBase\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"tax\" => $MontoImpuestos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"shipping\" => $MontoEnvio\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"handling_fee\" => $MontoManejo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"shipping_discount\" => - $MontoDescuento\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"insurance\" => $MontoSeguro\n\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)\n\t\t\t\t\t\t\t\t\t\t\t,\"description\" => \"SportSiete Payment\"\n\t\t\t\t\t\t\t\t\t\t\t,\"custom\" => $NumeroFactura\n\t\t\t\t\t\t\t\t\t\t\t,\"invoice_number\" => $NumeroFactura\n\t\t\t\t\t\t\t\t\t\t\t,\"payment_options\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"allowed_payment_method\" => \"INSTANT_FUNDING_SOURCE\"\n\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,\"soft_descriptor\" => \"ECHI5786786\"\n\t\t\t\t\t\t\t\t\t\t\t,\"item_list\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"items\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => \"CB0001\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"description\" => \"Carga Saldo\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"quantity\" => \"1\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"price\" => $MontoBase\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"tax\" => $MontoImpuestos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"sku\" => \"CB0001\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"currency\" => $Moneda\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\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t,\"shipping_address\" => Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"recipient_name\" => \"Hello World\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"line1\" => \"4thFloor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"line2\" => \"unit#34\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"city\" => \"SAn Jose\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"country_code\" => \"CO\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"postal_code\" => \"00000\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"phone\" => \"+573334445566\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,\"state\" => \"AN\"\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)\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,\"note_to_payer\" => \"Contact us for any questions on your order.\"\n\t\t\t\t\t\t\t,\"redirect_urls\" => Array(\n\t\t\t\t\t\t\t\t\t\t\"return_url\" => \"https://sportsiete.com/FelicitacionesPorSuPago.php\"\n\t\t\t\t\t\t\t\t\t\t,\"cancel_url\" => \"https://sportsiete.com/ErrorEnPago.php\"\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\nerror_log($lasOpc[CURLOPT_POSTFIELDS]);\n\t\t$resp = $this->ConsumirServicio($lasOpc);\n\t\tif ( $resp && isset($resp->state) ){\n\t\t\tswitch(strtolower($resp->state)){\n\t\t\t\tcase \"created\":\n\t\t\t\t\tif ( ! $resp->id ){\n\t\t\t\t\t\terror_log(\"_PayPal::IniciarPago() Error : No contiene un ID\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t_PayPal::$MiTransaccionID = $resp->id;\n\t\t\t\t\tif ( ! $resp->links ){\n\t\t\t\t\t\terror_log(\"PayPal : No se encontraron Links en la respuesta \" . var_export($resp,true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror_log(\"PayPal : Links encontrados \" . var_export($resp->links,true));\n\t\t\t\t\t\tforeach($resp->links as $unLink){\n\t\t\t\t\t\t\tif ($unLink->method == \"REDIRECT\"){\n\t\t\t\t\t\t\t\terror_log(\"PayPal : Se encontro la URL \" . $unLink->href);\n\t\t\t\t\t\t\t\t_PayPal::$MiURLConfirmacion = $unLink->href;\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t\terror_log(\"PayPal : Se ignora URL porque es para metodo \" . $unLink->method);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn _PayPal::$MiTransaccionID;\n\t\t\t\tdefault:\n\t\t\t\t\terror_log(\"_PayPal::IniciarPago() Error : Estado de respuesta no es aceptable \" . $resp->state);\n\t\t\t\t\terror_log(var_export($resp,true));\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\terror_log(\"_PayPal::IniciarPago() Error : Estado de respuesta no es aceptable \" . var_export($resp,true));\n\t\treturn false;\n\n\t}", "private function obtenerVentasDia($fecha,$sede)\n {\n $fechaFormateada = new \\DateTime($fecha);\n $fechaInicio = $fechaFormateada->format('Y-m-d 00:00:00');\n $fechaFinal = $fechaFormateada->format('Y-m-d 23:59:59');\n \n// $fechaInicio = $this->container->get('fechaHora')->fechaInicio($fecha);\n// \n// $fechaFinal = $this->container\n// ->get('fechaHora')\n// ->fechaFinal($fecha);\n \n return \n $this->entityManager->createQueryBuilder()\n ->select('tc.nombreComensal as tipo,'\n . 'count(hr) as cantidad,'\n . 'sum(hr.montoRecarga) as total'\n )\n ->from('ComensalesBundle:HistorialRecargas','hr')\n ->innerJoin('hr.tarjeta','tarj')\n ->innerJoin('tarj.solicitud','soli')\n ->innerJoin('soli.tipo_comensal','tc')\n ->innerJoin('hr.itemRecarga','item')\n ->innerJoin('hr.sedeRecarga','sed')\n ->where('sed.nombreSede = :sedeElegida')\n ->setParameter('sedeElegida',$sede)\n ->andWhere('hr.fechaHoraRecarga BETWEEN :dateMin AND :dateMax')\n ->setParameter('dateMin',$fechaInicio)\n ->setParameter('dateMax',$fechaFinal)\n ->groupBy('tc.nombreComensal')\n ->orderBy('total','DESC')\n ->getQuery()\n ->getArrayResult();\n }", "public function PagarCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" update compras set \"\n\t\t.\" fechavencecredito = '0000-00-00', \"\n\t\t.\" statuscompra = ? \"\n\t\t.\" where \"\n\t\t.\" codcompra = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $statuscompra);\n\t\t$stmt->bindParam(2, $codcompra);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$statuscompra = strip_tags(\"PAGADA\");\n\t\t$stmt->execute();\n\n\t\theader(\"Location: compraspendientes?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: compraspendientes?mesage=2\");\n\t\texit;\n\t}\n\n}", "function ConsultarPeritaje($idDisp,$fecha, $mes, $dia){\n $data_points = array();\n $datos = DB::select(\"SELECT * FROM `bitacoras` WHERE YEAR(`Fecha`) = :fecha and `Id_dispositivo` = :idDisp and MONTH(`Fecha`) = :mes and DAY(`Fecha`) = :dia AND HOUR(`Hora`)= (SELECT MAX(HOUR(`Hora`)) FROM `bitacoras` WHERE HOUR(`Hora`) ) ORDER by `Hora` ASC\",\n [\"idDisp\" => $idDisp ,\"fecha\" => $fecha, \"mes\"=> $mes, \"dia\"=> $dia ]);\n\n foreach ($datos as $valor) {\n $point = array(\"valorx\" => $valor->Hora, \"valory\" => $valor->Velocidad,\n \"latitud\" => $valor->Latitud, \"Longitud\" => $valor->Longitud);\n array_push($data_points, $point);\n }\n\n return json_encode($data_points);\n }", "public function printDiasByRango($fechaInicio, $fechaFin){\n echo \"<h1>$this->asignatura : Programacion</h1>\";\n// echo \"<strong>FechaInicio = \".$fechaInicio->format('Y-m-d').\"</strong>\";\n// echo \"<strong>FechaFin = \".$fechaFin->format('Y-m-d').\"</strong>\";\n echo \"<h2> Unidades </h2>\";\n $this->printUnidades();\n\n //echo \"<h2> PLANIFICACION\".count($this->DIAS).\"</h2>\";\n $mes = -1;\n foreach($this->DIAS as $dia){\n // parsear dia\n $mesDia = $dia->fecha->format('m');\n $diaSemana = $dia->fecha->format('w');\n\n // cambio de mes\n if ($mes != $mesDia){\n // cambio de mes\n // fin mes\n if ($mes != -1){\n echo \"</table>\\n\";\n }\n\n // nuevo mes\n $mes = $mesDia;\n $this->printCabeceraMes($dia);\n // rellenar hasta lunes\n if ($diaSemana != 0 ){\n $relleno = $diaSemana;\n }else{\n // es domingo cambio\n $relleno = 7;\n }\n for ($d = 1; $d < $relleno; $d++ ){\n echo \"<td></td>\\n\";// hueco de dia vacio\n }\n }\n // cambio de semana\n if ($diaSemana == 1){\n echo \"</tr>\\n\";\n echo \"<tr>\\n\";\n }\n\n // cambio de unidad\n //<<\n\n // escribir dia\n $this->printDia($dia);\n }\n\n }", "private function getDatosVentaFitterMeses($fechaInicial, $fechaFinal, $fitter, $request)\n {\n setlocale(LC_ALL, 'es_ES');\n $mes = $fechaInicial->formatLocalized('%B'); // mes en idioma español \n\n $datosVentasMes = [];\n $fechaFinal = $fechaFinal->endOfMonth();\n\n while ($fechaInicial->lessThanOrEqualTo($fechaFinal)) {\n $datosMes = $this->getDatosVentaFitterXMes($fechaInicial, $fechaFinal, $fitter, $request);\n // dd($datosMes);\n if ($datosMes[\"totales\"][\"montoVenta\"][\"valor\"] !== 0) {\n $datosVentasMes[] = [\n \"mes\" => ucfirst($fechaInicial->formatLocalized('%B')),\n \"metas\" => [\n \"montoVenta\" => $datosMes[\"montoVenta\"][0][\"meta\"],\n \"pacientes\" => $datosMes[\"pacientes\"][0][\"meta\"],\n \"recompras\" => $datosMes[\"recompras\"][0][\"meta\"],\n\n \"calcetines\" => $datosMes[\"calcetines\"][0][\"meta\"],\n \"leggings\" => $datosMes[\"leggings\"][0][\"meta\"],\n \"tobi\" => $datosMes[\"tobi\"][0][\"meta\"],\n \"panti\" => $datosMes[\"panti\"][0][\"meta\"],\n \"muslo\" => $datosMes[\"muslo\"][0][\"meta\"],\n \"mayorValor\" => $datosMes[\"mayorValor\"][0][\"meta\"],\n \"menorValor\" => $datosMes[\"menorValor\"][0][\"meta\"]\n ],\n $datosMes[\"totales\"],\n ];\n }\n\n $fechaInicial->addMonth();\n }\n\n $sumMonto = 0;\n $sumPacientes = 0;\n $sumRecompras = 0;\n $sumcalcetines=0;\n $sumleggings=0;\n $sumtobi=0;\n $sumpanti =0;\n $sumlmuslo=0;\n $summayorValor=0;\n $summenorValor=0;\n $sumMetas = [0, 0, 0,0, 0, 0,0, 0, 0,0];\n\n foreach ($datosVentasMes as $row) {\n\n $sumMonto += $row[0][\"montoVenta\"][\"valor\"];\n $sumPacientes += $row[0][\"pacientes\"][\"valor\"];\n $sumRecompras += $row[0][\"recompras\"][\"valor\"];\n $sumcalcetines += $row[0][\"calcetines\"][\"valor\"];\n $sumleggings += $row[0][\"leggings\"][\"valor\"];\n $sumtobi += $row[0][\"tobi\"][\"valor\"];\n $sumpanti += $row[0][\"panti\"][\"valor\"];\n $sumlmuslo += $row[0][\"muslo\"][\"valor\"];\n $summayorValor += $row[0][\"mayorValor\"][\"valor\"];\n $summenorValor += $row[0][\"menorValor\"][\"valor\"];\n \n \n\n\n\n $sumMetas[0] += $row[\"metas\"][\"montoVenta\"];\n $sumMetas[1] += $row[\"metas\"][\"pacientes\"];\n $sumMetas[2] += $row[\"metas\"][\"recompras\"];\n $sumMetas[3] += $row[\"metas\"][\"calcetines\"];\n $sumMetas[4] += $row[\"metas\"][\"leggings\"];\n $sumMetas[5] += $row[\"metas\"][\"tobi\"];\n $sumMetas[6] += $row[\"metas\"][\"panti\"];\n $sumMetas[7] += $row[\"metas\"][\"muslo\"];\n $sumMetas[8] += $row[\"metas\"][\"mayorValor\"];\n $sumMetas[9] += $row[\"metas\"][\"menorValor\"];\n }\n\n $datosVentasMes[\"totales\"] = [\n \"montoVenta\" => [$sumMetas[0], $sumMonto, (($sumMonto * 100) / $sumMetas[0])],\n \"pacientes\" => [$sumMetas[1], $sumPacientes, (($sumPacientes * 100) / $sumMetas[1])],\n \"recompras\" => [$sumMetas[2], $sumRecompras, (($sumRecompras * 100) / $sumMetas[2])],\n\n \"calcetines\" => [$sumMetas[3], $sumcalcetines, (($sumcalcetines * 100) / $sumMetas[3])],\n \"leggings\" => [$sumMetas[4], $sumleggings, (($sumleggings * 100) / $sumMetas[4])],\n \"tobi\" => [$sumMetas[5], $sumtobi, (($sumtobi * 100) / $sumMetas[5])],\n \"panti\" => [$sumMetas[6], $sumpanti, (($sumpanti * 100) / $sumMetas[6])],\n \"muslo\" => [$sumMetas[7], $sumlmuslo, (($sumlmuslo * 100) / $sumMetas[7])],\n \"mayorValor\" => [$sumMetas[8], $summayorValor, (($summayorValor * 100) / $sumMetas[8])],\n \"menorValor\" => [$sumMetas[9], $summenorValor, (($summenorValor * 100) / $sumMetas[9])],\n ];\n // dd( $datosVentasMes);\n return $datosVentasMes;\n }", "private function carga_info(Request $request, $nombre_obra,$mes=\"\", $year=\"\"){\n \t\n \t$data[\"obras\"]=$this->listado_obras();\n\n \t$aux=$this->proximaObra($nombre_obra,$mes, $year);\n \t$ProximaObraMes=$aux[\"ProximaObraMes\"];\n\t\t$ProximaObraAnyo=$aux[\"ProximaObraAnyo\"];\n\t\t$proximaObraFecha=$aux[\"proximaObraFecha\"];\n\t\t$ProximaObraNombre=$aux[\"ProximaObraNombre\"];\n\t\t$data[\"proxima_obra\"]=$aux[\"proxima_obra\"];\n\n\t\t$data[\"sesiones_proximas\"]=$this->sesiones_proximas($proximaObraFecha,$data[\"proxima_obra\"]->nombre_obra);\n\n\t\t$butacas_totales=Config('constants.options.filas_sala')*Config('constants.options.columnas_sala');\n\n\t\t$data[\"butacas_ocupadas_dia\"]=$this->butacas_ocupadas($ProximaObraNombre,$ProximaObraMes,$ProximaObraAnyo);\n\n\t\t$data[\"sesiones_mes\"] = $this->sesionesMes($ProximaObraAnyo,$ProximaObraMes,$data[\"proxima_obra\"]->nombre_obra);\n\t\t\n\t\t$data[\"colores\"]=$this->cargaColores($data[\"sesiones_mes\"],$data[\"butacas_ocupadas_dia\"],$butacas_totales);\n\t\t\n\t\t$data[\"hoy\"]=date(\"Y-m-d\");\n\t\t$data[\"hoy_mostrable\"]=date(\"d-m-Y\");\n\t\t$data[\"mes\"]=date(\"m\");\n\t\t$data[\"year\"]=date(\"Y\");\n\n\t\t$data[\"filas\"]=Config('constants.options.filas_sala');\n\t\t$data[\"columnas\"]=Config('constants.options.columnas_sala');\n\n\n\t\t//$data[\"salon\"]=$this->cargaSalon($request->id);\n \t\n \t//dd($data);\n return $data;\n\n }", "protected function procesaFormulario($datos)\n {\n\n $result = array();\n $app = Aplicacion::getSingleton();\n \n $id = $datos['id'] ?? null;\n\n $title = $datos['title'] ?? null;\n if ( empty($title) ) {\n $result['title'] = \"El nombre de la película no puede quedar vacío.\";\n }\n\n $date_released = $datos['date_released'] ?? null;\n if ( empty($date_released) ) {\n $result['date_released'] = \"La fecha no puede quedar vacía.\";\n }\n\n $duration = $datos['duration'] ?? null;\n if (!is_numeric($duration)) {\n $result['duration'] = \"La duración debe ser un número\";\n } else if ( empty($duration) || $duration < 0 ) {\n $result['duration'] = \"La película debe tener una duración positiva\";\n }\n\n $country = $datos['country'] ?? null;\n if ( empty($country)) {\n $result['country'] = \"El país no puede quedar vacío\";\n }\n\n $plot = $datos['plot'] ?? null;\n if ( empty($plot)) {\n $result['plot'] = \"La película debe tener una trama\";\n }\n\n $link = $datos['link'] ?? null;\n $price = $datos['price'] ?? null;\n if (empty($link) && !empty($price)) {\n $result['link'] = \"Has añadido el precio, pero no el link. Añádelo\";\n } else if (!empty($link) && empty($price)) {\n $result['price'] = \"Has añadido el link, pero no el precio. Añádelo\";\n } else if (!empty($link) && !empty($price)) {\n if (!is_numeric($price)) {\n $result['price'] = \"El precio debe ser un número\";\n }else if ( $price < 2 ) {\n $result['price'] = \"El precio debe ser mayor que 0\";\n }\n }\n\n $image = $datos['image'] ?? null;\n $dir_subida = './img/peliculas/';\n $fichero_subido = $dir_subida . basename($_FILES['image']['name']);\n if (!move_uploaded_file($_FILES['image']['tmp_name'], $fichero_subido) && !empty($_FILES['image']['name'])) {\n $result['image'] = $_FILES['image']['name'].\"El fichero no se ha podido subir correctamente\";\n }\n\n $genres = $datos['genres'] ?? null;\n\n $actors = $datos['actors'] ?? null;\n\n $directors = $datos['directors'] ?? null;\n \n $prevPage = $datos['prevPage'] ?? null;\n\n if (count($result) === 0) {\n if ($app->usuarioLogueado() && ($app->esGestor() || $app->esAdmin())) {\n $pelicula = Pelicula::editar($id, $title, $_FILES['image']['name'], $date_released, $duration, $country, $plot, $link, $price);\n\n Pelicula::actualizarGeneros($pelicula, $genres);\n\n Pelicula::actualizarActoresDirectores($pelicula, $actors, $directors);\n if ( ! $pelicula ) {\n $result[] = \"La película ya existe\";\n } else {\n $result = \"{$prevPage}\";\n }\n }\n }\n return $result;\n }", "function pagarcredito($idempleado,$money,$idencargado, $caja){\r\n\t$iduser = substr($idempleado, 1);\r\n\t$onoma=$caja->nameUser($iduser);\r\n\t$idMov=$caja->insert_movimiento(\"entrada\",$money,\"Cobrado Credito \".$onoma,9,$idencargado);\r\n\t$caja->insert_mov_credito($idMov,-$money,$iduser,1,\"HR\");\r\n\t//$response = loadtickets($caja,$iduser);\t\r\n\t$response = loadmovimientos($caja,$iduser);\t\r\n\t$totalTickets=$caja->total_cuenta($iduser);\r\n\t$response[\"TotalTickets\"]=$totalTickets;\r\n\treturn $response;\t\r\n}", "public function index(Request $request)\n {\n //\n $count_acep = RecordSolicitud::Count('estado')->where('estado','1')->where('rut', '=', auth()->user()->rut)->first();\n $count_pend = RecordSolicitud::Count('estado')->whereNull('estado')->where('rut', '=', auth()->user()->rut)->first();\n\n if(!$count_acep){\n $suma = 0;\n }else{\n $suma = $count_acep->count();\n }\n\n if(!$count_pend){\n $sumaP = 0;\n }else{\n $sumaP = $count_pend->count();\n }\n $actual = Carbon::now();\n\n //Semestre actual\n $lista = semestre::where('fecha_ini', '<=',$actual->format('Y-m-d'))\n ->where(\"fecha_term\",\">=\",$actual->format('Y-m-d'))->first();\n\n\n $detalle = $request->get('detalle');\n\n $solicitud = RecordSolicitud::where('rut', '=', auth()->user()->rut)\n ->name($detalle)\n ->paginate(6);\n\n\n return view('pages.index',['solicitud' => $solicitud,\n 'nombre_semestre_actual'=> $lista,\n 'cantidad_per' => $suma,\n 'cantidad_p' => $sumaP]);\n }", "function epagoc($mysqli,$fecha,$ref,$monto,$iva,$total,$saldoi,$factu,$mpago,$sfactu,$prov,$folio,$montop,\n $saldof,$cta,$arch=NULL,$comi=NULL,$civa=NULL){\n\t//define los montos de pago\n\t$pagoiva = defiva($monto,$saldoi,$montop);\n\t//definicion del status de pago\n\tif($montop<$saldoi){$status = 90;}else{$status = 99;};\n\t\t\ttry{\n\t\t\t\t$mysqli->autocommit(false);\n\t\t\t//la referencia es oc\n\t\t\t\t$tipoper=0;\n\t\t\t//movimientos de diario\n\t\t\t\t//cargo en salida de efectivo de recursos segun metodo de pago\n\t\t\t\t\t$cuenta1=metpago($mpago);\n\t\t\t\t\t//tipo 0 es debe\n\t\t\t\t\t$tipom1=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta1,$tipoper,$tipom1,$ref,$montop,$fecha,$sfactu,$cta);\n\t\t\t\t//abono a proveedores\n\t\t\t\t\t$cuenta2=\"201.01\";\n\t\t\t\t\t$tipom2=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta2,$tipoper,$tipom2,$ref,$montop,$fecha,$sfactu,$prov);\n\t\t\t\t//abono a iva acreditable por pagar\n\t\t\t\t\t$cuenta3=\"119.01\";\n\t\t\t\t\t$tipom3=1;\n\t\t\t\t\toperdiario($mysqli,$cuenta3,$tipoper,$tipom3,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//cargo a iva acreditable pagado\n\t\t\t\t\t$cuenta4=\"118.01\";\n\t\t\t\t\t$tipom4=0;\n\t\t\t\t\toperdiario($mysqli,$cuenta4,$tipoper,$tipom4,$ref,$pagoiva,$fecha,$sfactu);\n\t\t\t\t//movimientos de comisiones, si las hay, siempre se factura\n\t\t\t\t\tif($comi!=NULL){\n\t\t\t\t\t //cargo a bancos\n\t\t\t\t\t $cuentacomi=\"102.01\";\n\t\t\t\t\t $tipomc=1;\n\t\t\t\t\t $comitot = $comi+$civa;\n\t\t\t\t\t operdiario($mysqli,$cuentacomi,$tipoper,$tipomc,$ref,$comitot,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t //abono a gastos financieros e iva pagado\n\t\t\t\t\t operdiario($mysqli,\"701.10\",$tipoper,0,$ref,$comi,$fecha,1,NULL,'comisiones banc');\n\t\t\t\t\t operdiario($mysqli,\"118.01\",$tipoper,0,$ref,$civa,$fecha,1,NULL,'comisiones banc');\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t//actualizacion de orden de compra\n\t\t\t\t$archm;\n\t\t\t\tif($arch!=NULL){\n\t\t\t\t\t$archm= substr($arch,11);\n\t\t\t\t}else{$archm = NULL;}\n\t\t\t\t\t$mysqli->query(\"UPDATE oc SET status=$status,fechapago='$fecha',saldo=$saldof,factura='$factu',arch='$archm',foliomov='$folio' WHERE idoc='$ref'\");\t\t\t\t\n\t\t\t//efectuar la operacion\n\t\t\t\t$mysqli->commit();\n\t\t\t\t$resul=0;\n\t\t\t}catch (Exception $e) {\n\t\t\t\t\t//error en las operaciones de bd\n\t\t\t\t $mysqli->rollback();\n\t\t\t\t \t$resul=-2;\n\t\t\t\t}\n\treturn $resul;\n}", "public function ConsultarCambioEstados($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVACE($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['EstadoAnterior'],$fila['EstadoNuevo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }", "private function actualizar_fechaenvio_docxpagarcpe(){\n\n $this->docxpagar_cpe->fecha_envio = Carbon::now();\n $this->docxpagar_cpe->save();\n\n }", "function Cargar_servicios_precios($clave, $filadesde, $buscar_servicio, $buscar_fecha){\r\n\r\n\t\t$conexion = $this ->Conexion;\r\n\t\t$Usuario = $this ->Usuario;\r\n\r\n\t\r\n\t\tif($buscar_servicio != null){\r\n\t\t\t$fech = \" AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND CLAVE_SERVICIO = '\".$buscar_servicio.\"'\";\r\n\t\t\tif($buscar_fecha != null){\r\n\t\t\t\t$CADENA_BUSCAR .= $fech;\t\r\n\t\t\t}\r\n\t\t}elseif($buscar_fecha != null){\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"' AND '\".date(\"Y-m-d\",strtotime($buscar_fecha)).\"' BETWEEN FECHA_DESDE AND FECHA_HASTA\";\r\n\t\t}else{\r\n\t\t\t$CADENA_BUSCAR = \" CLAVE_CUADRO = '\".$clave.\"'\"; \r\n \t\t}\r\n\r\n\r\n\t\t$resultado =$conexion->query(\"SELECT clave_servicio,clave_calendario, pax_desde, pax_hasta, precio, precio_ninos\r\n\t\t\t\t\t\t\t\t\t\tFROM hit_producto_cuadros_servicios_precios \r\n\t\t\t\t\t\t\t\t\t\tWHERE \".$CADENA_BUSCAR.\" ORDER BY numero, fecha_desde, pax_desde\");\r\n\r\n\t\t/*if ($resultado == FALSE){\r\n\t\t\techo('Error en la consulta: '.$CADENA_BUSCAR);\r\n\t\t\t$resultado->close();\r\n\t\t\t$conexion->close();\r\n\t\t\texit;\r\n\t\t}*/\r\n\r\n\t\t//Guardamos el resultado en una matriz con un numero fijo de registros\r\n\t\t//que controlaremos por una tabla de configuracion de pantallas de usuarios. ESPECIFICO: Solo el nombre del formulario en la query\r\n\t\t$numero_filas =$conexion->query(\"SELECT LINEAS_MODIFICACION FROM hit_usuarios_formularios WHERE FORMULARIO = 'PRODUCTO_CUADROS_SERVICIOS_PRECIOS' AND USUARIO = '\".$Usuario.\"'\");\r\n\t\t$Nfilas\t = $numero_filas->fetch_assoc();\t\t\t\t\t\t\t\t\t\t\t //------\r\n\r\n\t\t$folletos_servicios_precios = array();\r\n\t\tfor ($num_fila = $filadesde-1; $num_fila <= $filadesde + $Nfilas['LINEAS_MODIFICACION']-2; $num_fila++) {\r\n\t\t\t$resultado->data_seek($num_fila);\r\n\t\t\t$fila = $resultado->fetch_assoc();\r\n\t\t\t//Esto es para dejar de cargar lineas en caso de que sea la ultima pagina de la consulta\r\n\t\t\tif($fila['clave_servicio'] == ''){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tarray_push($folletos_servicios_precios,$fila);\r\n\t\t}\r\n\r\n\t\t//Liberar Memoria usada por la consulta\r\n\t\t$resultado->close();\r\n\t\t$numero_filas->close();\r\n\r\n\t\treturn $folletos_servicios_precios;\r\n\t}", "public function suma_compras_anio_mes_grafica($fecha){\n\n $conectar=parent::conexion();\n parent::set_names();\n \n //se usa para traducir el mes en la grafica\n //imprime la fecha por separado ejemplo: dia, mes y año\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n\n \n\n //SI EXISTE EL ENVIO POST ENTONCES SE MUESTRA LA FECHA SELECCIONADA\n if(isset($_POST[\"year\"])){\n\n $fecha=$_POST[\"year\"];\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }\n\n\n } else {\n\n\n//sino se envia el POST, entonces se mostraria los datos del año actual cuando se abra la pagina por primera vez\n\n $fecha_inicial=date(\"Y\");\n\n\n $sql=\"SELECT YEAR(fecha_compra) as ano, MONTHname(fecha_compra) as mes, SUM(total) as total_compra_mes FROM compras WHERE YEAR(fecha_compra)=? and estado='1' GROUP BY MONTHname(fecha_compra) desc\";\n \n $sql=$conectar->prepare($sql);\n $sql->bindValue(1,$fecha_inicial);\n $sql->execute();\n\n $resultado= $sql->fetchAll();\n \n //recorro el array y lo imprimo\n foreach($resultado as $row){\n\n $ano= $output[\"mes\"]=$meses[date(\"n\", strtotime($row[\"mes\"]))-1];\n $p = $output[\"total_compra_mes\"]=$row[\"total_compra_mes\"];\n\n echo $grafica= \"{name:'\".$ano.\"', y:\".$p.\"},\";\n\n }//cierre del foreach\n\n\n }//cierre del else\n\n\n }", "function get_listado_540($filtro=array())\n\t{\n $udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']);\n\t\t$es_presupuestando=dt_mocovi_periodo_presupuestario::es_periodo_presupuestando($filtro['anio']);\n \n //que sea una designacion vigente, dentro del periodo actual o anulada cuando le setean el hasta con el dia anterior al desde\n\t\t$where=\" WHERE ((desde <= '\".$udia.\"' and (hasta >= '\".$pdia.\"' or hasta is null)) or (hasta is not null and desde>hasta and \".$filtro['anio'].\"=extract(year from hasta)))\";\n //cuando selecciona caracter:R tipo: normal, anuladas:no y tilde todos,periodo presupuestando entonces trae todos los regulares a pesar de tener tkd\n if (!(isset($filtro['especial']) and $filtro['especial']==1 and isset($filtro['uni_acad']) and $filtro['caracter']=='R' and isset($filtro['tipo_desig']) and $filtro['tipo_desig']==1 and\n !isset($filtro['estado']) and $filtro['anulada']=='no' and $es_presupuestando)){\n $where.=\" AND nro_540 is null\";//solo lo aplica cuando no se cumple la condicion tilde todos, caracter: R tipo:normal, anuladas:no, periodo presupuestando\n }\n \n $where2=\"\"; \n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']) {\n case 'no':$where.= \" AND not (hasta is not null and hasta<desde) \";break;\n case 'si':$where.= \" AND (hasta is not null and hasta<desde) \";break; \n default:\n break;\n }\n\t\t}\n \n\t\tif (isset($filtro['uni_acad'])) {\n\t\t\t$where.= \" AND uni_acad = \".quote($filtro['uni_acad']);\n\t\t}\n if (isset($filtro['caracter'])) {\n switch ($filtro['caracter']) {\n case 'I':$where.= \" AND (carac ='Interino' or carac ='Otro' or carac ='Suplente')\";break;\n case 'R':$where.= \" AND carac ='Regular'\";break; \n }\n\t\t}\n if (isset($filtro['id_programa'])) {\n \t$where.= \" AND id_programa=\".$filtro['id_programa'];\n\t\t}\n if (isset($filtro['tipo_desig'])) {\n \t$where.= \" AND tipo_desig=\".$filtro['tipo_desig'];\n\t\t}\n if (isset($filtro['estado'])) {\n if($filtro['estado']=='A'){\n $where2.= \" WHERE (estado='\".$filtro['estado'].\"' or estado='R')\";\n }else{\n $where2.= \" WHERE estado='\".$filtro['estado'].\"'\";\n }\n \n }\n \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and uni_acad=\".quote($filtro['uni_acad'])\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n toba::db('designa')->consultar($sql2);\n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia, $udia, $filtro['anio']);\n \n $sql= \"select * from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, nro_norma,b.tipo_norma,b.nro_540,b.observaciones,id_programa,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then case when tipo_desig=2 then costo_reserva(b.id_designacion,(dias_des*costo_diario*porc/100),\".$filtro['anio'].\") else ((dias_des-dias_lic)*costo_diario*porc/100) end else 0 end as costo\"\n . \",case when b.estado<>'B' then case when t_no.id_novedad is null then b.estado else 'L' end else 'B' end as estado \"//si tiene una baja o renuncia coloca B. Si tiene una licencia sin goce o cese coloca L\n . \" from (\"\n . \" select a.tipo_desig,a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad,a.desde,a.hasta,a.cat_mapuche,a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,a.id_departamento,a.id_area,a.id_orientacion,a.uni_acad,a.emite_norma,a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,id_programa,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\"\n . \" from (\".$sql.\") a\"\n . $where\n .\") b \"\n . \" LEFT JOIN novedad t_no ON (b.id_designacion=t_no.id_designacion and (t_no.tipo_nov=2 or t_no.tipo_nov=5) and (t_no.desde<='\".$udia.\"' and (t_no.hasta>='\".$pdia.\"' or t_no.hasta is null)))\"\n .\")c $where2\"\n . \" order by programa,docente_nombre\"; \n \n $ar = toba::db('designa')->consultar($sql);\n \n $datos = array();\n \n $band=$this->en_rojo($filtro['anio']);\n \n if($band){//si gaste mas de lo que tengo\n toba::notificacion()->agregar('USTED ESTA EN ROJO','error'); \n }\n else{\n for ($i = 0; $i < count($ar) ; $i++) {\n \t$datos[$i] = array(\n\t\t\t\t\t'id_designacion' => $ar[$i]['id_designacion'] ,\n\t\t\t\t\t'docente_nombre' => $ar[$i]['docente_nombre'] ,\n 'desde' => $ar[$i]['desde'] ,\n 'hasta' => $ar[$i]['hasta'] ,\n 'cat_mapuche' => $ar[$i]['cat_mapuche'] ,\n 'cat_estat' => $ar[$i]['cat_estat'] ,\n 'dedic' => $ar[$i]['dedic'] ,\n 'carac' => $ar[$i]['carac'] ,\n 'uni_acad' => $ar[$i]['uni_acad'] ,\n 'id_departamento' => $ar[$i]['id_departamento'] ,\n 'id_area' => $ar[$i]['id_area'] ,\n 'id_orientacion' => $ar[$i]['id_orientacion'] ,\n 'id_programa' => $ar[$i]['id_programa'] ,\n 'programa' => $ar[$i]['programa'] ,\n 'costo' => $ar[$i]['costo'] ,\n 'porc' => $ar[$i]['porc'] ,\n 'legajo' => $ar[$i]['legajo'] ,\n 'estado' => $ar[$i]['estado'] ,\n 'dias_lic' => $ar[$i]['dias_lic'] ,\n 'i' => $i,\n\t\t\t\t);\n\t\t\t}\n \n }\n return $datos;\n \n\t}", "public function getChoixAction($id,Request $request,$dateSortie,$lieu,$nomEnfant,$prenomEnfant) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n } \n \n $em = $this->getDoctrine()->getManager();\n $saison = new Saison;\n $year = $saison->connaitreSaison();\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n //on verifie que les parametres sont valides\n if($this->parametreValide($id, $dateSortie, $lieu) == false) {\n return $this->pageErreur(\"informations fournies non correctes\");\n }\n //liste des des inscriptions des enfants de l'utilisateur \n $mesSorties = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->jointureSortieInscriptionSortie($id,$request->getSession()->get('email'),$year); \n //liste des inscrits pour la sorties demandée\n $inscrits = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->getGroupe($id,$year/*,$lieu*/,$dateSortie);\n \n $total = 0; $conf = 0; $notConf = 0;\n foreach ($inscrits as $inscrit) {\n $total = $total + 1;\n if ($inscrit['participation'] == 1) {\n $conf = $conf + 1;\n }\n else {\n $notConf = $notConf + 1; \n }\n \n }\n return $this->render('SCUserBundle:Security:mesSorties.html.twig', array('activite'=> $activite, 'mesSorties' => $mesSorties,'choix'=>1,'inscrits'=>$inscrits,'nomEnfant'=>$nomEnfant,'prenomEnfant' => $prenomEnfant, 'dateSortie' => $dateSortie, 'lieu'=>$lieu,'saison'=>$year,'total' => $total, 'conf' => $conf, 'notConf'=> $notConf ));\n }", "public function salesPagoDet(Request $request)\n{\n\t$all = Input::get('all')==null?0:1;\n\t$fecha1=$this->fixFecha(Input::get('date1'));\n\t$fecha2=$this->fixFechaFin(Input::get('date2'));\n\t$document = Input::get('document');\n\t$document = $document ==null ? 'Todo':$document;\n\n\n\t$salesReport_q=Sale::select(['sales.id as id_sales'\n\t,'customers.name as customer_name'\n\t,DB::raw('concat(documents.name,\" \",series.name,\"-\",sales.correlative) as document_and_correlative')\n\t,DB::raw('(select sum(quantity) from sale_items where sale_id = sales.id) as qty')\n\t,DB::raw('(select sum(total_selling)-sum(total_cost) from sale_items where sale_id = sales.id) as utilidad')\n\t,'sales.sale_date','sales.comments', 'sales.pagare_id'\n\t,'sales.show_header','users.name as user_name'\n\t,'pagos.name as pago','sales.total_cost'])\n\t->leftJoin('series','sales.id_serie','=','series.id')\n\t->leftJoin('documents','series.id_document','=','documents.id')\n\t->leftJoin('customers','sales.customer_id','=','customers.id');\n\n\t$administrador =Session::get('administrador');\n\t$ruta_requerida = GeneralParameter::active()->where('name','Campo ruta requerido.')->first();\n\t/** Si la ruta es requerida y no es administrador */\n\tif( (isset($ruta_requerida)) && ($administrador ==false)) {\n\t\t$rutas = RouteUser::where('user_id',Auth::user()->id)->select('route_id')->get();\n\t\tif (count($rutas) == 0) {\n\t\t $rutas = [0, 0];\n\t\t}\n\t\t$salesReport_q->join('route_costumers','customers.id','=','route_costumers.customer_id')\n\t\t->whereIn('route_costumers.route_id',$rutas);\n\t};\n\n\t$salesReport_q->leftJoin('users','users.id','=','sales.user_relation')\n\t->leftJoin('pagos','sales.id_pago','=','pagos.id')\n\t->where('documents.sign','=','-')\n\t->where('sales.cancel_bill','=',0);\n\tif($document!='Todo'){\n\t\t$salesReport_q->where('sales.id_serie',$document);\n\t}\n\tif($all==1){\n\t\t$salesReport_q->whereBetween('sales.sale_date',[$fecha1,$fecha2]);\n\t}\n\t$salesReport_q->orderBy('pagos.name');\n\t$salesReport_q->almacen();\n\t$salesReport=$salesReport_q->get();\n\n\t$fromDate = date('d/m/Y',strtotime($fecha1));\n\t$toDate = date('d/m/Y',strtotime($fecha2));\n\t$sortBy = 'Fecha, Documento, Correlativo';\n\n\t$title = 'Reporte de Ventas por forma de pago detallado'; // Report title\n\n\tif($all!=1) {\n\t\t$meta = [ // For displaying filters description on header\n\t\t\t'Fecha' => 'Sin restriccion de fecha',\n\t\t\t'Ordenado por' => $sortBy\n\t\t];\n\t} else {\n\t\t$meta = [ // For displaying filters description on header\n\t\t\t'Fechas de' => $fromDate . ' a ' . $toDate,\n\t\t\t'Ordenado por' => $sortBy\n\t\t];\n\t}\n\n\t$columns = [ // Set Column to be displayed\n\t\t'Forma Pago' => 'pago',\n\t\t'Cliente' => 'customer_name',\n\t\t'Fecha' =>'sale_date',\n\t\t'Documento' => 'document_and_correlative',\n\t\t'Vendedor' => 'user_name',\n\t\t'Total' => 'total_cost',\n\t\t];\n\n\t\tif(isset($request->excelpagodet)) {\n\t\t\treturn ExcelReport::of($title, $meta, $salesReport, $columns)\n\t\t\t->editColumns(['Cliente'],\n\t\t\t['class'=>'left'])\n\t\t\t->editColumns(['Total'], [ // Mass edit column\n\t\t\t\t'class' => 'right bolder'\n\t\t\t\t])\n\t\t\t->setCss([\n\t\t\t\t'.bolder' => 'font-weight: 800;'\n\t\t\t\t])\n\t\t\t->showTotal([ // Used to sum all value on specified column on the last table (except using groupBy method). 'point' is a type for displaying total with a thousand separator\n\t\t\t\t'Total' => 'Q' // if you want to show dollar sign ($) then use 'Total Balance' => '$'\n\t\t\t\t])\n\t\t\t->groupBy('Forma Pago')\n\n\t\t\t\t->download($title);\n\t\t\t}\n\n\tif(isset($request->pdfpagodet)) {\n\t\treturn PdfReport::of($title, $meta, $salesReport, $columns)\n\t\t->editColumns(['Cliente'],\n\t\t['class'=>'left customer'])\n\t\t->setCss([\n\t\t'.customer'=>'font-size:10px;'\n\t\t])\n\t\t\t->editColumns(['Total'], [ // Mass edit column\n\t\t\t\t'class' => 'right bolder'\n\t\t\t\t])\n\t\t\t->setCss([\n\t\t\t\t'.bolder' => 'font-weight: 800;'\n\t\t\t\t])\n\t\t\t->showTotal([ // Used to sum all value on specified column on the last table (except using groupBy method). 'point' is a type for displaying total with a thousand separator\n\t\t\t\t'Total' => 'Q' // if you want to show dollar sign ($) then use 'Total Balance' => '$'\n\t\t\t\t])\n\t\t\t->groupBy('Forma Pago')\n\t\t\t->setOrientation('landscape')\n\t\t->stream(); // other available method: download('filename') to download pdf / make() that will producing DomPDF / SnappyPdf instance so you could do any other DomPDF / snappyPdf method such as stream() or download()\n\t}\n}", "public function procesarPagos(){ \n\t\trequire_once './core/SimpleXLSX.php';\n\t\t$dato=\"\";\n\t\t$fecha=\"\";\n\t\t$reg=0;\n\t\t$act=0;\n\t\t$count1=0;\n\t\t$aporte0=new Aporte($this->adapter);\n\t\t$porCruzar= $aporte0->contarCruceAportes();\n\t\tif (isset($porCruzar) && count($porCruzar)>=1)\n {\n\t\t\t\t foreach($porCruzar as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count1 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t\n\t\tif ( $xlsx = SimpleXLSX::parse( './uploads/Datos.xlsx' ) ) {\n\t\t\t \n\t foreach ( $xlsx->rows() as $r => $row ) {\n\t\t\n\t\tif ($r > 0)\n\t\t{\n\t\t\tif ($row[5]!= 'Depósito')\n\t\t\t{\n\t\t\t\t$fecha = substr($row[3], 0, 19) ;\n\t\t\t\t$fecha = str_replace(\".\",\":\",$fecha);\n\t\t\t\t$fecha = substr_replace($fecha, \" \", 10, 1);\n\t\t\t\t\t//echo $fecha.':'.$row[5].'|||'.$fecha .'<br/>';\n\t\t\t\t\t\n\t\t\t\t$aporte=new Aporte($this->adapter);\n\t\t\t\t$aporte->setTransactionID($row[4]);\n\t\t\t\t$aporte->setBank($row[14]);\n\t\t\t\t$aporte->setRegisteredDate($fecha);\n\t\t\t\t$aporte->setValue($row[6]);\n\t\t\t\t$aporte->setAccount($row[13]);\n\t\t\t\t\n\t\t\t\t$save=$aporte->updateCruce(); // Manda a actualizar la moto en el modelo\n\t\t\t\tif ($save == TRUE)\n\t\t\t\t{\n\t\t\t\t\t$act = $act+1;\n\t\t\t\t}\n\t\t\t\t$reg = $reg+1;\t\n\t\t\t\t//$dato = \"UPDATE aporte set \\\"transactionId\\\"='\".$row[4].\"', \\\"bank\\\"='\".$row[14].\"', \\\"registeredDate\\\"='\".$fecha.\"', \\\"bankValidated\\\"='true' WHERE \\\"account\\\"='\".$row[13].\"' AND \\\"value\\\"='\".$row[6].\"' AND \\\"bankValidated\\\"='false' AND \\\"callCenterValidated\\\"='false' AND \\\"transactionId\\\"= '0';\";\n\t\t\t\t//echo strval($save) . '<br/>';\n\t\t\t\ttry{\n\t\t\t\t$payment=new Payment($this->adapter);\n\t\t\t\t$payment->setTransactionID($row[4]);\n\t\t\t\t$payment->setValue($row[6]);\n\t\t\t\t$payment->setCedula($row[10]);\n\t\t\t\t$payment->setBank($row[14]);\n\t\t\t\t$payment->setAccount($row[13]);\n\t\t\t\t$payment->setRegisteredDate($fecha);\n\t\t\t\t$payment->setIsMatched('false');\n\t\t\t\t$payment->setIsActive('true');\n\t\t\t\t$save=$payment->save();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t//echo 'Excepción capturada: ', $e->getMessage(), \"\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t}\n\t\t} else {\n\t\techo SimpleXLSX::parseError();\n\t\t}\n\t\t\t$count2=0;\n\t\t$aporte1=new Aporte($this->adapter);\n\t\t$porCruzar1= $aporte1->contarCruceAportes();\n\t\tif (isset($porCruzar1) && count($porCruzar1)>=1)\n {\n\t\t\t\t foreach($porCruzar1 as $aporte)\n\t\t\t\t {\n\t\t\t\t\t $count2 = $aporte->aporteID;\n\t\t\t\t }\n\t\t\t }\n\t\t$payment0=new Payment($this->adapter);\n\t $save=$payment0->updateMatch();\n\t\n\t\t$aporte1->phpAlert('Registros econtrados en excel: ' .$reg \n\t\t.'\\nRegistros procesados desde el excel: ' .$act\n\t\t.'\\nAportes pendientes por cruzar antes del cruce: ' .$count1\n\t\t.'\\nAportes pendientes de cruzar luego del cruce: ' .$count2\n\t\t.'\\nTOTAL CRUZADOS en esta carga: ' .($count1 - $count2),\n\t\t$this->baseUrl(\"BandejaCallcenters\", \"index\")); // Alerta y redirige\n //$this->redirect(\"BandejaBancos\", \"index\"); // COntrolador + Vista\n }" ]
[ "0.67588687", "0.66265446", "0.6438808", "0.6382975", "0.637913", "0.6363689", "0.6333858", "0.63239175", "0.6271153", "0.6243587", "0.62340915", "0.6223537", "0.61878556", "0.6163207", "0.61508185", "0.61053795", "0.60768306", "0.60753787", "0.6065901", "0.60429776", "0.6036501", "0.60296685", "0.60253465", "0.6018305", "0.60099226", "0.60078067", "0.59949327", "0.59644043", "0.5964069", "0.5962175", "0.59620184", "0.5956089", "0.59404016", "0.59359765", "0.59345907", "0.5931601", "0.5930638", "0.59214586", "0.59154606", "0.5910602", "0.59024256", "0.59020776", "0.5895789", "0.5891037", "0.5885763", "0.5879393", "0.5875516", "0.5872745", "0.5854367", "0.58539593", "0.5853443", "0.5839472", "0.5836829", "0.5835324", "0.58269465", "0.5825639", "0.5823799", "0.5818838", "0.58177507", "0.58093226", "0.5805115", "0.57972383", "0.57953906", "0.57951295", "0.57910603", "0.5789675", "0.5766909", "0.57617587", "0.5760003", "0.5755912", "0.5752219", "0.5737759", "0.57372296", "0.5734994", "0.5734308", "0.57335955", "0.573191", "0.5728214", "0.57232577", "0.5721648", "0.57206774", "0.5719369", "0.5718533", "0.5708169", "0.5707814", "0.57057554", "0.5698909", "0.56946975", "0.56937647", "0.56927085", "0.56895316", "0.56864697", "0.56829906", "0.56817997", "0.56668013", "0.56664807", "0.566453", "0.5662378", "0.56610006", "0.5660494", "0.5656146" ]
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria = new CDbCriteria; $criteria->compare('GCCE_Id', $this->GCCE_Id); $criteria->compare('GCCA_Id', $this->GCCA_Id); $criteria->compare('GCCD_Id', $this->GCCD_Id); $criteria->compare('GCCP_Id', $this->GCCP_Id); $criteria->compare('GCCE_PorcentajeVentasD', $this->GCCE_PorcentajeVentasD); $criteria->compare('GCCE_PorcentajeVentasP', $this->GCCE_PorcentajeVentasP); $criteria->compare('GCCE_ControlEsquema', $this->GCCE_ControlEsquema, true); $criteria->compare('GCCE_PorcentajeUtilidad', $this->GCCE_PorcentajeUtilidad); $criteria->compare('GCCE_PorcentajePerdida', $this->GCCE_PorcentajePerdida); $criteria->compare('GCCE_Fecha', $this->GCCE_Fecha, true); $criteria->compare('GCCE_ApMinDirecta', $this->GCCE_ApMinDirecta); $criteria->compare('GCCE_ApMinParley', $this->GCCE_ApMinParley); $criteria->compare('GCCE_ApMaxDirecta', $this->GCCE_ApMaxDirecta); $criteria->compare('GCCE_ApMaxParley', $this->GCCE_ApMaxParley); $criteria->compare('GCCE_PreMaxDirecta', $this->GCCE_PreMaxDirecta); $criteria->compare('GCCE_PreMaxParley', $this->GCCE_PreMaxParley); $criteria->compare('GCCE_MaxMulti', $this->GCCE_MaxMulti); $criteria->compare('GCCE_MaxJugada', $this->GCCE_MaxJugada); $criteria->compare('GCCE_MinJugada', $this->GCCE_MinJugada); $criteria->compare('GCCE_Enabled', $this->GCCE_Enabled); // $criteria->compare('GCCE_MachoMin',$this->GCCE_MachoMin); // $criteria->compare('GCCE_HembraMax',$this->GCCE_HembraMax); // $criteria->compare('GCCE_HembraMin',$this->GCCE_HembraMin); // $criteria->compare('GCCE_EmpateMax',$this->GCCE_EmpateMax); $criteria->compare('GCCE_RepetidosMonto', $this->GCCE_RepetidosMonto); $criteria->compare('GCCE_CupoDeuda', $this->GCCE_CupoDeuda); $criteria->compare('GCCE_Repetidos', $this->GCCE_Repetidos, true); $criteria->compare('GCCE_Label', $this->GCCE_Label, true); $criteria->compare('GCCE_Currency', $this->GCCE_Currency, true); if (!Yii::app()->user->isSuperAdmin) $criteria->addInCondition('GCCD_Id', Gccd::model()->arrayHijos(Yii::app()->user->getState('grupo'))); return new CActiveDataProvider($this, array( 'criteria' => $criteria, 'sort' => array( 'defaultOrder' => 'GCCE_Fecha desc, GCCP_Id desc', 'attributes' => array( 'gcca_search' => array( 'asc' => 'gcca.GCCA_Nombre', 'desc' => 'gcca.GCCA_Nombre DESC', ), '*', ), ), 'pagination' => array( 'pageSize' => 500 ) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "protected function findModel()\n {\n $class = $this->model;\n $query = $class::query();\n\n foreach ($this->input as $key => $value) {\n $where = is_array($value) ? 'whereIn' : 'where';\n $query->$where($key, $value);\n }\n\n return $query->get();\n }", "public function modelScans()\n {\n if ($this->scanEverything) {\n return $this->getAllClasses();\n }\n\n return $this->scanModels;\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function getModels()\n {\n $this->prepare();\n\n return $this->_models;\n }", "public function searchableBy()\n {\n return [];\n }", "public function all($model){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n $stmt = $this->pdo->prepare('select * from ' . $table);\n $stmt->execute();\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public static function find($model, $conditions = null, $orderby = null){\n\t\t$sql = \"SELECT * FROM \" . self::table_for($model);\n\t\tif ($conditions) $sql .= \" WHERE \" . self::make_conditions($conditions);\n\t\tif ($orderby)\t$sql .= \" ORDER BY \" . $orderby;\n\t\t\n\t\t$resultset = self::do_query($sql);\n\t\treturn self::get_results($resultset, $model);\n\t}", "function get_model_list($where=\"1\",$where_array,$sort_by=\"\"){\n\t\t$data= $this->select_query(\"make_model\",\"id,name,del_status\",$where,$where_array,$sort_by);\n\t\treturn $data;\n\t}", "public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function findAll()\n {\n $fields = $options = [];\n //$options['debug'] = 1;\n $options['enablefieldsfe'] = 1;\n\n return $this->search($fields, $options);\n }", "public function findAll()\n {\n return $this->model->all();\n }", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function filter($params) {\n $model = $this->model;\n $keyword = isset($params['keyword'])?$params['keyword']:'';\n $sort = isset($params['sort'])?$params['sort']:''; \n if ($sort == 'name') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('name'); \n }\n else if ($sort == 'newest') {\n $query = $model->where('name','LIKE','%'.$keyword.'%')->orderBy('updated_at','desc'); \n }\n else {\n $query = $model->where('name','LIKE','%'.$keyword.'%'); \n }\n /** filter by class_id */ \n if (isset($params['byclass']) && isset($params['bysubject'])) {\n $query = $model->listClass($params['byclass'], $params['bysubject']);\n return $query; \n }\n else if (isset($params['byclass'])) { \n $query = $model->listClass($params['byclass']);\n return $query;\n }\n else if (isset($params['bysubject'])) {\n $query = $model->listClass(0,$params['bysubject']);\n return $query;\n }\n /** filter by course status */\n if (isset($params['incomming'])) {\n $query = $model->listCourse('incomming');\n return $query;\n }\n else if (isset($params['upcomming'])) {\n $query = $model->listCourse('upcomming');\n return $query;\n }\n $result = $query->paginate(10); \n return $result; \n }", "public function getAll($model, $filters = array())\n {\n $repo = $this->getRepository($model);\n\n return $repo->getAll($filters);\n }", "public function filters(Model $model): array\n {\n return [];\n }", "public function getResults()\n {\n if($this->search) {\n foreach ($this->filters as $field) {\n $field = array_filter(explode('.', $field));\n if(count($field) == 2) {\n $this->query->whereHas($field[0], function ($q) use ($field) {\n $q->where($field[1], 'ilike', \"%{$this->search}%\");\n });\n }\n if(count($field) == 1) {\n $this->query->orWhere($field[0], 'ilike', \"%{$this->search}%\");\n }\n }\n }\n\n if($this->where) {\n foreach ($this->where as $field => $value) {\n $this->query->where($field, $value);\n }\n }\n\n if ($this->whereBetween) {\n foreach ($this->whereBetween as $field => $value)\n $this->query->whereBetween($field, $value);\n }\n// dd($this->query->toSql());\n return $this->query->paginate($this->per_page);\n }", "protected function _searchInModel(Model $model, Builder $items){\n foreach($model->searchable as $param){\n if($param != 'id'){\n if(isset($this->request[$param]))\n $items = $items->where($param, $this->request[$param]);\n if(isset($this->request[$param.'_like']))\n $items = $items->where($param, 'like', '%'.$this->request[$param.'_like'].'%');\n }else{\n if(isset($this->request['id'])){\n $ids = explode(',', $this->request['id']);\n $items = $items->whereIn('id', $ids);\n }\n }\n }\n\n return $items;\n }", "public function getAll($model)\n {\n $sql = \"SELECT * FROM {$this->table}\";\n $req = Database::getBdd()->prepare($sql);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_CLASS,get_class($this->model));\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function findAll()\n {\n return $this->driver->findAll($this->model);\n }", "public function getAllFilters();", "public function GetAll()\n {\n return $this->model->all();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function findWhere($model, $conditions, $limit = 0){\n\n if(!class_exists($model)){\n return new $model;\n }\n\n $table = $this->getTableName($model);\n\n $sql = 'select * from ' . $table . ' where ';\n $values = [];\n $counter = 1;\n\n foreach ($conditions as $key => $value) {\n if($counter > 1)\n $sql .= ' AND ';\n\n $sql .= $key . '=?';\n $values[] = $value; \n $counter++;\n }\n\n if($limit > 0)\n $sql .= ' LIMIT ' . $limit;\n \n $stmt = $this->pdo->prepare($sql);\n $stmt->execute($values);\n\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, $model);\n }", "public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object_type_id);\n\t\t$criteria->compare('data_type_id',$this->data_type_id);\n\t\t$criteria->compare('create_date',$this->create_date,true);\n\t\t$criteria->compare('client_ip',$this->client_ip,true);\n\t\t$criteria->compare('url',$this->url,true);\n\t\t$criteria->compare('url_origin',$this->url_origin,true);\n\t\t$criteria->compare('device',$this->device,true);\n\t\t$criteria->compare('country_name',$this->country_name,true);\n\t\t$criteria->compare('country_code',$this->country_code,true);\n\t\t$criteria->compare('regionName',$this->regionName,true);\n\t\t$criteria->compare('cityName',$this->cityName,true);\n\t\t$criteria->compare('browser',$this->browser,true);\n\t\t$criteria->compare('os',$this->os,true);\n\t\t\t// se agrego el filtro por el usuario actual\n\t\t$idUsuario=Yii::app()->user->getId();\n\t\t$model = Listings::model()->finbyAttributes(array('user_id'=>$idUsuario));\n\t\tif($model->id!=\"\"){\n\t\t\t$criteria->compare('object_id',$model->id);\t\n\t\t}else{\n\t\t\t$criteria->compare('object_id',\"Null\");\t\n\t\t}\n\t\t\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getModels()\n {\n return $this->_models;\n }", "public function getSearchFields();", "public function all()\n {\n return $this->model->get();\n }", "public function getAllModels()\n {\n try {\n return AppModelList::models();\n }\n catch (Throwable $t) {\n throw new Exception('Parse Error: AppModelList.php has been corrupted.');\n }\n }", "protected function _list_items_query()\n\t{\n\t\t$this->filters = (array) $this->filters;\n\t\t$where_or = array();\n\t\t$where_and = array();\n\t\tforeach($this->filters as $key => $val)\n\t\t{\n\t\t\tif (is_int($key))\n\t\t\t{\n\t\t\t\tif (isset($this->filters[$val])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$key = $val;\n\t\t\t\t$val = $this->filter_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// used for separating table names and fields since periods get translated to underscores\n\t\t\t\t$key = str_replace(':', '.', $key);\n\t\t\t}\n\t\t\t\n\t\t\t$joiner = $this->filter_join;\n\t\t\t\n\t\t\tif (is_array($joiner))\n\t\t\t{\n\t\t\t\tif (isset($joiner[$key]))\n\t\t\t\t{\n\t\t\t\t\t$joiner = $joiner[$key];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$joiner = 'or';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($val)) \n\t\t\t{\n\t\t\t\t$joiner_arr = 'where_'.$joiner;\n\t\t\t\t\n\t\t\t\tif (strpos($key, '.') === FALSE AND strpos($key, '(') === FALSE) $key = $this->table_name.'.'.$key;\n\t\t\t\t\n\t\t\t\t//$method = ($joiner == 'or') ? 'or_where' : 'where';\n\t\t\t\t\n\t\t\t\t// do a direct match if the values are integers and have _id in them\n\t\t\t\tif (preg_match('#_id$#', $key) AND is_numeric($val))\n\t\t\t\t{\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\tarray_push($$joiner_arr, $key.'='.$val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// from imknight https://github.com/daylightstudio/FUEL-CMS/pull/113#commits-pushed-57c156f\n\t\t\t\t//else if (preg_match('#_from#', $key) OR preg_match('#_to#', $key))\n\t\t\t\telse if (preg_match('#_from$#', $key) OR preg_match('#_fromequal$#', $key) OR preg_match('#_to$#', $key) OR preg_match('#_toequal$#', $key) OR preg_match('#_equal$#', $key))\n\t\t\t\t{\n\t\t\t\t\t//$key = strtr($key, array('_from' => ' >', '_fromequal' => ' >=', '_to' => ' <', '_toequal' => ' <='));\n\t\t\t\t\t$key_with_comparison_operator = preg_replace(array('#_from$#', '#_fromequal$#', '#_to$#', '#_toequal$#', '#_equal$#'), array(' >', ' >=', ' <', ' <=', ' ='), $key);\n\t\t\t\t\t//$this->db->where(array($key => $val));\n\t\t\t\t\t//$where_or[] = $key.'='.$this->db->escape($val);\n\t\t\t\t\tarray_push($$joiner_arr, $key_with_comparison_operator.$this->db->escape($val));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//$method = ($joiner == 'or') ? 'or_like' : 'like';\n\t\t\t\t\t//$this->db->$method('LOWER('.$key.')', strtolower($val), 'both');\n\t\t\t\t\tarray_push($$joiner_arr, 'LOWER('.$key.') LIKE \"%'.strtolower($val).'%\"');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// here we will group the AND and OR separately which should handle most cases me thinks... but if not, you can always overwrite\n\t\t$where = array();\n\t\tif (!empty($where_or))\n\t\t{\n\t\t\t$where[] = '('.implode(' OR ', $where_or).')';\n\t\t}\n\t\tif (!empty($where_and))\n\t\t{\n\t\t\t$where[] = '('.implode(' AND ', $where_and).')';\n\t\t}\n\t\tif (!empty($where))\n\t\t{\n\t\t\t$where_sql = implode(' AND ', $where);\n\t\t\t$this->db->where($where_sql);\n\t\t}\n\t\t\n\t\t\n\t\t// set the table here so that items total will work\n\t\t$this->db->from($this->table_name);\n\t}", "public function getAll()\n {\n return $this->fetchAll($this->searchQuery(0));\n }", "public function listAction() {\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$select = null;\n\t\t\n\t\tif ($this->_request->getParam('data')) {\n\t\t\t\n\t\t\t$data = unserialize($this->_request->getParam('data'));\n\t\t\t$aWhere = array();\n\t\t\t$searchText = array();\n\t\t\t\n\t\t\tforeach ($data['query'] as $key => $q) {\n\t\t\t\n\t\t\t\tif (isset($data['fields'][$key]) && !empty($data['fields'][$key])) {\n\t\t\t\t\n\t\t\t\t\t$func = addslashes($data['func'][$key]);\n\t\t\t\t\t$q =\taddslashes($q);\n\t\t\t\t\t$tmpWhere = array();\n\t\t\t\t\t$searchText[] = implode(' OU ', $data['fields'][$key]) . ' ' . $this->view->func[$func] . ' \"' . stripslashes($q) . '\"';\n\t\t\t\t\t\n\t\t\t\t\tforeach ($data['fields'][$key] as $field) {\n\t\t\t\t\t\n\t\t\t\t\t\t$field\t=\taddslashes($field);\n\t\t\t\t\t\tswitch ($func) {\n\t\t\t\t\t\t\tcase 'LIKE':\n\t\t\t\t\t\t\tcase 'NOT LIKE':\n\t\t\t\t\t\t\tcase '=':\n\t\t\t\t\t\t\tcase '!=':\n\t\t\t\t\t\t\tcase '>':\n\t\t\t\t\t\t\tcase '>=':\n\t\t\t\t\t\t\tcase '<':\n\t\t\t\t\t\t\tcase '<=':\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' ' . $func . ' \\'' . $q . '\\''; }\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"= ''\":\n\t\t\t\t\t\t\tcase \"!= ''\":\n\t\t\t\t\t\t\tcase 'IS NULL':\n\t\t\t\t\t\t\tcase 'IS NOT NULL':\n\t\t\t\t\t\t\t\t$tmpWhere[] = $field . ' ' . stripslashes($func);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tif (trim($q) != '') { $tmpWhere[] = $field . ' LIKE \\'%' . $q . '%\\''; }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aWhere[] = '(' . implode(' OR ', $tmpWhere) . ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($aWhere)) { $select = $model->select()->where(implode(' AND ', $aWhere)); }\n\t\t\t$this->view->searchText = $searchText;\n\t\t}\n\t\t$this->view->model = $modelName;\n\t\t$this->view->allData = $model->fetchAll($select);\n\t\t$this->view->data = Zend_Paginator::factory($this->view->allData)\n\t\t\t\t\t\t\t->setCurrentPageNumber($this->_getParam('page', 1));\n\t}", "public function index(Request $request)\n {\n $this->validate($request, [\n 'type' => 'required',\n 'searched' => 'required',\n ]);\n\n try {\n if ($request->type == 'Categories') {\n return Category::search($request->searched)->take(20)->get();\n }\n\n if ($request->type == 'Submissions') {\n return $this->sugarFilter(Submission::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Comments') {\n return $this->withoutChildren(Comment::search($request->searched)->take(20)->get());\n }\n\n if ($request->type == 'Users') {\n return User::search($request->searched)->take(20)->get();\n }\n } catch (\\Exception $exception) {\n app('sentry')->captureException($exception);\n\n return [];\n }\n }", "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getReturnModels(){\r\n return array_values($this->models);\r\n }", "public function findAll()\n {\n $models = $this->getDoctrineRepository()->findAll();\n $this->events()->trigger(__FUNCTION__ . '.post', $this, array(\n 'model' => $models,\n 'om' => $this->getObjectManager())\n );\n return $models;\n }", "public function models();", "public function search($conditions)\n\t{\n\t\t$limit = (isset($conditions['limit']) && $conditions['limit'] !== null ? $conditions['limit'] : 10);\n\t\t$result = array();\n\t\t$alphabets = [];\n\n\t\tDB::enableQueryLog();\n\n\t\t$mem = new Memcached();\n\t\t$mem->addServer(env('memcached_server'), env('memcached_port'));\n\n\t\t/* Get Default Logo Link on setting_object table */\n\t\t$logoMem = $mem->get('logo_course');\n\n\t\tif ($logoMem)\n\t\t{\n\t\t\t$default_logo = $logoMem;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$default_logo = $this->getDefaultLogo();\n\t\t\t$mem->set('logo_course', $default_logo);\n\t\t}\n\n\t\tif (isset($conditions['alphabet']) && $conditions['alphabet'] !== null && sizeof($conditions['alphabet']) > 0) {\n\t\t\tforeach ($conditions['alphabet'] as $item) {\n\t\t\t\t$alphabets[] = \"lower(entity.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t\t$alphabets[] = \"lower(curriculum.name) like \" . DB::Raw(\"'\" . strtolower($item) . \"%'\");\n\t\t\t}\n\t\t}\n\n\t\t$extraGroup = (isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : '' );\n\t\t$extraGroup = str_replace(' ASC', '',$extraGroup);\n\t\t$extraGroup = str_replace(' DESC', '',$extraGroup);\n\n\t\t$searchData = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->limit($limit)\n\t\t\t->offset(isset($conditions['page']) && $conditions['page'] !== null ? ($conditions['page']-1) * $limit : 0)\n\t\t\t->get();\n\n\t\t$searchAll = DB::table('course')\n\t\t\t->select('curriculum.curriculum_id','course.course_id', DB::raw('entity.logo entity_logo'), 'course.day_of_week',\n\t\t\t\tDB::raw('entity.name entity_name, curriculum.name curriculum_name'), 'course.time_start', 'course.time_end')\n\t\t\t->whereRaw(\n\t\t\t\t(isset($conditions['is_free_trial'])&& sizeof($conditions['is_free_trial']) > 0 ? \"course.is_free_trial in (\" . implode(\",\", $conditions['is_free_trial']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['country_id']) && $conditions['country_id'] !== null ? \"campus.country_id in (\" . implode(\",\",$conditions['country_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['city_id']) && $conditions['city_id'] !== null ? \"campus.city_id in (\" . implode(\",\",$conditions['city_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['location_id']) && $conditions['location_id'] !== null ? \"campus.location_id in (\" . implode(\",\",$conditions['location_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['event_type_id']) && $conditions['event_type_id'] !== null ? \"program.event_type_id in (\" . implode(\",\",$conditions['event_type_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['facility_id']) && $conditions['facility_id'] !== null ? \"campus.facility_id in (\" . implode(\",\",$conditions['facility_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['campus_id']) && $conditions['campus_id'] !== null ? \"campus_arena.campus_id in (\" . implode(\",\",$conditions['campus_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['program_id']) && $conditions['program_id'] !== null ? \"curriculum.program_id in (\" . implode(\",\",$conditions['program_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['arena_id']) && $conditions['arena_id'] !== null ? \"campus_arena.arena_id in (\" . implode(\",\",$conditions['arena_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['provider_id']) && $conditions['provider_id'] !== null ? \"program.provider_id in (\" . implode(\",\",$conditions['provider_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['user_id']) && $conditions['user_id'] !== null ? \"schedule.instructor_id in (\" . implode(\",\",$conditions['user_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['day_of_week']) && $conditions['day_of_week'] !== null ? \"course.day_of_week in (\" . implode(\",\",$conditions['day_of_week']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['time_start']) && $conditions['time_start'] !== null ? \"time(course.time_start) = time('\" . $conditions['time_start'] . \"') AND \" : '') .\n\t\t\t\t(isset($conditions['time_end']) && $conditions['time_end'] !== null ? \"time(course.time_end) = time('\" . $conditions['time_end'] . \"') AND \" : '') .\n\n\t\t\t\t(isset($conditions['audience_gender_id']) && $conditions['audience_gender_id'] !== null ? \"course.audience_gender_id in (\" . implode(\",\",$conditions['audience_gender_id']) . \") AND \" : '') .\n\t\t\t\t(isset($conditions['audience_generation_id']) && $conditions['audience_generation_id'] !== null ? \"course.audience_generation_id in (\" . implode(\",\",$conditions['audience_generation_id']) . \") AND \" : '') .\n\n\t\t\t\t(isset($conditions['age_range_top']) && $conditions['age_range_top'] !== null ? \"course.age_range_top >= \" . $conditions['age_range_top'] . \" AND \" : '') .\n\t\t\t\t(isset($conditions['age_range_bottom']) && $conditions['age_range_bottom'] !== null ? \"course.age_range_bottom <= \" . $conditions['age_range_bottom'] . \" AND \" : '') .\n\n\t\t\t\t(isset($conditions['keyword']) && sizeof($conditions['keyword']) > 0 ? \"(\" . implode(\" OR \", $conditions['keyword']) . \") AND \" : '') .\n\t\t\t\t(isset($alphabets) && sizeof($alphabets) > 0 ? \"(\" . join(\" OR \", $alphabets) . \") AND \" : '') .\n\t\t\t\t('course.status = 0')\n\t\t\t)\n\t\t\t->join('campus_arena', function($join){\n\t\t\t\t$join->on('course.campus_arena_id','campus_arena.campus_arena_id');\n\t\t\t\t//$join->on('course.arena_id', 'campus_arena.arena_id');\n\t\t\t})\n\t\t\t->leftjoin('campus', 'campus_arena.campus_id', 'campus.campus_id')\n\t\t\t->leftjoin('location', 'campus.location_id', 'location.location_id')\n\n\t\t\t->leftjoin('facility', function ($join) {\n\t\t\t\t$join->on('campus.facility_id','facility.facility_id');\n\t\t\t\t$join->on('campus.country_id','facility.country_id');\n\t\t\t})\n\n\t\t\t->leftjoin('curriculum', 'course.curriculum_id', 'curriculum.curriculum_id')\n\n\t\t\t->leftjoin('program','program.program_id','curriculum.program_id')\n\t\t\t->leftjoin('provider', 'program.provider_id', 'provider.provider_id')\n\t\t\t->leftjoin('entity','provider.entity_id','entity.entity_id')\n\t\t\t->leftjoin('event_type', 'program.event_type_id', 'event_type.event_type_id')\n\t\t\t/*->join('entity', 'provider.entity_id', 'entity.entity_id')*/\n\n\t\t\t->leftjoin('schedule', 'course.course_id', 'schedule.course_id')\n\t\t\t->leftjoin('user', 'schedule.instructor_id', 'user.user_id')\n\t\t\t->leftjoin('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t->leftjoin('activity_classification', 'activity_classification.activity_classification_id', 'activity.activity_classification_id')\n\t\t\t//->groupBy('course.course_id','schedule.instructor_id','curriculum.curriculum_id','entity.logo', 'course.day_of_week','entity.name','curriculum.name','course.time_start', 'course.time_end','event_type.name')\n\t\t\t->groupBy(\n\t\t\t\tDB::raw('curriculum.curriculum_id, course.course_id, entity.logo, course.day_of_week, entity.name, curriculum.name, course.time_start, course.time_end' .\n\t\t\t\t\t(isset($conditions['sort']) && $conditions['sort'] !== null ? \", \" . $extraGroup : '' )\n\t\t\t\t)\n\t\t\t)\n\t\t\t->orderByRaw(isset($conditions['sort']) && $conditions['sort'] !== null ? $conditions['sort'] : 'course.day_of_week ASC, course.course_id DESC')\n\t\t\t->get();\n\n\t\t//echo(\"<br>Total : \" . sizeof($searchData) . \" records\");\n\t\tforeach ($searchData as $data) {\n\t\t\t/*echo('<br>' . $data->program_id . '|' . $data->program_name . '|'. $data->activity_id . '|' . $data->provider_name . '|' . $data->location_name);*/\n\t\t\t//echo('<br>' . $data->provider_id . '|' . $data->provider_name . '|' . $data->location_name);\n\n\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\t\t\t$day = DB::table('day_of_week')->where('day_of_week.day_of_week_id',$data->day_of_week)->first();\n\n\n\t\t\t//echo('<br>' . $data->course_id . \"~\" . $data->program_name . '#'.$day->name. \"|\". date('h:i',strtotime($data->time_start)) . '-' .date('h:i',strtotime($data->time_end)));\n\t\t\t$item = ['course_id' => $data->course_id,\n\t\t\t\t'entity_logo' => ($data->entity_logo ? $data->entity_logo : $default_logo),\n\t\t\t\t'entity_name' => $data->entity_name,\n\t\t\t\t'curriculum_name' => $data->curriculum_name,\n\t\t\t\t'day_name' => $day->name,\n\t\t\t\t'time_start' => date('H:i',strtotime($data->time_start)),\n\t\t\t\t'time_end' => date('H:i',strtotime($data->time_end))];\n\n\t\t\t/*$schedules = DB::table('schedule')\n\t\t\t\t->select('schedule.schedule_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\tforeach ($schedules as $schedule) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t}*/\n\n\t\t\t$programs = DB::table('curriculum')\n\t\t\t\t->select('program.program_id', 'program.name')\n\t\t\t\t->join('program', 'program.program_id', 'curriculum.program_id')\n\t\t\t\t->where('curriculum.curriculum_id', $data->curriculum_id)\n\t\t\t\t->orderBy('program.activity_id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\t$searchActivities = [];\n\t\t\tforeach ($programs as $program) {\n\t\t\t\t//echo($program->program_id . '|' . $program->name );\n\t\t\t\t$activities = DB::table('program')\n\t\t\t\t\t->select('activity.logo', 'program.provider_id', DB::raw('program.name program_name'))\n\t\t\t\t\t->join('activity', 'program.activity_id', 'activity.activity_id')\n\t\t\t\t\t->leftjoin('activity_classification', 'activity.activity_classification_id', 'activity_classification.activity_classification_id')\n\t\t\t\t\t->where('program.program_id', $program->program_id)\n\t\t\t\t\t->whereRaw(\n\t\t\t\t\t\t(isset($conditions['activity_id']) && $conditions['activity_id'] !== null ? \"program.activity_id in (\" . implode(\",\",$conditions['activity_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_classification_id']) && $conditions['activity_classification_id'] !== null ? \"activity.activity_classification_id in (\" . implode(\",\",$conditions['activity_classification_id']) . \") AND \" : '') .\n\t\t\t\t\t\t(isset($conditions['activity_type_id']) && $conditions['activity_type_id'] !== null ? \"activity_classification.activity_type_id in (\" . implode(\",\",$conditions['activity_type_id']) . \") AND \" : '') .\n\t\t\t\t\t\t('program.status = 0')\n\t\t\t\t\t)\n\t\t\t\t\t//->groupBy('activity.logo')\n\t\t\t\t\t->get();\n\n\t\t\t\tforeach ($activities as $activity) {\n\t\t\t\t\t//echo('<img src=\"' . $activity->logo . '\" style=\"width:2%;\" alt=\"' . $activity->program_name . '\" title=\"' . $activity->program_name . '\">');\n\t\t\t\t\t$searchActivity = [\n\t\t\t\t\t\t'logo' => $activity->logo,\n\t\t\t\t\t\t'name' => $activity->program_name,\n\t\t\t\t\t];\n\t\t\t\t\tarray_push($searchActivities, $searchActivity);\n\t\t\t\t}\n\t\t\t}\n\t\t\tarray_push($result, array('item' => $item, 'activity' => $searchActivities));\n\t\t}\n\n\t\t$final = array('totalPage' => ceil(sizeof($searchAll)/$limit), 'total' => ( sizeof($searchAll) > 0 ? sizeof($searchAll) : 0), 'result' => $result, 'debug' => DB::getQueryLog()[0]['query']);\n\t\treturn $final;\n\t}", "public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}", "public function all()\n {\n return $this->model->get();\n }", "public function master_search() {\r\n $this->db->join(\r\n '__Vehicles', \r\n '__Vehicles.__ContactId = ' . $this->table_name. '.' . $this->contactId_fieldname ,\r\n 'left outer'\r\n ); \r\n return $this->get();\r\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function findBy(array $filters);", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('brand',$this->brand,true);\n\t\t$criteria->compare('status',$this->status,true);\n\t\t$criteria->compare('width',$this->width);\n\t\t$criteria->compare('height',$this->height);\n\t\t$criteria->compare('goods_thumb',$this->goods_thumb,true);\n\t\t$criteria->compare('goods_img',$this->goods_img,true);\n\t\t$criteria->compare('model_search',$this->model_search,true);\n\t\t$criteria->compare('brand_search',$this->brand_search,true);\n\t\t$criteria->compare('brand2',$this->brand2,true);\n\t\t$criteria->compare('brand2_search',$this->brand2_search,true);\n\t\t$criteria->compare('brand3',$this->brand3,true);\n\t\t$criteria->compare('brand3_search',$this->brand3_search,true);\n\t\t$criteria->compare('brand4',$this->brand4,true);\n\t\t$criteria->compare('brand4_search',$this->brand4_search,true);\n\t\t$criteria->compare('model2',$this->model2,true);\n\t\t$criteria->compare('model2_search',$this->model2_search,true);\n\t\t$criteria->compare('model3',$this->model3,true);\n\t\t$criteria->compare('model3_search',$this->model3_search,true);\n\t\t$criteria->compare('model4',$this->model4,true);\n\t\t$criteria->compare('model4_search',$this->model4_search,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function getList($params = [])\n {\n $model = $this->prepareModel();\n return $model::all();\n }", "abstract protected function getSearchModelName(): string;", "public function getItemsCriteria() {}", "public function getItemsCriteria() {}", "public function getFilters();", "public static function getList(array $filters){\n return self::model()->findAllByAttributes($filters);\n }", "public function getSearch();", "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }", "public function actionList() {\n switch ($_GET['model']) {\n case 'Product':\n $models = Product::model()->findAll();\n break;\n case 'Vendor':\n $models = Vendor::model()->findAll();\n break;\n case 'FavoriteProduct':\n $models = FavoriteProduct::model()->findAll();\n break;\n case 'Order':\n $models = Order::model()->findAll();\n break;\n case 'Rating':\n $models = Rating::model()->findAll();\n break;\n case 'Review':\n $models = Review::model()->findAll();\n break;\n case 'UserAddress':\n $models = UserAddress::model()->findAll();\n break;\n case 'OrderDetail':\n $models = OrderDetail::model()->findAll();\n break;\n default:\n $this->_sendResponse(0, 'You have pass invalid modal name');\n Yii::app()->end();\n }\n // Did we get some results?\n if (empty($models)) {\n // No\n $this->_sendResponse(0, 'No Record found ');\n } else {\n // Prepare response\n $rows = array();\n $i = 0;\n foreach ($models as $model) {\n $rows[] = $model->attributes;\n if ($_GET['model'] == 'Order') {\n $rows[$i]['cart_items'] = Product::model()->getProducts($model->product_id);\n $rows[$i]['order_detail'] = OrderDetail::model()->findAll(array('condition' => 'order_id ='.$model->id));\n }\n $i = $i + 1;\n }\n // Send the response\n $this->_sendResponse(1, '', $rows);\n }\n }", "static public function filterData($model_name)\n {\n $query = \"{$model_name}Query\";\n $objects = $query::create()->find();\n \n if ($objects != null) {\n\n $array = array();\n foreach ($objects as $object) {\n $array[$object->getId()] = $object->__toString();\n }\n\n return $array;\n } else {\n return array();\n }\n }", "public static function getList(string $filter='')\n {\n $query = self::with(['product','insuredPerson','agency'])->whereNotNull('n_OwnerId_FK');\n\n $filterArray = json_decode(request('filter'));\n\n if (is_object($filterArray)) {\n foreach($filterArray as $key=>$value) {\n if (empty($value)) {\n continue;\n }\n if (is_array($value)) {\n $query->whereIn($key, $value);\n continue;\n }\n $query->where($key, 'like', \"%$value%\");\n }\n }\n return $query;\n }", "public function getCriteria();", "public static function getSearchable()\n {\n return [\n 'columns' => [],\n 'joins' => [\n \n ]\n ];\n }", "static function filter($model) {\n $cond = Session::get('filter', strtolower($model->source));\n $param = array(\n /* Relaciones */\n 'rel' => array(\n '=' => 'Igual',\n 'LIKE' => 'Parecido',\n '<>' => 'Diferente',\n '<' => 'Menor',\n '>' => 'Mayor'\n ),\n 'col' => array_diff($model->fields, $model->_at, $model->_in, $model->primary_key),\n 'model' => $model,\n 'cond' => $cond\n );\n ob_start();\n View::partial('backend/filter', false, $param);\n return ob_get_clean();\n }", "public function findByModelName($model_name);", "abstract public function getFieldsSearchable();", "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "public static function getModels()\n\t{\n\t\t$result = [];\n\t\t$path = __DIR__ . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR;\n\t\t$Iterator = new RecursiveDirectoryIterator($path);\n\t\t$objects = new RecursiveIteratorIterator($Iterator, RecursiveIteratorIterator::SELF_FIRST);\n\t\tforeach ($objects as $name => $object)\n\t\t{\n\t\t\tif (strtolower(substr($name, -4) != '.php'))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$name = strtolower(str_replace($path, '', substr($name, 0, strlen($name) - 4)));\n\t\t\t$name = str_replace(DIRECTORY_SEPARATOR, '\\\\', $name);\n\t\t\t$name = 'Model\\\\' . ucwords($name, '\\\\');\n\t\t\tif (class_exists($name))\n\t\t\t{\n\t\t\t\t$result[]= $name;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "public function getListQuery();", "public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }", "public function getWorkFlowModels()\n {\n return $this->postRequest('GetWorkFlowModels');\n }", "public function getList()\n {\n $filter = $this->getEvent()->getRouteMatch()->getParam('filter', null);\n return $this->getService()\n ->getList($filter);\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "function getAll(){\n\n\t\t\t$this->db->order_by(\"status\", \"asc\");\n\t\t\t$query = $this->db->get_where($this->table);\n\t\t\treturn $query;\n\t\t}", "public function actionViewModelList($modelName)\n\t{\n\t\t$pageSize = BaseModel::PAGE_SIZE;\n\t\tif ($_POST[\"sortBy\"]) {\n\t\t\t$order = $_POST[\"sortBy\"];\n\t\t}\n\t\t//echo $order;\n\t\t/*if (!$modelName) {\n\t\t\t\n\t\t}*/\n\t\t$sess_data = Yii::app()->session->get($modelName.'search');\n\t\t$searchId = $_GET[\"search_id\"];\n\t\t$fromSearchId = TriggerValues::model() -> decodeSearchId($searchId);\n\t\t//print_r($fromSearchId);\n\t\t//echo \"<br/>\";\n\t\t//Если задан $_POST/GET с формы, то сливаем его с массивом из searchId с приоритетом у searchId\n\t\tif ($_POST[$modelName.'SearchForm'])\n\t\t{\n\t\t\t$fromPage = array_merge($_POST[$modelName.'SearchForm'], $fromSearchId);\n\t\t} else {\n\t\t\t//Если же он не задан, то все данные берем из searchId\n\t\t\t$fromPage = $fromSearchId;\n\t\t}\n\t\t//print_r($fromPage);\n\t\tif ((!$fromPage)&&(!$sess_data))\n\t\t{\n\t\t\t//Если никаких критереев не задано, то выдаем все модели.\n\t\t\t$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t} else {\n\t\t\tif ($_GET[\"clear\"]==1)\n\t\t\t{\n\t\t\t\t//Если критерии заданы, но мы хотим их сбросить, то снова выдаем все и обнуляем нужную сессию\n\t\t\t\tYii::app()->session->remove($modelName.'search');\n\t\t\t\t$page = 1;\n\t\t\t\t//was://$searched = $modelName::model() -> userSearch(array(),$order);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromSearchId,$order);\n\t\t\t} else {\n\t\t\t\t//Если же заданы какие-то критерии, но не со страницы, то вместо них подаем данные из сессии\n\t\t\t\tif (!$fromPage)\n\t\t\t\t{\n\t\t\t\t\t$fromPage = $sess_data;\n\t\t\t\t\t//echo \"from session\";\n\t\t\t\t}\n\t\t\t\t//Адаптируем критерии под специализацию. Если для данной специализации нет какого-то критерия, а он где-то сохранен, то убираем его.\n\t\t\t\t$fromPage = Filters::model() -> FilterSearchCriteria($fromPage, $modelName);\n\t\t\t\t//Если критерии заданы и обнулять их не нужно, то запускаем поиск и сохраняем его критерии в сессию.\n\t\t\t\tYii::app()->session->add($modelName.'search',$fromPage);\n\t\t\t\t$searched = $modelName::model() -> userSearch($fromPage,$order);\n\t\t\t}\n\t\t}\n\t\t//делаем из массива объектов dataProvider\n $dataProvider = new CArrayDataProvider($searched['objects'],\n array( 'keyField' =>'id'\n ));\n\t\t$this -> layout = 'layoutNoForm';\n\t\t//Определяем страницу.\n\t\t$maxPage = ceil(count($searched['objects'])/$pageSize);\n\t\tif ($_GET[\"page\"]) {\n\t\t\t$_POST[\"page\"] = $_GET[\"page\"];\n\t\t}\n\t\t$page = $_POST[\"page\"] ? $_POST[\"page\"] : 1;\n\t\t$page = (($page >= 1)&&($page <= $maxPage)) ? $page : 1;\n\t\t$_POST[$modelName.'SearchForm'] = $fromPage;\n\t\t$this->render('show_list', array(\n\t\t\t'objects' => array_slice($searched['objects'],($page - 1) * $pageSize, $pageSize),\n\t\t\t'modelName' => $modelName,\n\t\t\t'filterForm' => $modelName::model() -> giveFilterForm($fromPage),\n\t\t\t'fromPage' => $fromPage,\n\t\t\t'description' => $searched['description'],\n\t\t\t'specialities' => Filters::model() -> giveSpecialities(),\n\t\t\t'page' => $page,\n\t\t\t'maxPage' => $maxPage,\n\t\t\t'total' => count($searched['objects'])\n\t\t));\n\t\t\n\t}", "public function search_through(Request $request)\n {\n $reports = Payment::query();\n\n if (!empty($request->query())) {\n foreach ($request->query() as $key => $value) {\n if ($key == 'date') {\n $reports->whereDate('created_at', '>=', $value);\n } else {\n $reports->where($key, $value);\n }\n }\n }\n\n return $reports->get();\n }", "public function models($query, array $options = [])\n {\n $hits = $this->run($query);\n list($models, $totalCount) = $this->search->config()->models($hits, $options);\n // Remember total number of results.\n $this->setCachedCount($query, $totalCount);\n\n return Collection::make($models);\n }", "public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n return $this->repository->all();\n }", "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n \n $criteria->with=array('c','b');\n\t\t$criteria->compare('pid',$this->pid,true);\n\t\t$criteria->compare('t.cid',$this->cid,true);\n\t\t$criteria->compare('t.bid',$this->bid,true);\n\n $criteria->compare('c.classify_name',$this->classify,true);\n\t\t$criteria->compare('b.brand_name',$this->brand,true);\n \n $criteria->addCondition('model LIKE :i and model REGEXP :j');\n $criteria->params[':i'] = \"%\".$this->index_search.\"%\";\n $criteria->params[':j'] = \"^\".$this->index_search;\n\n \n\t\t$criteria->compare('model',$this->model,true);\n\t\t$criteria->compare('package',$this->package,true);\n\t\t$criteria->compare('RoHS',$this->RoHS,true);\n\t\t$criteria->compare('datecode',$this->datecode,true);\n\t\t$criteria->compare('quantity',$this->quantity);\n\t\t$criteria->compare('direction',$this->direction,true);\n $criteria->compare('image_url',$this->image_url,true);\n\t\t$criteria->compare('create_time',$this->create_time,true);\n\t\t$criteria->compare('status',$this->status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function queryset(){\n return $this->_get_queryset();\n }", "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = $request->get('limit');\n $perPage = empty($perPage) ? 25 : $perPage;\n\n if (!empty($keyword)) {\n $filters = Filter::where('sl_gender', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_color', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_occasion', 'LIKE', \"%$keyword%\")\n ->orWhere('sl_style', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_age', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_min_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_max_price', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_from', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_date_to', 'LIKE', \"%$keyword%\")\n ->orWhere('wg_city_id', 'LIKE', \"%$keyword%\")\n ->orWhere('user_id', 'LIKE', \"%$keyword%\")\n ->paginate($perPage);\n } else {\n $filters = Filter::paginate($perPage);\n }\n\n return $filters;\n }", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getList(\\Magento\\Framework\\Api\\SearchCriteriaInterface $searchCriteria);", "public function getSearchCriterias()\n {\n return $this->_searchCriterias;\n }", "private function getSearchConditions()\n {\n $searchConditions = [];\n\n $userIds = $this->request->get('ids') ?? [];\n if ($userIds) {\n $searchConditions['id'] = $userIds;\n }\n\n $email = $this->request->get('email') ?? '';\n if ($email) {\n $searchConditions['email'] = $email;\n }\n\n return $searchConditions;\n }", "public function findAllAction();", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "function GetFilterList() {\n\t\tglobal $UserProfile;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\t\t$sSavedFilterList = \"\";\n\n\t\t// Load server side filters\n\t\tif (EW_SEARCH_FILTER_OPTION == \"Server\" && isset($UserProfile))\n\t\t\t$sSavedFilterList = $UserProfile->GetSearchFilters(CurrentUserName(), \"fsolicitudlistsrch\");\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id->AdvancedSearch->ToJson(), \",\"); // Field id\n\t\t$sFilterList = ew_Concat($sFilterList, $this->nombre_contacto->AdvancedSearch->ToJson(), \",\"); // Field nombre_contacto\n\t\t$sFilterList = ew_Concat($sFilterList, $this->name->AdvancedSearch->ToJson(), \",\"); // Field name\n\t\t$sFilterList = ew_Concat($sFilterList, $this->lastname->AdvancedSearch->ToJson(), \",\"); // Field lastname\n\t\t$sFilterList = ew_Concat($sFilterList, $this->_email->AdvancedSearch->ToJson(), \",\"); // Field email\n\t\t$sFilterList = ew_Concat($sFilterList, $this->address->AdvancedSearch->ToJson(), \",\"); // Field address\n\t\t$sFilterList = ew_Concat($sFilterList, $this->phone->AdvancedSearch->ToJson(), \",\"); // Field phone\n\t\t$sFilterList = ew_Concat($sFilterList, $this->cell->AdvancedSearch->ToJson(), \",\"); // Field cell\n\t\t$sFilterList = ew_Concat($sFilterList, $this->created_at->AdvancedSearch->ToJson(), \",\"); // Field created_at\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_sucursal->AdvancedSearch->ToJson(), \",\"); // Field id_sucursal\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoinmueble->AdvancedSearch->ToJson(), \",\"); // Field tipoinmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_inmueble->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_inmueble\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipovehiculo->AdvancedSearch->ToJson(), \",\"); // Field tipovehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_vehiculo->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_vehiculo\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomaquinaria->AdvancedSearch->ToJson(), \",\"); // Field tipomaquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_ciudad_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_ciudad_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->id_provincia_maquinaria->AdvancedSearch->ToJson(), \",\"); // Field id_provincia_maquinaria\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipomercaderia->AdvancedSearch->ToJson(), \",\"); // Field tipomercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->documento_mercaderia->AdvancedSearch->ToJson(), \",\"); // Field documento_mercaderia\n\t\t$sFilterList = ew_Concat($sFilterList, $this->tipoespecial->AdvancedSearch->ToJson(), \",\"); // Field tipoespecial\n\t\t$sFilterList = ew_Concat($sFilterList, $this->email_contacto->AdvancedSearch->ToJson(), \",\"); // Field email_contacto\n\t\tif ($this->BasicSearch->Keyword <> \"\") {\n\t\t\t$sWrk = \"\\\"\" . EW_TABLE_BASIC_SEARCH . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Keyword) . \"\\\",\\\"\" . EW_TABLE_BASIC_SEARCH_TYPE . \"\\\":\\\"\" . ew_JsEncode2($this->BasicSearch->Type) . \"\\\"\";\n\t\t\t$sFilterList = ew_Concat($sFilterList, $sWrk, \",\");\n\t\t}\n\t\t$sFilterList = preg_replace('/,$/', \"\", $sFilterList);\n\n\t\t// Return filter list in json\n\t\tif ($sFilterList <> \"\")\n\t\t\t$sFilterList = \"\\\"data\\\":{\" . $sFilterList . \"}\";\n\t\tif ($sSavedFilterList <> \"\") {\n\t\t\tif ($sFilterList <> \"\")\n\t\t\t\t$sFilterList .= \",\";\n\t\t\t$sFilterList .= \"\\\"filters\\\":\" . $sSavedFilterList;\n\t\t}\n\t\treturn ($sFilterList <> \"\") ? \"{\" . $sFilterList . \"}\" : \"null\";\n\t}", "public function search(Request $request)\n {\n if(!$request->has('query')) {\n return response()->json(['message' => 'Please type a keyword.']);\n }\n\n $userTenant = Auth::userTenant();\n $user = Auth::user();\n\n $searchableModelNameSpace = 'App\\\\Models\\\\';\n $result = [];\n // Loop through the searchable models.\n foreach (config('scout.searchableModels') as $model) {\n $modelClass = $searchableModelNameSpace.$model;\n $modelService = app($model.'Ser');\n\n if($model == 'Task') {\n $allowedModels = $modelService->searchForUserTenant($userTenant, $request->get('query'))->get();\n } else {\n $foundModels = $modelClass::search($request->get('query'))->get();\n if ($model === 'Comment') {\n $foundModels->where('groupId', '!=', null)->toArray();\n }\n $policy = app()->make('App\\Policies\\V2\\\\' . $model . 'Policy');\n $allowedModels = $foundModels->filter(function(BaseModel $foundModel) use($user, $policy) {\n return $policy->getAccess($user, $foundModel);\n });\n }\n\n $result[Str::lower($model) . 's'] = $allowedModels;\n }\n\n $responseData = ['message' => 'Keyword(s) matched!', 'results' => $result, 'pagination' => ['more' => false]];\n $responseHeader = Response::HTTP_OK;\n if (!count($result)) {\n $responseData = ['message' => 'No results found, please try with different keywords.'];\n $responseHeader = Response::HTTP_NOT_FOUND;\n }\n\n return response()->json($responseData, $responseHeader);\n }", "public function getAndFilter() {\n\t\treturn $this->db->getAndFilter();\n\t}" ]
[ "0.6745192", "0.6745192", "0.6607936", "0.6480248", "0.6380478", "0.6346251", "0.6309924", "0.6302481", "0.62549895", "0.62511677", "0.62511677", "0.6111791", "0.60769993", "0.60728127", "0.60465515", "0.60351735", "0.6033834", "0.601554", "0.5982608", "0.59806865", "0.5979308", "0.5970091", "0.59315383", "0.5928182", "0.59239197", "0.5891605", "0.588925", "0.5849558", "0.58478904", "0.58265656", "0.5818011", "0.5813345", "0.5808009", "0.5790819", "0.57766616", "0.57694167", "0.5765023", "0.57642305", "0.57522315", "0.5740738", "0.5738047", "0.5727545", "0.5724201", "0.5723084", "0.57225823", "0.5721401", "0.5718913", "0.5714439", "0.5712011", "0.5707315", "0.5694636", "0.5680138", "0.56711453", "0.5670484", "0.56703377", "0.56703377", "0.56703377", "0.5669673", "0.56673825", "0.56659126", "0.5656451", "0.5651109", "0.56498116", "0.564325", "0.5635642", "0.5633513", "0.56310356", "0.56235486", "0.56176996", "0.5612909", "0.560956", "0.5595046", "0.5579938", "0.557241", "0.5556209", "0.5550101", "0.55487776", "0.5547998", "0.5547349", "0.5535324", "0.5534813", "0.55342954", "0.55319065", "0.5525128", "0.55199116", "0.5518253", "0.55144674", "0.5509604", "0.55057275", "0.550087", "0.550019", "0.54966915", "0.54966915", "0.54966915", "0.54954666", "0.54937917", "0.5492664", "0.5492298", "0.5490264", "0.5489261", "0.54850507" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $nacionalidades_vuelos = NacionalidadVuelo::lists('nombre','id'); $tipos_matriculas = TipoMatricula::lists('nombre','id'); if($request->ajax()){ $sortName = $request->get('sortName','nombre_cargo'); $sortName =($sortName=="")?"nombre_cargo":$sortName; $sortType = $request->get('sortType','ASC'); $sortType =($sortType=="")?"ASC":$sortType; $nombre_cargo = $request->get('nombre_cargo', '%'); $nombre_cargo =($nombre_cargo=="")?"%":$nombre_cargo; \Input::merge([ 'sortName'=>$sortName, 'sortType'=>$sortType]); $otros_cargos = OtrosCargo::with("conceptos") ->where('nombre_cargo', 'like', $nombre_cargo) ->orderBy($sortName, $sortType) ->paginate(20); return view('configuracionPrecios.confOtrosCargos.partials.table', compact('otros_cargos','tipos_matriculas', 'nacionalidades_vuelos')); } else { return view('configuracionPrecios.confOtrosCargos.index', compact('otros_cargos', 'tipos_matriculas', 'nacionalidades_vuelos')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { $cantidad_unidades = $request->unidades; $aeropuerto_id = $request->aeropuerto_id; $precio_cargo = 0; $peso_desde = $request->peso_desde; $peso_hasta = $request->peso_hasta; foreach ($request->conceptos_id as $key => $concepto_id) { $concepto = Concepto::find($concepto_id); $nombre_cargo = $concepto->nompre; foreach ($request->tipos_matriculas_id as $key => $tipo_matricula_id) { foreach ($request->procedencias_id as $key => $procedencia_id) { foreach($request->nacionalidad_matriculas as $key => $nacionalidad_matricula) { $whereIn['concepto_id'] = $concepto_id; $whereIn['tipo_matricula'] = $tipo_matricula_id; $whereIn['aeropuerto_id'] = $aeropuerto_id; $whereIn['procedencia'] = $procedencia_id; $whereIn['nacionalidad_matricula'] = $nacionalidad_matricula; $whereIn['peso_desde'] = $peso_desde; $whereIn['peso_hasta'] = $peso_hasta; $otros_cargos = OtrosCargo::updateOrCreate($whereIn,array_filter([ 'nombre_cargo' => $nombre_cargo, 'precio_cargo' => $precio_cargo, 'aeropuerto_id' => $aeropuerto_id, 'cantidad_unidades' => $cantidad_unidades, 'concepto_id' => $concepto_id, 'conceptoCredito_id' => $concepto_id, 'conceptoContado_id' => $concepto_id, 'peso_desde' => $peso_desde, 'peso_hasta' => $peso_hasta, 'tipo_matricula' => $tipo_matricula_id, 'nacionalidad_matricula' => $nacionalidad_matricula, 'procedencia' => $procedencia_id, 'tipo_pago_id' => $request->tipo_pago_id ])); } } } } if ($otros_cargos){ return response()->json(array("text"=>'Registro realizado exitósamente', "otros_cargos"=>$otros_cargos, "success"=>1)); }else{ response()->json(array("text"=>'Error registrando el cargo',"success"=>0)); } }
{ "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(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\n }", "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.728708", "0.7144915", "0.7132209", "0.66401577", "0.66205436", "0.65682197", "0.6526531", "0.65085673", "0.6449452", "0.63749766", "0.63726056", "0.6364582", "0.6364582", "0.6364582", "0.6341498", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726" ]
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 }" ]
[ "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.0
-1
Show the form for editing the specified resource.
public function edit($id) { $otrosCargo = OtrosCargo::find($id); $nacionalidades_vuelos = NacionalidadVuelo::lists('nombre','id'); $tipos_matriculas = TipoMatricula::lists('nombre','id'); $tipo_pagos = TipoPago::lists('name','id'); return view('configuracionPrecios.confOtrosCargos.partials.edit', compact('otrosCargo', 'tipos_matriculas', 'nacionalidades_vuelos','tipo_pagos')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update($id, Request $request) { $oc = OtrosCargo::find($id); $otrosCargo = $oc->update($request->all()); if($otrosCargo){ return ["success"=>1, "text" => "Registro modificado con éxito."]; }else{ return ["success"=>0, "text" => "Error modificando el registro."]; } }
{ "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) { if(\App\OtrosCargo::destroy($id)){ return ["success"=>1, "text" => "Registro eliminado con éxito."]; }else{ return ["success"=>0, "text" => "Error eliminando el registro."]; } }
{ "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
checks if the current stack includes the given type
private function within($type, $stop = []) { $wild = !empty($stop) && $stop[0] === '*'; for ($i = count($this->stack) -1; $i >= 0; --$i) { $c = $this->stack[$i]; if ($c === $type) return true; if ($wild || in_array($c, $stop)) break; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasType(){\n return $this->_has(9);\n }", "public function hasType(){\r\n return $this->_has(7);\r\n }", "public function hasType(){\n return $this->_has(5);\n }", "public function hasType(){\n return $this->_has(5);\n }", "public function hasType(){\n return $this->_has(4);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\n return $this->_has(3);\n }", "public function hasType(){\r\n return $this->_has(1);\r\n }", "public function hasType(){\n return $this->_has(2);\n }", "public function hasType() {\n return $this->_has(3);\n }", "public function hasType() {\n return $this->_has(2);\n }", "protected function is_types_active() {\n\t\treturn class_exists( 'Types_Main' );\n\t}", "public function has($type);", "public function hasType($type) {\n return in_array($type, (array)$this->getType());\n }", "public function hasType(){\n return !empty($this->type);\n }", "function is($type);", "public static function hasType($type)\n {\n \t$types = array_keys(self::getTypes());\n return false !== in_array($type, $types);\n }", "public function isType($type){\n \n // canary...\n if(!$this->hasType()){ return false; }//if\n \n return ($this->field_map['type'] === $type);\n \n }", "public function hasType(): bool\n {\n return $this->node->type !== null;\n }", "public function hasType()\n {\n return isset($this->type);\n }", "public function has($type = null) {}", "public function is_type( $type ) {\n\t\tif ( 'variable' == $type || ( is_array( $type ) && in_array( 'variable', $type ) ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn parent::is_type( $type );\n\t\t}\n\t}", "public function hasType($name);", "public function isOfType( int $type ): bool\n\t{\n\t\treturn $this->getType() === $type;\n\t}", "public function hasType($type){\r\n $types=$this->contractTypes;\r\n $arrTypes =explode(\",\", $types);\r\n foreach($arrTypes as $typeP){\r\n if($typeP==$type)\r\n return true;\r\n }\r\n return false;\r\n }", "public function hasStackFrame(){\n return $this->_has(1);\n }", "static function isType($type)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isType', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function hasComponent(string $type): bool;", "static function is_requested_post_type()\n {\n $retval = FALSE;\n $screen = get_current_screen();\n foreach (self::get_instance()->get_all() as $slug => $properties) {\n // Are we rendering a NGG post type?\n if (isset($properties['post_type']) && $screen->post_type == $properties['post_type']) {\n $retval = $slug;\n break;\n }\n }\n return $retval;\n }", "public function hasType(string $name): bool;", "public function isType($type)\r\n\t{\r\n\t\treturn ($this->type == $type);\r\n\t}", "public static function isScopeType($token) {\n\t\t\t// TODO uncomment session code\n\t\t\t// return is_string($token) && preg_match('/^(singleton|prototype|session)$/', $token);\n\t\t\treturn is_string($token) && preg_match('/^(singleton|prototype)$/', $token);\n\t\t}", "function is_post_type($type){\n\tglobal $wp_query;\n\tif($type == get_post_type($wp_query->post->ID)) return true;\n\treturn false;\n}", "public function is_type($type)\n\t{\n\t\treturn $this->get('object_type') == $type;\n\t}", "function in_tag_stack($tag_stack,$tags)\n{\n\tforeach ($tag_stack as $_temp)\n\t{\n\t\tif (in_array($_temp[0],$tags))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "public function isTypeOf($type)\n {\n return $this->getType() == $type;\n }", "public function isStack($index = null)\n {\n return (array_key_exists($index, $this->registry_stacks));\n }", "public function supports(string $type): bool;", "function is_type( $type ) {\n\t\tif (is_array($type) && in_array($this->product_type, $type)) return true;\n\t\telseif ($this->product_type==$type) return true;\n\t\treturn false;\n\t}", "function is_valid_type($type){\n\t\treturn in_array($type, $this->valid_types);\n\t}", "public function hasAny(string $type): bool\n {\n foreach ($this->getMessages() as $message) {\n if ($message->is($type)) {\n return true;\n }\n }\n\n return false;\n }", "private function _isValidType($type) {\n return in_array($type, array('select', 'checkboxes', 'checkbox', 'radios',\n 'radio', 'textfield', 'textarea', 'file', 'submit', 'reset',\n 'hidden', 'fieldset', 'markup', 'button', 'password'));\n }", "private function is_valid_post_type() {\n\t\t\n\t\t/**\n\t\t * Includes our array of post types\n\t\t */\n\t\tinclude_once( 'q-and-a-post-types.php' );\n\t\t\n\t\treturn ! empty( $_POST['post_type'] ) && ( in_array( get_current_screen()->post_type, $q_and_a_post_types ) );\n\t}", "public function hasItemtype(){\n return $this->_has(40);\n }", "public function isType(int $type): bool\n {\n return ($this->getType() & $type) !== 0;\n }", "function is($type)\n {\n return $this->factory->is($type);\n }", "public function hasVariableType() {\n return $this->_has(4);\n }", "public function hasVariableType() {\n return $this->_has(4);\n }", "public function isTypeSupported(string $type) : bool;", "public function isType(string $type)\n {\n return $this->getType() === $type;\n }", "public function hasShoptype(){\n return $this->_has(19);\n }", "public function matches($type);", "public function matches($type);", "public function is_type( $type ) {\n\t\treturn ( $this->discount_type == $type || ( is_array( $type ) && in_array( $this->discount_type, $type ) ) ) ? true : false;\n\t}", "public function supports($type);", "public function hasChild($type)\n {\n foreach ($this->children as $child) {\n if ($child->getType() === $type) {\n return true;\n }\n }\n return false;\n }", "private function currentType() {\n $top = count($this->stack) - 1;\n\n if ($top < 0) {\n return null;\n }\n\n $type = $this->stack[ $top ];\n\n return $type->getAST();\n }", "public function has_type( $type )\n {\n if ( ! $this->types && ! is_array( $this->types ) ) return false;\n for ( $i = count( $this->types ) - 1; $i >= 0; --$i ) {\n if ( $this->types[$i] == $type )\n return true;\n }\n return false;\n }", "private static function isType($arg, $type) {\n\t\tswitch ($type) {\n\t\t\tcase self::TYPE_INTEGER: return is_int($arg);\n\t\t\tcase self::TYPE_BOOLEAN: return is_bool($arg);\n\t\t\tcase self::TYPE_FLOAT: return is_float($arg);\n\t\t\tcase self::TYPE_STRING: return is_string($arg);\n\t\t\tdefault:\n\t\t\t\tif (is_object($arg) && get_class($arg) === $type) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t}\n\t\tthrow new \\Scrivo\\SystemException(\"No such argument type\");\n\t}", "function is_custom_post_type( $post = NULL ){\n $all_custom_post_types = get_post_types( array ( '_builtin' => FALSE ) );\n\n // there are no custom post types\n if ( empty ( $all_custom_post_types ) )\n return FALSE;\n\n $custom_types = array_keys( $all_custom_post_types );\n $current_post_type = get_post_type( $post );\n\n // could not detect current type\n if ( ! $current_post_type )\n return FALSE;\n\n return in_array( $current_post_type, $custom_types );\n }", "public function hasPayloadConfig($type);", "private function isValidType($type){\n $lowercased = strtolower($type);\n //check if something is in array\n return in_array($lowercased, $this->allowedTypes);\n }", "public function hasAppType()\n {\n return $this->app_type !== null;\n }", "private function _checkClass()\n {\n if ($this->_useWithoutTypeCheck === true) {\n return true;\n }\n\n $resource = $this->_owApp->selectedResource;\n $rModel = $resource->getMemoryModel();\n\n // search with each expression using the preg matchtype\n foreach ($this->_types as $type) {\n if (isset($type['classUri'])) {\n $classUri = $type['classUri'];\n } else {\n continue;\n }\n if (\n $rModel->hasSPvalue(\n (string) $resource,\n EF_RDF_TYPE,\n $classUri\n )\n ) {\n return true;\n }\n }\n\n // type does not match to one of the expressions\n return false;\n }", "function is_type_of(mixed $var, string ...$types): bool\n{\n $var_type = strtolower(get_debug_type($var));\n\n // Multiple at once.\n if ($types && str_contains($types[0], '|')) {\n $types = explode('|', $types[0]);\n\n // A little bit faster than foreach().\n if (in_array($var_type, $types, true)) {\n return true;\n }\n }\n\n foreach ($types as $type) {\n $type = strtolower($type);\n if (match ($type) {\n // Any/mixed.\n 'any', 'mixed' => 1,\n\n // Sugar stuff.\n 'list', 'number', 'image', 'stream', 'iterator', 'enum'\n => ('is_' . $type)($var),\n\n // Primitive & internal stuff.\n 'int', 'float', 'string', 'bool', 'array', 'object', 'null',\n 'numeric', 'scalar', 'resource', 'iterable', 'callable', 'countable',\n => ('is_' . $type)($var),\n\n // All others.\n default => ($var_type === $type) || ($var instanceof $type)\n }) {\n return true;\n }\n }\n return false;\n}", "public function typeIsValid()\n {\n if (!$this->scan_attributes) {\n return false;\n }\n\n return !is_null($this->scan_attributes->template_type);\n }", "private function isAllowedType(string $type): bool\n {\n return in_array($type, Reduction::ALLOWED_TYPES, true);\n }", "public function is_type( $type ) {\n\t\treturn ( 'job_package_subscription' == $type || ( is_array( $type ) && in_array( 'job_package_subscription', $type ) ) ) ? true : parent::is_type( $type );\n\t}", "public function hasType($type = false)\n {\n // If no type is set just count the saved methods\n if(!$type) {\n if(!$this->getCustomerSavedPaymentMethods()) {\n return false;\n }\n return count($this->getCustomerSavedPaymentMethods());\n }\n\n // Check there are some saved accounts\n if($savedAccounts = $this->getCustomerSavedPaymentMethods()) {\n\n // Iterate through the saved accounts\n foreach ($savedAccounts as $savedAccount) {\n\n // Check which type we're after\n if ($type == Gene_Braintree_Model_Saved::SAVED_CREDITCARD_ID) {\n if ($savedAccount instanceof Braintree\\CreditCard) {\n return true;\n }\n } elseif ($type == Gene_Braintree_Model_Saved::SAVED_PAYPAL_ID) {\n if ($savedAccount instanceof Braintree\\PayPalAccount) {\n return true;\n }\n }\n\n }\n }\n\n return false;\n }", "public function type_exists($type)\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\treturn file_exists($module_path.'/'.$type);\n\t}", "function check_type_code($type_code){\n\t\t\tif($this->db->get_where('type',array('code' => $type_code))->num_rows() > 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function hasItemType(): bool\n {\n return $this->itemTypeAttr !== NULL;\n }", "public function isType(int ...$types): bool\n {\n foreach ($types as $type) {\n if ($this->type === $type) {\n return true;\n }\n }\n\n return false;\n }", "protected function checkType(&$inMessage = '') {\n\t\t$isValid = true;\n\t\tif ( !is_string($this->_Type) && $this->_Type !== '' ) {\n\t\t\t$inMessage .= \"{$this->_Type} is not a valid value for Type\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\tif ( $isValid && $this->_Type != '' && !in_array($this->_Type, array(self::TYPE_SOURCE, self::TYPE_THUMBNAIL, self::TYPE_FILE, self::TYPE_CCA)) ) {\n\t\t\t$inMessage .= \"Type must be one of TYPE_SOURCE, TYPE_THUMBNAIL, TYPE_FILE\";\n\t\t\t$isValid = false;\n\t\t}\t\t\n\t\treturn $isValid;\n\t}", "protected function hasType(string $type): bool\n {\n return stripos($this->getType(), $type) !== false;\n }", "public static function isElementRegistered($type)\r\n {\r\n return isset(self::$elementTypes[strtolower($type)]);\r\n }", "protected function _supports($type)\n {\n return in_array($type, $this->supports);\n }", "function isType($input) {\n\treturn ((strcmp($input, 'dynamic') == 0) || (strcmp($input, 'static') == 0));\n}", "public function hasTypeIdentifier()\n {\n return count($this->get(self::TYPE_IDENTIFIER)) !== 0;\n }", "public function has($type) : bool\n {\n return $this->bindings->has($type);\n }", "public function isinstanceof($class,$instance=null);", "public function check($type)\n {\n switch ($type)\n {\n case Signature::TYPE_SUBSCRIBO_BASIC:\n if (empty($this->basicToken)) {\n return false;\n }\n return true;\n case Signature::TYPE_SUBSCRIBO_DIGEST:\n if (empty($this->digestToken)) {\n return false;\n }\n if (empty($this->digestSecret)) {\n return false;\n }\n return true;\n default:\n return false;\n }\n }", "function is_post_type_hierarchical($post_type)\n {\n }", "private function checkStacks() {\n\t\t\t$o = end($this->openStack);\n\t\t\t$c = end($this->closeStack);\n\n\t\t\t// if last item at open stack is equal with last item at close stack\n\t\t\t// then remove those items from stacks\n\t\t\tif(isset($this->openHooks[$o]) && $this->openHooks[$o] == $c) {\n\t\t\t\tarray_pop($this->openStack);\n\t\t\t\tarray_pop($this->closeStack);\n\t\t\t}\n\t\t}", "public function typedSessionExists($type)\n {\n return $this->has($type);\n }", "public function isTypeIncludedOnSearch()\n {\n return $this->typeIncludedOnSearch;\n }", "protected function is_type( $mf_array, $type ) {\n\t\treturn is_array( $mf_array ) && ! empty( $mf_array['type'] ) && is_array( $mf_array['type'] ) && in_array( $type, $mf_array['type'], true );\n\t}", "public function hasTaskType(){\n return $this->_has(6);\n }", "protected function check_type()\n {\n $regex = \"/^int$|^bool$|^string$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <type> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "public static function is_type( $mf, $type ) {\n\t\treturn is_array( $mf ) && ! empty( $mf['type'] ) && is_array( $mf['type'] ) && in_array( $type, $mf['type'], true );\n\t}", "public function hasCodeType(){\n return $this->_has(3);\n }", "private function isPushNeeded()\n {\n $this->logging->addDebug(__METHOD__ . '|1|');\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('add_service_action_from_magento', ['refund'])\n ) {\n $statusCodeSuccess = $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_SUCCESS');\n if ($this->hasPostData('brq_statuscode', $statusCodeSuccess)\n && !empty($this->postData['brq_relatedtransaction_refund'])) {\n if ($this->receivePushCheckDuplicates(\n $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_PENDING_APPROVAL'),\n $this->postData['brq_relatedtransaction_refund']\n )) {\n $this->logging->addDebug(__METHOD__ . '|4|');\n return true;\n }\n }\n $this->logging->addDebug(__METHOD__ . '|5|');\n return false;\n\n }\n\n $types = ['capture', 'cancelauthorize', 'cancelreservation'];\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('add_service_action_from_magento', $types)\n && empty($this->postData['brq_relatedtransaction_refund'])\n ) {\n return false;\n }\n\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('brq_transaction_method', ['klarnakp', 'KlarnaKp'])\n && $this->hasPostData('add_service_action_from_magento', 'pay')\n && isset($this->postData['brq_service_klarnakp_captureid'])\n ) {\n return false;\n }\n\n return true;\n }", "public function hasSsCardType()\n {\n $availableTypes = explode(',', $this->getMethod()->getConfigData('cctypes'));\n $ssPresenations = array_intersect(array('SS', 'SM', 'SO'), $availableTypes);\n if ($availableTypes && count($ssPresenations) > 0) {\n return true;\n }\n return false;\n }", "protected function _is_valid_type($type) {\n\t\t$types_array = explode(',', self::types_array);\n\t\tif (in_array($type, $types_array)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private function isManifestType($path) {\n $extensions = array(\n 'yml' => 1,\n 'php' => 1,\n 'php4' => 1,\n 'php5' => 1,\n 'module' => 1,\n 'inc' => 1,\n 'install' => 1,\n 'test' => 1,\n 'theme' => 1,\n 'engine' => 1,\n 'profile' => 1,\n 'css' => 1,\n 'js' => 1,\n 'info' => 1,\n 'sh' => 1,\n // SSL certificates.\n 'pem' => 1,\n 'pl' => 1,\n 'pm' => 1,\n );\n $pathinfo = pathinfo($path);\n return isset($pathinfo['extension']) && isset($extensions[$pathinfo['extension']]);\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}", "public function isEmpty() {\r\n\t\treturn count($this->stack) == 0;\r\n\t}", "public function hasProvider($type);", "public function hasTissueTypes() {\n return $this->_has(12);\n }" ]
[ "0.66251063", "0.65623266", "0.6503499", "0.6503499", "0.64942384", "0.642284", "0.642284", "0.642284", "0.64030236", "0.6358008", "0.6354337", "0.6323765", "0.6166012", "0.60577357", "0.60429424", "0.60297215", "0.60248476", "0.60134256", "0.6005678", "0.5984078", "0.5933386", "0.5907926", "0.58602726", "0.58437115", "0.58052623", "0.5778063", "0.57274896", "0.5715135", "0.5704155", "0.564589", "0.56226194", "0.5619378", "0.5618575", "0.561745", "0.55955106", "0.55875194", "0.5570631", "0.5547701", "0.55372643", "0.5481411", "0.54542863", "0.544734", "0.54328215", "0.5422708", "0.53898364", "0.5378802", "0.53748107", "0.5374314", "0.5374314", "0.537164", "0.53515863", "0.5344509", "0.53400004", "0.53400004", "0.5333506", "0.53252554", "0.5322949", "0.5318883", "0.5312259", "0.52991086", "0.5294401", "0.52931684", "0.52921647", "0.5283285", "0.52795786", "0.52347416", "0.522484", "0.5223805", "0.522047", "0.52153593", "0.52150047", "0.5209291", "0.5206427", "0.5194673", "0.5190003", "0.51883656", "0.51739264", "0.5173586", "0.51727986", "0.515947", "0.5156844", "0.51528645", "0.5144819", "0.51406413", "0.51277375", "0.51253724", "0.50771284", "0.5075634", "0.50728905", "0.5069131", "0.50665736", "0.50517285", "0.5046158", "0.5044592", "0.5031374", "0.5025493", "0.5023912", "0.5020216", "0.5018658", "0.5005295" ]
0.6244216
12
checks if the given mods can be used without collision
private function check_nested_mods($mods) { foreach ($this->nmods as $nmo) { foreach ($mods as $mod) { if (isset ($nmo[$mod->type])) { Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value); Logger::info_at($nmo[$mod->type], 'previous modifier was here'); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cs_coins_mod($mod)\n{\n\t$options = cs_sql_option(__FILE__, 'coins');\n\t$mods = array_map('trim', explode(',', strtolower($options['coin_mods'])));\n\tif (in_array(strtolower($mod), $mods))\n\t\treturn true;\n\treturn false;\n}", "protected function checkUsage(){\n $modId = $this->getModId();\n $oDeclarator = AMI_ModDeclarator::getInstance();\n $parentModId = $oDeclarator->getParent($modId);\n return\n AMI::issetAndTrueOption($parentModId, 'use_categories');\n }", "function isMod ($name) {\n\tglobal $MODS; return in_array (strtolower ($name), array_map ('strtolower', $MODS['GLOBAL'] + $MODS['LOCAL']));\n}", "private function has_private_mod($mods)\n {\n // private by default\n if (!$mods) return true;\n \n $other = false;\n \n foreach ($mods as $mod) {\n if ($mod->type === T_PRIVATE) \n return true;\n \n if ($mod->type === T_PUBLIC ||\n $mod->type === T_PROTECTED) {\n $other = true;\n break;\n }\n }\n \n return !$other;\n }", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "private function checkIfBcmodIsAvailable(): bool\n {\n return function_exists('bcmod');\n }", "private function has_static_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_STATIC) \n return true;\n \n return false;\n }", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public function checkModules() : bool\n {\n if (method_exists($this, 'modules') && ! empty($this->modules())) {\n return true;\n }\n\n return false;\n }", "private function has_const_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_CONST) \n return true;\n \n return false;\n }", "public function allow_inventory_access(){\n if (!empty($this->flags['player_battle'])){ return false; }\n elseif (!empty($this->flags['challenge_battle'])){ return false; }\n return true;\n }", "private function has_extern_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_EXTERN ||\n $mod->type === T_NATIVE) \n return true;\n \n return false;\n }", "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 }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "private function has_final_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_FINAL) \n return true;\n \n return false;\n }", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "function decide_about_modVisibilityANDAvailability( $mod_restrictions, $visibility_allowhiddenmodules, $availability_ignoreavailabilityrestrictions ){\n\n // Indeed: all those restrictions types must be reviewed and decided abou: if it could be considerd as 'public exposition' disabler or NOT.\n $decidedTobePublic=1;\n //Module visibility: is already considering 'section' visibility:\n $mod_visibility = $mod_restrictions->mod_visibility;\n $mod_accrestrictions = $mod_restrictions->mod_accrestrictions;\n $mod_section_accrestrictions = $mod_restrictions->mod_section_accrestrictions;\n if( $visibility_allowhiddenmodules==0 and ($mod_visibility==0 or $mod_visibility=='0') ){\n $decidedTobePublic=0;\n\n }\n $i=0;\n while ( $availability_ignoreavailabilityrestrictions==0 and $decidedTobePublic == 1 and $i<count($mod_section_accrestrictions) ) {\n\n //Any of 'Availability restrictions' will be considered as 'decidedtobepublic=0'\n if($mod_section_accrestrictions[$i]->type=='profile'){\n $decidedTobePublic=0;\n }\n if($mod_section_accrestrictions[$i]->type=='date'){\n\n $decidedTobePublic=0;\n }\n $i++;\n }\n $i=0;\n while ($availability_ignoreavailabilityrestrictions==0 and $decidedTobePublic == 1 and $i<count($mod_accrestrictions)) {\n\n //Any of 'Availability restrictions' will be considered as 'decidedtobepublic=0'\n if($mod_accrestrictions[$i]->type=='profile'){\n $decidedTobePublic=0;\n }\n if($mod_accrestrictions[$i]->type=='date'){\n\n $decidedTobePublic=0;\n\n }\n $i++;\n }\n\n return $decidedTobePublic;\n }", "function check_perm_old($act = NULL, $mid, $need = 0, $module = NULL, $type = \"admin\")\n{\n\tglobal $mdb2;\n\n\tif (isset($_REQUEST['p']) || !empty($module)) {\n\t\t$p = (!empty($module) ? $module : $mdb2->escape($_REQUEST['p']));\n\t\t$query = \"\n\t\t\tSELECT m.module_id AS mmodid, '0' AS mcontid\n\t\t\tFROM iShark_Modules m\n\t\t\tWHERE m.file_name = '$p' AND is_active = '1' AND type = '\".$type.\"'\n\t\t\";\n\t} elseif (isset($_REQUEST['mid']) || !empty($mid)) {\n\t\t$mid = (!empty($mid) ? $mid : (int) $_REQUEST['mid']);\n\t\t$query = \"\n\t\t\tSELECT m.module_id AS mmodid, m.content_id AS mcontid\n\t\t\tFROM iShark_Menus m\n\t\t\tWHERE menu_id = '$mid'\n\t\t\";\n\t} else {\n\t return FALSE;\n\t}\n\t$result =& $mdb2->query($query);\n\tif (!$row = $result->fetchRow()) {\n\t\treturn FALSE;\n\t}\n\t$module_id = $row['mmodid'];\n\t$content_id = $row['mcontid'];\n\n\t//lekerdezzuk, hogy milyen funkciok erhetoek el az adott modulhoz\n\t$func_array = array();\n\t$query = \"\n\t\tSELECT f.function_id AS fid, f.function_name AS fname\n\t\tFROM iShark_Functions f\n\t\tWHERE f.module_id = '$module_id'\n\t\";\n\n\t$result = $mdb2->query($query);\n\tif ($result->numRows() > 0) {\n\t\twhile ($row = $result->fetchRow())\n\t\t{\n\t\t\t$func_array[$row['fname']] = $row['fid'];\n\t\t}\n\n\t\tif ($act != NULL) {\n\t\t\t$func = $func_array[$act];\n\t\t}\n\t} else {\n\t\treturn true;\n\t}\n\n\t//lekerdezzuk a csoportokat, akik hozzaferhetnek az adott menuponthoz az adott jogosultsaggal\n\tif (!empty($func)) {\n\t\t$group_array = array();\n\t\t$query = \"\n\t\t\tSELECT gr.group_id AS gid\n\t\t\tFROM iShark_Rights r, iShark_Rights_Functions rf, iShark_Groups_Rights gr\n\t\t\tWHERE r.right_id = rf.right_id AND rf.function_id = '$func' AND gr.right_id = r.right_id AND\n\t\t\";\n\t\tif ($module_id != 0) {\n\t\t\t$query .= \"\n\t\t\t\tr.module_id = '$module_id'\n\t\t\t\";\n\t\t}\n\t\tif ($content_id != 0) {\n\t\t\t$query .= \"\n\t\t\t\tr.content_id = '$content_id'\n\t\t\t\";\n\t\t}\n\t\t$result = $mdb2->query($query);\n\t\t//ha nincs talalat, akkor nincs beallitva hozza semmilyen jog, ezert true-val terunk vissza\n\t\tif ($result->numRows() > 0) {\n\t\t\twhile ($row = $result->fetchRow())\n\t\t\t{\n\t\t\t\t$group_array[] = $row['gid'];\n\t\t\t}\n\t\t} else {\n\t\t\tif ($need == 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\telse if (empty($func) && $need != 0) {\n\t\treturn false;\n\t}\n\telse {\n\t\treturn true;\n\t}\n\n\t//ha letezik a session, csak akkor vizsgaljuk\n\tif (isset($_SESSION['user_groups'])) {\n\t\t//letrehozzuk a user session-bol a tombot, hogy milyen csoportok tagja\n\t\t$usergroup_array = explode(\" \", $_SESSION['user_groups']);\n\n\t\t//megnezzuk, hogy a ket tombben vannak-e megegyezo azonositok\n\t\tif (count(array_intersect($usergroup_array, $group_array)) > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif ($need == 0) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ($need == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}", "function initModules($_mods = Array())\n\t{\n\t\t//инициализировать модули ИМЕННО в таком порядке\n\t\t$_caches = Array();\n\t\t\n\t\tif (in_array('memcache', $_mods)) $_caches[] = 'memcache';\n\t\tif (in_array('file', $_mods)) $_caches[] = 'file';\n\t\tif (in_array('apc', $_mods)) $_caches[] = 'apc';\n\t\t\n\t\t$this->_prepareCache($_caches);\n\t\t\n\t\tif (in_array('db', $_mods)) $this->_prepareDb();\n\t\tif (in_array('session', $_mods)) $this->_prepareSession();\n\t\tif (in_array('redis', $_mods)) $this->_prepareRedis();\t\t\n\n\t\treturn true;\n\t}", "protected function isValidModuleRequest() {}", "function isModule($name, $type = \"admin\")\n{\n\tglobal $mdb2;\n\tstatic $mods = array();\n\n\tif (!isset($mods[$type])) {\n\t\t$query = \"\n\t\t\tSELECT file_name\n\t\t\tFROM iShark_Modules\n\t\t\tWHERE type = '\".$type.\"' AND is_active='1'\n\t\t\";\n\t\t$result = $mdb2->query($query);\n\t\t$mods[$type] = $result->fetchCol();\n\t}\n\n\treturn in_array($name, $mods[$type]);\n}", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "function check_module_visibilityANDavailability_standalone($moduleid){\n\n $DB=$GLOBALS['GLBMDL_DB'];\n\n //Controlled in Moodle Gui: under 'availability (under \"Common module settings\")'\n $module_infos=new stdClass();\n $module_restrictions= new stdClass();\n try {\n\n $module_infos= $DB->get_record('course_modules', array('id' =>$moduleid));\n $resource_course_infos=new stdClass();\n $resource_course_infos=get_course_infos($module_infos->course, $DB);\n\n $module_infos=$resource_course_infos->course_modules[$moduleid];\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, 0, 0 ));\n\n }", "protected function checkModules()\n\t{\n\t\tif (Loader::includeModule('imconnector'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tShowError(Loc::getMessage('IMCONNECTOR_COMPONENT_FACEBOOK_MODULE_NOT_INSTALLED_MSGVER_1'));\n\n\t\t\treturn false;\n\t\t}\n\t}", "protected function checkRequiredModules()\n\t{\n\t\t$result = true;\n\n\t\tif(!Loader::includeModule('crm'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_CRM_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\tif(!Loader::includeModule('sale'))\n\t\t{\n\t\t\t$this->errors['FATAL'][] = Loc::getMessage(\"CRM_CLE2_SALE_MODULE_NOT_INSTALL\");\n\t\t\t$result = false;\n\t\t}\n\n\t\treturn $result;\n\t}", "function _checkForModule($strModuleName) {\r\n global $objDatabase;\r\n if (($objRS = $objDatabase->SelectLimit(\"SELECT `status` FROM \".DBPREFIX.\"modules WHERE name = '\".$strModuleName.\"' AND `is_active` = '1' AND `is_licensed` = '1'\", 1)) != false) {\r\n if ($objRS->RecordCount() > 0) {\r\n if ($objRS->fields['status'] == 'n') {\r\n return false;\r\n }\r\n return true;\r\n }\r\n }\r\n return true;\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}", "public function isCMlayers() {}", "function angular_check_module($mod){\n\t$return = [\n\t\t'modules' => [],\n\t\t'found' => 0,\n\t\t'not_found' => 0\n\t];\n\tif (is_array($mod)) {\n\t\tforeach ($mod as $value) {\n $file = '/public/js/vendors/angular/angular-'.$value.'.js';\n $cond = file_exists(base_path($file));\n\t\t\tif(!$cond){\n\t\t\t\t$return['modules'][] .= $value;\n\t\t\t\t$return['not_found'] += 1;\n\t\t\t}\n\t\t}\n\t\tif($return['not_found'] == 0){\n\t\t\t$return = true;\n\t\t} else {\n\t\t\t$return = $return['modules'];\n\t\t}\n\t} else {\n $file = '/public/js/vendors/angular/angular-'.$mod.'.js';\n $cond = file_exists(base_path($file));\n\t\tif($cond){\n $return = true;\n } else {\n $return = false;\n\t\t}\n\t}\n\treturn $return;\n}", "function is_module($mod_name) {\n return (isset($this->Modules[$mod_name]));\n }", "function check_permission($moduleName = '', $scope = 'both') {\n\tif (!defined('NO_ACCESS')) {\n\t\tdie('No access to files!');\n\t}\n \n if ($scope == 'both' || $scope == 'module') {\n if (Cms::$modules[$moduleName] != 1) {\n die('This module is disabled!');\n }\n }\n \n if ($scope == 'both' || $scope == 'user') {\n if ($_SESSION[USER_CODE]['privilege'][$moduleName] != 1) {\n die('No permission at this level!');\n }\n }\n}", "function can_mod(): bool\n{\n\treturn session_status() === PHP_SESSION_ACTIVE &&\n\t\tarray_key_exists('can_mod', $_SESSION) &&\n\t\t$_SESSION['can_mod'] === true;\n}", "function can_download_plugin() {\n\t\tif( SS_Envato_API()->user->is_staff() ) return true;\n\n\t\t$current_user = wp_get_current_user(); \n\n\t\t$tf_codes = get_user_tf_codes( $current_user->ID );\n\t\t$site_codes = get_on_site_licenses( $current_user->ID );\n\n\t \t$plugins_codes = explode(',', etheme_get_custom_field('tf_themes'));\n\t \t$for_themes = explode(',', etheme_get_custom_field('et_themes'));\n\n\t \t$intersection = array_intersect($tf_codes, $plugins_codes);\n\t \t$intersection2 = array_intersect($site_codes, $for_themes);\n\n\t \tif(count($intersection) > 0 || count($intersection2) > 0 || et_is_staff()) {\n\t \t\treturn true;\n\t \t}\n\n\t \treturn false;\n\n\t}", "protected function _isAllowed()\r\n\t{\r\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('system/tools/modulesmanager');\r\n\t}", "public function check_role_access($cur_module,$modules, $page){\n\t\tforeach($modules as $per){\t\t\t\n\t\t\t$format_per[] = $per;\n\t\t}\n\t\t// not to check for view profile\n\t\tif($page != 'view_profile'){\n\t\t\tif (!in_array($cur_module, $format_per)){\n\t\t\t\theader('Location:../home/?access=invalid');\t\n\t\t\t}\n\t\t}\n\t\tforeach($modules as $key => $module){\n\t\t\t// check the user module exists in the database module list\n\t\t\tif (in_array($module, $format_per)) { \t\n\t\t\t\tswitch($module){\n\t\t\t\t\tcase 1:\t\t\n\t\t\t\t\t$mod['add_client'] = 1;\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\tcase 39:\t\t\t\t\t\n\t\t\t\t\t$mod['approve_client'] = 1;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 2:\t\t\t\t\t\n\t\t\t\t\t$mod['client'] = 1;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\tcase 4:\t\t\t\t\t\n\t\t\t\t\t$mod['add_position'] = 1;\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\tcase 38:\t\t\t\t\t\n\t\t\t\t\t$mod['approve_position'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\t\t\t\t\t\n\t\t\t\t\t$mod['position'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 7:\t\t\t\t\t\n\t\t\t\t\t$mod['create_resume'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 8:\t\t\t\t\t\n\t\t\t\t\t$mod['view_resume'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 10:\t\t\t\t\t\n\t\t\t\t\t$mod['view_interview'] = 1;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\tcase 13:\t\t\t\t\t\n\t\t\t\t\t$mod['create_incentive'] = 1;\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\tcase 14:\t\t\t\t\t\n\t\t\t\t\t$mod['view_incentive'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 15:\t\t\t\t\t\n\t\t\t\t\t$mod['approve_incentive'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 29:\t\t\t\t\t\n\t\t\t\t\t$mod['sent_item'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 35:\n\t\t\t\t\t$mod['view_billing'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 36:\t\t\t\t\t\n\t\t\t\t\t$mod['add_billing'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 37:\t\t\t\t\t\n\t\t\t\t\t$mod['approve_billing'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 30:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_grade'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 31:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_users'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 32:\t\t\t\n\t\t\t\t\t$mod['manage_role'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 33:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_mailer_template'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 34:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_incentive'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 40:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_designation'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 41:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_contact_branch'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 43:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_functional_area'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 51:\t\t\t\t\t\n\t\t\t\t\t$mod['api_keys'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 52:\t\t\t\t\t\n\t\t\t\t\t$mod['manage_qualification'] = 1;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\tcase 45:\t\t\t\t\t\n\t\t\t\t\t$mod['create_my_leaves'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 46:\t\t\t\t\t\n\t\t\t\t\t$mod['approve_my_leaves'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 47:\t\t\t\t\t\n\t\t\t\t\t$mod['view_my_leaves'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 48:\t\t\t\t\t\n\t\t\t\t\t$mod['view_todays_plan'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 49:\t\t\t\t\t\n\t\t\t\t\t$mod['create_todays_plan'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 50:\t\t\t\t\t\n\t\t\t\t\t$mod['view_event'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcase 18:\t\t\t\t\t\n\t\t\t\t\t$mod['ctc_wise_monthly_openings_handled'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 19:\t\t\t\t\t\n\t\t\t\t\t$mod['ctc_wise_client_openings_handled'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 17:\t\t\t\t\t\n\t\t\t\t\t$mod['month_wise_client_openings_handled'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 20:\t\t\t\t\t\n\t\t\t\t\t$mod['ctc_wise_cv_status'] = 1;\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\tcase 22:\t\t\t\t\t\n\t\t\t\t\t$mod['client_wise_cv_status'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 64:\t\t\t\t\t\n\t\t\t\t\t$mod['month_wise_cv_status'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 23:\t\t\t\t\t\n\t\t\t\t\t$mod['ctc_wise_average_takt_time'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 24:\t\t\t\t\t\n\t\t\t\t\t$mod['employee_productivity'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 25:\t\t\t\t\t\n\t\t\t\t\t$mod['employee_business_conversion'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 26:\t\t\t\t\t\n\t\t\t\t\t$mod['client_business_conversion'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 27:\t\t\t\t\t\n\t\t\t\t\t$mod['client_wise_billing'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 28:\t\t\t\t\t\n\t\t\t\t\t$mod['recruiter_wise_billing'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 53:\t\t\t\t\t\n\t\t\t\t\t$mod['individual_contribution'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 54:\t\t\t\t\t\n\t\t\t\t\t$mod['recruiter_incentive_earning'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 55:\t\t\t\t\t\n\t\t\t\t\t$mod['crm_incentive_earning'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 56:\t\t\t\t\t\n\t\t\t\t\t$mod['location_wise_active_clients'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 57:\t\t\t\t\t\n\t\t\t\t\t$mod['business_continuity'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 58:\t\t\t\t\t\n\t\t\t\t\t$mod['client_retention'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 59:\t\t\t\t\t\n\t\t\t\t\t$mod['cv_rejection_analysis'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 60:\t\t\t\t\t\n\t\t\t\t\t$mod['position_rejection_analysis'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 61:\t\t\t\t\t\n\t\t\t\t\t$mod['collection_days'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 62:\t\t\t\t\t\n\t\t\t\t\t$mod['recuiter_wise'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 63:\t\t\t\t\t\n\t\t\t\t\t$mod['client_wise'] = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $mod;\n\t}", "protected function checkNeededModules()\n\t{\n\t\t$modulesGot\t= array_keys( $this->env->getModules()->getAll() );\t\t\t\t\t\t\t\t// get installed modules\n\t\t$missing\t= array_diff( self::$modulesNeeded, $modulesGot );\t\t\t\t\t\t\t\t// find missing modules\n\t\tif( $missing ){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// there are missing modules\n\t\t\t$this->reportMissingModules( $missing );\t\t\t\t\t\t\t\t\t\t\t\t// report missing modules to screen\n\t\t\texit;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// quit execution\n\t\t}\n\t}", "public function mod_is_available($modname) {\n global $remotedb;\n $installedplugins = core_plugin_manager::instance()->get_plugins_of_type('mod');\n // Is the module installed?\n if (array_key_exists($modname, $installedplugins)) {\n // Is the module visible?\n if ($remotedb->get_field('modules', 'visible', array('name' => $modname\n ))) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function doesCheckModifyAccessListHookModifyAccessAllowed() {}", "function qruqsp_core_checkModuleFlags($q, $module, $flags) {\n if( isset($q['station']['modules'][$module]['flags']) && ($q['station']['modules'][$module]['flags']&$flags) > 0 ) {\n return true;\n }\n return false;\n}", "function is_concerned_resource( $module_infos, $mdl_considered_resources ){\n\n if( in_array($module_infos->modname, $mdl_considered_resources) ){\n\n return 1;\n }\n\n return 0;\n }", "public function isModerator()\n {\n }", "public static function scriptCanBeDecoded($packagename=\"Professional\"){\n\t\t\n//\t\tif(!empty(self::$ioncubeWorks)){\n//\t\t\treturn true;\n//\t\t}\n\t\t\n\t\t\n\n\t\t$majorVersion = GO::config()->getMajorVersion();\n\t\n\t\tswitch($packagename){\n\t\t\tcase 'Billing':\n\t\t\t\t$className = 'LicenseBilling';\n\t\t\t\t$licenseFile = 'billing-'.$majorVersion.'-license.txt';\n\t\t\t\tbreak;\n\n\t\t\tcase 'Documents':\n\t\t\t\t$className = 'LicenseDocuments';\n\t\t\t\t$licenseFile = 'documents-'.$majorVersion.'-license.txt';\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\n\t\t\t\t$className = 'License';\n\t\t\t\t$licenseFile = 'groupoffice-pro-'.$majorVersion.'-license.txt';\n\t\t\t\t\n\t\t\t\t\n\t\t\tbreak;\n\t\t\n//\t\t\tdefault:\n//\t\t\t\tthrow new Exception(\"Unknown package \".$packagename);\n\t\t}\n\t\t\n\t\tif(isset(self::$ioncubeChecks[$className])) {\n\t\t\treturn self::$ioncubeChecks[$className];\n\t\t}\n\n\t\t$path = GO::config()->root_path.'modules/professional/'.$className.'.php';\n\t\t\n\t\t\n\t\tif(!file_exists($path)){\n\t\t\tself::$ioncubeChecks[$className] = false;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//echo $path;\n\n\t\t//check data for presence of ionCube in code.\n\t\t$data= file_get_contents($path, false, null, 0, 100);\t\t\n\t\tif(strpos($data, 'ionCube')===false){\t\t\n\t\t\tself::$ioncubeChecks[$className] = true;\n\t\t\treturn true;\n\t\t}\n\n\t\tif(!extension_loaded('ionCube Loader')){\n\t\t\tself::$ioncubeChecks[$className] = false;\n\t\t\treturn false;\n\t\t}\n\n\n//\t\t$lf = self::getLicenseFile();\n\t\t\n\t\t$file = new \\GO\\Base\\Fs\\File(GO::config()->root_path.$licenseFile);\n\t\t\n\t\t//Empty license file is provided in download so we must check the size.\n\t\tif(!$file->exists()){\n\t\t\tself::$ioncubeChecks[$className] = false;\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$fullClassName = \"\\\\GO\\\\Professional\\\\\".$className;\n\n\t\t$check = self::$ioncubeChecks[$className] = $fullClassName::check();\n\t\t\n//\t\tvar_dump($check);\n\t\t\n\t\treturn $check;\n\t\t\n//\t\tself::$ioncubeWorks = true;\n\t\t\n//\t\treturn self::$ioncubeWorks;\n\t\t\n\t}", "function auth_can_access_module($db, $str_module_code)\r\r\n{\r\r\n // Check if user can access module - by code\r\r\n $result_module_access = func_db_query($db, \"SELECT m.module_code FROM @TABLE_PREFIX@nx3_module m\r\r\n WHERE m.module_code = ? AND m.module_id IN @MODULE_SECURITY@ LIMIT 1\", array(\"s\", $str_module_code));\r\r\n return (isset($result_module_access[0]) && $result_module_access[0]['module_code'] != '');\r\r\n}", "private function scan_allowed() {\n\t\treturn $this->as3cf->is_plugin_enabled();\n\t}", "public function isModDebug() {\n if(isset($this->_instances['debug']) && !is_null($this->_instances['debug']))\n return true;\n return false;\n }", "public static function available($modname = null, $force = false)\n {\n // define input, all numbers and booleans to strings\n $modname = (isset($modname) ? strtolower((string)$modname) : '');\n\n // validate\n if (!System::varValidate($modname, 'mod')) {\n return false;\n }\n\n if (!isset(self::$cache['modstate'])) {\n self::$cache['modstate'] = array();\n }\n\n if (!isset(self::$cache['modstate'][$modname]) || $force == true) {\n $modinfo = self::getInfo(self::getIDFromName($modname));\n if (isset($modinfo['state'])) {\n self::$cache['modstate'][$modname] = $modinfo['state'];\n }\n }\n\n if ($force == true) {\n self::$cache['modstate'][$modname] = self::STATE_ACTIVE;\n }\n\n if ((isset(self::$cache['modstate'][$modname]) &&\n self::$cache['modstate'][$modname] == self::STATE_ACTIVE) || (preg_match('/^(extensions|admin|theme|block|groups|permissions|users)$/i', $modname) &&\n (isset(self::$cache['modstate'][$modname]) && (self::$cache['modstate'][$modname] == self::STATE_UPGRADED || self::$cache['modstate'][$modname] == self::STATE_INACTIVE)))) {\n self::$cache['modstate'][$modname] = self::STATE_ACTIVE;\n return true;\n }\n\n return false;\n }", "function check_privs($privs, $name)\n{\n\t$matches = false;\n\n\tforeach($privs['allow'] as $p)\n\t\tif(preg_match('/'.$p.'/', $name))\n\t\t{\n\t\t\t$matches = true;\n\t\t\tbreak;\n\t\t}\n\n\tif($matches)\n\t\treturn true;\n\n\tforeach($privs['deny'] as $p)\n\t\tif(preg_match('/'.$p.'/', $name))\n\t\t\treturn false;\n\n\treturn true;\n}", "protected function should_apply_compat() {\n\t\t$conditions = [\n\t\t\t/**\n\t\t\t * 5.0:\n\t\t\t *\n\t\t\t * Classic editor either disabled or enabled (either via an option or with GET argument).\n\t\t\t * It's a hairy conditional :(\n\t\t\t */\n\t\t\t// phpcs:ignore WordPress.VIP.SuperGlobalInputUsage.AccessDetected, WordPress.Security.NonceVerification.NoNonceVerification\n\t\t\tself::is_at_least_50() && ! self::is_plugin_active( 'classic-editor' ),\n\t\t\tself::is_at_least_50() && self::is_plugin_active( 'classic-editor' ) && ( get_option( 'classic-editor-replace' ) === 'block' && ! isset( $_GET[ 'classic-editor__forget' ] ) ),\n\t\t\tself::is_at_least_50() && self::is_plugin_active( 'classic-editor' ) && ( get_option( 'classic-editor-replace' ) === 'classic' && isset( $_GET[ 'classic-editor__forget' ] ) ),\n\t\t\t/**\n\t\t\t * < 5.0 but Gutenberg plugin is active.\n\t\t\t */\n\t\t\t! self::is_at_least_50() && self::is_plugin_active( 'gutenberg' ),\n\t\t];\n\n\t\treturn count( array_filter( $conditions, function( $c ) { return (bool) $c; } ) ) > 0;\n\t}", "public function hasAllRequiredData(array $modifier): bool;", "function modules_in_use($course) {\n global $DB;\n\n $dbmanager = $DB->get_manager(); // Used to check if tables exist.\n $modules = monitorable_modules();\n $modulesinuse = array();\n\n foreach ($modules as $module => $details) {\n if (\n $dbmanager->table_exists($module) &&\n $DB->record_exists($module, array('course' => $course))\n ) {\n $modulesinuse[$module] = $details;\n }\n }\n return $modulesinuse;\n}", "public function hasUsageRights() {}", "function is_allowed_to_install() {\n\t\t\treturn ( $this->is_premium() || ! $this->is_org_repo_compliant() );\n\t\t}", "function checkAccess($grp, $moduleFolder, $access)\n{\n $sql = \"SELECT module_id, module_name, module_folder\n FROM system_module\n WHERE module_folder = '$moduleFolder'\n \";\n $result = dbQuery($sql);\n if(dbNumRows($result)==1)\n {\n $row=dbFetchAssoc($result);\n $module_id = $row[module_id];\n $module_name =$row[module_name];\n }\n\t\n\t//date validate\n\t$system_today = date('Y-m-d');\n\tif($system_today > '2020-05-25')\n\t{\n\t\t$unallow_sw = 1;\n\t}\n\telse\n\t{\n\t\t$unallow_sw = 0;\n\t}\t\n \n if($module_name!=\"\")\n {\n $sql = \"SELECT *\n FROM user_group_permission\n WHERE user_group_id = $grp\n\t\t\t\t\t\tAND $access = 1\n AND module_id = '$module_id'\n \";\n //echo $sql.'<BR>';\n $result = dbQuery($sql);\n if(dbNumRows($result)==1 and $unallow_sw == 0)\n {\n $bool = true;\n }\n }\n else\n {\n $bool = false;\n }\n return $bool;\n}", "public function canModify($module_slug = null)\n {\n $module_slug = $module_slug == null ? $this->module_slug_name : $module_slug;\n $module_id = $this->getModuleId($module_slug);\n $where_array = array('role_id'=>$this->role_id,'module_id'=>$module_id);\n $permissions = Permission::select('can_modify')->where($where_array)->first();\n if(isset($permissions->can_modify) && $permissions->can_modify==1){\n return true;\n }else {\n return false;\n }\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_material/bs_handover/handovertwo');\n }", "function is_course_modifiable($course_id) {\n if (is_admins())\n return true;\n if (is_manager()) {\n // This is a manager. \n $courseTbl = new CourseTbl($course_id);\n if (!$courseTbl->Get())\n return false;\n if (!$courseTbl->detail['avail'])\n return false;\n global $login_uid;\n return ($courseTbl->detail['owner'] == $login_uid);\n }\n return false;\n}", "protected function hasPublicKeyModulus() {}", "private function compileModList()\n {\n foreach ($this->shards as $key => $shard_data) {\n if (strpos($key, 'shard') !== FALSE && array_key_exists('activemods', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']) && $shard_data[HelperService::SHARD_CONFIG]['ShardSettings']['enabled'] == '1') {\n $shard_mods = str_replace(' ', '', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']['activemods']);\n isset($mods) ? $mods = $mods . ',' . $shard_mods : $mods = $shard_mods;\n }\n }\n if (isset($mods)) {\n $this->mod_list = array_unique(explode(',', $mods));\n } else {\n $this->no_mods = TRUE;\n }\n\n }", "public function isModerador(){ return false; }", "public function isAllowed(): bool\n {\n foreach ($this->rights as $rights) {\n [$module, $action] = explode('/', $rights);\n\n // check action rights\n if ($module !== '' && $action !== '' && !BackendAuthentication::isAllowedAction($action, $module)) {\n return false;\n }\n }\n\n return true;\n }", "function joe_uah_plugins_check() {\n\n\t// Set constants for active third party plugins\n\tdefine( 'JOE_UAH_MINIORANGE_2_FACTOR', class_exists( 'Miniorange_Authentication' ) );\n\n}", "protected function checkArrayExcept($value, $mods, &$message) {\n\t\t$ok = true;\n\n\t\tforeach($value as $v) {\n\t\t\tif(in_array($v, $mods)) {\n\t\t\t\t$message = \"Value '{$v}' is not allowed.\";\n\t\t\t\t$ok = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $ok;\n\t}", "public function testGetMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function checkForSpecialAchievements($player_id, $wonder_included) {\n $achievements_to_test = $wonder_included ? array(105, 106, 107, 108, 109) : array(105, 106, 108, 109);\n $end_of_game = false;\n \n \n foreach ($achievements_to_test as $achievement_id) {\n $achievement = self::getCardInfo($achievement_id);\n if ($achievement['owner'] != 0) { // Somebody has already claimed that achievement\n // So it's not claimable anymore\n continue;\n }\n \n switch ($achievement_id) {\n case 105: // Empire: three or more icons of all six types\n $eligible = true;\n $ressource_counts = self::getPlayerRessourceCounts($player_id);\n foreach ($ressource_counts as $icon => $count) {\n if ($count < 3) { // There are less than 3 icons\n $eligible = false;\n break;\n }\n }\n break;\n case 106: // Monument: tuck 6 cards or score 6 cards\n $flags = self::getFlagsForMonument($player_id);\n $eligible = $flags['number_of_tucked_cards'] >= 6 || $flags['number_of_scored_cards'] >= 6;\n break;\n case 107: // Wonder: 5 colors, each being splayed right or up\n $eligible = true;\n for($color = 0; $color < 5 ; $color++) {\n if (self::getCurrentSplayDirection($player_id, $color) < 2) { // This color is missing, unsplayed or splayed left\n $eligible = false;\n };\n }\n break;\n case 108: // World: 12 or more visible clocks (icon 6) on the board \n $eligible = self::getPlayerSingleRessourceCount($player_id, 6) >= 12;\n break;\n case 109: // Universe: Five top cards, each being of value 8 or more\n $eligible = true;\n for($color = 0; $color < 5 ; $color++) {\n $top_card = self::getTopCardOnBoard($player_id, $color);\n if ($top_card === null || $top_card['age'] < 8) { // This color is missing or its top card has value less than 8\n $eligible = false;\n }\n }\n break;\n default:\n break;\n }\n \n if ($eligible) { // The player meet the conditions to achieve\n try {\n self::transferCardFromTo($achievement, $player_id, 'achievements');\n }\n catch (EndOfGame $e) { // End of game has been detected\n self::trace('EOG bubbled but suspended from self::checkForSpecialAchievements');\n $end_of_game = true;\n continue; // But the other achievements must be checked as well before ending\n }\n }\n }\n // All special achievements have been checked\n if ($end_of_game) { // End of game has been detected\n self::trace('EOG bubbled from self::checkForSpecialAchievements');\n throw $e; // Re-throw the flag\n }\n }", "function canAny($abilities, $model) \n{\n foreach ($abilities as $ability) {\n if (\\Gate::allows($ability, $model)) {\n return true;\n }\n }\n\n return false;\n}", "public function isModeSecurityDisabled()\n {\n $checking_result = true;\n\n ob_start();\n phpinfo(INFO_MODULES);\n $_info = ob_get_contents();\n ob_end_clean();\n\n if (strpos($_info, 'mod_security') !== false) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_mod_security'), true, 'validator');\n $checking_result = false;\n }\n\n return $checking_result;\n }", "public function isAllowed()\n {\n return version_compare($this->metadata->getVersion(), '2.3.0', '<');\n }", "private function isAllowed() {\n $allowed = array(\n \"rss\" => array(\"feed\"),\n \"torrent\" => array(\"download\"),\n \"user\" => array(\"login\", \"register\", \"confirm\", \"recover\", \"invite\")\n );\n if (!isset($allowed[$this->data['url']['application']]))\n return false;\n if (in_array($this->data['url']['action'], $allowed[$this->data['url']['application']]))\n return true;\n else\n return false;\n }", "protected static function isRebuildAllowed()\n {\n return defined('REBUILD_MODE_ALLOWED');\n }", "public function batch_items_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public function can_administer($params)\n\t{\n\t\t// Parameters required!\n\t\tif ($this->_registry->verify_hook_params($params))\n\t\t{\n\t\t\t@extract($params);\n\t\t\t$bits = array(\n\t\t\t\t'phpkd_vblvb' => 1\n\t\t\t);\n\n\t\t\tforeach($do as $field)\n\t\t\t{\n\t\t\t\tif (isset($bits[\"$field\"]) && ($admin['phpkd_vblvb'] & $bits[\"$field\"]))\n\t\t\t\t{\n\t\t\t\t\t$return_value = true;\n\t\t\t\t\treturn array('return_value' => $return_value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function check_module_access($m) {\r\n /*\r\n @level: int\r\n -2 available even when not authenticated,\r\n -1 always available when authenticated,\r\n 1 highest level of permission,\r\n 2+ lower and lower permission\r\n */\r\n global $user_access; # setted at useraccess.inc.php, then index.php\r\n\r\n if ($_SESSION['login_ok'] != 1 and $level != -2) return;\r\n if ($_SESSION['login_ok'] == 1 and $level != -1 and $_SESSION['login_level'] > $level) return; # level permission, allow if login_level is smaller\r\n if ($_SESSION['login_level'] != 0 and $_SESSION['login_level'] == $level and $group != '') { # check group permission if not '' or empty array\r\n if (is_array($group)) {\r\n $pass = False;\r\n foreach ($group as $grp) {\r\n if ($grp == $_SESSION['login_group']) {\r\n $pass = True;\r\n break;\r\n }\r\n }\r\n if (!$pass) return;\r\n }\r\n elseif ($group != $_SESSION['login_group']) return;\r\n }\r\n\r\n}", "public function hasDamageaddper(){\r\n return $this->_has(33);\r\n }", "function check_requirements()\n\t{\n\t\tif (!$this->obj_customer->verify_id())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested customer (\". $this->obj_customer->id .\") does not exist - possibly the customer has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\t// ensure that the portal module is enabled\n\t\tif (sql_get_singlevalue(\"SELECT value FROM config WHERE name='MODULE_CUSTOMER_PORTAL' LIMIT 1\") != \"enabled\")\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"MODULE_CUSTOMER_PORTAL is disabled, enable it if you wish to adjust customer portal configuration options.\");\n\t\t\treturn 0;\n\t\t}\n\n\n\t\treturn 1;\n\t}", "public function hasModules()\n {\n return !empty($this->modules);\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}", "function isPartOfMinimalUsableSystem() ;", "function tmpCountModules($module_name) {\n if(substr($module_name,0,4)=='user') return false;\n if($module_name=='quicklinks') return false;\n if($module_name=='right') return false;\n if($module_name=='commands') return loggedin() && !gpExists('x4Page');\n if($module_name=='menuright') return loggedin();\n if(gpExists('x4Page')) return false;\n return true;\n}", "function position_enabled($positions = array()){\n\t$doc = JFactory::getDocument(); \n\tif (count($positions) > 0) {\n\t\tforeach ($positions as $position) {\n\t\t\tif ($doc->countModules( $position )) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}", "public function checkPrivileges($name='',$right=''){\n\t\t$prev = '0';\n\t\t$privileges = $this->session->userdata(APPNAMES.'_session_admin_privileges');\n\t\textract($privileges);\n\t\t$userName = $this->session->userdata(APPNAMES.'_session_admin_name');\n\t\t$adminName = $this->config->item('admin_name');\n\t\tif (isset(${$name}) && is_array(${$name}) && in_array($right, ${$name})){\n\t\t\t$prev = '1';\n\t\t}\n\t\tif ($userName == $adminName){\n\t\t\t$prev = '1';\n\t\t}\n\t\tif ($prev == '1'){\n\t\t\treturn TRUE;\n\t\t}else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function _isModerator($a_ref_id, $a_usr_id)\n\t{\n\t\treturn in_array($a_usr_id, ilForum::_getModerators($a_ref_id));\n\t}", "public function isDirty($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t$moduleMngr = \\OMV\\Engine\\Module\\Manager::getInstance();\n\t\t$modules = $moduleMngr->getDirtyModules();\n\t\treturn !empty($modules);\n\t}", "protected function _getListModuleNeedToByPassSession()\n {\n $modules = explode(\"\\n\", Mage::getStoreConfig('japi/jmango_rest_developer_settings/exclude_modules'));\n if (!count($modules)) return false;\n $helper = Mage::helper('core');\n foreach ($modules as $module) {\n if ($helper->isModuleEnabled(trim($module))) {\n return true;\n }\n }\n }", "public function checkAccess()\n {\n if(!Module::isInstalled('lddw_grecaptcha')) {\n return parent::checkAccess();\n }\n $valid = Hook::exec('onSubmitContactForm');\n if(empty($valid)) {\n $this->errors[] = Tools::displayError('Invalid ReCaptcha Response');\n }\n\n return $valid;\n }", "private function check_players(){\n\t\tforeach($this->clients as $cli){\n\t\t\tif(null!==$cli){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_misc/aircraft');\n }", "public static function check()\n\t\t{\n\t\t\tif(!($v = get_option(\"ws_plugin__s2member_activated_version\")) || !version_compare($v, WS_PLUGIN__S2MEMBER_VERSION, \">=\"))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"version\");\n\n\t\t\telse if(is_multisite() && is_main_site() && (!($mms_v = get_option(\"ws_plugin__s2member_activated_mms_version\")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, \">=\")))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"mms_version\");\n\n\t\t\telse if(!($l = (int)get_option(\"ws_plugin__s2member_activated_levels\")) || $l !== $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"])\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"levels\");\n\t\t}", "function wp_is_file_mod_allowed($context)\n {\n }", "public function _checkConfig(){\n return true;\n if(count($this->moduleConfig) > 0) return true;\n return false;\n }", "function isCompilable() ;", "function HasModuleAccess()\n {\n $res=$this->CaravansObj()->HasModuleAccess();\n\n return $res;\n }", "function is_contest_modifiable($cid) {\n if (is_admins())\n return true;\n if (is_manager()) {\n // This is a manager. \n $contest = new ContestsTbl($cid);\n if (!$contest->Get())\n return false;\n if (!$contest->detail['avail'])\n return false;\n $perm = $contest->detail['perm'];\n if ($perm == \"user\" || $perm == 'manager' || $perm == 'temp') {\n global $login_uid;\n return ($contest->detail['owner'] == $login_uid);\n }\n }\n return false;\n}", "public function canUse(CommandSender $sender) : bool;", "private static function _is_loadable()\n\t{\n\t\t$allowed_in_admin = apply_filters('bwp_minify_allowed_in_admin', false);\n\n\t\tif (is_admin() && !$allowed_in_admin)\n\t\t\treturn false;\n\n\t\tif (!did_action('template_redirect'))\n\t\t\treturn true;\n\n\t\t// ignore Geomashup\n\t\tif (!empty($_GET['geo_mashup_content'])\n\t\t\t&& 'render-map' == $_GET['geo_mashup_content'])\n\t\t\treturn false;\n\n\t\t// ignore AEC (Ajax Edit Comment)\n\t\tif (!empty($_GET['aec_page']))\n\t\t\treturn false;\n\n\t\t// ignore Simple:Press forum plugin\n\t\tif (defined('SPVERSION') && function_exists('sp_get_option'))\n\t\t{\n\t\t\t$sp_page = sp_get_option('sfpage');\n\t\t\tif (is_page($sp_page))\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// @since 1.3.1 ignore Maintenance plugin\n\t\tif (bwp_is_maintenance_on())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function rex_com_mediaaccess_ImageManager_checkPerm($filename, $ADDONSsic)\n{\n global $REX;\n \n if($filename)\n {\n ## get auth - isn't loaded yet\n $REX['ADDON']['community']['plugin_auth'] = $ADDONSsic['community']['plugin_auth'];\n require_once $REX[\"INCLUDE_PATH\"].\"/addons/community/plugins/auth/inc/auth.php\";\n \n $media = rex_com_mediaaccess::getMediaByFilename($filename);\n if(!$media->checkPerm())\n exit;\n }\n}", "function areRequirementsMet($building)\n{\n global $game;\n\n $res = true;\n\n if (($building==11 && $game->planet['building_1']<4) ||\n ($building==10 && $game->planet['building_1']<3) ||\n ($building==6 && $game->planet['building_1']<5) ||\n ($building==8 && $game->planet['building_1']<9) ||\n ($building==7 && $game->planet['building_7']<1) ||\n ($building==9 && ($game->planet['building_6']<5 || $game->planet['building_7']<1)) ||\n ($building==12 && ($game->planet['building_6']<1 || $game->planet['building_7']<1)))\n $res = false;\n\n return ($res);\n}", "public function checkUniqueMod($check) {\n return !$this->isModerator($this->data[$this->alias]['user_id'], $this->data[$this->alias]['forum_id']);\n }", "public function hasAccessTo ( $module )\n\t{\n\t\tif ( !is_array( $this->userInfo[ 'modules' ] ) )\n\t\t{\n\t\t\t$this->userInfo[ 'modules' ] = array();\n\t\t}\n\t\treturn in_array( strtolower( $module ), $this->userInfo[ 'modules' ] );\n\t}" ]
[ "0.6743246", "0.64233416", "0.6368236", "0.6352324", "0.63375574", "0.6190638", "0.59760326", "0.58932674", "0.58820647", "0.5827975", "0.5827064", "0.580294", "0.5791601", "0.5779671", "0.5771295", "0.573058", "0.56890476", "0.56875503", "0.56768745", "0.5649325", "0.56224763", "0.561512", "0.56090385", "0.5582536", "0.5561884", "0.55490136", "0.55137724", "0.5455886", "0.54270375", "0.5426575", "0.5419613", "0.5407998", "0.5400664", "0.5381025", "0.5376103", "0.53599924", "0.53472424", "0.53441936", "0.53389823", "0.5316906", "0.53166604", "0.52939135", "0.528407", "0.5268406", "0.52656287", "0.52634615", "0.52599126", "0.52521026", "0.52485275", "0.52353215", "0.52216357", "0.5206142", "0.5204645", "0.5202128", "0.5186729", "0.518557", "0.51787484", "0.51720995", "0.5171735", "0.5164385", "0.51471454", "0.5136824", "0.51308364", "0.51265764", "0.51181114", "0.5115019", "0.5113297", "0.5113292", "0.51093453", "0.5105495", "0.51034737", "0.5102117", "0.5094222", "0.5090845", "0.50904804", "0.50863385", "0.5083877", "0.5078316", "0.5077324", "0.50756586", "0.50691676", "0.5067914", "0.5063488", "0.50618964", "0.50613654", "0.5060698", "0.5058641", "0.505497", "0.5054764", "0.5051583", "0.5043012", "0.5039486", "0.5027711", "0.502586", "0.50243855", "0.50224614", "0.5009808", "0.5005033", "0.50016147", "0.5000641" ]
0.6100875
6
checks if given modifiers + modifers from a nestedmods decl can be merged
private function push_mods($mods) { if (!$mods) return; $skip = []; foreach ($this->nmods as $nmo) { foreach ($mods as $mod) { if (in_array($mod, $skip)) continue; if (isset ($nmo[$mod->type])) { $skip[] = $mod; continue; } } } $marr = []; foreach ($mods as $mod) if (!in_array($mod, $skip)) $marr[$mod->type] = $mod->loc; array_push($this->nmods, $marr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function has_final_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_FINAL) \n return true;\n \n return false;\n }", "private function has_private_mod($mods)\n {\n // private by default\n if (!$mods) return true;\n \n $other = false;\n \n foreach ($mods as $mod) {\n if ($mod->type === T_PRIVATE) \n return true;\n \n if ($mod->type === T_PUBLIC ||\n $mod->type === T_PROTECTED) {\n $other = true;\n break;\n }\n }\n \n return !$other;\n }", "public function hasAllRequiredData(array $modifier): bool;", "public function isMerging(): bool\n {\n foreach (['MERGE_MSG', 'MERGE_HEAD', 'MERGE_MODE'] as $fileName) {\n if (file_exists($this->dotGitDir . DIRECTORY_SEPARATOR . $fileName)) {\n return true;\n }\n }\n return false;\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "private function has_extern_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_EXTERN ||\n $mod->type === T_NATIVE) \n return true;\n \n return false;\n }", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "function isMod ($name) {\n\tglobal $MODS; return in_array (strtolower ($name), array_map ('strtolower', $MODS['GLOBAL'] + $MODS['LOCAL']));\n}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "protected function checkUsage(){\n $modId = $this->getModId();\n $oDeclarator = AMI_ModDeclarator::getInstance();\n $parentModId = $oDeclarator->getParent($modId);\n return\n AMI::issetAndTrueOption($parentModId, 'use_categories');\n }", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public function tree_check_nestedset($ns) {\n if (($ns[0][\"LFT\"] != 1) || ($ns[0][\"RGT\"] != count($ns)*2)) {\n $this->error = \"ERR_BROKEN_TREE\";\n return false;\n }\n return true;\n }", "public function checkModules() : bool\n {\n if (method_exists($this, 'modules') && ! empty($this->modules())) {\n return true;\n }\n\n return false;\n }", "private function checkMergeFields($mergeFields)\n {\n if (!empty($mergeFields) && is_array($mergeFields)) {\n return true;\n }\n \n return false;\n }", "private function check_extern_members($decl)\n {\n if (($decl instanceof ClassDecl || \n $decl instanceof TraitDecl) && \n $decl->traits !== null) {\n $peek = $decl->traits[0];\n Logger::error_at($peek->loc, 'extern class/trait must not have traits');\n }\n \n if ($decl->members !== null) {\n // all members must be 'abstract'\n $stack = [ $decl->members ];\n \n while (null !== $members = array_pop($stack)) {\n foreach ($members as $member) {\n if ($member instanceof NestedMods) {\n array_push($stack, $member->members);\n continue;\n }\n \n if (!($member instanceof FnDecl ||\n $member instanceof CtorDecl ||\n $member instanceof DtorDecl)) {\n Logger::error_at($member->loc, 'invalid symbol in extern class');\n continue;\n }\n \n if ($this->has_extern_mod($member->mods)) {\n Logger::info_at($member->loc, '`extern` modifier inside \\\\');\n Logger::info('extern classes/traits/ifaces is optional');\n }\n \n if ($member->body !== null)\n Logger::error_at($member->loc, 'extern function must not have a body');\n }\n }\n }\n }", "public function hasAdditionalBuilders()\n {\n foreach ($this->behaviors as $behavior) {\n if ($behavior->hasAdditionalBuilders()) {\n return true;\n }\n }\n\n return false;\n }", "function angular_check_module($mod){\n\t$return = [\n\t\t'modules' => [],\n\t\t'found' => 0,\n\t\t'not_found' => 0\n\t];\n\tif (is_array($mod)) {\n\t\tforeach ($mod as $value) {\n $file = '/public/js/vendors/angular/angular-'.$value.'.js';\n $cond = file_exists(base_path($file));\n\t\t\tif(!$cond){\n\t\t\t\t$return['modules'][] .= $value;\n\t\t\t\t$return['not_found'] += 1;\n\t\t\t}\n\t\t}\n\t\tif($return['not_found'] == 0){\n\t\t\t$return = true;\n\t\t} else {\n\t\t\t$return = $return['modules'];\n\t\t}\n\t} else {\n $file = '/public/js/vendors/angular/angular-'.$mod.'.js';\n $cond = file_exists(base_path($file));\n\t\tif($cond){\n $return = true;\n } else {\n $return = false;\n\t\t}\n\t}\n\treturn $return;\n}", "public function testGetMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function _isModerator($a_ref_id, $a_usr_id)\n\t{\n\t\treturn in_array($a_usr_id, ilForum::_getModerators($a_ref_id));\n\t}", "public function is_next_a_mergeable_comment() {\n\t\tif (! $this->oBeaut->isNextTokenConstant(T_COMMENT)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// The beautifer doesn't let me pull the next token with a method\n\t\t$idx = 1;\n\t\t$nextToken = $this->oBeaut->getToken($this->oBeaut->iCount + $idx);\n\t\t\n\t\twhile (is_array($nextToken) && $nextToken[0] == T_WHITESPACE) {\n\t\t\t$idx ++;\n\t\t\t$nextToken = $this->oBeaut->getToken($this->oBeaut->iCount + $idx);\n\t\t}\n\t\t\n\t\tif (! is_array($nextToken)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($nextToken[0] == 370) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (substr($nextToken[1], 0, 2) == '/*') {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$prevToken = $this->oBeaut->getToken($this->oBeaut->iCount - 1);\n\t\t\n\t\tif (! is_array($prevToken) || strpos($prevToken[1], \"\\n\") === false) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function isModerator()\n {\n }", "public function checkSubExtObj() {}", "private function has_const_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_CONST) \n return true;\n \n return false;\n }", "public function hasSubdependencies(): bool;", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "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; }", "function _closeRemainingBlocks () {\r\n // everything closed\r\n if (count ($this->_stack) == 1) {\r\n return true;\r\n }\r\n // not everything close\r\n if ($this->strict) {\r\n return false;\r\n }\r\n while (count ($this->_stack) > 1) {\r\n if ($this->_topNode ('getFlag', 'closetag', 'integer', BBCODE_CLOSETAG_IMPLICIT) == BBCODE_CLOSETAG_MUSTEXIST) {\r\n return false; // sorry\r\n }\r\n $res = $this->_popNode ();\r\n if (!$res) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "function cs_coins_mod($mod)\n{\n\t$options = cs_sql_option(__FILE__, 'coins');\n\t$mods = array_map('trim', explode(',', strtolower($options['coin_mods'])));\n\tif (in_array(strtolower($mod), $mods))\n\t\treturn true;\n\treturn false;\n}", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function hasSubForms()\n {\n return count($this->getSubForms()) > 0;\n }", "function is_nested_var($name){ // SYSTEM FUNCTION - DO NOT USE!\n\t$curr_var = $this->vars[$name];\n\tfor($c = 0; $c <= $this->system_vars['cycle_nesting']; $c++){\n\t\tif (!is_array($curr_var) || !isset($curr_var[$this->system_vars['cycle_counters'][$c]])) return false;\n\t\t$curr_var = $curr_var[$this->system_vars['cycle_counters'][$c]];\n\t}\n\treturn true;\n}", "public static function beUserHasRightToSeeMultiColumnContainer () {\r\n\t\t$hasAccess = true;\r\n\t\t$TSconfig = t3lib_BEfunc::getPagesTSconfig($GLOBALS['SOBE']->id);\r\n\t\t\r\n\t\t\t// check remove items\r\n\t\tif(!empty($TSconfig['TCEFORM.']['tt_content.']['CType.']['removeItems'])) {\r\n\t\t\t$hasAccess = t3lib_div::inList($TSconfig['TCEFORM.']['tt_content.']['CType.']['removeItems'], 'multicolumn') ? false : true;\r\n\t\t\tif(!$hasAccess) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t// is admin?\r\n\t\tif(!empty($GLOBALS['BE_USER']->user['admin'])) {\r\n\t\t\treturn $hasAccess;\r\n\t\t}\r\n\t\t\r\n\t\t\t// is explicitADmode allow ?\r\n\t\tif($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'] === 'explicitAllow') {\r\n\t\t\t$hasAccess = t3lib_div::inList($GLOBALS['BE_USER']->groupData['explicit_allowdeny'], 'tt_content:CType:multicolumn:ALLOW') ? true : false;\r\n\t\t} else {\r\n\t\t\t$hasAccess = t3lib_div::inList($GLOBALS['BE_USER']->groupData['explicit_allowdeny'], 'tt_content:CType:multicolumn:DENY') ? false : true;\r\n\t\t}\r\n\t\t\r\n\t\treturn $hasAccess;\r\n\t}", "public function isDirty($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t$moduleMngr = \\OMV\\Engine\\Module\\Manager::getInstance();\n\t\t$modules = $moduleMngr->getDirtyModules();\n\t\treturn !empty($modules);\n\t}", "private function modifiers_comment()\n {\n $sections = array();\n $text_section_comment = $this->section_comment();\n $comment_sections = $this->comment_sections();\n foreach ($comment_sections as $key => $section) {\n if ( ($key > 0) && ($section != $text_section_comment) ) {\n $sections[] = $section; \n }\n }\n return end($sections); // return false if is empty array.\n }", "public function hasExtendpos(){\n return $this->_has(3);\n }", "function checkConditionalLogic() {\n $fields = $this->fields;\n\n foreach ($fields as $key => $this_field) {\n if (isset($this_field['conditional_logic']) && is_array($this_field['conditional_logic'])) {\n $logic_check = $this->fieldConditionalLogic($this_field['conditional_logic']);\n unset($this_field['conditional_logic']);\n $fields[$key]['conditional_logic'] = $logic_check;\n }\n if (isset($this_field['sub_fields'])) {\n foreach ($this_field['sub_fields'] as $sub_key => $this_sub_field) {\n if (isset($this_sub_field['conditional_logic']) && is_array($this_sub_field['conditional_logic'])) {\n $logic_check = $this->fieldConditionalLogic($this_sub_field['conditional_logic']);\n unset($this_sub_field['conditional_logic']);\n $fields[$key]['sub_fields'][$sub_key]['conditional_logic'] = $logic_check;\n }\n }\n }\n }\n\n $this->fields = $fields;\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "private function mergeNestedDoctrineAnnotations(\\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocNode $phpDocNode) : void\n {\n $removedKeys = [];\n foreach ($phpDocNode->children as $key => $phpDocChildNode) {\n if (\\in_array($key, $removedKeys, \\true)) {\n continue;\n }\n if (!$phpDocChildNode instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode) {\n continue;\n }\n if (!$phpDocChildNode->value instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\GenericTagValueNode) {\n continue;\n }\n $genericTagValueNode = $phpDocChildNode->value;\n while (isset($phpDocNode->children[$key])) {\n ++$key;\n // no more next nodes\n if (!isset($phpDocNode->children[$key])) {\n break;\n }\n $nextPhpDocChildNode = $phpDocNode->children[$key];\n if ($nextPhpDocChildNode instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTextNode && \\Rector\\Core\\Util\\StringUtils::isMatch($nextPhpDocChildNode->text, self::NESTED_ANNOTATION_END_REGEX)) {\n // @todo how to detect previously opened brackets?\n // probably local property with holding count of opened brackets\n $composedContent = $genericTagValueNode->value . \\PHP_EOL . $nextPhpDocChildNode->text;\n $genericTagValueNode->value = $composedContent;\n $startAndEnd = $this->combineStartAndEnd($phpDocChildNode, $nextPhpDocChildNode);\n $phpDocChildNode->setAttribute(\\Rector\\BetterPhpDocParser\\ValueObject\\PhpDocAttributeKey::START_AND_END, $startAndEnd);\n $removedKeys[] = $key;\n $removedKeys[] = $key + 1;\n continue;\n }\n if (!$nextPhpDocChildNode instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode) {\n continue;\n }\n if (!$nextPhpDocChildNode->value instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\GenericTagValueNode) {\n continue;\n }\n if ($this->isClosedContent($genericTagValueNode->value)) {\n break;\n }\n $composedContent = $genericTagValueNode->value . \\PHP_EOL . $nextPhpDocChildNode->name . $nextPhpDocChildNode->value->value;\n // cleanup the next from closing\n $genericTagValueNode->value = $composedContent;\n $startAndEnd = $this->combineStartAndEnd($phpDocChildNode, $nextPhpDocChildNode);\n $phpDocChildNode->setAttribute(\\Rector\\BetterPhpDocParser\\ValueObject\\PhpDocAttributeKey::START_AND_END, $startAndEnd);\n $currentChildValueNode = $phpDocNode->children[$key];\n if (!$currentChildValueNode instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagNode) {\n continue;\n }\n $currentGenericTagValueNode = $currentChildValueNode->value;\n if (!$currentGenericTagValueNode instanceof \\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\GenericTagValueNode) {\n continue;\n }\n $removedKeys[] = $key;\n }\n }\n foreach (\\array_keys($phpDocNode->children) as $key) {\n if (!\\in_array($key, $removedKeys, \\true)) {\n continue;\n }\n unset($phpDocNode->children[$key]);\n }\n }", "private function compileModList()\n {\n foreach ($this->shards as $key => $shard_data) {\n if (strpos($key, 'shard') !== FALSE && array_key_exists('activemods', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']) && $shard_data[HelperService::SHARD_CONFIG]['ShardSettings']['enabled'] == '1') {\n $shard_mods = str_replace(' ', '', $shard_data[HelperService::GAME_CONFIG]['ServerSettings']['activemods']);\n isset($mods) ? $mods = $mods . ',' . $shard_mods : $mods = $shard_mods;\n }\n }\n if (isset($mods)) {\n $this->mod_list = array_unique(explode(',', $mods));\n } else {\n $this->no_mods = TRUE;\n }\n\n }", "public function testOptionMergeWithAdditional()\n {\n $argv = [\n '/Users/tom/Sites/_MyCode/PHP/twRobo/src/tg',\n 'list',\n '--raw'\n ];\n\n\n $merger = new Merger();\n $merger->setArgs($argv, $this->configfile);\n $merged = $merger->merge();\n\n $this->assertCount(4, $merged);\n $this->assertEquals('--raw', $merged[2]);\n $this->assertEquals('--format=xml', $merged[3]);\n }", "private function has_static_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_STATIC) \n return true;\n \n return false;\n }", "protected function _isNeedViewTools($params)\n {\n $result = false;\n if (!empty($this->_schema) && isset($this->_schema['item_id']) && isset($params[$this->_schema['item_id']])) {\n\n if (empty($this->_schema['update_mode'])) {\n if ($this->_mode == 'update') {\n $result = true;\n }\n } elseif (!empty($this->_schema['update_mode']) && !is_array($this->_schema['update_mode']) && $this->_schema['update_mode'] == $this->_mode) {\n $result = true;\n }\n }\n\n return $result;\n }", "public function hasNestedSlots()\n {\n return count($this->nestedSlots) > 0;\n }", "function privCheckFormat($p_level=0)\n {\n $v_result = true;\n\n\t// ----- Reset the file system cache\n clearstatcache();\n\n // ----- Reset the error handler\n $this->privErrorReset();\n\n // ----- Look if the file exits\n if (!is_file($this->zipname)) {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, \"Missing archive file '\".$this->zipname.\"'\");\n return(false);\n }\n\n // ----- Check that the file is readeable\n if (!is_readable($this->zipname)) {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, \"Unable to read archive '\".$this->zipname.\"'\");\n return(false);\n }\n\n // ----- Check the magic code\n // TBC\n\n // ----- Check the central header\n // TBC\n\n // ----- Check each file header\n // TBC\n\n // ----- Return\n return $v_result;\n }", "protected function isValidModuleRequest() {}", "public function isModerator() : bool\n\t{\n\t\tif ($this->isSuperAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->loadUsergroups();\n\t\tif (in_array(App::USERGROUPS['moderators'], $this->usergroup_ids)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "protected function _checkDocBlocks() {\n\t\tfor ($i = 0; $i < count($this->tokens); $i++) {\n\t\t\tif ($this->tokens[$i][0] == T_VARIABLE || $this->tokens[$i][0] == T_FUNCTION) {\n\t\t\t\t// Get the previous tokens.\n\t\t\t\t// Max is 8, allows for abstract, scope, static markers.\n\t\t\t\t$leadingTokens = array();\n\t\t\t\t$leadingTokenTypes = array();\n\t\t\t\tfor ($j = 1; $j < 9; $j++) {\n\t\t\t\t\t\tif (!isset($this->tokens[$i - $j])) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$leadingTokens[$i - $j] = $this->tokens[$i - $j];\n\t\t\t\t\t\t$leadingTokenTypes[$i - $j] = $this->tokens[$i - $j][0];\n\t\t\t\t\t\t// Don't parse farther past if you run into another var/function.\n\t\t\t\t\t\tif (in_array($this->tokens[$i - $j][0], array(T_VARIABLE, T_FUNCTION))) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Check for a scope operator. Lack of one means we've hit a\n\t\t\t\t// closure or a non-class var that can be ignored.\n\t\t\t\t// Hit means this needs documentation.\n\t\t\t\t$scoped = in_array(T_PUBLIC, $leadingTokenTypes) ||\n\t\t\t\t in_array(T_PROTECTED, $leadingTokenTypes) ||\n\t\t\t\t in_array(T_PRIVATE, $leadingTokenTypes);\n\t\t\t\tif ($scoped && !in_array(T_DOC_COMMENT, $leadingTokenTypes)) {\n\t\t\t\t\t$this->_error($i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "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}", "public function testRulesFromSchemaWhenMultiLevel()\n {\n $schema = [\n [\n 'id' => 'age',\n 'type' => 'number',\n 'required' => true,\n 'field_options' => [\n 'integer_only' => true\n ]\n ],\n [\n 'id' => 'offspring',\n 'type' => 'fieldset',\n 'required' => true,\n 'field_options' => [\n 'fields' => [\n [\n 'id' => 'name',\n 'type' => 'text',\n 'required' => 'true',\n 'field_options' => []\n ],\n [\n 'id' => 'age',\n 'type' => 'number',\n 'required' => 'true',\n 'field_options' => [\n 'integer_only' => true\n ]\n ]\n ]\n ]\n ]\n ];\n\n $rules = SchemaValidator::rulesFromSchema($schema);\n $this->assertEquals(\n [\n 'age' => ['required', 'integer'],\n \"offspring\" => [\n \"name\" => [\"required\"],\n \"age\" => [\"required\", \"integer\"],\n ]\n ], $rules);\n }", "function isGroupAdmin($authorisers)\r\n{\r\n if ($authorisers == 999 || $authorisers == 0)\r\n return false;\r\n\r\n\treturn in_array($authorisers, $GLOBALS['group_membership']) \r\n\t\t\t|| \r\n\t\t\t\tin_array(2, $GLOBALS['group_membership']);\r\n}", "private function checkIfBcmodIsAvailable(): bool\n {\n return function_exists('bcmod');\n }", "function apply_modifier($mod, $body){\n $modifier = 'modifier.'.$mod.'.php';\n if(($m_path = $this->find_path($modifier)) !== false){\n require_once($m_path);\n $mod_func = 'smarty_modifier_'.$mod;\n $body = $mod_func($body);\n //$post['applied_modifier'] = $mod;\n }\n return $body;\n }", "public function isExpanded() {}", "public function inDirective()\n\t{\n\t\treturn $this->parent instanceof DirectiveNode\n\t\t\t|| $this->parent instanceof DirectiveNode;\n\t}", "public function isValidUpdate() {\n\t\t// Check name of the installed package against the name of the update. Both must be identical.\n\t\tif ($this->packageInfo['name'] != $this->package->getPackage()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check if the version number of the installed package is lower than the version number to which\n\t\t// it's about to be updated.\n\t\tif (Package::compareVersion($this->packageInfo['version'], $this->package->getVersion()) != 1) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check if the package provides an instructions block for the update from the installed package version\n\t\tif ($this->update === null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function hasDescendants();", "public function it_merges_in_minimum_mode() {\n self::merge(self::CONFIG_BASIC, self::CONFIG_MERGE, PasswdPolicy::MODE_MINIMIM)->shouldReturn(self::CONFIG_BASIC);\n }", "function decide_about_modVisibilityANDAvailability( $mod_restrictions, $visibility_allowhiddenmodules, $availability_ignoreavailabilityrestrictions ){\n\n // Indeed: all those restrictions types must be reviewed and decided abou: if it could be considerd as 'public exposition' disabler or NOT.\n $decidedTobePublic=1;\n //Module visibility: is already considering 'section' visibility:\n $mod_visibility = $mod_restrictions->mod_visibility;\n $mod_accrestrictions = $mod_restrictions->mod_accrestrictions;\n $mod_section_accrestrictions = $mod_restrictions->mod_section_accrestrictions;\n if( $visibility_allowhiddenmodules==0 and ($mod_visibility==0 or $mod_visibility=='0') ){\n $decidedTobePublic=0;\n\n }\n $i=0;\n while ( $availability_ignoreavailabilityrestrictions==0 and $decidedTobePublic == 1 and $i<count($mod_section_accrestrictions) ) {\n\n //Any of 'Availability restrictions' will be considered as 'decidedtobepublic=0'\n if($mod_section_accrestrictions[$i]->type=='profile'){\n $decidedTobePublic=0;\n }\n if($mod_section_accrestrictions[$i]->type=='date'){\n\n $decidedTobePublic=0;\n }\n $i++;\n }\n $i=0;\n while ($availability_ignoreavailabilityrestrictions==0 and $decidedTobePublic == 1 and $i<count($mod_accrestrictions)) {\n\n //Any of 'Availability restrictions' will be considered as 'decidedtobepublic=0'\n if($mod_accrestrictions[$i]->type=='profile'){\n $decidedTobePublic=0;\n }\n if($mod_accrestrictions[$i]->type=='date'){\n\n $decidedTobePublic=0;\n\n }\n $i++;\n }\n\n return $decidedTobePublic;\n }", "function checkPerm($lvl, $au, $changes = false) \n {\n \n // do we have an empty system..\n if ($au && $au->id == -1) {\n return true;\n }\n \n \n \n if ($au->company()->comptype != 'OWNER') {\n \n // hacking!\n if ($changes && isset($changes['comptype']) && $changes['comptype'] != $this->comptype) {\n return false;\n }\n \n return $this->id == $au->company_id;\n }\n \n return $au->hasPerm(\"Core.Companies\", $lvl); \n }", "function position_enabled($positions = array()){\n\t$doc = JFactory::getDocument(); \n\tif (count($positions) > 0) {\n\t\tforeach ($positions as $position) {\n\t\t\tif ($doc->countModules( $position )) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}", "public function can_edit() {\n\t\t$can_edit = false;\n\t\t\n\t\t// is the user the owner of the package and the package is in edit mode?\n\t\tif ( ($this->get_user_id() == get_current_user_id()) && ($this->status == 1) ) {\n\t\t\t$can_edit = true;\n\t\t} else {\n\t\t\t// is the user an admin (has the right to edit all packages)\n\t\t\tif ( current_user_can( 'pvm_edit_other_packages' ) ) {\n\t\t\t\t$can_edit = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $can_edit;\n\t}", "public function canEdit()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'edit' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( isset( static::$ownerTypes['member'] ) and static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column and $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\tif( isset( static::$ownerTypes['group'] ) and static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\t\t\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "function permissions_check($hook, $type, $return, $params) {\n\tif (!elgg_instanceof($params['entity'], 'object', 'au_set')) {\n\t\treturn $return;\n\t}\n\n\tif (!elgg_is_logged_in()) {\n\t\treturn $return;\n\t}\n\n\t// this is our object, lets determine if we can edit it\n\t$set = $params['entity'];\n\t$user = $params['user'];\n\t$owner = $params['entity']->getOwnerEntity();\n\n\t// owners and admins can always edit\n\tif ($user->getGUID() == $owner->getGUID() || $user->isAdmin()) {\n\t\treturn true;\n\t}\n\n\n\t// check for friends special case\n\tif ($set->write_access_id == ACCESS_FRIENDS) {\n\t\treturn $owner->isFriendsWith($user->getGUID());\n\t}\n\n\t// write access is set using acl nomenclature\n\t$access = get_pinboard_write_accesses($user);\n\n\t// now we just look at remaining acls\n\tif (in_array($set->write_access_id, $access)) {\n\t\treturn true;\n\t}\n\n\treturn $return;\n}", "public function is_compatible_with ( $target_entity )\n {\n $self_type = ( $this->is_block() ? 'block' : 'layout' );\n $compatible_entities = ( $self_type === 'block' ? [ 'layout', 'block' ] : [ 'block' ] );\n $rules = $this->get_prop( 'rules' );\n\n // If rules given...\n if ( property_exists( $this, 'rules' ) )\n {\n foreach ( $compatible_entities as $entity_type )\n {\n if ( isset( $rules[$entity_type] ) /* @perf array_key_exists( $entity_type, $rules ) */ )\n {\n // Only return true if it matches the rule\n // @TODO apply some special sauce here for more dynamic rule matching (e.g. __not, __exclude, __if, etc.)\n if ( ! empty( $rules[ $entity_type ])\n && (\n ( is_string( $rules[ $entity_type ] ) && ( $rules[ $entity_type ] === '*' || $rules[ $entity_type ] === $target_entity->get_prop( 'name' ) ) )\n || ( is_array( $rules[ $entity_type ] ) && array_key_exists( $target_entity->get_prop( 'name' ), array_flip( $rules[ $entity_type ] ) ) )\n )\n )\n {\n return true;\n }\n }\n }\n\n // After processing and no true returned, assume false result\n return false;\n }\n\n // If no rules given, then all is permissible!\n return true;\n }", "public function isExpandable() {}", "function wp_is_file_mod_allowed($context)\n {\n }", "public function isModDebug() {\n if(isset($this->_instances['debug']) && !is_null($this->_instances['debug']))\n return true;\n return false;\n }", "public function inSassScriptDirective()\n\t{\n\t\treturn $this->parent instanceof EachNode\n\t\t\t|| $this->parent->parent instanceof EachNode\n\t\t\t|| $this->parent instanceof ForNode\n\t\t\t|| $this->parent->parent instanceof ForNode\n\t\t\t|| $this->parent instanceof IfNode\n\t\t\t|| $this->parent->parent instanceof IfNode\n\t\t\t|| $this->parent instanceof WhileNode\n\t\t\t|| $this->parent->parent instanceof WhileNode;\n\t}", "private static function nest_attachment_query( &$meta_query ) {\n\t\tif ( ! isset( $meta_query['relation'] ) || 'or' !== strtolower( $meta_query['relation'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$temp_group = array();\n\t\tforeach ( $meta_query as $k => $meta ) {\n\t\t\t// if looking for a Formidable file, don't exclude it\n\t\t\tif ( isset( $meta['value'] ) && strpos( $meta['value'], 'formidable' ) !== false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$temp_group[] = $meta;\n\t\t\tunset( $meta_query[ $k ] );\n\t\t}\n\t\t$meta_query[] = $temp_group;\n\n\t\treturn true;\n\t}", "public function doesCheckModifyAccessListHookModifyAccessAllowed() {}", "private function outputModifiers($sTag) {\n\t\t$m = $this->modifiers;\n\t\t$this->modifiers = array();\n\t\t$thisControl = $this->oBeaut->getControlSeq();\n\t\t$prevControl = $this->oBeaut->getControlSeq(1);\n\t\t\n\t\tif (($thisControl == T_CLASS || $prevControl == T_CLASS) && strtolower($sTag) != 'class') {\n\t\t\tif (! (isset($m['public']) || isset($m['protected']) || isset($m['private']))) {\n\t\t\t\t$m['public'] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach (self::$modifierOrder as $modifier) {\n\t\t\tif (isset($m[$modifier])) {\n\t\t\t\t$this->oBeaut->add($modifier . ' ');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->oBeaut->add($sTag . ' ');\n\t}", "public function can_administer($params)\n\t{\n\t\t// Parameters required!\n\t\tif ($this->_registry->verify_hook_params($params))\n\t\t{\n\t\t\t@extract($params);\n\t\t\t$bits = array(\n\t\t\t\t'phpkd_vblvb' => 1\n\t\t\t);\n\n\t\t\tforeach($do as $field)\n\t\t\t{\n\t\t\t\tif (isset($bits[\"$field\"]) && ($admin['phpkd_vblvb'] & $bits[\"$field\"]))\n\t\t\t\t{\n\t\t\t\t\t$return_value = true;\n\t\t\t\t\treturn array('return_value' => $return_value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function canHandleNestedTransaction(): bool;", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "function export_check_nest()\r\n{\r\n global $cur_entity, $cur_integration, $raw_line, $nest_is_this_it, $last_comment;\r\n $max_en = 20;\r\n\r\n if (!$nest_is_this_it)\r\n $nest_is_this_it = $cur_integration['name'];\r\n\r\n\r\n if (substr($raw_line, 0, 2) != \" \") {\r\n return false;\r\n //parse_error(\"check nest is confused -- should have an indent here. Maybe the yaml was flawed, maybe check nest called at wrong time\");\r\n }\r\n $temp_line = $raw_line;\r\n\r\n\r\n $cur_path = explode(\"/\", $nest_is_this_it);\r\n if ($cur_path[0] != $cur_integration['name']) {\r\n $nest_is_this_it = $cur_integration['name'];\r\n $cur_path = array($cur_integration['name']);\r\n }\r\n\r\n\r\n $cur_level = count($cur_path);\r\n $prev_nest_info = \"Prev Level: $cur_level prev path: '$nest_is_this_it'\";\r\n $total_indent = 0;\r\n\r\n list($level_count, $total_indent, $indent_string) = export_return_indent_size($temp_line);\r\n\r\n if (!strpos($temp_line, \":\"))\r\n $entity_name = \"\";\r\n else {\r\n\r\n $entity_name = str_replace(array(\" \", \"/\"), array(\"\", \"_\"), $temp_line);\r\n\r\n list($entity_name, $crap) = explode(\":\", $entity_name);\r\n\r\n if (strlen($entity_name) > $max_en)\r\n $entity_name = substr($entity_name, 0, $max_en);\r\n }\r\n\r\n while ($cur_level > $level_count) {\r\n //$raw_line .= \"\\n|removing \".$cur_path[$cur_level - 1].\"|\";\r\n unset($cur_path[$cur_level - 1]);\r\n $cur_level = count($cur_path);\r\n }\r\n if ($cur_level == $level_count) {\r\n //$raw_line .= \"\\n|swapping \".$cur_path[$cur_level - 1].\" for $entity_name ti:'$total_indent' is:'$indent_string' lc:$level_count|\";\r\n // the last cur path should equal entity_name, otherwise swap\r\n if ($cur_path[$cur_level - 1] != $entity_name) {\r\n $cur_path[$cur_level - 1] = $entity_name;\r\n }\r\n }\r\n if ($cur_level < $level_count) {\r\n if ($level_count > $cur_level + 1) {\r\n\r\n //parse_error(\"check nest got a problem here: We missed a level..\");\r\n }\r\n //$raw_line .= \"\\n|adding $entity_name|\";\r\n $cur_path[] = $entity_name;\r\n $cur_level = count($cur_path);\r\n }\r\n\r\n $nest_is_this_it = implode(\"/\", $cur_path);\r\n\r\n return;\r\n\r\n}", "public function hasModules(Expression $expr = null);", "public function isOpen() {\n $form = $this->Html->peek();\n return isset($form) and ($form instanceof Field or\n array_search($form->tag, array('form', 'select', 'optgroup')) !== false);\n }", "function isSectionEditable($sectionId){\r\n\t\t//sections no longer used\r\n\t\tif (in_array($sectionId, array (4,5))) {\r\n\t\t\t//HTML or PHP module, invalid module since that can be done in smarty templates now\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//disable featured levels 2-5 unless the addon is present\r\n\t\t$featuredLevels = array(13,14,15,16);\r\n\t\tif(in_array($sectionId, $featuredLevels) && !geoAddon::getInstance()->isEnabled('featured_levels')) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function verificarSiEsRecursivo($modeloPadre, $modelo_para_agregar)\n {\n if ($modelo_para_agregar->hijosModelos->isEmpty()) {\n //si entra es imposible que sea recursivo si no tiene hijos a que referenciar\n return false;\n }\n\n foreach ($modelo_para_agregar->hijosModelos as $key => $hijoModelo) {\n if ($hijoModelo->id == $modeloPadre->id) {\n return true;\n }\n }\n foreach ($modelo_para_agregar->hijosModelos as $key => $hijoModelo) {\n if ($this->verificarSiEsRecursivo($modeloPadre, $hijoModelo)) {\n return true;\n }\n }\n //si no tiene hijos pero ninguno de ellos contienen al modelo padre que le quiere agregar, entonces no es recursivo\n return false;\n }", "protected function needImport(): bool\n {\n $out = true;\n $this->structureCont = $this->structureApi->send();\n if ($structure = OpenDataStructure::find()->one()) {\n if ($structure->num_id == $this->structureCont->data['num_id']) {\n $out = false;\n }\n }\n return $out;\n }", "public function modify($nested=false) {\n $action = ($nested) ? 'modifyNested' : 'modify';\n if (isset($this->values[$this->object->primary])) {\n $primary = $this->object->primary;\n $idItem = (isset($this->values[$primary.'_oldId'])) ? $this->values[$primary.'_oldId'] : $this->values[$primary];\n $this->object = $this->object->readObject($idItem);\n }\n $formClass = $this->type.'_Form';\n $form = new $formClass($this->object->values, array(), $this->object);\n $form->addValues($this->values);\n $object = $this->object;\n $errors = $form->isValid();\n if (empty($errors)) {\n try {\n $object->modify($this->values);\n } catch (Exception $e) {\n $html = '<div class=\"message messageError\">\n '.str_replace('<pre>', '', $e->getMessage()).'\n </div>\n '.Form::createForm($form->createFormFields(false, $nested), array('action'=>url($this->type.'/'.$action.'/'.$this->id, true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminModify', 'nested'=>$nested));\n return array('success'=>'0', 'html'=>$html);\n }\n $multipleChoice = (count((array)$this->object->info->info->form->multipleActions) > 0) ? true : false;\n $html = $object->showUi('Admin', array('userType'=>$this->login->get('type'), 'multipleChoice'=>$multipleChoice, 'nested'=>$nested));\n return array('success'=>'1', 'id'=>$object->id(), 'html'=>$html);\n } else {\n $form = new $formClass($this->values, $errors);\n $html = Form::createForm($form->createFormFields(false, $nested), array('action'=>url($this->type.'/'.$action.'/'.$this->id, true), 'submit'=>__('save'), 'class'=>'formAdmin formAdminModify', 'nested'=>$nested));\n return array('success'=>'0', 'html'=>$html);\n }\n }", "public function hasConflicts() {\n if(!isset($this->hasConflicts)) {\n $repo = Repo::getById($this->repoId);\n $clone = $repo->getCloneRepo();\n $currentBranch = $clone->getActiveBranch();\n $conflicts = false;\n\n // First download the main repository references in the cloned repository\n $clone->fetch();\n\n // First update the two branches on the clone repository\n $clone->checkout($this->to);\n $clone->pull();\n\n $clone->fetch();\n $clone->checkout($this->from);\n $clone->pull();\n\n if($currentBranch !== $this->to) {\n $clone->checkout($this->to);\n }\n\n try {\n $clone->run('merge --no-commit --no-ff ' . $this->from);\n }\n catch(GitException $e) {\n $conflicts = true;\n }\n\n try {\n $clone->run('merge --abort');\n }\n catch(GitException $e) {}\n\n if($currentBranch !== $this->to) {\n $clone->checkout($currentBranch);\n }\n\n\n $this->hasConflicts = $conflicts;\n }\n\n return $this->hasConflicts;\n }", "protected function checkXdebugMaxNestingLevel() {}", "public function canUseAllOfAsAlternativeToExtends() {\n\t\t$loader = new DummySchemaLoader();\n\t\t$loader->a = '{\n\t\t\t\"type\":\"integer\",\n\t\t\t\"minimum\":3\n\t\t}';\n\t\t$loader->b = '{\n\t\t\t\"type\":\"number\",\n\t\t\t\"maximum\":4\n\t\t}';\n\t\t$loader->c = '{\n\t\t\t\"allOf\":[\n\t\t\t\t{\"$ref\":\"a\"},\n\t\t\t\t{\"$ref\":\"b\"}\n\t\t\t]\n\t\t}';\n\n\t\t$this->sut = new JSONSchemaBuilder($loader);\n\t\t$schema = $this->sut->build('c');\n\n\t\t$this->assertFalse($schema->validate('object'));\n\t\t$this->assertFalse($schema->validate(1.5));\n\t\t$this->assertFalse($schema->validate(TRUE));\n\t\t$this->assertFalse($schema->validate(new \\stdClass()));\n\t\t$this->assertFalse($schema->validate(array('a'=>123)));\n\t\t$this->assertFalse($schema->validate(NULL));\n\n\t\t$this->assertFalse($schema->validate(2));\n\t\t$this->assertTrue($schema->validate(3));\n\t\t$this->assertFalse($schema->validate(3.5));\n\t\t$this->assertTrue($schema->validate(4));\n\t\t$this->assertFalse($schema->validate(5));\n\t}", "protected function validaObligatorios() {\n $this->controlaValidezLista($this->armaArrayClavesListas());\n $retorno = true;\n $arrayFallos = array();\n $arrayClaves = array_keys($this->arrayObligatorios);\n foreach ($arrayClaves as $cpoOblig) {\n $atrib = $this->buscoAtributo($cpoOblig);\n if ($this->arrayObligatorios[$cpoOblig] == 0) {\n $arrayFallos[] = $atrib;\n $retorno = $arrayFallos;\n }\n }\n return $retorno;\n }", "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 }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function canModify($module_slug = null)\n {\n $module_slug = $module_slug == null ? $this->module_slug_name : $module_slug;\n $module_id = $this->getModuleId($module_slug);\n $where_array = array('role_id'=>$this->role_id,'module_id'=>$module_id);\n $permissions = Permission::select('can_modify')->where($where_array)->first();\n if(isset($permissions->can_modify) && $permissions->can_modify==1){\n return true;\n }else {\n return false;\n }\n }", "function group_membership_group_admin_permissions($hook, $type, $return, $params) {\n\n\t$entity = elgg_extract('entity', $params);\n\t$user = elgg_extract('user', $params);\n\n\tif (!$entity instanceof ElggGroup || !$user instanceof ElggUser || !$entity->isMember($user)) {\n\t\treturn;\n\t}\n\n\tif (check_entity_relationship($user->guid, 'group_admin', $entity->guid)) {\n\t\treturn true;\n\t}\n}", "private function canModify()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "public function accept_scope (Scope $scope) {\n\t\t\n\t\t// fields only accept structs and ivar blocks but the macro module will \n\t\t// apply fields scopes so we need to prevent them from processing here\n\t\t//return $scope->conforms_to(array(SCOPE_IVAR_BLOCK, SCOPE_RECORD, SCOPE_MACRO));\t\t\n\t\treturn ($scope->conforms_to(array(SCOPE_IVAR_BLOCK, SCOPE_RECORD)) || ($scope->is_within(array(SCOPE_IVAR_BLOCK, SCOPE_RECORD))));\n\t}", "public function initializeForCustomPermissions () {\n// if (($currentUser = $this->modx->getAuthenticatedUser()) && $currentUser->get('sudo')) { return true; }\n\n if ($this->getProperty('checkByRelatedObjects', false)) {\n $checkParents = $this->checkByRelatedObjects();\n if ($checkParents !== true) {\n return $checkParents;\n }\n }\n\n $ownerField = $this->defaultOwnerField;\n if (empty($ownerField) || !$ownerField) {\n $result = $this->checkCommonCustomPermissions();\n } else {\n $result = $this->checkCustomPermissionsByOwner();\n }\n\n return $result;\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "private function tokenIsImport()\n {\n return $this->isFullToken()\n && in_array($this->getTokenObject(), [T_INCLUDE, T_INCLUDE_ONCE, T_REQUIRE, T_REQUIRE_ONCE]);\n }", "public static function parse($globals){\n\t\t$scanner = $globals->curr_pkg->scanner;\n\t\t$r = self::e3($globals);\n\t\twhile( $scanner->sym === Symbol::$sym_or2 ){\n\t\t\t$scanner->readSym();\n\t\t\t$r = $r->booleanOr($globals->logger, $scanner->here(), self::e3($globals), \"or\");\n\t\t}\n\t\treturn $r;\n\t}", "private function getFormatStatusFromContent(){\n\t\t if(EducationalUtil::isRoleTypeTheme($this->roleType, $this->roleNamesObj)){\n\t\t\treturn true;\n\t\t }\n\t\t \n\t\t $contentArray = explode(FieldContentInAgenda::SPLIT_CHARACTER, $this->filedContent);\n\t\t \n\t\t if(EducationalUtil::isRoleTypeCC($this->roleType, $this->roleNamesObj)){\n\t\t\t$NUM_OF_PIECES_FOR_MEMBER_OLD = 5;\n\t\t\t$NUM_OF_PIECES_FOR_NON_MEMBER_OLD = 6;\n\t\t\tif(((count($contentArray) == $NUM_OF_PIECES_FOR_MEMBER_OLD) && ($contentArray[0] == FieldContentInAgenda::MEMBER_TAG)) ||\n\t\t\t ((count($contentArray) == $NUM_OF_PIECES_FOR_NON_MEMBER_OLD) && ($contentArray[0] == FieldContentInAgenda::NONE_MEMBER_TAG))){\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t } else {\n\t\t\t$NUM_OF_PIECES_FOR_MEMBER_OLD = 3;\n\t\t\t$NUM_OF_PIECES_FOR_NON_MEMBER_OLD = 4;\n\t\t\t\n\t\t\tif(((count($contentArray) == $NUM_OF_PIECES_FOR_MEMBER_OLD) && ($contentArray[0] == FieldContentInAgenda::MEMBER_TAG)) ||\n\t\t\t ((count($contentArray) == $NUM_OF_PIECES_FOR_NON_MEMBER_OLD) && ($contentArray[0] == FieldContentInAgenda::NONE_MEMBER_TAG))){\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t }\n\t }", "protected function hasAccessControl() {\n $field_definitions = \\Drupal::service('entity_field.manager')\n ->getFieldDefinitions($this->entityTypeId, $this->bundle);\n\n if (Og::isGroup($this->entityTypeId, $this->bundle)) {\n return isset($field_definitions[OgAccess::OG_ACCESS_FIELD]);\n }\n\n if (Og::isGroupContent($this->entityTypeId, $this->bundle)) {\n return isset($field_definitions[OgAccess::OG_ACCESS_CONTENT_FIELD]);\n }\n\n return FALSE;\n }", "public static function has_js_merge_tag( $form ){\n\n\t\t/***\n\t\t * Determines if javascript merge tags are supported. Defaults to false (not supported).\n\t\t *\n\t\t * @since 2.4\n\t\t *\n\t\t * @param bool $has_js_merge_tags Value to be filtered. Return true to add support for Javascript merge tags. Return false to disable it.\n\t\t * @param array $form The current Form Object\n\t\t */\n\t\t$has_js_merge_tags = gf_apply_filters( array( 'gform_has_js_merge_tag', $form['id'] ), false, $form );\n\t\treturn $has_js_merge_tags;\n\t}", "public function isMultiVar() {\n\t\treturn $this->_children !== null && $this->_parent === null;\n\t}" ]
[ "0.6935619", "0.5366825", "0.5365497", "0.5359097", "0.51166934", "0.5115001", "0.505053", "0.4888271", "0.48372728", "0.48295137", "0.4708239", "0.461563", "0.45601478", "0.45381725", "0.45031318", "0.44679478", "0.44479215", "0.4422452", "0.43839535", "0.43794093", "0.43533576", "0.4339371", "0.43210956", "0.4321032", "0.43179557", "0.4288986", "0.42872065", "0.42752004", "0.42722443", "0.4271735", "0.4267771", "0.4260565", "0.4256614", "0.42433083", "0.4241086", "0.4239488", "0.4220953", "0.42036387", "0.4202677", "0.4197138", "0.4193484", "0.41915113", "0.41882467", "0.41829696", "0.41796035", "0.4179432", "0.41787395", "0.41782427", "0.41766736", "0.416278", "0.41487342", "0.4148475", "0.41377065", "0.41366488", "0.41315264", "0.41301137", "0.4129458", "0.4125361", "0.41218063", "0.41205254", "0.4104699", "0.4101965", "0.4101326", "0.40983373", "0.40961906", "0.40956095", "0.40851632", "0.40799558", "0.40744886", "0.4070709", "0.4065697", "0.4062213", "0.40567085", "0.40535286", "0.40534398", "0.4043673", "0.40423745", "0.40376726", "0.40327677", "0.40292394", "0.40241465", "0.4009893", "0.400732", "0.4007147", "0.40013307", "0.40011036", "0.3992297", "0.3991705", "0.39909732", "0.39863592", "0.39846537", "0.3982811", "0.3978909", "0.3976468", "0.39762786", "0.3974088", "0.39722162", "0.39705732", "0.39704978", "0.3968371", "0.3964465" ]
0.0
-1
pops off nested mods
private function pop_mods() { array_pop($this->nmods); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "protected function resetNestedElementCalls() {}", "private function push_mods($mods) \n {\n if (!$mods) return;\n \n $skip = [];\n \n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (in_array($mod, $skip))\n continue;\n \n if (isset ($nmo[$mod->type])) {\n $skip[] = $mod;\n continue;\n }\n }\n }\n \n $marr = [];\n \n foreach ($mods as $mod)\n if (!in_array($mod, $skip))\n $marr[$mod->type] = $mod->loc;\n \n array_push($this->nmods, $marr);\n }", "protected function unsetHiddenModules() {}", "public function popContext() {\n\t\t// Count the number of contexts created\n\t\t$index = count($this->context);\n\n\t\tif ($index >= 2) {\n\t\t\t// Use context n-1 and clean the last context\n\t\t\t$this->tpl_vars = &$this->context[$index-2];\n\t\t\tunset($this->context[$index-1]);\n\t\t} else if ($index == 1) {\n\t\t\t// Actual context is #0, clean it\n\t\t\t$this->context[0] = array();\n\t\t}\n\t}", "function _del_p(&$ary)\n{\n foreach ($ary as $k => $v) {\n if ($k === '_p') {\n unset($ary[$k]);\n } elseif (is_array($ary[$k])) {\n _del_p($ary[$k]);\n }\n }\n}", "function _gallery2_adminapi_removememberhook($args)\n{\n // first check if the module has been configured\n if(!xarGallery2Helper::isConfigured()) {\n return $args['extrainfo'];\n }\n \n extract($args['extrainfo']);\n \n // we only accept roles module hook calls\n if (!isset($module) || $module != 'roles') {\n return $args['extrainfo'];\n }\n \n // we need both, the parent id (itemid) and the child id (uid)\n if (!isset($itemid) || !isset($uid)) {\n $msg = xarML('removemember hook call without group/user ids!');\n xarErrorSet(XAR_USER_EXCEPTION, 'BAD_PARAM', new DefaultUserException($msg));\n return $args['extrainfo'];\n }\n \n // Start G2 transaction\n if(!xarGallery2Helper::init()) {\n return $args['extrainfo'];\n }\n \n // if child is a group: remove all child users from \"groups to be removed\"\n // if child is a user: remove user from \"groups to be removed\"\n // \"groups to be removed\" = getAncestors of parent + parent - getAncestors of child \n \n // this is ridiculous, the role get function defaults to type =1 if none was specified\n $childRole = xarModAPIFunc('roles','user','get', array('uid' => $uid));\n if ( !isset($childRole['type']) || $childRole['uid'] != $uid) {\n $childRole = xarModAPIFunc('roles','user','get', array('uid' => $uid, 'type' => 1));\n }\n \n $xarChildUsers = array();\n if ($childRole['type'] == 1) { // it's a group\n $xarChildUsers = xarGallery2Helper::xarGetChildUsers($uid); // returns only users, no groups\n } else {\n $xarChildUsers[] = $childRole;\n }\n \n // Load the parent role\n list($parentRole, $xarParentGroups) = xarGallery2Helper::xarGetAncestors(array('uid' => $itemid)); // an ancestor is a group per se\n $xarParentGroups[] = $parentRole;\n \n $removeGroupsList = array();\n foreach ($xarParentGroups as $group) {\n $removeGroupsList[$group['uid']] = $group;\n }\n\n // don't remove users from the G2 all users group\n $defaultGroupData = xarModAPIFunc('roles','user','get'\n\t\t\t\t , array('name' => xarModGetVar('roles', 'defaultgroup'), 'type' => 1));\n \n foreach ($xarChildUsers as $child) {\n // first get the remaining memberships and delete the group in \n // $removeGroupsList that we still want to be member of\n $currentGroupsRemoveList = $removeGroupsList;\n list($thechildRole, $remainingGroups) = xarGallery2Helper::xarGetAncestors(array('uid' => $child['uid']));\n foreach ($remainingGroups as $remGroup) {\n $currentGroupsRemoveList[$remGroup['uid']] = null;\n }\n // Now remove the memberships\n foreach ($currentGroupsRemoveList as $groupId => $group) {\n if ($group == null) {\n\tcontinue; // still a member of this group\n }\n \n // don't remove user from G2 all user group\n if ($group['uid'] == $defaultGroupData['uid']) {\n\tcontinue;\n }\n\n // make sure the group already exists in G2, if not, add it (there are some\n // rare scenarios where the group doesn't exist in G2. i.e. if the group was \n // in deleted state in xaraya while we imported/exported the groups and now\n // this group is back, recalled. \n // other CMS shouldn't care i guess, just a strange and rare issue\n list($ret, $g2Group) = GalleryCoreApi::loadEntityByExternalId($group['uid'], 'GalleryGroup');\n if ($ret) {\n\tif ($ret->getErrorCode() & ERROR_MISSING_OBJECT) { \n\t // ok, we need to create this group first\n\t if (!xarGallery2Helper::g2createGroup($group['uid'], $group)) {\n\t return $args['extrainfo'];\n\t }\n\t} else { // a real error, damn\n\t $msg = xarML('Failed to fetch group for extId [#(1)] removeusertogroup synchronization! Here\n\t\t\t\t\t\t\tis the error message from G2: <br />', $group['uid'], $ret->getAsHtml());\n\t xarErrorSet(XAR_SYSTEM_EXCEPTION, 'FUNCTION_FAILED', new SystemException($msg));\n\t return $args['extrainfo'];\n\t}\n }\n\n // remove user from group\n $ret = GalleryEmbed::removeUserFromGroup($child['uid'], $group['uid']);\n if ($ret) {\n\t$msg = xarML('Failed to remove g2 user [#(1)] with extId [#(2)] from g2 group [#(3)]! Here is the\n\t\t\t\t\terror from G2: <br />', $child['uname'], $child['uid'], $group['name'], $ret->getAsHtml());\n\txarErrorSet(XAR_SYSTEM_EXCEPTION, 'FUNCTION_FAILED', new SystemException($msg));\n\treturn $args['extrainfo'];\n }\n }\n }\n \n // complete G2 transaction\n xarGallery2Helper::done();\n \n return $args['extrainfo'];\n}", "function remove_theme_mods()\n {\n }", "public function & arrayUnShift () {\n $getFunctionArguments = func_get_args ();\n foreach ($getFunctionArguments as $k => $v) {\n array_unshift ($this->varContainer, $v);\n }\n # Return to chain ...\n return $this->returnToChain ();\n }", "public function testRemove() {\n $data = $this->expanded;\n $match = $data;\n\n unset($match['boolean']);\n $data = Hash::remove($data, 'boolean');\n $this->assertEquals($match, $data);\n\n unset($match['one']['depth']);\n $data = Hash::remove($data, 'one.depth');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['depth']);\n $data = Hash::remove($data, 'one.two.depth');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['three']['depth'], $match['one']['two']['three']['zero'], $match['one']['two']['three']['null']);\n $data = Hash::remove($data, 'one.two.three.depth');\n $data = Hash::remove($data, 'one.two.three.zero');\n $data = Hash::remove($data, 'one.two.three.null');\n $this->assertEquals($match, $data);\n\n unset($match['one']['two']['three']['four']['five']['six']['seven']['key']);\n $data = Hash::remove($data, 'one.two.three.four.five.six.seven.key');\n $this->assertEquals($match, $data);\n\n foreach (array(true, false, null, 123, 'foo') as $type) {\n $data = Hash::remove($data, $type);\n $this->assertEquals($match, $data);\n }\n\n $data = Hash::remove($data, 'a.fake.path');\n $this->assertEquals($match, $data);\n }", "public function pop()\r\n\t{\r\n\t}", "function &getSubModules()\n{\n if(count($this->SubModules) == 0){\n $this->loadSubModules();\n }\n return $this->SubModules;\n}", "private function checkStacks() {\n\t\t\t$o = end($this->openStack);\n\t\t\t$c = end($this->closeStack);\n\n\t\t\t// if last item at open stack is equal with last item at close stack\n\t\t\t// then remove those items from stacks\n\t\t\tif(isset($this->openHooks[$o]) && $this->openHooks[$o] == $c) {\n\t\t\t\tarray_pop($this->openStack);\n\t\t\t\tarray_pop($this->closeStack);\n\t\t\t}\n\t\t}", "private function recursive_unset(&$object, $unwanted_key) {\n\t if(is_object($object)){\n\t\tunset($object->$unwanted_key);\n\t\tforeach ($object as &$value) {\n\t\t if (is_object($value) || is_array($value)) {\n\t\t\t$this->recursive_unset($value, $unwanted_key);\n\t\t }\n\t\t}\t \n\t }elseif(is_array($object)){\n\t\tunset($object[$unwanted_key]);\n\t\tforeach ($object as &$value) {\n\t\t if (is_array($value) || is_object($value)) {\n\t\t\t$this->recursive_unset($value, $unwanted_key);\n\t\t }\n\t\t}\n\t }\n\t}", "function _del_p(&$ary) {\n\t foreach ($ary as $k=>$v) {\n\t if ($k==='_p') unset($ary[$k]);\n\t elseif (is_array($ary[$k])) $this->_del_p($ary[$k]);\n\t }\n\t}", "function pluton_remove_actions() {\n\t$hooks = pluton_theme_hooks();\n\tforeach ( $hooks as $section => $array ) {\n\t\tif ( ! empty( $array['hooks'] ) && is_array( $array['hooks'] ) ) {\n\t\t\tforeach ( $array['hooks'] as $hook ) {\n\t\t\t\tremove_all_actions( $hook, false );\n\t\t\t}\n\t\t}\n\t}\n}", "public function modules($like=array(),$options=array()){\n\t\t$action = array_shift($like);\n\t\tif(isset($options['server'])){\n\t\t\t$server = $options['server'];\n\t\t}else{\n\t\t\t$server = 'nthalk.com';\n\t\t}\n\t\tif($action == 'uninstall'){\n\t\t\t$module = array_shift($like);\n\t\t\t$module_dir = Framework::moduleInstalled($module);\n\t\t\tif(!$module_dir){\n\t\t\t\t$this->write(\"Module does not appear to be installed: $module\\n\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->write(\"Uninstalling: $module\\n\");\n\t\t\t\n\t\t\t$this->write(\"Running uninstall scripts...\\n\");\n\t\t\tif(method_exists($module,'uninstall')){\n\t\t\t\tif(!call_user_func(array($module,'uninstall'))||isset($options['force'])){\n\t\t\t\t\t$this->write(\"Uninstaller failed... Please inspect $module::uninstall() before completely removing or supply --force\\n\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->write(\"Removing submodule from app/.git cache...\\n\");\n\t\t\t$cmd = 'git rm --cached ' . $module_dir;\n\t\t\t//$this->write($cmd . \"\\n\");\n\t\t\t$cmd_p = popen($cmd,'r');\n\t\t\t$this->write(fread($cmd_p,10000). \"\\n\");\n\t\t\t\n\t\t\t$dir = SERVER_APP_DIR;\n\t\t\t$git_submodules_file = $dir .'/.gitmodules';\n\t\t\tif(file_exists($git_submodules_file)){\n\t\t\t\t$git_submodules = file_get_contents($git_submodules_file);\n\t\t\t\t$match = \"/\\[submodule.*$module\\\"\\]\\s+path.*\\s+url.*\\s?/\";\n\t\t\t\tif(preg_match($match,$git_submodules)){\n\t\t\t\t\t$git_submodules_new = preg_replace($match,'',$git_submodules);\n\t\t\t\t\t$git_submodules_new = preg_replace(\"/\\n+/\",\"\\n\",$git_submodules_new );\n\t\t\t\t\t$this->write(\"Removing submodule from submodules...\\n\");\n\t\t\t\t\t//$this->write($git_submodules_new . \"\\n\");\n\t\t\t\t\tfile_put_contents($git_submodules_file,$git_submodules_new);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$git_conf_file = $dir . '/.git/config';\n\t\t\tif(file_exists($git_conf_file)){\n\t\t\t\t$git_conf = file_get_contents($git_conf_file);\n\t\t\t\t$match = \"/\\[submodule.*$module\\\"\\](\\s+path.*|\\s+url.*)+?\\s?/\";\n\t\t\t\tif(preg_match($match,$git_conf)){\n\t\t\t\t\t$git_conf_new = preg_replace($match,'',$git_conf);\n\t\t\t\t\t$git_conf_new = preg_replace(\"/\\n+/\",\"\\n\",$git_conf_new);\n\t\t\t\t\t$this->write(\"Removing submodule from config...\\n\");\n\t\t\t\t\t//$this->write($git_conf_new . \"\\n\");\n\t\t\t\t\tfile_put_contents($git_conf_file,$git_conf_new);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->write(\"Removing submodule from file system...\\n\");\n\t\t\t$cmd = 'rm -rf ' . $module_dir;\n\t\t\t//$this->write($cmd . \"\\n\");\n\t\t\t$cmd_p = popen($cmd,'r');\n\t\t\t$this->write(fread($cmd_p,10000). \"\\n\");\n\t\t\t\n\t\t\t$this->write(\"Done. It is up to you to commit this change into your app repo...\\n\");\n\t\t\t\n\t\t}else if($action == 'list'){\n\t\t\t$this->write(\"Currently installed modules:\\n\\n\");\n\t\t\tforeach(Framework::moduleList(array_shift($like)) as $module){\n\t\t\t\t$this->write(\n\t\t\t\t\t' ' . $module . ' -' .$this->getDocumentation(new ReflectionClass($module))\n\t\t\t\t);\n\t\t\t}\n\t\t\t$this->write(\"\\n\");\n\t\t}else if($action =='list-remote'){\n\t\t\t$content = file_get_contents(\"http://$server/Packages\");\n\t\t\t$packages = json_decode($content);\n\t\t\tif(!is_array($packages)){\n\t\t\t\t$this->write('Error retrieving data from module server: '.$server.\"\\n\");\n\t\t\t}else{\n\t\t\t\tforeach($packages as $package){\n\t\t\t\t\t$this->write($package->name . \" - \" . $package->version . \"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else if($action =='install'){\n\t\t\tif(realpath(getcwd()) !== SERVER_APP_DIR){\n\t\t\t\t$this->write(\"fatal: You must install modules from the root of your app dir ( \".SERVER_APP_DIR.\" )\\n\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$content = file_get_contents(\"http://$server/Packages\");\n\t\t\t$packages = json_decode($content);\n\t\t\tif(!is_array($packages)){\n\t\t\t\t$this->write('Error retrieving data from module server: '.$server.\"\\n\");\n\t\t\t\texit -1;\n\t\t\t}else{\n\t\t\t\t$what = array_shift($like);\n\t\t\t}\n\t\t\tforeach($packages as $package){\n\t\t\t\tif($package->name == $what){\n\t\t\t\t\t// Define the dir\n\t\t\t\t\t$dir = SERVER_EXT_DIR;\n\t\t\t\t\tif(!file_exists($dir)){\n\t\t\t\t\t\t$dir_parts = explode('/',$dir);\n\t\t\t\t\t\t$curr_dir = '';\n\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t$curr_dir .= '/' . array_shift($dir_parts);\n\t\t\t\t\t\t\tif(!file_exists($curr_dir)){\n\t\t\t\t\t\t\t\tmkdir($curr_dir);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}while(!file_exists($dir));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If app is git repo\n\t\t\t\t\t$app_is_git = file_exists(SERVER_APP_DIR.'/.git');\n\t\t\t\t\t// Install directory\n\t\t\t\t\t$dir .= '/modules/';\n\t\t\t\t\tif(!file_exists($dir)){\n\t\t\t\t\t\tmkdir($dir);\n\t\t\t\t\t}\n\t\t\t\t\t$dir .= $package->name;\n\t\t\t\t\t$dir = substr($dir,strlen(SERVER_APP_DIR)+1);\n\t\t\t\t\tif(isset($options['as-git-submodule'])){\n\t\t\t\t\t\tif(!$app_is_git){\n\t\t\t\t\t\t\t$this->write('fatal: app is not a git repo. Please run `git init` within '.SERVER_APP_DIR.\"\\n\");\n\t\t\t\t\t\t\texit -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cmd = 'git submodule add ' . $package->git_url . ' ' .$dir;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$cmd = 'git clone --depth 0 ' . $package->git_url . ' ' . $dir;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->write(\"Retrieving package $what...\\t\");\n\t\t\t\t\t$this->write(\"\\ncmd: $cmd\\n\");\n\t\t\t\t\t\n\t\t\t\t\tif(shell_exec($cmd)){\n\t\t\t\t\t\tif(!isset($options['as-git-repo'])&&!isset($options['as-git-submodule'])){\n\t\t\t\t\t\t\tif (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {\n\t\t\t\t\t\t exec( \"rd /s $dir/.git\" );\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \tif(!$app_is_git){\n\t\t\t\t\t\t\t\t\t$this->write('warning: app is not a git repo. Installing modules this way may pollute the framework and prevent you from having your application as a standalone repository. Please run `git init` within app to avoid this warning.'.\"\\n\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t exec( \"rm -rf $dir/.git\" );\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->write(\"[Success]\\n\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If the module has a configuration function, run that on install\n\t\t\t\t\t\tif(method_exists($what,'setup')){\n\t\t\t\t\t\t\tcall_user_func_array(array($what,'setup'),array($this->out_stream,$this->in_stream));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->write(\"Package installed!\\n\");\n\t\t\t\t\t\texit;\n\t\t\t\t\t}else{\n\t\t\t\t\t\texit -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->write('Package: ' . json_encode($what) . ' not found.' . \"\\n\");\n\t\t}else{\n\t\t\t$this->write(\"Usage: nth action [ARGS] [[--option=setting]]\\n\\n\");\n\t\t\t$this->write($this->getDocumentation(new ReflectionMethod($this,__FUNCTION__),true));\n\t\t}\n\t}", "function remove_from_parent()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n if ($this->plugins[$name]->initially_was_account) {\n if (isset($this->plugins[$name]->krb_host_key) && $this->plugins[$name]->krb_host_key instanceof krbHostKeys) {\n $this->plugins[$name]->krb_host_key->remove_from_parent_by_prefix($this->plugins[$name]->krb_service_prefix);\n }\n $this->plugins[$name]->remove_from_parent();\n }\n }\n }", "function recursiveLockUnlock($lock_id,$action) {\n\t\t$query=\"SELECT vers_id, vers_comp_id, vers_type FROM (SELECT *, MAX(vers_repo_vers) FROM(SELECT * FROM versions WHERE vers_parent=\".$lock_id.\" ORDER BY vers_repo_vers DESC) AS c GROUP BY c.vers_comp_id ORDER BY vers_type, vers_name) AS a WHERE a.vers_type='file' OR a.vers_type='dir'\";\n\t\t$result=mysql_query($query) or die(mysql_error());\n\t\t$temp=lock_convert($result);\n\t\t$len=sizeof($temp);\n\t\tfor($i=0; $i<$len; $i++) {\n\t\t\tif($temp[$i][\"vers_type\"]==\"file\") {\n\t\t\t\t$query=\"SELECT vers_id FROM versions WHERE vers_comp_id=\".$temp[$i][\"vers_comp_id\"].\" AND vers_type='file'\";\n\t\t\t\t$result=mysql_query($query) or die(mysql_error());\n\t\t\t\t$arr=lock_convert($result);\n\t\t\t\t$len2=sizeof($arr);\n\t\t\t\tfor($j=0; $j<$len2; $j++) {\n\t\t\t\t\tif(!$j) {\n\t\t\t\t\t\tlockUnlock($arr[$j][\"vers_id\"],$action,true);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlockUnlock($arr[$j][\"vers_id\"],$action,false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlockUnlockDir($temp[$i][\"vers_id\"],$action);\n\t\t\t\trecursiveLockUnlock($temp[$i][\"vers_id\"],$action);\n\t\t\t}\n\t\t}\n\t}", "public function removeNested($name)\n {\n if(array_key_exists($name, $this->_nested)) {\n unset($this->_nested[$name]);\n }\n }", "function coder_upgrade_cache_info_hooks($item, $recursive = TRUE) {\n// cdp(\"inside \" . __FUNCTION__);\n global $_coder_upgrade_module_name, $upgrade_theme_registry, $upgrade_menu_registry;\n static $ignore = array('.', '..', 'CVS', '.svn');\n static $extensions = array('module', 'inc');\n\n $dirname = $item['old_dir'];\n\n // Determine module name.\n coder_upgrade_module_name($dirname, $item);\n $_coder_upgrade_module_name = $item['module'] ? $item['module'] : $_coder_upgrade_module_name;\n\n // Find hook_theme for this module and cache its result.\n $filenames = scandir($dirname . '/');\n foreach ($filenames as $filename) {\n if (!in_array($filename, $ignore)) {\n if (is_dir($dirname . '/' . $filename)) {\n if ($recursive) {\n // TODO Fix this!!!\n $new_item = array(\n 'name' => $item['name'],\n 'old_dir' => $dirname . '/' . $filename,\n );\n coder_upgrade_cache_info_hooks($new_item, $recursive);\n // Reset the module name.\n $_coder_upgrade_module_name = $item['module'];\n }\n }\n elseif (in_array(pathinfo($filename, PATHINFO_EXTENSION), $extensions)) {\n $cur = file_get_contents($dirname . '/' . $filename);\n // Create reader object.\n $reader = PGPReader::getInstance();\n $reader->setSnippet($cur);\n $reader->addTokenNames();\n $reader->buildGrammar();\n\n $functions = $reader->getFunctions();\n foreach ($functions as $function) {\n// cdp(\"name = {$function->data->name}\");\n if ($function->data->name == $_coder_upgrade_module_name . '_theme') {\n $module_theme = eval($function->data->body->toString());\n foreach ($module_theme as $key => &$value) {\n $value['variables'] = isset($value['arguments']) ? $value['arguments'] : array();\n unset($value['arguments']);\n// $module_theme[$key] = $value;\n }\n $upgrade_theme_registry = array_merge($upgrade_theme_registry, $module_theme);\n// break 2;\n }\n elseif ($function->data->name == $_coder_upgrade_module_name . '_menu') {\n coder_upgrade_convert_return($function->data->body, 'menu', '', 1, 1);\n// break 2;\n }\n }\n // Free up memory.\n $reader->reset();\n pgp_log_memory_use('reset reader');\n }\n }\n }\n}", "function _recursiveMoveMenuItem($result)\n\t{\n\t\t$i = 0;\n\t\twhile(count($result->child))\n\t\t{\n\t\t\tunset($node);\n\t\t\t$node = array_shift($result->child);\n\n\t\t\t$this->moveMenuItem($this->menuSrl, $node->parent_node, $i, $node->node, 'move');\n\t\t\t$this->_recursiveMoveMenuItem($node);\n\t\t\t$i = $node->node;\n\t\t}\n\t}", "function xh_finalModules()\r\n\t{\r\n\t}", "function undo_op(log_op_move $log, tree $t): tree {\n $GLOBALS['undo_call_cnt'] ++; // for stats, not part of algo \n\n if(is_null($log->oldp)) {\n $t->rm_child($log->child_id);\n } else {\n $t->rm_child($log->child_id);\n\n $oldp = $log->oldp;\n $t->add_node($log->child_id, new tree_node($oldp->parent_id, $oldp->meta));\n }\n\n return $t;\n}", "public function popCurrentModule()\n {\n return array_pop($this->_modulesContext);\n }", "public function post_get_mod_orphan() {\n global $wp_query;\n \n $mod['id'] = isset( $wp_query->queried_object_id ) ? $wp_query->queried_object_id : '';\n $mod['obj'] = CsQuery::Cs_Get_Post_Custom( $mod['id'] );\n return $mod;\n }", "public function pop()\n {\n \n }", "function pop_no_keep_context()\n{\n global $HAS_NO_KEEP_CONTEXT, $NO_KEEP_CONTEXT_STACK;\n $HAS_NO_KEEP_CONTEXT = array_pop($NO_KEEP_CONTEXT_STACK);\n}", "public function unshiftNode( $node );", "function tab_restore_mods($mod,$restore) {\r\n\r\n global $CFG;\r\n\r\n $status = true;\r\n\r\n //Get record from backup_ids\r\n $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);\r\n\r\n if ($data) {\r\n //Now get completed xmlized object\r\n $info = $data->info;\r\n //traverse_xmlize($info); //Debug\r\n //print_object ($GLOBALS['traverse_array']); //Debug\r\n //$GLOBALS['traverse_array']=\"\"; //Debug\r\n \r\n //Now, build the tab record structure\r\n $tab->course = $restore->course_id;\r\n $tab->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);\r\n $tab->tab1 = backup_todb($info['MOD']['#']['TAB1']['0']['#']);\r\n\t\t\t$tab->tab2 = backup_todb($info['MOD']['#']['TAB2']['0']['#']);\r\n\t\t\t$tab->tab3 = backup_todb($info['MOD']['#']['TAB3']['0']['#']);\r\n\t\t\t$tab->tab4 = backup_todb($info['MOD']['#']['TAB4']['0']['#']);\r\n\t\t\t$tab->tab5 = backup_todb($info['MOD']['#']['TAB5']['0']['#']);\r\n\t\t\t$tab->tab6 = backup_todb($info['MOD']['#']['TAB6']['0']['#']);\r\n\t\t\t$tab->tab7 = backup_todb($info['MOD']['#']['TAB7']['0']['#']);\r\n\t\t\t$tab->tab8 = backup_todb($info['MOD']['#']['TAB8']['0']['#']);\r\n\t\t\t$tab->tab9 = backup_todb($info['MOD']['#']['TAB9']['0']['#']);\r\n\t\t\t$tab->tab0 = backup_todb($info['MOD']['#']['TAB0']['0']['#']);\r\n\t\t\t$tab->tab1content = backup_todb($info['MOD']['#']['TAB1CONTENT']['0']['#']);\r\n\t\t\t$tab->tab2content = backup_todb($info['MOD']['#']['TAB2CONTENT']['0']['#']);\r\n\t\t\t$tab->tab3content = backup_todb($info['MOD']['#']['TAB3CONTENT']['0']['#']);\r\n\t\t\t$tab->tab4content = backup_todb($info['MOD']['#']['TAB4CONTENT']['0']['#']);\r\n\t\t\t$tab->tab5content = backup_todb($info['MOD']['#']['TAB5CONTENT']['0']['#']);\r\n\t\t\t$tab->tab6content = backup_todb($info['MOD']['#']['TAB6CONTENT']['0']['#']);\r\n\t\t\t$tab->tab7content = backup_todb($info['MOD']['#']['TAB7CONTENT']['0']['#']);\r\n\t\t\t$tab->tab8content = backup_todb($info['MOD']['#']['TAB8CONTENT']['0']['#']);\r\n\t\t\t$tab->tab9content = backup_todb($info['MOD']['#']['TAB9CONTENT']['0']['#']);\r\n\t\t\t$tab->tab0content = backup_todb($info['MOD']['#']['TAB0CONTENT']['0']['#']);\r\n\t\t\t$tab->css = backup_todb($info['MOD']['#']['CSS']['0']['#']);\r\n\t\t\t$tab->menucss = backup_todb($info['MOD']['#']['MENUCSS']['0']['#']);\r\n\t\t\t$tab->displaymenu = backup_todb($info['MOD']['#']['DISPLAYMENU']['0']['#']);\r\n\t\t\t$tab->menuname = backup_todb($info['MOD']['#']['MENUNAME']['0']['#']);\r\n $tab->timemodified = $info['MOD']['#']['TIMEMODIFIED']['0']['#'];\r\n \r\n //The structure is equal to the db, so insert the tab\r\n $newid = insert_record (\"tab\",$tab);\r\n\r\n //Do some output \r\n if (!defined('RESTORE_SILENTLY')) {\r\n echo \"<li>\".get_string(\"modulename\",\"tab\").\" \\\"\".format_string(stripslashes($tab->name),true).\"\\\"</li>\";\r\n }\r\n backup_flush(300);\r\n\r\n if ($newid) {\r\n //We have the newid, update backup_ids\r\n backup_putid($restore->backup_unique_code,$mod->modtype,\r\n $mod->id, $newid);\r\n \r\n } else {\r\n $status = false;\r\n }\r\n } else {\r\n $status = false;\r\n }\r\n\r\n return $status;\r\n }", "function pinimp_remove_capability($capability)\n{\n // this function remove the $capability only from the classic roles\n $check_order = array(\"subscriber\", \"contributor\", \"author\", \"editor\", \"administrator\");\n\n foreach ($check_order as $role) {\n $role = get_role($role);\n $role->remove_cap($capability);\n }\n\n}", "function wp_restore_group_inner_container($block_content, $block)\n {\n }", "function _drush_pm_uninstall($args) {\n $extension_info = drush_get_extensions();\n\n // classify $args in themes, modules or unknown.\n $modules = array();\n $themes = array();\n drush_pm_classify_extensions($args, $modules, $themes, $extension_info);\n $extensions = array_merge($modules, $themes);\n $unknown = array_diff($args, $extensions);\n\n // Discard and set an error for each unknown extension.\n foreach ($unknown as $name) {\n drush_log('DRUSH_PM_DISABLE_EXTENSION_NOT_FOUND', dt('!extension was not found and will not be uninstalled.', array('!extension' => $name)), 'warning');\n }\n\n // Discard extensions that are not installed.\n foreach ($extensions as $name) {\n if (!$extension_info[$name]->status && $extension_info[$name]->type == 'theme') {\n unset($themes[$name]);\n drush_log(dt('!extension is not installed.', array('!extension' => $name)), 'ok');\n }\n }\n\n // Discard default theme.\n if (!empty($themes)) {\n $default_theme = drush_theme_get_default();\n if (in_array($default_theme, $themes)) {\n unset($themes[$default_theme]);\n drush_log(dt('!theme is the default theme and can\\'t be disabled.', array('!theme' => $default_theme)), 'ok');\n }\n }\n\n if (!empty($modules)) {\n // Add enabled dependents to the list of modules to uninstall.\n $dependents = drush_module_dependents($modules, $extension_info);\n $dependents = array_intersect($dependents, drush_module_list());\n $modules = array_merge($modules, $dependents);\n\n // Discard required modules.\n $required = drush_drupal_required_modules($extension_info);\n foreach ($required as $module) {\n if (isset($modules[$module])) {\n unset($modules[$module]);\n $info = $extension_info[$module]->info;\n // No message for hidden modules.\n if (!isset($info['hidden'])) {\n $explanation = !empty($info['explanation']) ? ' ' . dt('Reason: !explanation', array('!explanation' => strip_tags($info['explanation']))) : '';\n drush_log(dt('!module is a required module and can\\'t be uninstalled.', array('!module' => $module)) . $explanation, 'ok');\n }\n }\n }\n }\n\n // Inform the user which extensions will finally be uninstalled.\n $extensions = array_merge($modules, $themes);\n if (empty($extensions)) {\n return drush_log(dt('There were no extensions that could be uninstall.'), 'ok');\n }\n else {\n drush_print(dt('The following extensions will be uninstalled: !extensions', array('!extensions' => implode(', ', $extensions))));\n if(!drush_confirm(dt('Do you really want to continue?'))) {\n return drush_user_abort();\n }\n }\n\n // Disable themes.\n if (!empty($themes)) {\n drush_theme_disable($themes);\n }\n\n // Uninstall modules and pass dependency validation in form submit.\n if (!empty($modules)) {\n drush_module_uninstall($modules);\n }\n\n // Inform the user of final status.\n $result_extensions = drush_get_named_extensions_list($extensions);\n $problem_extensions = array();\n foreach ($result_extensions as $name => $extension) {\n if (!$extension->status) {\n drush_log(dt('!extension was uninstalled successfully.', array('!extension' => $extension->name)), 'ok');\n }\n else {\n $problem_extensions[] = $extension->name;\n }\n }\n if (!empty($problem_extensions)) {\n return drush_set_error('DRUSH_PM_UNINSTALL_EXTENSION_ISSUE', dt('There was a problem uninstalling !extension.', array('!extension' => implode(',', $problem_extensions))));\n }\n}", "public function testGetMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function pop_entry()\n {\n $args = func_get_args();\n return call_user_func_array(array( &$this, 'popEntry' ), $args);\n }", "function pop()\n\t{\n\t\tglobal $argv;\n\t\treturn array_shift($argv);\n\t}", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "function gencwooc_gsm_theme_mod( $mods ) {\n\n\t/** Post meta key as per GSM 0.1.4 */\n\t$field_name = '_gsm_menu';\n\n\t$shop_id = woocommerce_get_page_id( 'shop' );\n\n\tif ( is_post_type_archive( 'product' ) && $_menu = get_post_meta( $shop_id, $field_name, true ) )\n\t\t$mods['secondary'] = (int) $_menu;\n\n\treturn $mods;\n\n}", "public function moduleList($opt=array()){\n\n\t$core = @$this->fsFolder(APP.'/module', '', 'NOROOT_FLAT');\n\t$user = @$this->fsFolder(USER.'/module', '', 'NOROOT_FLAT');\n\n\t$core = is_array($core) ? $core : array();\n\t$user = is_array($user) ? $user : array();\n\t$mods = array_merge($core, $user);\n\tksort($mods);\n\n\tforeach($mods as $mod){\n\n\t\t$core\t= (strpos($mod, \"/user/module\") === false) ? true : false;\n\t\t$mod\t= basename($mod);\n\t\t$module = $this->moduleData($mod, $core);\n\n\t\tif(is_array($module)){\n\t\t\tif($module['hidden'] != 'YES' OR $opt['all']){\n\t\t\t\tif($opt['profile']){\n\t\t\t\t\tif($this->userCan($module['key'].'.index')) $out[$module['name']] = $module;\n\t\t\t\t}else{\n\t\t\t\t\t$out[$module['name']]\t= $module;\n\t\t\t\t\t$pkg[$module['key']]\t= $module;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tksort($out); ksort($pkg);\n\n\tif($opt['dependencies']){\n\t\tforeach($pkg as $key => $mod){\n\t\t\tif(is_array($mod['dependencies']) && sizeof($mod['dependencies']) > 0){\n\t\t\t\tforeach($mod['dependencies'] as $i => $dep){\n\t\t\t\t\tif(array_key_exists($dep, $pkg)){\n\t\t\t\t\t\t$pkg[$key]['dependencies'][$dep] = $pkg[$dep];\n\t\t\t\t\t\t$un[] = $dep;\n\t\t\t\t\t\t\n\t\t\t\t\t#\t$this->pre('@'.$dep, $un);\n\n\t\t\t\t\t\tunset($pkg[$key]['dependencies'][$i]);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tksort($mod['dependencies']);\n\t\t\t}\n\t\t}\n\n\t\tif(sizeof($un) > 0){\n\t\t#\t$this->pre($un, $pkg);\n\t\t\tforeach($un as $unk){\n\t\t\t\tunset($pkg[$unk]);\n\t\t\t}\n\t\t}\n\n\t\treturn $pkg;\n\t}\n\n\t#$this->pre($un);\n\n\n\treturn $out;\n}", "public function __clone()\n\t{\n\t\t$this->children=[];\n\t}", "function cleanMenuStructure(array &$array)\n{\n for ($i = count($array)-1; $i >= 0; $i--) {\n if (isset($array[$i][\"children\"])) {\n cleanMenuStructure($array[$i][\"children\"]);\n }\n\n if (trim($array[$i][\"name\"]) === \"\" && trim($array[$i][\"target\"]) === \"\") {\n unset($array[$i]);\n }\n }\n}", "protected function popd() {\n $dir = array_pop($this->pwd_stack);\n if (!empty($dir)) {\n chdir($dir);\n }\n }", "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 }", "function loadSubModules()\n{\n $debug_prefix = debug_indent(\"Module->loadSubModules() {$this->ModuleID}:\");\n $submodule_elements = $this->_map->selectChildrenOfFirst('SubModules', null, null, true, true);\n if(count($submodule_elements) > 0){\n foreach($submodule_elements as $submodule_element){\n $submodule = $submodule_element->createObject($this->ModuleID);\n $subModuleID = $submodule_element->getAttr('moduleID', true);\n $this->SubModules[$subModuleID] = $submodule;\n print \"$debug_prefix Submodule $subModuleID parsed.\\n\";\n unset($submodule);\n }\n\n //special for best practices: add the IsBestPractice SummaryField\n if(isset($this->SubModules['bpc'])){\n $this->useBestPractices = true;\n $recordIDField = end($this->PKFields);\n\n $field_object = MakeObject(\n $this->ModuleID,\n 'IsBestPractice',\n 'SummaryField',\n array(\n 'name' => 'IsBestPractice',\n 'type' => 'tinyint',\n 'summaryFunction' => 'count',\n 'summaryField' => 'BestPracticeID',\n 'summaryKey' => 'RelatedRecordID',\n 'summaryModuleID' => 'bpc',\n 'localKey' => $recordIDField,\n 'phrase' => 'Is Best Practice|Whether the associated record is a best practice'\n )\n );\n//print \"best practice auto field\";\n//print_r($field_object);\n//die();\n $this->ModuleFields['IsBestPractice'] = $field_object;\n }\n\n //copies submodule conditions to summary fields\n foreach($this->ModuleFields as $fieldName => $field){\n if('summaryfield' == strtolower(get_class($field))){\n if(!$field->isGlobal){\n\n if(isset($this->SubModules[$field->summaryModuleID])){\n $subModule =& $this->SubModules[$field->summaryModuleID];\n if(count($subModule->conditions) > 0){\n //$field->conditions = $subModule->conditions;\n $field->conditions = array_merge($subModule->conditions, (array)$field->conditions);\n $this->ModuleFields[$fieldName] = $field;\n }\n unset($subModule);\n } else {\n trigger_error(\"The summaryfield '{$field->name}' requires a '{$field->summaryModuleID}' submodule.\", E_USER_ERROR);\n }\n }\n }\n }\n }\n debug_unindent();\n}", "function clear_subtags()\n {\n $numtags = sizeof($this->tags);\n $keys = array_keys( $this->tags );\n foreach( $keys as $k ) {\n $this->tags[$k]->clear_subtags();\n unset($this->tags[$k]->parent);\n }\n\n # Clear the tags array\n $this->tags = array();\n unset( $this->curtag );\n }", "public function clearModules();", "function wooninja_remove_items() {\n $remove = array( \n 'wc-reports', \n 'wc-addons',\n //'wc-settings',\n //'wc-status',\n 'edit.php?post_type=shop_coupon',\n //'edit.php?post_type=shop_order'\n );\n foreach ( $remove as $submenu_slug ) {\n remove_submenu_page( 'woocommerce', $submenu_slug );\n }\n}", "function offsetUnset(/*. mixed .*/ $object_){}", "public function remove_all_the_metaboxes() {\n\n global $wp_meta_boxes;\n\n // This is the post type you want to target. Adjust it to match yours.\n $post_type = 'envira';\n\n // These are the metabox IDs you want to pass over. They don't have to match exactly. preg_match will be run on them.\n $pass_over_defaults = array( 'submitdiv', 'envira' );\n $pass_over = apply_filters( 'envira_gallery_metabox_ids', $pass_over_defaults );\n\n // All the metabox contexts you want to check.\n $contexts_defaults = array( 'normal', 'advanced', 'side' );\n $contexts = apply_filters( 'envira_gallery_metabox_contexts', $contexts_defaults );\n\n // All the priorities you want to check.\n $priorities_defaults = array( 'high', 'core', 'default', 'low' );\n $priorities = apply_filters( 'envira_gallery_metabox_priorities', $priorities_defaults );\n\n // Loop through and target each context.\n foreach ( $contexts as $context ) {\n // Now loop through each priority and start the purging process.\n foreach ( $priorities as $priority ) {\n if ( isset( $wp_meta_boxes[$post_type][$context][$priority] ) ) {\n foreach ( (array) $wp_meta_boxes[$post_type][$context][$priority] as $id => $metabox_data ) {\n // If the metabox ID to pass over matches the ID given, remove it from the array and continue.\n if ( in_array( $id, $pass_over ) ) {\n unset( $pass_over[$id] );\n continue;\n }\n\n // Otherwise, loop through the pass_over IDs and if we have a match, continue.\n foreach ( $pass_over as $to_pass ) {\n if ( preg_match( '#^' . $id . '#i', $to_pass ) ) {\n continue;\n }\n }\n\n // If we reach this point, remove the metabox completely.\n unset( $wp_meta_boxes[$post_type][$context][$priority][$id] );\n }\n }\n }\n }\n\n }", "function bt_remove_order_notes( $fields ) {\n unset($fields['order']['order_comments']);\n return $fields;\n}", "public function pop();", "public function pop();", "public function pop();", "public function pop();", "public function pop();", "public function pop();", "public function pop();", "public function pop();", "function end_lvl( &$output, $depth = 0, $args = array() ) {}", "function end_lvl( &$output, $depth = 0, $args = array() ) {}", "function yy_pop_parser_stack()\n {\n if (!count($this->yystack)) {\n return;\n }\n $yytos = array_pop($this->yystack);\n if (self::$yyTraceFILE && $this->yyidx >= 0) {\n fwrite(self::$yyTraceFILE,\n self::$yyTracePrompt . 'Popping ' . self::$yyTokenName[$yytos->major] .\n \"\\n\");\n }\n $yymajor = $yytos->major;\n self::yy_destructor($yymajor, $yytos->minor);\n $this->yyidx--;\n return $yymajor;\n }", "function &getSubModule($moduleID)\n{\n if( isset($this->SubModules[$moduleID]) ){\n return $this->SubModules[$moduleID];\n } else {\n $submodule_elements = $this->_map->selectChildrenOfFirst('SubModules', null, null);\n if(count($submodule_elements) > 0){\n foreach($submodule_elements as $submodule_element){\n if($submodule_element->getAttr('moduleID', true) == $moduleID){\n $submodule =& $submodule_element->createObject($this->ModuleID);\n break;\n }\n }\n }\n if(empty($submodule)){\n return false;\n } else {\n return $submodule;\n }\n }\n}", "function hestia_child_get_parent_options() {\r\n\t\t$hestia_mods = get_option( 'theme_mods_hestia-pro' );\r\n\t\t\tif ( ! empty( $hestia_mods ) ) {\r\n\t\t\t\t\t\tforeach ( $hestia_mods as $hestia_mod_k => $hestia_mod_v ) {\r\n\t\t\t\t\t\t\t\t\t\tset_theme_mod( $hestia_mod_k, $hestia_mod_v );\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n}", "function remove_metaboxes(){\n // remove_meta_box( 'tagsdiv-keywords', 'ticket', 'side' );\n remove_meta_box( 'versiondiv', 'ticket', 'side' );\n remove_meta_box( 'milestonediv', 'ticket', 'side' );\n remove_meta_box( 'componentdiv', 'ticket', 'side' );\n remove_meta_box( 'prioritydiv', 'ticket', 'side' );\n remove_meta_box( 'severitydiv', 'ticket', 'side' );\n remove_meta_box( 'ticket_typediv', 'ticket', 'side' );\n remove_meta_box( 'resolutiondiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n //remove_meta_box( 'severitydiv', 'ticket', 'side' );\n }", "private function popNode()\r\n {\r\n $this->currentNode = $this->currentNode->parentNode;\r\n }", "function getMultilevel() {\n\t\t}", "function lib4ridora_ingest_selector_form_undo_submit(array $form, array &$form_state) {\n $association_step_storage = &islandora_ingest_form_get_step_storage($form_state, 'xml_form_builder_association_step');\n unset($association_step_storage['association']);\n $object = islandora_ingest_form_get_object($form_state);\n if (isset($object[\"MODS\"])) {\n unset($object[\"MODS\"]);\n }\n}", "function book_ctools_block_info($module, $delta, &$info) {\n // do with context.\n $info = NULL;\n}", "public function ajaxProcessremoveModuleHook(){\n $result = array();\n $hookname = Tools::getValue('hookname');\n $id_option = (int)Tools::getValue('id_option');\n $option = new Options($id_option);\n $hookexec_name = Tools::getValue('hookexec_name');\n $module_name = Tools::getValue('module_name');\n if ($option && Validate::isLoadedObject($option) && $module_name && Validate::isModuleName($module_name) && $hookname && Validate::isHookName($hookname) && $hookexec_name && Validate::isHookName($hookexec_name)){\n $HookedModulesArr = OvicLayoutControl::getModulesHook($option->theme,$option->alias, $hookname);\n $HookedModulesArr = Tools::jsonDecode($HookedModulesArr['modules'],true);\n $HookedModulesArr = array_values($HookedModulesArr);\n $moduleHook = array();\n $moduleHook[] = $module_name;\n $moduleHook[] = $hookexec_name;\n if ($HookedModulesArr && is_array($HookedModulesArr) && sizeof($HookedModulesArr)){\n $key = array_search($moduleHook,$HookedModulesArr);\n unset($HookedModulesArr[$key]);\n }\n $HookedModulesArr = array_values($HookedModulesArr);\n $result['status'] = OvicLayoutControl::registerHookModule($option, $hookname, Tools::jsonEncode($HookedModulesArr),$this->context->shop->id);\n $result['msg'] = $this->l('Successful deletion');\n //$this->displayError\n }\n Tools::clearCache();\n die(Tools::jsonEncode($result));\n }", "function lgm_theme_remove_tags_menu() {\n\t global $submenu;\n\t unset($submenu['edit.php'][16]);\n\t}", "function packRemoveObject2Tag($Depth)\n\t{\n\t\tarray_push($this->FMDebug, \"packRemoveObject2Tag\");\n\n\t\t$TagID = 28;\n\n\t\t$Depth = $this->packUI16($Depth);\n\n\t\t$TagLength = strlen($Depth);\n\t\n\t\t$this->MovieData .= $this->packRECORDHEADER($TagID, $TagLength) . $Depth;\n\n\t\tarray_pop($this->FMDebug);\n\t}", "function yy_pop_parser_stack()\r\n {\r\n if (!count($this->yystack)) {\r\n return;\r\n }\r\n $yytos = array_pop($this->yystack);\r\n if (self::$yyTraceFILE && $this->yyidx >= 0) {\r\n fwrite(self::$yyTraceFILE,\r\n self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .\r\n \"\\n\");\r\n }\r\n $yymajor = $yytos->major;\r\n self::yy_destructor($yymajor, $yytos->minor);\r\n $this->yyidx--;\r\n return $yymajor;\r\n }", "function lesson_pages_restore_mods($lessonid,$info,$restore,$userdata=false) {\n\n global $CFG;\n\n $status = true;\n\n //Get the lesson_elements array\n $pages = $info['MOD']['#']['PAGES']['0']['#']['PAGE'];\n\n //Iterate over lesson pages (they are held in their logical order)\n $prevpageid = 0;\n for($i = 0; $i < sizeof($pages); $i++) {\n $page_info = $pages[$i];\n //traverse_xmlize($ele_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //We'll need this later!!\n $oldid = backup_todb($page_info['#']['PAGEID']['0']['#']);\n\n //Now, build the lesson_pages record structure\n $page->lessonid = $lessonid;\n $page->prevpageid = $prevpageid;\n $page->qtype = backup_todb($page_info['#']['QTYPE']['0']['#']);\n $page->qoption = backup_todb($page_info['#']['QOPTION']['0']['#']);\n $page->layout = backup_todb($page_info['#']['LAYOUT']['0']['#']);\n $page->display = backup_todb($page_info['#']['DISPLAY']['0']['#']);\n $page->timecreated = backup_todb($page_info['#']['TIMECREATED']['0']['#']);\n $page->timemodified = backup_todb($page_info['#']['TIMEMODIFIED']['0']['#']);\n $page->title = backup_todb($page_info['#']['TITLE']['0']['#']);\n $page->contents = backup_todb($page_info['#']['CONTENTS']['0']['#']);\n\n //The structure is equal to the db, so insert the lesson_pages\n $newid = insert_record (\"lesson_pages\",$page);\n\n //Fix the forwards link of the previous page\n if ($prevpageid) {\n if (!set_field(\"lesson_pages\", \"nextpageid\", $newid, \"id\", $prevpageid)) {\n error(\"Lesson restorelib: unable to update link\");\n }\n }\n $prevpageid = $newid;\n\n //Do some output\n if (($i+1) % 10 == 0) {\n if (!defined('RESTORE_SILENTLY')) {\n echo \".\";\n if (($i+1) % 200 == 0) {\n echo \"<br/>\";\n }\n }\n backup_flush(300);\n }\n\n if ($newid) {\n //We have the newid, update backup_ids (restore logs will use it!!)\n backup_putid($restore->backup_unique_code,\"lesson_pages\", $oldid, $newid);\n //We have to restore the lesson_answers table now (a page level table)\n $status = lesson_answers_restore($lessonid,$newid,$page_info,$restore,$userdata);\n \n //Need to update useranswer field (which has answer id's in it)\n //for matching and multi-answer multi-choice questions\n if ($userdata) { // first check to see if we even have to do this\n // if multi-answer multi-choice question or matching\n if (($page->qtype == 3 && $page->qoption) ||\n $page->qtype == 5) {\n // get all the attempt records for this page\n if ($attempts = get_records(\"lesson_attempts\", \"pageid\", $newid)) {\n foreach ($attempts as $attempt) {\n unset($newuseranswer);\n if ($attempt->useranswer != NULL) {\n // explode the user answer. Each element in\n // $useranswer is an old answer id, so needs to be updated\n $useranswer = explode(\",\", $attempt->useranswer);\n foreach ($useranswer as $oldanswerid) {\n $backupdata = backup_getid($restore->backup_unique_code,\"lesson_answers\",$oldanswerid);\n $newuseranswer[] = $backupdata->new_id;\n }\n // get the useranswer in the right format\n $attempt->useranswer = implode(\",\", $newuseranswer);\n // update it\n update_record(\"lesson_attempts\", $attempt);\n }\n }\n }\n }\n } \n \n // backup branch table info for branch tables.\n if ($status && $userdata) {\n if (!lesson_branch_restore($lessonid,$newid,$page_info,$restore)) {\n return false;\n }\n }\n } else {\n $status = false;\n }\n }\n\n //We've restored all the pages and answers, we now need to fix the jumps in the\n //answer records if they are absolute\n if ($answers = get_records(\"lesson_answers\", \"lessonid\", $lessonid)) {\n foreach ($answers as $answer) {\n if ($answer->jumpto > 0) {\n // change the absolute page id\n $page = backup_getid($restore->backup_unique_code,\"lesson_pages\",$answer->jumpto);\n if ($page) {\n if (!set_field(\"lesson_answers\", \"jumpto\", $page->new_id, \"id\", $answer->id)) {\n error(\"Lesson restorelib: unable to reset jump\");\n }\n }\n }\n }\n }\n return $status;\n }", "function mktree_ops(array &$ops, replica $r, $parent_id, $depth=2, $max_depth=12) {\n if($depth > $max_depth) {\n return;\n }\n for($i=0; $i < 2; $i++) {\n $name = sprintf( \"%s\", $i == 0 ? 'a' : 'b' );\n $ops[] = new op_move($r->tick(), $parent_id, $name, $child_id = new_id());\n mktree_ops($ops, $r, $child_id, $depth+1, $max_depth);\n }\n}", "function remove_theme_mod($name)\n {\n }", "public function __clone() {\n $this->actions = clone $this->actions;\n $this->actions->setRoot($this->getRoot());\n $this->conditions = clone $this->conditions;\n $this->conditions->setRoot($this->getRoot());\n }", "function tac_remove_menus() {\n\tglobal $menu;\n\t$restricted = array( __( 'Links' ),__( 'Comments' ) );\n\tend( $menu );\n\twhile ( prev( $menu ) ) {\n\t\t$value = explode( ' ', $menu[ key( $menu ) ] [0] );\n\t\tif ( in_array( $value[0] !== null?$value[0] : '' , $restricted ) ) {\n\t\t\tunset( $menu[ key( $menu ) ] );\n\t\t}\n\t}\n}", "public function liftUp();", "function lesson_restore_mods($mod,$restore) {\n\n global $CFG;\n\n $status = true;\n\n //Get record from backup_ids\n $data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);\n\n if ($data) {\n //Now get completed xmlized object\n $info = $data->info;\n //if necessary, write to restorelog and adjust date/time fields\n if ($restore->course_startdateoffset) {\n restore_log_date_changes('Lesson', $restore, $info['MOD']['#'], array('AVAILABLE', 'DEADLINE'));\n }\n //traverse_xmlize($info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //Now, build the lesson record structure\n $lesson->course = $restore->course_id;\n $lesson->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);\n $lesson->practice = backup_todb($info['MOD']['#']['PRACTICE']['0']['#']);\n $lesson->modattempts = backup_todb($info['MOD']['#']['MODATTEMPTS']['0']['#']);\n $lesson->usepassword = backup_todb($info['MOD']['#']['USEPASSWORD']['0']['#']);\n $lesson->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']); \n $lesson->dependency = isset($info['MOD']['#']['DEPENDENCY']['0']['#'])?backup_todb($info['MOD']['#']['DEPENDENCY']['0']['#']):'';\n $lesson->conditions = isset($info['MOD']['#']['CONDITIONS']['0']['#'])?backup_todb($info['MOD']['#']['CONDITIONS']['0']['#']):'';\n $lesson->grade = backup_todb($info['MOD']['#']['GRADE']['0']['#']);\n $lesson->custom = backup_todb($info['MOD']['#']['CUSTOM']['0']['#']);\n $lesson->ongoing = backup_todb($info['MOD']['#']['ONGOING']['0']['#']);\n $lesson->usemaxgrade = backup_todb($info['MOD']['#']['USEMAXGRADE']['0']['#']);\n $lesson->maxanswers = backup_todb($info['MOD']['#']['MAXANSWERS']['0']['#']);\n $lesson->maxattempts = backup_todb($info['MOD']['#']['MAXATTEMPTS']['0']['#']);\n $lesson->review = backup_todb($info['MOD']['#']['REVIEW']['0']['#']);\n $lesson->nextpagedefault = backup_todb($info['MOD']['#']['NEXTPAGEDEFAULT']['0']['#']);\n $lesson->feedback = isset($info['MOD']['#']['FEEDBACK']['0']['#'])?backup_todb($info['MOD']['#']['FEEDBACK']['0']['#']):'';\n $lesson->minquestions = backup_todb($info['MOD']['#']['MINQUESTIONS']['0']['#']);\n $lesson->maxpages = backup_todb($info['MOD']['#']['MAXPAGES']['0']['#']);\n $lesson->timed = backup_todb($info['MOD']['#']['TIMED']['0']['#']);\n $lesson->maxtime = backup_todb($info['MOD']['#']['MAXTIME']['0']['#']);\n $lesson->retake = backup_todb($info['MOD']['#']['RETAKE']['0']['#']);\n $lesson->activitylink = isset($info['MOD']['#']['ACTIVITYLINK']['0']['#'])?backup_todb($info['MOD']['#']['ACTIVITYLINK']['0']['#']):'';\n $lesson->mediafile = isset($info['MOD']['#']['MEDIAFILE']['0']['#'])?backup_todb($info['MOD']['#']['MEDIAFILE']['0']['#']):'';\n $lesson->mediaheight = isset($info['MOD']['#']['MEDIAHEIGHT']['0']['#'])?backup_todb($info['MOD']['#']['MEDIAHEIGHT']['0']['#']):'';\n $lesson->mediawidth = isset($info['MOD']['#']['MEDIAWIDTH']['0']['#'])?backup_todb($info['MOD']['#']['MEDIAWIDTH']['0']['#']):'';\n $lesson->mediaclose = isset($info['MOD']['#']['MEDIACLOSE']['0']['#'])?backup_todb($info['MOD']['#']['MEDIACLOSE']['0']['#']):'';\n $lesson->slideshow = backup_todb($info['MOD']['#']['SLIDESHOW']['0']['#']);\n $lesson->width = backup_todb($info['MOD']['#']['WIDTH']['0']['#']);\n $lesson->height = backup_todb($info['MOD']['#']['HEIGHT']['0']['#']);\n $lesson->bgcolor = backup_todb($info['MOD']['#']['BGCOLOR']['0']['#']);\n $lesson->displayleft = isset($info['MOD']['#']['DISPLAYLEFT']['0']['#'])?backup_todb($info['MOD']['#']['DISPLAYLEFT']['0']['#']):'';\n $lesson->displayleftif = isset($info['MOD']['#']['DISPLAYLEFTIF']['0']['#'])?backup_todb($info['MOD']['#']['DISPLAYLEFTIF']['0']['#']):'';\n $lesson->progressbar = isset($info['MOD']['#']['PROGRESSBAR']['0']['#'])?backup_todb($info['MOD']['#']['PROGRESSBAR']['0']['#']):'';\n $lesson->highscores = backup_todb($info['MOD']['#']['SHOWHIGHSCORES']['0']['#']);\n $lesson->maxhighscores = backup_todb($info['MOD']['#']['MAXHIGHSCORES']['0']['#']);\n $lesson->available = backup_todb($info['MOD']['#']['AVAILABLE']['0']['#']);\n $lesson->deadline = backup_todb($info['MOD']['#']['DEADLINE']['0']['#']);\n $lesson->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);\n\n //The structure is equal to the db, so insert the lesson\n $newid = insert_record(\"lesson\", $lesson);\n\n //Do some output\n if (!defined('RESTORE_SILENTLY')) {\n echo \"<li>\".get_string(\"modulename\",\"lesson\").\" \\\"\".format_string(stripslashes($lesson->name),true).\"\\\"</li>\";\n }\n backup_flush(300);\n\n if ($newid) {\n //We have the newid, update backup_ids\n backup_putid($restore->backup_unique_code,$mod->modtype,\n $mod->id, $newid);\n //We have to restore the lesson pages which are held in their logical order...\n $userdata = restore_userdata_selected($restore,\"lesson\",$mod->id);\n $status = lesson_pages_restore_mods($newid,$info,$restore,$userdata);\n //...and the user grades, high scores, and timer (if required)\n if ($status) {\n if ($userdata) {\n if(!lesson_grades_restore_mods($newid,$info,$restore)) {\n return false;\n }\n if (!lesson_high_scores_restore_mods($newid,$info,$restore)) {\n return false;\n }\n if (!lesson_timer_restore_mods($newid,$info,$restore)) {\n return false;\n }\n }\n // restore the default for the course. Only do this once by checking for an id for lesson_default\n $lessondefault = backup_getid($restore->backup_unique_code,'lesson_default',$restore->course_id);\n if (!$lessondefault) {\n $status = lesson_default_restore_mods($info,$restore);\n }\n \n }\n } else {\n $status = false;\n }\n } else {\n $status = false;\n }\n return $status;\n }", "public function popNodeFromStack() {}", "function variant_mod($left, $right) {}", "public function popNode();", "function role_unassign($roleid=0, $userid=0, $groupid=0, $contextid=0, $enrol=NULL) {\n\n global $USER, $CFG;\n\n $success = true;\n\n $args = array('roleid', 'userid', 'groupid', 'contextid');\n $select = array();\n foreach ($args as $arg) {\n if ($$arg) {\n $select[] = $arg.' = '.$$arg;\n }\n }\n if (!empty($enrol)) {\n $select[] = \"enrol='$enrol'\";\n }\n\n if ($select) {\n if ($ras = get_records_select('role_assignments', implode(' AND ', $select))) {\n $mods = get_list_of_plugins('mod');\n foreach($ras as $ra) {\n /// infinite loop protection when deleting recursively\n if (!$ra = get_record('role_assignments', 'id', $ra->id)) {\n continue;\n }\n $success = delete_records('role_assignments', 'id', $ra->id) and $success;\n\n /// If the user is the current user, then reload the capabilities too.\n if (!empty($USER->id) && $USER->id == $ra->userid) {\n load_all_capabilities();\n }\n $context = get_record('context', 'id', $ra->contextid);\n\n /// Ask all the modules if anything needs to be done for this user\n foreach ($mods as $mod) {\n include_once($CFG->dirroot.'/mod/'.$mod.'/lib.php');\n $functionname = $mod.'_role_unassign';\n if (function_exists($functionname)) {\n $functionname($ra->userid, $context); // watch out, $context might be NULL if something goes wrong\n }\n }\n\n /// now handle metacourse role unassigment and removing from goups if in course context\n if (!empty($context) and $context->contextlevel == CONTEXT_COURSE) {\n\n // cleanup leftover course groups/subscriptions etc when user has \n // no capability to view course\n // this may be slow, but this is the proper way of doing it\n if (!has_capability('moodle/course:view', $context, $ra->userid)) {\n // remove from groups\n if ($groups = get_groups($context->instanceid, $ra->userid)) {\n foreach ($groups as $group) {\n delete_records('groups_members', 'groupid', $group->id, 'userid', $ra->userid);\n }\n }\n\n // delete lastaccess records\n delete_records('user_lastaccess', 'userid', $ra->userid, 'courseid', $context->instanceid);\n }\n\n //unassign roles in metacourses if needed\n if ($parents = get_records('course_meta', 'child_course', $context->instanceid)) {\n foreach ($parents as $parent) {\n sync_metacourse($parent->parent_course);\n }\n }\n }\n }\n }\n }\n\n return $success;\n}", "public function stackNodeComponents()\r\n\t{\r\n\t\t$em = $this->getManager();\r\n\t\t$doctrine = $this->getDoctrine();\r\n\t\t$repository = $doctrine->getRepository('DebbConfigBundle:Node');\r\n\t\tforeach($repository->findAll() as $node)\r\n\t\t{\r\n\t\t\t$components = $node->getComponents();\r\n\t\t\t/* count the amount from same types */\r\n\t\t\t$nComponents = array();\r\n\t\t\tforeach($components as $component)\r\n\t\t\t{\r\n\t\t\t\tif($component->getActive() == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(array_key_exists($component->getType() . '.' . $component->getActive()->getId(), $nComponents))\r\n\t\t\t\t{\r\n\t\t\t\t\t$nComponents[$component->getType() . '.' . $component->getActive()->getId()] += $component->getAmount();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$nComponents[$component->getType() . '.' . $component->getActive()->getId()] = $component->getAmount();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t/* loop the components and remove double components */\r\n\t\t\t$newComponentArray = array();\r\n\t\t\tforeach($nComponents as $key => $amount)\r\n\t\t\t{\r\n\t\t\t\t$cache = explode('.', $key);\r\n\t\t\t\t$type = $cache[0];\r\n\t\t\t\t$activeId = $cache[1];\r\n\r\n\t\t\t\t$first = true;\r\n\t\t\t\tforeach($components as $compKey => $component)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($component->getActive() == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif($component->getType() == $type && $component->getActive()->getId() == $activeId)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif($first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$first = false;\r\n\t\t\t\t\t\t\t$component->setAmount($amount);\r\n\t\t\t\t\t\t\t$newComponentArray[] = $component;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$em->remove($component);\r\n\t\t\t\t\t\t}\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$em->flush();\r\n\t}", "public function shiftNode();", "private function _uninstallSubextensions($parent)\n\t{\n\t\tjimport('joomla.installer.installer');\n\n\t\t$db = JFactory::getDBO();\n\n\t\t$status = new JObject();\n\t\t$status->modules = array();\n\t\t$status->plugins = array();\n\n\t\t$src = $parent->getParent()->getPath('source');\n\n\t\t// Modules uninstallation\n\t\tif(count($this->uninstall_queue['modules'])) {\n\t\t\tforeach($this->uninstall_queue['modules'] as $folder => $modules) {\n\t\t\t\tif(count($modules)) foreach($modules as $module => $modulePreferences) {\n\t\t\t\t\t// Find the module ID\n\t\t\t\t\t$sql = $db->getQuery(true)\n\t\t\t\t\t\t->select($db->qn('extension_id'))\n\t\t\t\t\t\t->from($db->qn('#__extensions'))\n\t\t\t\t\t\t->where($db->qn('element').' = '.$db->q('mod_'.$module))\n\t\t\t\t\t\t->where($db->qn('type').' = '.$db->q('module'));\n\t\t\t\t\t$db->setQuery($sql);\n\t\t\t\t\t$id = $db->loadResult();\n\t\t\t\t\t// Uninstall the module\n\t\t\t\t\tif($id) {\n\t\t\t\t\t\t$installer = new JInstaller;\n\t\t\t\t\t\t$result = $installer->uninstall('module',$id,1);\n\t\t\t\t\t\t$status->modules[] = array(\n\t\t\t\t\t\t\t'name'=>'mod_'.$module,\n\t\t\t\t\t\t\t'client'=>$folder,\n\t\t\t\t\t\t\t'result'=>$result\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Plugins uninstallation\n\t\tif(count($this->uninstall_queue['plugins'])) {\n\t\t\tforeach($this->uninstall_queue['plugins'] as $folder => $plugins) {\n\t\t\t\tif(count($plugins)) foreach($plugins as $plugin => $published) {\n\t\t\t\t\t$sql = $db->getQuery(true)\n\t\t\t\t\t\t->select($db->qn('extension_id'))\n\t\t\t\t\t\t->from($db->qn('#__extensions'))\n\t\t\t\t\t\t->where($db->qn('type').' = '.$db->q('plugin'))\n\t\t\t\t\t\t->where($db->qn('element').' = '.$db->q($plugin))\n\t\t\t\t\t\t->where($db->qn('folder').' = '.$db->q($folder));\n\t\t\t\t\t$db->setQuery($sql);\n\n\t\t\t\t\t$id = $db->loadResult();\n\t\t\t\t\tif($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$installer = new JInstaller;\n\t\t\t\t\t\t$result = $installer->uninstall('plugin',$id);\n\t\t\t\t\t\t$status->plugins[] = array(\n\t\t\t\t\t\t\t'name'=>'plg_'.$plugin,\n\t\t\t\t\t\t\t'group'=>$folder,\n\t\t\t\t\t\t\t'result'=>$result\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}", "function recursivelyRemoveFromList($lists,$badkey)\n\t{\n\t\t//print_r($lists);\n\t\t//echo \"</pre>\";\n\t\t\n\t\tfor($x=0;$x<count($lists);$x++)\n\t\t{\n\t\t\tif($lists[$x][$badkey] != null)\n\t\t\t{\n\t\t\t\t//if this side has an entry for the bad key...\n\t\t\t\t//remove the bad key entry\n\t\t\t\tunset($lists[$x][$badkey]);\n\t\t\t\techo \"calling destroyParentByKey for first time, $keys[$x]$badkey, listside is $x<br/>\";\n\t\t\t\t$lists[$x] = destroyParentByKey($lists[$x],$badkey);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//echo \"lists after removing '$badkey':<pre>\";\n\t\t//print_r($lists);\n\t\t//echo \"</pre>\";\n\t\t\n\t\t//exit();\n\t\t\n\t\treturn $lists;\n\t}", "public function popAllUtilities() {\n $currentUtilities = $this->adsUtilities;\n $this->adsUtilities = array();\n return $currentUtilities;\n }", "function jetpackme_remove_rp() {\n\tif ( class_exists( 'Jetpack_relatedPosts')) {\n\t\t$jprp = Jetpack_relatedPosts::init();\n\t\t$callback = array ( $jprp, 'filter_add_target_to_dom' );\n\t\tremove_filter( 'the_content', $callback, 40);\n\t}\n}", "public function reset()\r\n\t{\r\n\t\t$this->first = null;\r\n\t\t$this->alreadyIncluded = array();\r\n\t\t$this->depths = array();\r\n\t}", "private function reload()\n {\n $p = 0;\n for ($i = self::N - self::M; $i--; ++$p) {\n $m = $this->state['mt'][$p + self::M];\n $u = $this->state['mt'][$p];\n $v = $this->state['mt'][$p + 1];\n $this->state['mt'][$p] = ($m ^ ((($u & 0x80000000) | ($v & 0x7fffffff)) >> 1) ^ (-($u & 0x00000001) & 0x9908b0df));\n }\n for ($i = self::M; --$i; ++$p) {\n $m = $this->state['mt'][$p + self::M - self::N];\n $u = $this->state['mt'][$p];\n $v = $this->state['mt'][$p + 1];\n $this->state['mt'][$p] = ($m ^ ((($u & 0x80000000) | ($v & 0x7fffffff)) >> 1) ^ (-($u & 0x00000001) & 0x9908b0df));\n }\n $m = $this->state['mt'][$p + self::M - self::N];\n $u = $this->state['mt'][$p];\n $v = $this->state['mt'][0];\n $this->state['mt'][$p] = ($m ^ ((($u & 0x80000000) | ($v & 0x7fffffff)) >> 1) ^ (-($u & 0x00000001) & 0x9908b0df));\n\n $this->state['left'] = self::N;\n $this->state['next'] = 0;\n }", "public function __clone()\n {\n unset( $this->_original['_tapioca'] );\n }", "function remove_permastruct($name)\n {\n }", "function endElement($parser)\n\t{\n\t\t$this_element=array_peek($this->tag_stack);\n\t\tif (strpos($this_element,':')!==false)\n\t\t{\n\t\t\t$bits=explode(':',$this_element);\n\t\t\t$this_element=$bits[1];\n\t\t}\n\n\t\t$child_tempcode=array_pop($this->tempcode_stack);\n\t\t$parent_special_child_elements=array_pop($this->special_child_elements_stack);\n\t\tlist($tempcode,$aggregate)=$this->convertFinalisedElement($parser,$child_tempcode,$parent_special_child_elements);\n\n\t\tarray_pop($this->attribute_stack);\n\t\tarray_pop($this->tag_stack);\n\n\t\tif ($aggregate)\n\t\t{\n\t\t\t$parent_tempcode=array_pop($this->tempcode_stack);\n\t\t\t$parent_tempcode->attach($tempcode);\n\t\t\tarray_push($this->tempcode_stack,$parent_tempcode);\n\t\t}\n\n\t\tif (!array_key_exists($this_element,$parent_special_child_elements)) $parent_special_child_elements[$this_element]=array();\n\t\t$parent_special_child_elements[$this_element][]=$tempcode;\n\t\tarray_push($this->special_child_elements_stack,$parent_special_child_elements);\n\t}", "function end_lvl( &$output, $depth = 0, $args = array() ) { //phpcs:ignore\n\t\t\t$GLOBALS['comment_depth'] = $depth + 1; //phpcs:ignore\n\t\t\t?>\n\n\t\t\t</ul><!-- /.children -->\n\n\t\t\t<?php\n\t\t}", "function yy_r68()\n {\n $this->_retvalue = $this->compiler->compileTag('Internal_Modifier', array(), array('value' => $this->yystack[$this->yyidx + - 1]->minor, 'modifier_list' => $this->yystack[$this->yyidx + 0]->minor));\n }", "public static function remove_self() {\n\t\tglobal $I2_SQL;\n\t\t$tjstarid = $I2_SQL->query('SELECT boxid FROM intrabox WHERE name=\"tjstar\";')->fetch_single_value();\n\t\t$users = $I2_SQL->query('SELECT uid FROM intrabox_map WHERE boxid=%d;', $tjstarid)->fetch_all_arrays(Result::ASSOC);\n\t\tforeach ($users as $user) {\n\t\t\t$order = $I2_SQL->query('SELECT box_order FROM intrabox_map WHERE boxid=%d AND uid=%d;', $tjstarid, $user['uid'])->fetch_single_value();\n\t\t\t$I2_SQL->query('DELETE FROM intrabox_map WHERE uid=%d AND boxid=%d;', $user['uid'], $tjstarid);\n\t\t\t$I2_SQL->query('UPDATE intrabox_map SET box_order=box_order-1 WHERE uid=%d AND box_order>%d;', $user['uid'], $order);\n\t\t}\n\t\t$I2_SQL->query('DELETE FROM intrabox WHERE name=\"tjstar\";');\n\t\t\n\t}", "public function removeFindThisAnywhere()\n\t{\n\t\tif(isset($this->masterArray[$this->ref_wildCard]))\n\t\t{\n\t\t\tunset($this->masterArray[$this->ref_wildCard]);\n\t\t}\n\t}", "function tmpModuleLeft() {\n if(function_exists('appModuleLeft')) {\n $continue=appModuleLeft();\n if(!$continue) return;\n }\n \n //echo \"<br/>\";\n if (!LoggedIn()) return;\n\n // Only display menu if \n if(OptionGet('MENULEFT','Y')=='Y') { \n $module=SessionGet(\"AGMENU_MODULE\");\n $AGMENU=SessionGet(\"AGMENU\");\n $kount=0;\n \n if(isset($AGMENU[$module])) {\n $desc=$AGMENU[$module]['description'];\n \n echo \"<div class=\\\"moduletable\\\"><h3>$desc</h3></div>\";\n echo \"<table width=\\\"100%\\\">\";\n foreach($AGMENU[$module]['items'] as $key=>$info) {\n $hExtra=' tabindex=\"'.hpTabIndexNext(100).'\"';\n // We may make the first item the focused item if nothing else\n // has been picked yet. This code runs when rendering is going on\n // and the class-specific biz code has all run already, so it will\n // not override any business-specific focus setting\n if(vgfGet('HTML_focus')=='') {\n $hExtra.=' ID=\"FIRSTSPLITMENU\" NAME=\"FIRSTSPLITMENU\" ';\n vgfSet('HTML_focus','FIRSTSPLITMENU');\n }\n \n $kount++;\n $d='?gp_page='.$key;\n $h=hLink(\"mainlevel\",$info['description'],$d,$hExtra);\n echo \"\\n<tr><td class=\\\"leftcol\\\">$h</td></tr>\";\n \n // Possibly two more links \n if(ArraySafe($info,'linknew')=='Y') {\n $hx=' tabindex=\"'.hpTabIndexNext(100).'\" style=\"margin-left:30px\"';\n $h=hLink(\"mainlevel\",'New',$d.'&gp_mode=ins',$hx);\n echo \"\\n<tr><td class=\\\"leftcol\\\">$h</td></tr>\";\n }\n if(ArraySafe($info,'linksearch')=='Y') {\n $hx=' tabindex=\"'.hpTabIndexNext(100).'\" style=\"margin-left:30px\"';\n $h=hLink(\"mainlevel\",'Search',$d.'&gp_mode=search',$hx);\n echo \"\\n<tr><td class=\\\"leftcol\\\">$h</td></tr>\";\n }\n }\n echo \"</table>\";\n }\n }\n //while ($kount++ < 30) { echo \"<br>\"; }\n}", "public function end_lvl(&$output, $depth=0, $args=array()){}" ]
[ "0.54058236", "0.5280488", "0.50870544", "0.5004442", "0.48704857", "0.48507556", "0.48277876", "0.47754657", "0.4772254", "0.4744985", "0.4714142", "0.47010183", "0.4693923", "0.46936768", "0.46694234", "0.46484742", "0.46434817", "0.463465", "0.46233124", "0.46045268", "0.4597661", "0.45811936", "0.4572748", "0.45541096", "0.45390424", "0.45228285", "0.45081967", "0.45008484", "0.448228", "0.44754493", "0.4472136", "0.44657046", "0.44642234", "0.4462541", "0.44614577", "0.44509283", "0.44488257", "0.44390047", "0.4438576", "0.44313926", "0.4419897", "0.44194433", "0.44189185", "0.44087958", "0.44085407", "0.43764406", "0.43742603", "0.43681175", "0.43676552", "0.43643862", "0.43621778", "0.43621778", "0.43621778", "0.43621778", "0.43621778", "0.43621778", "0.43621778", "0.43621778", "0.43438393", "0.43438393", "0.43360952", "0.43350524", "0.43331036", "0.43319342", "0.4331331", "0.43285355", "0.43278226", "0.4325252", "0.43221936", "0.4316431", "0.43162566", "0.43088922", "0.43076393", "0.4306731", "0.43055293", "0.4304977", "0.42990598", "0.42982772", "0.42967308", "0.42908907", "0.42791328", "0.4277673", "0.42757836", "0.42713386", "0.42712104", "0.4265423", "0.4261112", "0.42606172", "0.42596048", "0.42580053", "0.42469403", "0.4238011", "0.42349732", "0.4231286", "0.4229589", "0.42295846", "0.42262182", "0.42224947", "0.42224443", "0.42212635" ]
0.6652544
0
checks if modifier is set
private function has_extern_mod($mods) { if (!$mods) return false; foreach ($mods as $mod) if ($mod->type === T_EXTERN || $mod->type === T_NATIVE) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function modifier($modifiers, $overwrite = false);", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6808254", "0.6620051", "0.64306134", "0.6209378", "0.602689", "0.59699136", "0.59650046", "0.59650046", "0.59650046", "0.59650046", "0.58731395", "0.5726979", "0.5694137", "0.55240077", "0.5494135", "0.5475493", "0.5427277", "0.5381709", "0.53693116", "0.5353525", "0.53461426", "0.5338295", "0.53225", "0.5298267", "0.52944815", "0.52882683", "0.5258372", "0.5255724", "0.5253183", "0.52324116", "0.5221618", "0.5220791", "0.52012193", "0.5195859", "0.51806366", "0.5170985", "0.5170985", "0.5157931", "0.515205", "0.5141246", "0.5138686", "0.51308084", "0.5125863", "0.51211566", "0.51171017", "0.5116667", "0.5112091", "0.511082", "0.5108804", "0.50867254", "0.5083239", "0.5081882", "0.5075809", "0.5069228", "0.5068792", "0.5068381", "0.50578326", "0.5051514", "0.504839", "0.5045548", "0.5042381", "0.5042381", "0.5033307", "0.50260335", "0.50248647", "0.502386", "0.5020912", "0.50085485", "0.5008303", "0.5002793", "0.49976337", "0.49868244", "0.49858668", "0.49820328", "0.49743262", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.4968265", "0.49652958", "0.49640158", "0.49639395", "0.49632138", "0.49624196", "0.49587628", "0.49574766", "0.49545005", "0.49522033", "0.49495232", "0.49445343", "0.49348912", "0.493183", "0.49123782", "0.49109006", "0.49100503", "0.49047488", "0.49026024", "0.49012715", "0.48979294" ]
0.0
-1
checks if modifier is set
private function has_const_mod($mods) { if (!$mods) return false; foreach ($mods as $mod) if ($mod->type === T_CONST) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function modifier($modifiers, $overwrite = false);", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6808254", "0.6620051", "0.64306134", "0.6209378", "0.602689", "0.59699136", "0.59650046", "0.59650046", "0.59650046", "0.59650046", "0.58731395", "0.5726979", "0.5694137", "0.55240077", "0.5494135", "0.5475493", "0.5427277", "0.5381709", "0.53693116", "0.5353525", "0.53461426", "0.5338295", "0.53225", "0.5298267", "0.52944815", "0.52882683", "0.5258372", "0.5255724", "0.5253183", "0.52324116", "0.5221618", "0.5220791", "0.52012193", "0.5195859", "0.51806366", "0.5170985", "0.5170985", "0.5157931", "0.515205", "0.5141246", "0.5138686", "0.51308084", "0.5125863", "0.51211566", "0.51171017", "0.5116667", "0.5112091", "0.511082", "0.5108804", "0.50867254", "0.5083239", "0.5081882", "0.5075809", "0.5069228", "0.5068792", "0.5068381", "0.50578326", "0.5051514", "0.504839", "0.5045548", "0.5042381", "0.5042381", "0.5033307", "0.50260335", "0.50248647", "0.502386", "0.5020912", "0.50085485", "0.5008303", "0.5002793", "0.49976337", "0.49868244", "0.49858668", "0.49820328", "0.49743262", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.4968265", "0.49652958", "0.49640158", "0.49639395", "0.49632138", "0.49624196", "0.49587628", "0.49574766", "0.49545005", "0.49522033", "0.49495232", "0.49445343", "0.49348912", "0.493183", "0.49123782", "0.49109006", "0.49100503", "0.49047488", "0.49026024", "0.49012715", "0.48979294" ]
0.0
-1
checks if modifier is set
private function has_static_mod($mods) { if (!$mods) return false; foreach ($mods as $mod) if ($mod->type === T_STATIC) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function modifier($modifiers, $overwrite = false);", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6808254", "0.6620051", "0.64306134", "0.6209378", "0.602689", "0.59699136", "0.59650046", "0.59650046", "0.59650046", "0.59650046", "0.58731395", "0.5726979", "0.5694137", "0.55240077", "0.5494135", "0.5475493", "0.5427277", "0.5381709", "0.53693116", "0.5353525", "0.53461426", "0.5338295", "0.53225", "0.5298267", "0.52944815", "0.52882683", "0.5258372", "0.5255724", "0.5253183", "0.52324116", "0.5221618", "0.5220791", "0.52012193", "0.5195859", "0.51806366", "0.5170985", "0.5170985", "0.5157931", "0.515205", "0.5141246", "0.5138686", "0.51308084", "0.5125863", "0.51211566", "0.51171017", "0.5116667", "0.5112091", "0.511082", "0.5108804", "0.50867254", "0.5083239", "0.5081882", "0.5075809", "0.5069228", "0.5068792", "0.5068381", "0.50578326", "0.5051514", "0.504839", "0.5045548", "0.5042381", "0.5042381", "0.5033307", "0.50260335", "0.50248647", "0.502386", "0.5020912", "0.50085485", "0.5008303", "0.5002793", "0.49976337", "0.49868244", "0.49858668", "0.49820328", "0.49743262", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.4968265", "0.49652958", "0.49640158", "0.49639395", "0.49632138", "0.49624196", "0.49587628", "0.49574766", "0.49545005", "0.49522033", "0.49495232", "0.49445343", "0.49348912", "0.493183", "0.49123782", "0.49109006", "0.49100503", "0.49047488", "0.49026024", "0.49012715", "0.48979294" ]
0.0
-1
checks if modifier is set
private function has_final_mod($mods) { if (!$mods) return false; foreach ($mods as $mod) if ($mod->type === T_FINAL) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function modifier($modifiers, $overwrite = false);", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6806211", "0.6619349", "0.6429502", "0.6208909", "0.6026118", "0.5967336", "0.5960598", "0.5960598", "0.5960598", "0.5960598", "0.5876116", "0.5725192", "0.5695354", "0.55231917", "0.54922205", "0.5476657", "0.54311085", "0.53812736", "0.5368902", "0.5351525", "0.5346897", "0.5337849", "0.5322552", "0.5296571", "0.52921766", "0.52864", "0.5258111", "0.5254132", "0.52540475", "0.5232483", "0.5220838", "0.5220435", "0.5201035", "0.5195529", "0.5183273", "0.5175532", "0.5175532", "0.5162839", "0.5153121", "0.5138304", "0.5136132", "0.5133858", "0.51252735", "0.5124455", "0.5119892", "0.51163316", "0.5113", "0.5111696", "0.5109276", "0.5088865", "0.50859004", "0.5081815", "0.5077107", "0.5070339", "0.50693125", "0.50680536", "0.5057822", "0.50530195", "0.5047957", "0.5047545", "0.5045645", "0.5045645", "0.50322634", "0.50290394", "0.50244623", "0.50243974", "0.50220686", "0.50087035", "0.5006266", "0.50045925", "0.4997163", "0.49895218", "0.4986418", "0.4981309", "0.49732664", "0.4973172", "0.4973172", "0.4973172", "0.4973172", "0.4973172", "0.4970648", "0.49659038", "0.49654832", "0.49637505", "0.4963652", "0.49606058", "0.49603647", "0.4959591", "0.4958345", "0.49539572", "0.49497208", "0.49442026", "0.4935249", "0.4932379", "0.49148506", "0.49126247", "0.4907462", "0.4903205", "0.49026564", "0.49024534", "0.48996758" ]
0.0
-1
checks if modifier is set
private function has_private_mod($mods) { // private by default if (!$mods) return true; $other = false; foreach ($mods as $mod) { if ($mod->type === T_PRIVATE) return true; if ($mod->type === T_PUBLIC || $mod->type === T_PROTECTED) { $other = true; break; } } return !$other; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "private function has_protected_mod($mods)\n {\n if (!$mods) return false;\n \n foreach ($mods as $mod)\n if ($mod->type === T_PROTECTED) \n return true;\n \n return false;\n }", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function modifier($modifiers, $overwrite = false);", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6808254", "0.6620051", "0.64306134", "0.6209378", "0.602689", "0.59699136", "0.59650046", "0.59650046", "0.59650046", "0.59650046", "0.58731395", "0.5726979", "0.5694137", "0.55240077", "0.5494135", "0.5475493", "0.5427277", "0.5381709", "0.53693116", "0.5353525", "0.53461426", "0.5338295", "0.53225", "0.5298267", "0.52944815", "0.52882683", "0.5258372", "0.5255724", "0.5253183", "0.52324116", "0.5221618", "0.5220791", "0.52012193", "0.5195859", "0.51806366", "0.5170985", "0.5170985", "0.5157931", "0.515205", "0.5141246", "0.5138686", "0.51308084", "0.5125863", "0.51211566", "0.51171017", "0.5116667", "0.5112091", "0.511082", "0.5108804", "0.50867254", "0.5083239", "0.5081882", "0.5075809", "0.5069228", "0.5068792", "0.5068381", "0.50578326", "0.5051514", "0.504839", "0.5045548", "0.5042381", "0.5042381", "0.5033307", "0.50260335", "0.50248647", "0.502386", "0.5020912", "0.50085485", "0.5008303", "0.5002793", "0.49976337", "0.49868244", "0.49858668", "0.49820328", "0.49743262", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.4968265", "0.49652958", "0.49640158", "0.49639395", "0.49632138", "0.49624196", "0.49587628", "0.49574766", "0.49545005", "0.49522033", "0.49495232", "0.49445343", "0.49348912", "0.493183", "0.49123782", "0.49109006", "0.49100503", "0.49047488", "0.49026024", "0.49012715", "0.48979294" ]
0.0
-1
checks if modifier is set
private function has_protected_mod($mods) { if (!$mods) return false; foreach ($mods as $mod) if ($mod->type === T_PROTECTED) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsModifier() {\n return $this->isModifier;\n }", "function isTrustedModifier($modifier_name, $compiler)\r\n {\r\n if (empty($this->smarty->security_policy->modifiers) || in_array($modifier_name, $this->smarty->security_policy->modifiers)) {\r\n return true;\r\n } else {\r\n $compiler->trigger_template_error (\"modifier \\\"\" . $modifier_name . \"\\\" not allowed by security setting\");\r\n return false;\r\n } \r\n }", "public function testModifierCanBeSet()\n {\n $field = (new StringField('name'))->modifier('trim');\n $this->assertEquals('trim', $field->getModifier());\n }", "public function isModifierPosition($position) {\n if ($this->isNull($position)) {\n return false;\n }\n return $this->dictionary->isModifier($this->words[$position]['word']);\n }", "public function isModifyProtected() {\n\t\treturn $this->getModifyProtected();\n\t}", "public function isModerator()\n {\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function getModifier()\n {\n return $this->modifier;\n }", "public function hasAllRequiredData(array $modifier): bool;", "protected function setModifier($modifier) {\n\t\tPHPParser_Node_Stmt_Class::verifyModifier ( $this->type, $modifier );\n\t\t$this->type |= $modifier;\n\t}", "public function hasModfun()\n {\n return isset($this->modfun);\n }", "public function isReadOnlyReal(): bool\n {\n return ($this->getFlags() & ast\\flags\\MODIFIER_READONLY) !== 0;\n }", "#[@test]\n public function protectedModifier() {\n $this->assertTrue(Modifiers::isProtected(MODIFIER_PROTECTED));\n $this->assertEquals('protected', Modifiers::stringOf(MODIFIER_PROTECTED));\n }", "public function canEdit()\n {\n return $this->is_locked == 0;\n }", "function can_be_manually_set() {\n return true;\n }", "function testIfmatchWithModifiers(){\n\t\t#mdx:ifmatch2\n\t\tParam::get('phone')\n\t\t\t->filters()\n\t\t\t->ifmatch('/[a-z]/i', 'Phone cannot contain letters');\n\n\t\t$error = Param::get('phone')->process(['phone'=>'9829574K'])->error;\n\t\t#/mdx var_dump($error)\n\t\t$this->assertEquals(\"Phone cannot contain letters\", $error);\n\n\t}", "#[@test]\n public function defaultModifier() {\n $this->assertTrue(Modifiers::isPublic(0));\n $this->assertEquals('public', Modifiers::stringOf(0));\n }", "public function setModifiersFromTags(): void\n {\n $hasFinalTag = count($this->getTags('final')) > 0;\n $hasProtectedTag = count($this->getTags('protected')) > 0;\n $hasPrivateTag = count($this->getTags('private')) > 0;\n $hasPublicTag = count($this->getTags('public')) > 0;\n $hasStaticTag = count($this->getTags('static')) > 0;\n $accessTags = $this->getTags('access');\n $hasAccessTag = count($accessTags) > 0;\n $flags = $this->modifiers ?? 0;\n\n if ($hasAccessTag) {\n $accessTag = strtolower(trim(implode('', $accessTags[0])));\n if ($accessTag === 'protected') {\n $hasProtectedTag = true;\n } elseif ($accessTag === 'private') {\n $hasPrivateTag = true;\n } elseif ($accessTag === 'public') {\n $hasPublicTag = true;\n }\n }\n\n if ($hasFinalTag) {\n $flags |= self::MODIFIER_FINAL;\n }\n if ($hasProtectedTag) {\n $flags |= self::MODIFIER_PROTECTED;\n }\n if ($hasPrivateTag) {\n $flags |= self::MODIFIER_PRIVATE;\n }\n if ($hasPublicTag) {\n $flags |= self::MODIFIER_PUBLIC;\n }\n if ($hasStaticTag) {\n $flags |= self::MODIFIER_STATIC;\n }\n\n $this->setModifiers($flags);\n }", "protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }", "public static function isMod(): bool\n {\n $user = self::getUser();\n\n // Check if is logged in and (check if user is moderator in database - set to 1)\n if (!$user || !$user->moderator) {\n return false;\n }\n\n return true;\n }", "public function canEdit($member = null) {\n\t\treturn false;\n\t}", "public function isModerador(){ return false; }", "public function setIsModifier($isModifier) {\n $this->isModifier = $isModifier;\n return $this;\n }", "public function isModerator()\n\t{\n\t\tif( $this->permission != array_search( 'moderator', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "function isModerated()\r\n {\r\n $ret = false;\r\n if ( $this->IsModerated == 1 )\r\n $ret = true;\r\n\r\n return $ret;\r\n }", "public function is_met() {\n\t\treturn \\is_admin();\n\t}", "public function canEdit($member = null) {\n return false;\n }", "function isProtected() ;", "public function isProtected() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_PROTECTED);\n }", "public function isModerated()\n {\n return $this->accepted !== null;\n }", "public function isEditOnlyMode();", "function inspiry_is_edit_property() {\n\t\tif ( isset( $_GET['edit_property'] ) && ! empty( $_GET['edit_property'] ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isFlagSet($flag) {}", "public function isFlagSet($flag) {}", "public function issetMovementType(): bool\n {\n return isset($this->movementType);\n }", "public function is_met() {\n\t\treturn ! \\is_admin();\n\t}", "public function setModifiers(int $modifiers): void\n {\n $this->modifiers = $modifiers;\n }", "public function setModifiers($modifiers)\n {\n if (0 === ($modifiers & self::VISIBILITY_MODIFER_MASK)) {\n $modifiers |= self::MODIFIER_PUBLIC;\n }\n\n $this->modifiers = $modifiers;\n }", "public function isFieldFlagSet($flag) {}", "private function isEditor() : bool\n {\n return $this->role('editor');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . Str::studly($key) . 'Attribute');\n }", "protected function canEdit() {}", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set' . studly_case($key) . 'Attribute');\n }", "public function getModifyProtected() {\n\t\t$modifyProtected = FALSE;\n\t\tif ($this->getUsersWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithModificationAccess()->count() > 0) {\n\t\t\t$modifyProtected = TRUE;\n\t\t}\n\n\t\treturn $modifyProtected;\n\t}", "public function canSetPassword()\n {\n return $this->isActive() && $this->definition->canSetPassword();\n }", "public function isReadonly() : bool {\n return (bool) ($this->flags & Class_::MODIFIER_READONLY);\n }", "function av5_kirki_check_value() {\r\n\t\t$mods = get_theme_mods();\r\n\t\tif ( empty( $mods ) ) {\r\n\t\t\tav5_kirki_set_default();\r\n\t\t}\r\n\t}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertData) and count($this->AddRecordInsertData) > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public function modifier($modifiers, $overwrite = false);", "final public function isSet():bool\n {\n return $this->mode === 'set';\n }", "public function user_can_edit() {\n if (has_capability('mod/swipe:manage', $this->context)) {\n return true;\n }\n }", "private function checkAccessMode($mod,$protocol)\n\t{\n\t\t//$this->isInternalRequest() || $this->_authorizedClient() || \n\t\treturn ($this->engines[$mod][$protocol]['access']=='all');\n\t}", "public function check_permflag($flag) {\n // TO DO!!!!!!\n }", "function canEdit() {\n\t\t\treturn true;\n\t\t}", "public function checkForModeration() {\n $moderate = $this->dictionary->get('register.moderate');\n return !empty($moderate);\n }", "public static function isModerator() {\n return (int)$_SESSION['user']['moderator'] === 1;\n }", "protected function hasGetMutator($key)\n {\n return method_exists($this, 'set' . $this->getMutatorName($key) . 'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function hasSetMutator($key)\n {\n return method_exists($this, 'set'.Str::studly($key).'Attribute');\n }", "public function modifierType($type)\r\n {\r\n // Connexion à la base\r\n self::connexionBD();\r\n \r\n // Prépare la requête\r\n $requete = self::getBaseDeDonnees()->getCnxBD()->prepare(self::RQT_MODIFIER_TYPE_UTIL);\r\n \r\n $ok = $requete->execute(array(\r\n ':login' => $this->login,\r\n ':type' => ($type == 'A' ? self::$TYPE_ADMIN : self::$TYPE_USER)\r\n ));\r\n \r\n if ($ok) {\r\n $this->type = $type;\r\n }\r\n \r\n return $ok;\r\n }", "function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }", "public function isEditable() {}", "public function canEdit($member = null)\n {\n return $this->owner->isEditable();\n }", "public function hasRotateControl()\n {\n return $this->rotateControl !== null;\n }", "function test($value) {\n\t\t// php doesn't have g modifier so we remove it if it's there and call preg_match_all()\n\t\tif(strpos($this->modifiers, 'g') !== false){\n\t\t\t$this->modifiers = str_replace('g', '', $this->modifiers);\n\t\t\treturn preg_match_all($this->getRegex(), $value);\n\t\t}\n\t\treturn preg_match($this->getRegex(), $value);\n\t}", "#[@test]\n public function privateModifier() {\n $this->assertTrue(Modifiers::isPrivate(MODIFIER_PRIVATE));\n $this->assertEquals('private', Modifiers::stringOf(MODIFIER_PRIVATE));\n }", "public function isMan()\n {\n $res = $this->getEntity()->isMan();\n\t\tif($res === null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->isMan();\n\t\t}\n return $res;\n }", "public function isProtected() {}", "private function isNotModerator()\n {\n if (Auth::user() == null || Auth::user()->users_status != \"moderator\") {\n return true;\n }\n }", "public function hasSetMutator($key)\n {\n return $this->methodExists('set'.Str::studly($key).'Attribute');\n }", "public function isModerated()\n {\n return $this->attribute('state') == self::STATUS_MODERATED;\n }", "function field_edit($name)\r\n {\r\n if (right::superuser()) return (true);\r\n \r\n $rightArray = right::get_field($name);\r\n $userRight = right::get(\"rights\");\r\n\r\n if ($rightArray[edit]) return($userRight & $rightArray[edit]);\r\n else return(false); // default no edit\r\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "function userCanSetDbPassword(){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function getModifierObject()\n {\n return $this->m_modifierObject;\n }", "public function hasModulusParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_N);\n }", "public function is_password_required()\n {\n $edit = $this->uri->segment(2);\n\n if ($edit != 'edit') {\n $password = $this->input->post('password', true);\n if (empty($password)) {\n $this->form_validation->set_message('is_password_required', '%s harus diisi.');\n return false;\n }\n }\n return true;\n }", "public function isEditor(){\n\t\tif($_SESSION['waf_user']['editor']==1)return true;\n\t\telse return false;\n\t}", "public function isSetFlag($path);", "public function hasGetMutator($key)\n {\n if ($this->isMutatorWhitelisted($key) === false) {\n return false;\n }\n\n return parent::hasGetMutator($key);\n }", "public function isProtected()\n {\n return in_array($this->slug, self::PROTECTED_KEYS);\n }", "public function valid() { return isset($this->keys[$this->pos]);\n }", "public function Modificar(): bool;", "function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}", "private function check_nested_mods($mods)\n {\n foreach ($this->nmods as $nmo) {\n foreach ($mods as $mod) {\n if (isset ($nmo[$mod->type])) {\n Logger::warn_at($mod->loc, 'duplicate modifier `%s`', $mod->value);\n Logger::info_at($nmo[$mod->type], 'previous modifier was here');\n }\n }\n }\n }", "private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "public function isEditable()\n\t{\n\t\tif(Auth::check())\n\t\t{\n\t\t\tif(Auth::user()->id == $this->author_id)\n\t\t\t{\n\t\t\t\tif ($this->created_at->diffInMinutes(Carbon::now()) < 30)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Auth::user()->hasRole(['moderator', 'administrator', 'super user'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "protected function looksLikeSetter($line)\n {\n return strpos($line, '=') !== false;\n }", "public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}", "public function get_supported_modifiers() {\n return 'i';//any preg_matcher who intends to work with this question should support case insensitivity\n }", "protected function setModifier($modifier, $line) {\n\t\tClassStatement::verifyModifier($this->type, $modifier, $line);\n\t\t$this->type |= $modifier;\n\t}", "public function test_manual_field_is_view_or_editable_with_pm_using_invalid_entity() {\n global $DB, $CFG;\n\n // Skip test if elis/program doesn't exist.\n if (!file_exists($CFG->dirroot.'/elis/program/lib/setup.php')) {\n $this->markTestSkipped('Requires elis/program to be installed.');\n }\n\n $this->resetAfterTest(true);\n $this->load_libraries_for_additional_tests();\n // Load CSV data.\n $this->load_csv_data();\n\n // Setup place holders for capabilities.\n $editcap = 'elis/program:user_edit';\n $viewcap = 'elis/program:user_view';\n\n // Retrieve the PM user id to be assigned to a userset.\n $param = array('id' => 103);\n $pmuserinusersetid = $DB->get_field('crlm_user', 'id', $param);\n\n // Get the userset context.\n $usersetcontext = context_elis_userset::instance(1);\n // System context.\n $syscontext = context_system::instance();\n\n $field = new field(array('id' => 101));\n $field->load();\n\n $result = manual_field_is_view_or_editable($field, $syscontext, $editcap, $viewcap, 'system', $pmuserinusersetid);\n\n $this->assertEquals(MANUAL_FIELD_NO_VIEW_OR_EDIT, $result);\n }", "function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}", "private function validate()\r\n {\r\n if (!$this->user->hasPermission('modify', 'module/promotion')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }" ]
[ "0.6808254", "0.6620051", "0.64306134", "0.6209378", "0.602689", "0.59699136", "0.59650046", "0.59650046", "0.59650046", "0.59650046", "0.58731395", "0.5726979", "0.5694137", "0.55240077", "0.5494135", "0.5475493", "0.5427277", "0.5381709", "0.53693116", "0.5353525", "0.53461426", "0.5338295", "0.53225", "0.5298267", "0.52944815", "0.52882683", "0.5255724", "0.5253183", "0.52324116", "0.5221618", "0.5220791", "0.52012193", "0.5195859", "0.51806366", "0.5170985", "0.5170985", "0.5157931", "0.515205", "0.5141246", "0.5138686", "0.51308084", "0.5125863", "0.51211566", "0.51171017", "0.5116667", "0.5112091", "0.511082", "0.5108804", "0.50867254", "0.5083239", "0.5081882", "0.5075809", "0.5069228", "0.5068792", "0.5068381", "0.50578326", "0.5051514", "0.504839", "0.5045548", "0.5042381", "0.5042381", "0.5033307", "0.50260335", "0.50248647", "0.502386", "0.5020912", "0.50085485", "0.5008303", "0.5002793", "0.49976337", "0.49868244", "0.49858668", "0.49820328", "0.49743262", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.49700284", "0.4968265", "0.49652958", "0.49640158", "0.49639395", "0.49632138", "0.49624196", "0.49587628", "0.49574766", "0.49545005", "0.49522033", "0.49495232", "0.49445343", "0.49348912", "0.493183", "0.49123782", "0.49109006", "0.49100503", "0.49047488", "0.49026024", "0.49012715", "0.48979294" ]
0.5258372
26
checks members of a class/trait or iface declaration
private function check_extern_members($decl) { if (($decl instanceof ClassDecl || $decl instanceof TraitDecl) && $decl->traits !== null) { $peek = $decl->traits[0]; Logger::error_at($peek->loc, 'extern class/trait must not have traits'); } if ($decl->members !== null) { // all members must be 'abstract' $stack = [ $decl->members ]; while (null !== $members = array_pop($stack)) { foreach ($members as $member) { if ($member instanceof NestedMods) { array_push($stack, $member->members); continue; } if (!($member instanceof FnDecl || $member instanceof CtorDecl || $member instanceof DtorDecl)) { Logger::error_at($member->loc, 'invalid symbol in extern class'); continue; } if ($this->has_extern_mod($member->mods)) { Logger::info_at($member->loc, '`extern` modifier inside \\'); Logger::info('extern classes/traits/ifaces is optional'); } if ($member->body !== null) Logger::error_at($member->loc, 'extern function must not have a body'); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _parseClass()\n {\n // check which interfaces are implemented\n $interfaces = $this->_reflectionClass->getInterfaceNames();\n foreach ($interfaces as $i) {\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\AccessInterface') {\n $this->_parsedClass->accessInterface = true;\n }\n\n if ($i == 'Webiny\\Component\\Rest\\Interfaces\\CacheKeyInterface') {\n $this->_parsedClass->cacheKeyInterface = true;\n }\n }\n }", "function member_in_class($class, $member)\n{\n return $class->class_pin == $member->class->class_pin;\n}", "public function has_fields()\n {\n }", "protected function checkForValidImplementingClass()\n {\n $this->validateModel();\n $this->validateItemId();\n }", "public function hasMethods($class);", "public function isMember(): bool\n {\n return $this->getType() === static::TYPE_MEMBER;\n }", "public function testMixedAccessibility()\n {\n $members = MixedAccessibilityEnumeration::members();\n\n self::assertCount(2, $members);\n self::assertArrayHasKey(MixedAccessibilityEnumeration::IMPLICIT_PUBLIC, $members);\n self::assertArrayHasKey(MixedAccessibilityEnumeration::EXPLICIT_PUBLIC, $members);\n }", "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 }", "public function isMethods() {}", "function have_interface() {\n\t\treturn count($this->watches) > 0;\n\t}", "function isMember ($name) {\n\tglobal $MEMBERS; return in_array (strtolower ($name), array_map ('strtolower', $MEMBERS));\n}", "public function testCanFindClasses()\n {\n foreach ($this->classes as $class) {\n $this->assertTrue(class_exists($class) || interface_exists($class));\n }\n }", "protected static function check_interface( $class ) {\n\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$interfaces = class_implements( $class, false );\n\n\t\tif ( in_array( 'ht_dms\\api\\internal\\actions\\action_interface', $interfaces ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t}", "public function hasPublicMethod(string $class, string $method);", "public function check_validity($_classname);", "public function test_ClassResolver_hasMethod_propertiesMeta() {\n $this->assertTrue(method_exists($this->obj, 'propertiesMeta'));\n }", "function checkInterface(DOMDocument $doc, DOMXPath $xpath, ReflectionClass $refClass)\n {\n $meta = $doc->getElementsByTagName('classmeta')->item(0);\n $nInterfaces = count($refClass->getInterfaces());\n\n if ($nInterfaces == 0\n && $xpath->evaluate('count(/classentry/classmeta/implements)') > 0\n ) {\n //remove all interfaces\n foreach ($xpath->query('/classentry/classmeta/implements') as $implements) {\n $meta->removeChild($implements);\n }\n } else if ($nInterfaces > 0) {\n $shortdesc = $xpath->query('/classentry/classmeta/shortdesc')->item(0);\n\n foreach ($refClass->getInterfaces() as $refInterface) {\n $strInterface = $refInterface->getName();\n if ($xpath->evaluate('count(/classentry/classmeta/implements[text()=\"' . $strInterface . '\"])') == 0) {\n //add new interface\n $meta->insertBefore(\n $doc->createTextNode(' '),\n $shortdesc\n );\n $meta->insertBefore(\n $doc->createElement('implements', $strInterface),\n $shortdesc\n );\n $meta->insertBefore(\n $doc->createTextNode(\"\\n\"),\n $shortdesc\n );\n }\n }\n }\n }", "public function test_ClassResolver_hasMethod_methodsMeta() {\n $this->assertTrue(method_exists($this->obj, 'methodsMeta'));\n }", "protected function checkReflectionDocComment() {}", "function getOwnInterfaces();", "public function getAllowedMemberTypes()\n {\n if (array_key_exists(\"allowedMemberTypes\", $this->_propDict)) {\n return $this->_propDict[\"allowedMemberTypes\"];\n } else {\n return null;\n }\n }", "function isValid($dtoInfo)\n{\n return property_exists($dtoInfo, 'name')\n && property_exists($dtoInfo, 'namespace')\n && property_exists($dtoInfo, 'vars')\n && count($dtoInfo->vars) > 0;\n}", "public function hasFields(){\n return $this->_has(1);\n }", "private function isProperty($source, string $collection) : bool\n {\n $reflection = new ReflectionClass($source);\n\n while (!$reflection->hasProperty($collection)) {\n if (!($reflection = $reflection->getParentClass())) {\n return false;\n }\n }\n\n return $reflection->getProperty($collection)->isPublic();\n }", "abstract public function is_have();", "public function hasField();", "public function getMember(): MemberInterface;", "function implementing($class, $interface) {\n $interfaces = class_implements($class);\n return isset($interfaces[$interface]);\n}", "public function validate(){\n\t\t$valid = true;\n\t\t$ref = new ReflectionObject($this);\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\tif(isset($this->_atributosMetadata[$prop->getName()])){\n\t\t\t\t$propMetadata = $this->_atributosMetadata[$prop->getName()];\n\t\t\t\tif($propMetadata->needValidate){\n\t\t\t\t\t$propMetadata->Validate($prop->getValue($this));\n\t\t\t\t\tif($propMetadata->isValid){\n\t\t\t\t\t\t$valid = $valid && $propMetadata->isValid; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $valid;\t\t\n\t}", "function checkFields( $args )\r\n {\r\n\t\treturn true;\r\n }", "public function validate_fields() {\n \n\t\t//...\n \n }", "#[@test]\n public function classImplementsComparatorInterface() {\n $class= $this->classloader->loadClass($this->classname);\n $interface= XPClass::forName('util.Comparator');\n $interfaces= new HashSet();\n $interfaces->addAll($class->getInterfaces());\n $this->assertTrue($interfaces->contains($interface));\n }", "public function has($_field);", "public function hasProperties()\n {\n $props = $this->getReflectionClass()->getProperties();\n foreach ($props as $prop) {\n if ($prop->getDeclaringClass()->getName() === $this->getName()) {\n return true;\n }\n }\n return false;\n }", "public function hasField(string $name, string $class=null): bool;", "public function validate_fields() {\n \n\t\t\n \n\t\t}", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "public function testCreateMember()\n {\n }", "public function testBasicMethodInspection() {\n\t\t$class = 'lithium\\analysis\\Debugger';\n\t\t$parent = 'lithium\\core\\StaticObjectDeprecated';\n\n\t\t$expected = array_diff(get_class_methods($class), get_class_methods($parent));\n\t\t$result = array_keys(Inspector::methods($class, 'extents'));\n\t\t$this->assertEqual(array_intersect($result, $expected), $result);\n\n\t\t$result = array_keys(Inspector::methods($class, 'extents', [\n\t\t\t'self' => true, 'public' => true\n\t\t]));\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$this->assertNull(Inspector::methods('lithium\\core\\Foo'));\n\n\t\t$result = Inspector::methods('stdClass', 'extents');\n\t\t$this->assertEqual([], $result);\n\t}", "abstract protected function propertyExists($name);", "public function test_ClassResolver_hasAttribute_reflection() {\n $this->assertClassHasAttribute('reflection', \\FightTheIce\\Coding\\ClassResolver::class);\n }", "public function test_ClassResolver_hasMethod_classMeta() {\n $this->assertTrue(method_exists($this->obj, 'classMeta'));\n }", "public function testAnnotation()\n {\n $fooClass = new ReflectionClass(Foo::class);\n $this->assertFalse($fooClass->isFinal());\n }", "public function hasColumns(){\n return $this->_has(3);\n }", "public function isBound($interface, $targetClass = null);", "public function hasMethods() {\n return $this->_has(12);\n }", "function checkForBounds() {\n $res = true;\n foreach ($this->listFields() as $fieldName) {\n $fieldInfo = $this->getFieldInfo($fieldName);\n $res = $this->_checkForBounds($fieldName, $fieldInfo) && $res;\n }\n return $res;\n }", "private static function isReflection($var) {\n return $var instanceof Reflection || $var instanceof HintReflection;\n }", "public function checkInterfaceImplements(ClassDefinition $classDefinition, ClassDefinition $interfaceDefinition)\n {\n foreach ($interfaceDefinition->getMethods() as $method) {\n if (!$classDefinition->hasMethod($method->getName())) {\n throw new CompilerException(\"Class \" . $classDefinition->getCompleteName() . \" must implement method: \" . $method->getName() . \" defined on interface: \" . $interfaceDefinition->getCompleteName());\n }\n\n if ($method->hasParameters()) {\n $implementedMethod = $classDefinition->getMethod($method->getName());\n if ($implementedMethod->getNumberOfRequiredParameters() > $method->getNumberOfRequiredParameters() || $implementedMethod->getNumberOfParameters() < $method->getNumberOfParameters()) {\n throw new CompilerException(\"Class \" . $classDefinition->getCompleteName() . \"::\" . $method->getName() . \"() does not have the same number of required parameters in interface: \" . $interfaceDefinition->getCompleteName());\n }\n }\n }\n }", "protected function checkForNecessaryProperties()\n {\n if (!property_exists($this, 'data')) {\n throw new IncompatibleParentClass('Parent class must implement $data property.');\n }\n }", "public function testReadMember()\n {\n }", "public function isMemberScope()\n {\n return $this->attributes['scope'] == self::MEMBER_SCOPE;\n }", "function _class_check($str){\n }", "public function testTypeDetection() {\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\util'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\analysis'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\analysis\\Inspector'));\n\t\t$this->assertEqual('property', Inspector::type('Inspector::$_classes'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type'));\n\t\t$this->assertEqual('method', Inspector::type('Inspector::type()'));\n\n\t\t$this->assertEqual('class', Inspector::type('\\lithium\\security\\Auth'));\n\t\t$this->assertEqual('class', Inspector::type('lithium\\security\\Auth'));\n\n\t\t$this->assertEqual('namespace', Inspector::type('\\lithium\\security\\auth'));\n\t\t$this->assertEqual('namespace', Inspector::type('lithium\\security\\auth'));\n\t}", "public function isValid()\r\n {\r\n if (!retGet('class'))\r\n return false;\r\n\r\n if (!in_array(retGet('class'), $this->_available))\r\n return false;\r\n\r\n return true;\r\n }", "static function classHasAttribute($attributeName)\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::classHasAttribute', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "public function hasTraits(): bool\n {\n return !is_null($this->traits);\n }", "private static function checkCanAccessProtectedElement(CodeBase $code_base, FullyQualifiedClassName $defining_fqsen, FullyQualifiedClassName $accessing_class_fqsen): bool\n {\n $accessing_class_type = $accessing_class_fqsen->asType();\n $type_of_class_of_property = $defining_fqsen->asType();\n\n // If the definition of the property is protected,\n // then the subclasses of the defining class can access it.\n try {\n if ($accessing_class_type->isSubclassOf($type_of_class_of_property, $code_base)) {\n return true;\n }\n // and base classes of the defining class can access it\n if ($type_of_class_of_property->isSubclassOf($accessing_class_type, $code_base)) {\n return true;\n }\n } catch (RecursionDepthException $_) {\n }\n return false;\n }", "public function members() {\n return array_filter(parent::members(), function ($member) {\n return !$member->isStatic();\n });\n }", "public function hasFields()\n {\n return null !== @$this->fields;\n }", "protected function validateMethodModifiers()\n {\n if ($this->getVisibility() != self::VISIBILITY_PUBLIC) {\n throw new \\LogicException(\n \"Interface method visibility can only be 'public'. Method name: '{$this->getName()}'\"\n );\n }\n if ($this->isFinal()) {\n throw new \\LogicException(\n \"Interface method cannot be marked as 'final'. Method name: '{$this->getName()}'\"\n );\n }\n if ($this->isAbstract()) {\n throw new \\LogicException(\n \"'abstract' modifier cannot be used for interface method. Method name: '{$this->getName()}'\"\n );\n }\n }", "function hasChildren(string $interface) : bool;", "abstract protected function isValidDefinition(ilADTDefinition $a_def);", "public function hasInjectMethods() {}", "public function nodeHasEligibleFields(NodeInterface $node) {\n return sizeof($this->listEligibleFieldsForNode($node)) > 0;\n }", "function test_get_field_method_exists() {\n $wpNonce = new \\Fazleelahhee\\Inpsyde\\WPNonce();\n $this->assertTrue(\n method_exists($wpNonce, 'getField'),\n 'Class does not have method createField'\n );\n }", "function hasField($fieldName);", "function mdl_has_constructor_method(array $methods)\n{\n foreach ($methods as $value) {\n if (!is_array($value)) {\n continue;\n }\n if (isset($value['name']) && (strtolower(strval($value['name'])) === '__construct')) {\n return true;\n }\n }\n return false;\n}", "public function hasCOI() {\r\n foreach($this->coi AS $coi) {\r\n if($coi->hasDeclarations() == true) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "private function changelog_validate_object () {\n\t\t# set valid objects\n\t\t$objects = array(\n\t\t\t\t\t\t\"ip_addr\",\n\t\t\t\t\t\t\"subnet\",\n\t\t\t\t\t\t\"section\"\n\t\t\t\t\t\t);\n\t\t# check\n\t\treturn in_array($this->object_type, $objects) ? true : false;\n\t}", "public function validate()\r\n {\r\n //clean out the errors in the errors array\r\n $this->errors = array(); //set it equal to a new empty array to clear the items in the array\r\n\r\n // need find a way to check each property\r\n // lets uses a naming convention that any function that begins with 'validate_'\r\n //will be executed in this method\r\n $methods = get_class_methods($this);\r\n $validationResults = array();\r\n foreach($methods as $func)\r\n {\r\n //see if the function begins with the text 'validate_'\r\n if(strpos($func,'validate_')===0)\r\n {\r\n //call the method with the name stored in the $func variable\r\n $validationResults[] = call_user_func([$this,$func]);\r\n }\r\n }\r\n //check to see if any of the property validation functions returned false\r\n return !in_array(false,$validationResults);\r\n\r\n }", "public function validInterface($interface)\n {\n return in_array($interface, $this->getInterfaceList());\n }", "abstract public function check();", "public function isAnnotation();", "public function hasTrait(PhpTrait $trait): bool;", "abstract public function has(string ...$names): bool;", "function isMemberChanged(string $name): bool;", "public function test_requirements()\n\t{\n\t\t// Look for ACF\n\t\tif ( ! class_exists('acf') && ! class_exists('Acf') ) { return false; }\n\t\treturn true;\n\t}", "abstract protected function fields();", "abstract protected function fields();", "function is_field_type($name)\n {\n }", "protected abstract function hasAccess($object, $attribute);", "function foo() {\n if (class_exists('MyClass') === false) {\n class MyClass {\n function foo() {}\n }\n }\n\n if (trait_exists('MyTrait') === false) {\n trait MyTrait {\n function foo() {}\n }\n }\n\n if (interface_exists('MyInterface') === false) {\n interface MyInterface {\n function foo();\n }\n }\n\n // But disallow functions nested inside those methods\n if (class_exists('NestedFunctionInMethod') === false) {\n class NestedFunctionInMethod {\n function foo() {\n function innerFunction() {}\n }\n }\n }\n}", "private function assertValidMethods() : void\n {\n InvalidDescriptorArgumentException::assertIsNotEmpty(\n $this->methods,\n '#[Route.methods] must contain at least one element.'\n );\n\n foreach ($this->methods as $value) {\n InvalidDescriptorArgumentException::assertIsNotEmptyString(\n $value,\n '#[Route.methods] must contain non-empty strings.'\n );\n }\n }", "public function hasCustomFields(): bool\n {\n foreach ($this->fields as $fieldName => $field) {\n if (isset($field['type']) === false) {\n throw (new \\Exception('Field \\'' . $fieldName . '\\' has no type'));\n }\n\n if ($field['type'] == 'custom') {\n return true;\n }\n }\n\n return false;\n }", "private function isField($fld)\n {\n return isset($this->columns->{$fld});\n }", "public static function is_implements($obj_or_class, $interface) {\n return class_exists($obj_or_class) && in_array($interface, class_implements($obj_or_class));\n }", "public function testListMembers()\n {\n }", "public function checkProperties($conditions);", "public function hasElements() {}", "private function hasCustomFields()\r\n\t{\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\tif ($field instanceOf CustomField)\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "protected function hasKnownSubclasses() : bool\n {\n return true;\n }", "public function isTrait(): bool\n {\n return $this->endsWith($this->getShortName(), 'Trait');\n }", "protected function _isValid()\n {\n $class = get_called_class();\n $methods = get_class_methods($class);\n \n foreach($methods as $method) {\n if(strcasecmp(substr($method, 0, 9), 'validates') === 0)\n {\n $value = $this->_getter(strtolower(substr($method, 9)));\n if($error = $this->{$method}($value) !== true)\n {\n return $error;\n }\n }\n }\n\n return true; \n }", "public function isClassMember($cid, $uid)\n {\n\t\t$sql = \"SELECT COUNT(1) FROM school_class_member WHERE cid = :cid AND uid = :uid\";\n\t\t$result = $this->_rdb->fetchOne($sql, array('cid' => $cid, 'uid' => $uid));\n\t\treturn $result == 1 ? true : false;\n }", "function get_trait_names($arg1) {\n return (new ReflectionClass($arg1))->getTraitNames();\n }", "public function isValid()\n {\n $docType = get_class($this->source);\n if (isset($this->options['required'][$docType])) {\n $this->validateTags($docType);\n } else if (isset($this->options['required']['__ALL__'])) {\n $this->validateTags('__ALL__');\n }\n }", "public function valid () {\n return isset($this->__fields[key($this->__fields)]);\n }", "static public function getDefinedFields() {\n\t\treturn Arrays::getPublicPropertiesOfClass(get_called_class());\n\t}", "public function isElements() {}" ]
[ "0.58498263", "0.5686526", "0.5643352", "0.55730605", "0.5551772", "0.5394808", "0.5390989", "0.5330083", "0.532341", "0.5291463", "0.5287305", "0.5254403", "0.5251495", "0.51687783", "0.5167336", "0.5166519", "0.5147239", "0.51312774", "0.5123417", "0.51204133", "0.5089501", "0.5088413", "0.5085328", "0.5083417", "0.5079029", "0.5068989", "0.5050619", "0.50420916", "0.5020692", "0.50103635", "0.49909586", "0.49853498", "0.49694705", "0.4942485", "0.49388638", "0.4926946", "0.49259225", "0.49117392", "0.49092934", "0.490604", "0.49043345", "0.48875606", "0.488311", "0.48810297", "0.48753163", "0.4863523", "0.48475543", "0.48442984", "0.48375788", "0.48371235", "0.48333654", "0.48245987", "0.48240423", "0.48227966", "0.48155916", "0.48144886", "0.4813042", "0.48127338", "0.48113757", "0.48002645", "0.47883758", "0.4780976", "0.47694147", "0.4766451", "0.4759747", "0.4755853", "0.47492173", "0.4745312", "0.47445047", "0.47432312", "0.47402892", "0.47357076", "0.47258273", "0.4721451", "0.4721052", "0.4720458", "0.47200233", "0.47198614", "0.47043893", "0.47043893", "0.47039104", "0.469709", "0.46908733", "0.46891627", "0.46769968", "0.4673516", "0.46723843", "0.46720526", "0.4670075", "0.4669621", "0.46682775", "0.46671695", "0.46646667", "0.46640077", "0.46634218", "0.46549946", "0.46512526", "0.46507043", "0.46383208", "0.46349156" ]
0.6437542
0
checks if there a unreachable/undefined jumps (gotos)
private function check_jumps() { static $seen_loop_info = false; assert(is_array($this->gotos)); foreach ($this->gotos as $lid => $gotos) { foreach ($gotos as $goto) { if ($goto->resolved === true) continue; if (!isset ($this->labels[$lid])) Logger::error_at($goto->loc, 'goto to undefined label `%s`', $goto->id); else { Logger::error_at($goto->loc, 'goto to unreachable label `%s`', $goto->id); Logger::info_at($this->labels[$lid]->loc, 'label was defined here'); if (!$seen_loop_info) { $seen_loop_info = true; Logger::info_at($goto->loc, 'it is not possible to jump into a loop or switch statement'); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stepOutOfScope();", "private function isUnreachable(array $ping): bool\n {\n $needles = 'perdidos|lost';\n\n $result = $ping[count($ping) - 1];\n\n $unreachable = false;\n\n foreach (explode('|', $needles) as $needle) {\n $search = strpos($result, '100% '.$needle);\n\n if ($search !== false) {\n $unreachable = true;\n break;\n }\n }\n\n return $unreachable;\n }", "public function hasJumpTimeS()\n {\n return $this->jump_time_s !== null;\n }", "public function branching()\n {\n }", "function _checkGoto($a_target)\n\t{\n\t\tglobal $ilAccess;\n\t\t$t_arr = explode('_', $a_target);\n\t\tif ($t_arr[0] != 'orgu' || ((int)$t_arr[1]) <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif ($ilAccess->checkAccess('read', '', $t_arr[1])) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function broken() { return TRUE; }", "static function unittest_loopBarrier () {\n PhlintTest::assertIssues('\n class A {\n function foo () {}\n }\n function foo () {\n /** @var A */\n $a = null;\n foreach ([1, 2, 3] as $x) {\n if (is_null($a))\n break;\n else\n $a->foo();\n $a->foo();\n }\n $a->foo();\n }\n ', [\n 'Unable to invoke undefined *mixed::foo* for the expression *$a->foo()* on line 14.',\n ]);\n }", "function isUnknown( $var );", "function tideways_last_fatal_error()\n{\n}", "private function isElse()\n\t{\n\t\treturn $this->expression=='';\n\t}", "public function globalVarConditionDoesNotMatchOnNotEqualExpression() {}", "public function globalVarConditionDoesNotMatchOnNotEqualExpression() {}", "public function testSilencedUndefinedVariable()\n {\n $a = @$notSetVariable + 1;\n $this->assertEquals(1, $a);\n }", "function broken() { }", "public function FrontControllerIsVisitedOrDie() {\n\t\t\n\t\tglobal $gPage; // Always defined in frontcontroller\n\t\t\n\t\tif(!isset($gPage)) {\n\t\t\tdie('No direct access to pagecontroller is allowed.');\n\t\t}\n\t}", "function tideways_last_detected_exception()\n{\n}", "function languagelesson_unseen_branch_jump($lesson, $userid) {\n global $DB;\n\n if (!$retakes = $DB->count_records(\"languagelesson_grades\", array(\"lessonid\"=>$lesson->id, \"userid\"=>$userid))) {\n $retakes = 0;\n }\n\n $params = array (\"lessonid\" => $lesson->id, \"userid\" => $userid, \"retry\" => $retakes);\n if (!$seenbranches = $DB->get_records_select(\"languagelesson_branch\", \"lessonid = :lessonid AND userid = :userid AND retry = :retry\", $params,\n \"timeseen DESC\")) {\n print_error('cannotfindrecords', 'languagelesson');\n }\n\n // Get the lesson pages.\n $lessonpages = $lesson->load_all_pages();\n\n // This loads all the viewed branch tables into $seen until it finds the branch table with the flag\n // Which is the branch table that starts the unseenbranch function.\n $seen = array();\n foreach ($seenbranches as $seenbranch) {\n if (!$seenbranch->flag) {\n $seen[$seenbranch->pageid] = $seenbranch->pageid;\n } else {\n $start = $seenbranch->pageid;\n break;\n }\n }\n // This function searches through the lesson pages to find all the branch tables.\n // That follow the flagged branch table.\n $pageid = $lessonpages[$start]->nextpageid; // Move down from the flagged branch table.\n $branchtables = array();\n while ($pageid != 0) { // Grab all of the branch table till eol.\n if ($lessonpages[$pageid]->qtype == LL_BRANCHTABLE) {\n $branchtables[] = $lessonpages[$pageid]->id;\n }\n $pageid = $lessonpages[$pageid]->nextpageid;\n }\n $unseen = array();\n foreach ($branchtables as $branchtable) {\n // Load all of the unseen branch tables into unseen.\n if (!array_key_exists($branchtable, $seen)) {\n $unseen[] = $branchtable;\n }\n }\n if (count($unseen) > 0) {\n return $unseen[rand(0, count($unseen)-1)]; // Returns a random page id for the next page.\n } else {\n return LL_EOL; // Has viewed all of the branch tables.\n }\n}", "public function isNoop(): bool;", "protected function isThereHiddenError(): bool\n {\n // TODO when phpmd found a sintaxis error finish succefully instead of error.\n // for different versions of the tool the error output is different\n // if (is_int(strpos($this->exit[3], 'No mess detected'))) {\n // return false;\n // }\n return true;\n }", "function game_is_broken($game) {\n\tif ($game->is_tie()) {\n\t\techo \"\\n\\n****ERROR: Broken Game. Tie! in game_is_broken()\";\n\t\tpause(\"\");\n\t\treturn true;\n\t}\n\treturn false;\n}", "function canReach($hops)\n{\n $left = 1;\n\n for ($i = 0 ; $i < count($hops)-1; $i++) {\n $left = max($left-1, $hops[$i]);\n if ($left === 0) {\n return false;\n }\n }\n\n return true;\n}", "function jumpingOnClouds($c)\n{\n $n = count($c);\n if ($n >= 2 && $n <= 100) {\n array_walk($c, 'intval');\n $i = 0;\n $jumps = 0;\n while ($i < $n - 1) {\n if ($c[$i + 2] == 0)\n $i += 2;\n else\n $i++;\n $jumps++;\n }\n return $jumps;\n }\n}", "function _checkGoto($a_target)\n\t{\n\t\tglobal $ilAccess;\n\t\t\n\t\t$t_arr = explode(\"_\", $a_target);\n\n\t\tif ($ilAccess->checkAccess(\"read\", \"\", $t_arr[1]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function checkNoneCodeLocations($location, $eachLocation)\n {\n if ($this->analyseEachInfluencerLocation($location, $eachLocation) || $this->analyseEachInfluencerLocation($location, strtolower($eachLocation))) {\n return true;\n }\n }", "public function hasRet()\n {\n return $this->get(self::RET) !== null;\n }", "public function hasRet()\n {\n return $this->get(self::RET) !== null;\n }", "function trial(\n int $instruction_index\n): array\n{\n global $instructions;\n\n // Check if the instruction from the index is a jmp or noop (we can only\n // change those)\n if (!preg_match('/^(nop|jmp).*$/', $instructions[$instruction_index])) {\n // Not a suitable candidate for execution\n return [ false, null ];\n }\n\n // Execute the program\n $accumulator = 0;\n $program_pointer = 0;\n\n // Mark which instructions was already executed\n $executed = [];\n\n\n while (true) {\n if ($program_pointer >= count($instructions)) {\n // We reached a location outside of the instruction bootrom\n return [ true, $accumulator ];\n }\n // Execute everything\n $current_instruction = $instructions[$program_pointer];\n\n if (in_array($program_pointer, $executed)) {\n // We executed this command earlier\n // Since our boot program is stateless, this must mean an infinite\n // loop\n return [ false, null ];\n }\n\n // print($instruction_index.' - '.$program_pointer.': '.$current_instruction.\"\\n\");\n\n // Mark this is executed\n $executed[] = $program_pointer;\n\n if (preg_match('/^nop ([+-][0-9]+)$/', $current_instruction, $parts)) {\n // No op - progress by one\n if ($program_pointer == $instruction_index) {\n // We are supposed to try and change this one to a jmp\n $program_pointer += intval($parts[1]);\n } else {\n // Behave normally\n $program_pointer += 1;\n }\n } elseif (preg_match('/^acc ([+-][0-9]+)$/', $current_instruction, $parts)) {\n // Accumulation\n $program_pointer += 1;\n $accumulator += intval($parts[1]);\n } elseif (preg_match('/^jmp ([+-][0-9]+)$/', $current_instruction, $parts)) {\n // Jump\n if ($program_pointer == $instruction_index) {\n // We are supposed to try and change this one to a noop\n $program_pointer += 1;\n } else {\n // Behave normally\n $program_pointer += intval($parts[1]);\n }\n }\n }\n}", "function yy_r139(){$this->_retvalue = '!='; }", "private function check_label_break($node)\n {\n $lid = ident_to_str($node->id);\n \n if (!isset ($this->labels[$lid]))\n Logger::error_at($node->loc, 'can not break/continue undefined label `%s`', $lid);\n else {\n $label = $this->labels[$lid];\n \n if (!$label->breakable) {\n Logger::error_at($node->loc, 'can not break/continue label `%s` from this position', $lid);\n Logger::info_at($label->loc, 'label was defined here');\n }\n }\n }", "public function isVoid()\n {\n return static::STATUS_VOID == $this->getStatus();\n }", "public function hasStackFrame(){\n return $this->_has(1);\n }", "function drupal_fast_404(){}", "private function movement_check($data) {\n if ($this->SQL->GetPlayerData(Session::get('PlayerGUID'))->AP == 0){\n $data['location_err'] = true;\n }\n // Get Player Gameboard location\n $location = $this->SQL->GetPlayerLocation(Session::get('PlayerGUID'));\n // Look up Gameboard data\n $MapData = $this->SQL->GetMap($location->ID);\n // Check if desired destination is in GetMap (stop teleportation)\n $isTooFar = true;\n foreach ($MapData as $value) {\n if ($value->ID == $data['location']){$isTooFar = false;}\n }\n // Set error flag if an error was found\n $data['HAS_ERRORS'] = true;\n if (\n empty($data['location_err']) &&\n $isTooFar == false\n ) {\n $data['HAS_ERRORS'] = false;\n }\n // Return to the controller\n return($data);\n }", "public static function charIsUndefined($char) {\n $ascii = ord($char);\n return ($ascii <= 0x1f && $char != \"\\t\" && $char != \"\\n\" && $char != \"\\r\")\n || ($ascii >= 0x7f && $ascii <= 0x9f);\n }", "function remove_gaps()\n\t{\n\t\t$ret = false;\n\t\twhile($this->remove_first_gap() !== false)\n\t\t{\n\t\t\t$ret = true;\n\t\t}\n\t\treturn $ret;\n\t}", "public function test_get_non_existent() {\n $this->_cut->get(1);\n }", "public function hasReturnHead()\n {\n return isset($this->return_head);\n }", "abstract public function isWalkable();", "function is_reachable()\r\n {\r\n return $this->is_connected();\r\n }", "function maybe_redirect_404()\n {\n }", "function isFatal(){\n\t\treturn $this->state->isFatal();\n\t}", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "public function is_404();", "private function check_for_no_recursion() {\n $parent_id=$this->navi_parent_page_id;\n if($parent_id=='0') return true;\n for($i=0;$parent_id!='0'&&$i<20;$i++) {\n if(strpos($parent_id,'s')===0) {\n $parent_id=substr($parent_id,1);\n if($parent_id==$this->page_id) return false;\n\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"pages\")->prepare(\"SELECT\n navi_parent_page_id\n FROM\n u235_pages_html\n WHERE\n page_id=:page_id AND\n site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':page_id', $parent_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('120'/*.$e->getMessage()*/);}\n\n /** @noinspection PhpUndefinedVariableInspection PhpUndefinedMethodInspection */\n if(!$qr=$stm->fetch(PDO::FETCH_OBJ)) return false;\n $parent_id=$qr->navi_parent_page_id;\n if($parent_id=='0') return true;\n }\n elseif(strpos($parent_id,'p')===0) {\n $parent_id=substr($parent_id,1);\n if($parent_id==$this->page_id) return false;\n\n try {\n /** @noinspection PhpUndefinedMethodInspection */\n $stm=$this->uFunc->pdo(\"uPage\")->prepare(\"SELECT\n navi_parent_page_id\n FROM\n u235_pages\n WHERE\n page_id=:page_id AND\n site_id=:site_id\n \");\n $site_id=site_id;\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':page_id', $parent_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->bindParam(':site_id', $site_id,PDO::PARAM_INT);\n /** @noinspection PhpUndefinedMethodInspection */$stm->execute();\n }\n catch(PDOException $e) {$this->uFunc->error('130'/*.$e->getMessage()*/);}\n\n /** @noinspection PhpUndefinedVariableInspection PhpUndefinedMethodInspection */\n if(!$qr=$stm->fetch(PDO::FETCH_OBJ)) return false;\n $parent_id=$qr->navi_parent_page_id;\n if($parent_id=='0') return true;\n }\n else return true;\n }\n return false;\n }", "public function add_jump()\n {\n $this->jumps++;\n }", "function __return_false()\n {\n }", "function Step1_IntegrityHard() { return( $this->stepTest( 'integ_') ); }", "public function testRegonLocal6()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function is_trackback()\n {\n }", "function goNoGoForLaunch($place){\n return $this->ship->hold->get($this->fuel()) >= $this->getFuelReqTo($place);\n }", "public function hasUnknownStatus()\n {\n return $this->unknown_status !== null;\n }", "public function isBeingReturned($stackPtr)\n {\n $prevPtr = $this->phpcsFile->findPrevious(T_RETURN, $stackPtr - 1, null, false, null, true);\n if ($this->tokens[$prevPtr]['code'] == T_RETURN) {\n return true;\n } else {\n return false;\n }\n }", "public function testRegonLocal7()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function treeLevelConditionDoesNotMatchFaultyValue() {}", "public function treeLevelConditionDoesNotMatchFaultyValue() {}", "static function unittest_conditionalConnectives () {\n PhlintTest::assertIssues('\n\n class A {}\n\n class B {\n function foo () {\n return true;\n }\n }\n\n function foo (A $a) {\n $b = ($a instanceof B) && $a->foo();\n if ($b->bar()) {}\n if (($b instanceof B) && $b->foo())\n $b->foo();\n }\n\n ', [\n 'Unable to invoke undefined *bool::bar* for the expression *$b->bar()* on line 12.',\n ]);\n }", "public function isEvaluated()\n {\n // does not use compiler, must be false\n return false;\n }", "public function is_404()\n {\n }", "public function testRegonLocal0()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testResolve1()\n{\n\n // Traversed conditions\n // if (!$this->cached) == true (line 193)\n // if (!($prev = $this->handler)) == false (line 194)\n\n $actual = $this->handlerStack->resolve();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function isCoalesced();", "public function jumpto_is_correct($pageid, $jumpto) {\n global $DB;\n\n // First test the special values\n if (!$jumpto) {\n // Same page\n return false;\n } else if ($jumpto == LL_NEXTPAGE) {\n return true;\n } else if ($jumpto == LL_UNSEENBRANCHPAGE) {\n return true;\n } else if ($jumpto == LL_RANDOMPAGE) {\n return true;\n } else if ($jumpto == LL_CLUSTERJUMP) {\n return true;\n } else if ($jumpto == LL_EOL) {\n return true;\n }\n\n $pages = $this->load_all_pages();\n $apageid = $pages[$pageid]->nextpageid;\n while ($apageid != 0) {\n if ($jumpto == $apageid) {\n return true;\n }\n $apageid = $pages[$apageid]->nextpageid;\n }\n return false;\n }", "function defail($de=0)\n {\n ob_start(); $tn=dbug::trap(); dbug::trap('hush');\n if($de){error_reporting(0);};\n return $tn;\n }", "public function hasStackTrace(){\n return $this->_has(7);\n }", "function _quail_server_is_error_page($url, $page, $website) {\n\treturn ($url == $website->ac_server['404_url'] || md5(trim($page)) == $website->ac_server['404_hash']);\n}", "public function isUnhandled()\n {\n foreach ($this->backtrace as $frame) {\n $this->processFrame($frame);\n\n // stop iterating early if we know we're done\n if ($this->state === self::STATE_DONE) {\n break;\n }\n }\n\n return $this->unhandled;\n }", "public function testRegonLocal2()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function languagelesson_unseen_question_jump($lesson, $user, $pageid) {\n global $DB;\n\n // Get the number of retakes.\n if (!$retakes = $DB->count_records(\"languagelesson_grades\", array(\"lessonid\"=>$lesson->id, \"userid\"=>$user))) {\n $retakes = 0;\n }\n\n // Get all the languagelesson_attempts aka what the user has seen.\n if ($viewedpages = $DB->get_records(\"languagelesson_attempts\", array(\"lessonid\"=>$lesson->id, \"userid\"=>$user, \"retry\"=>$retakes), \"timeseen DESC\")) {\n foreach ($viewedpages as $viewed) {\n $seenpages[] = $viewed->pageid;\n }\n } else {\n $seenpages = array();\n }\n\n // Get the lesson pages.\n $lessonpages = $lesson->load_all_pages();\n\n if ($pageid == LL_UNSEENBRANCHPAGE) { // This only happens when a student leaves in the middle of an unseen question within a branch series.\n $pageid = $seenpages[0]; // Just change the pageid to the last page viewed inside the branch table.\n }\n\n // Go up the pages till branch table.\n while ($pageid != 0) { // This condition should never be satisfied... only happens if there are no branch tables above this page.\n if ($lessonpages[$pageid]->qtype == LL_BRANCHTABLE) {\n break;\n }\n $pageid = $lessonpages[$pageid]->prevpageid;\n }\n\n $pagesinbranch = $lesson->get_sub_pages_of($pageid, array(LL_BRANCHTABLE, LL_ENDOFBRANCH));\n\n // This foreach loop stores all the pages that are within the branch table but are not in the $seenpages array.\n $unseen = array();\n foreach ($pagesinbranch as $page) {\n if (!in_array($page->id, $seenpages)) {\n $unseen[] = $page->id;\n }\n }\n\n if (count($unseen) == 0) {\n if (isset($pagesinbranch)) {\n $temp = end($pagesinbranch);\n $nextpage = $temp->nextpageid; // They have seen all the pages in the branch, so go to EOB/next branch table/EOL.\n } else {\n // There are no pages inside the branch, so return the next page.\n $nextpage = $lessonpages[$pageid]->nextpageid;\n }\n if ($nextpage == 0) {\n return LL_EOL;\n } else {\n return $nextpage;\n }\n } else {\n return $unseen[rand(0, count($unseen)-1)]; // Returns a random page id for the next page.\n }\n}", "function CheckCondition()\n\t{\n\t\treturn true;\n\t}", "public function testRegonLocal3()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function for_404() {\n\t\t$indexable = $this->repository->find_for_system_page( '404' );\n\n\t\tif ( ! $indexable ) {\n\t\t\treturn false;\n\t\t}\n\n\n\t\treturn $this->build_meta( $this->context_memoizer->get( $indexable, 'Error_Page' ) );\n\t}", "private function _checkEnd($position){\r\n return $position == $this->_endPoint ? true : false;\r\n /*\r\n * If it's possible that there is no solution for labyrinth\r\n * this function should check if algorithm didn't go back to start tile\r\n */\r\n }", "public function testRegonLocal4()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isHalted(/* ... */)\n {\n return $this->_halt;\n }", "public function breakLoop( $label = null )\n {\n throw new \\FutoIn\\Error( \\FutoIn\\Error::InternalError );\n }", "public function isBeingAssigned($stackPtr)\n {\n $prevPtr = $stackPtr;\n $prevPtr = $this->phpcsFile->findPrevious(T_EQUAL, $stackPtr - 1, null, false, null, true);\n if ($prevPtr !== false) {\n return true;\n }\n /*while (($prevPtr = $this->phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $prevPtr - 1, null, true, null, true)) !== false) {\n if ($this->tokens[$prevPtr]['code'] == T_EQUAL) {\n $prevPtr = $this->phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $prevPtr - 1, null, true);\n return $prevPtr;\n }\n }*/\n return false;\n /*$prevPtr = $this->phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $stackPtr - 1, null, true);\n if ($this->tokens[$prevPtr]['code'] == T_EQUAL) {\n $prevPtr = $this->phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $prevPtr - 1, null, true);\n return $prevPtr;\n }\n else {\n return false;\n }*/\n }", "function exceptionCheck( $page, $url ) {\n global $exceptions;\n if( is_null($exceptions) ) return false;\n foreach( $exceptions as $exception ) {\n if( isset( $exception['ns'] ) ) {\n $temp = explode( ':', $page );\n if( isset( $temp[1] ) && $temp[0] == $exception['ns'] ) return true;\n } else {\n if( $exception['page'] == '*' && $exception['url'] == '*' ) continue;\n if( $page == $exception['page'] || $exception['page'] == '*') {\n if( $url == $exception['url'] || $exception['url'] == '*' ) return true;\n } \n }\n }\n return false;\n}", "function yy_r74()\n {\n $this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + - 1]->minor . ')';\n }", "public function testRegonLocal5()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "static function unittest_emptyWithValues () {\n PhlintTest::assertIssues('\n\n class A {\n function foo () {}\n }\n\n $obj = null;\n\n if (rand(0, 1))\n $obj = new A();\n\n if (!empty($obj)) {\n $obj->foo();\n $obj->bar();\n }\n\n ', [\n 'Unable to invoke undefined *A::bar* for the expression *$obj->bar()* on line 13.',\n ]);\n }", "function letGo()\n {\n }", "function is_defined($handle)\n {\n return isset($this->mBlockHandles[$handle]);\n }", "public function wasHalted()\n\t{\n\t\treturn $this->halted === true;\n\t}", "public function benchThisWillBeSkipped()\n {\n }", "public function has_not_reached_eof()\n {\n return ! @feof($this->file_handle);\n }", "private static function _jump_out( $is_snippet ) {\n\n\t\tif ( $is_snippet ) {\n\t\t\tnocache_headers();\n\t\t\twp_die( '', '', 204 );\n\t\t}\n\n\t\treturn false;\n\t}", "public function tryVisiting($flight) {\n if(!isset($this->airports_to_go_visited[$flight->arrivalAirport->IATA])) {\n $this->airports_to_go_visited[$flight->arrivalAirport->IATA] = true;\n $this->flights_to_go[] = $flight;\n return true;\n }\n return false;\n }", "function output_error() {\r\n return false;\r\n }", "function yy_r138(){$this->_retvalue = '=='; }", "public function testResolve2()\n{\n\n // Traversed conditions\n // if (!$this->cached) == true (line 193)\n // if (!($prev = $this->handler)) == false (line 194)\n\n $actual = $this->handlerStack->resolve();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function isHit()\n {\n return false;\n }", "private function emptyPlaces(){\n //$direccion=;\n //var_dump($direccion);\n return (is_null(Lugares::find()->one()))?true:false;\n }", "function gateway_exit_offsite($post_array=NULL, $url=FALSE, $jump_url= FALSE)\n\t{\n\t\t$this->save_cart_snapshot($this->order('entry_id')); \n\t\t$this->set_status_offsite(array(), $this->order('order_id'), $send_email=FALSE);\n\t\t\n\t\tif ($jump_url !== FALSE)\n\t\t{\n\t\t\techo $this->jump_form($jump_url, $post_array, $hide_jump_form=TRUE, $this->lang('jump_header'), $this->lang('jump_alert'), $this->lang('jump_submit')); \n\t\t\texit; \n\t\t}\n\t\telseif ($url !== FALSE)\n\t\t{\n\t\t\tif ($post_array)\n\t\t\t{\n\t\t\t\t$url .= '?'.$this->data_array_to_string($post_array);\t\n\t\t\t}\n\t\t\t$this->EE->functions->redirect($url);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn; \n\t\t}\n\n\t}", "public function isSunk()\r\n {\r\n return $this->squares == $this->hits;\r\n }", "function generateError()\n{\n unknownFunction();\n // END\n}", "public function hasDefhpper(){\r\n return $this->_has(29);\r\n }", "function yy_r128(){$this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')'; }", "public function isReachable(int $x, int $y): bool\n {\n // C = column, \"null\" wall, empty string = out of matrix\n return !in_array($this->getValue($x, $y), ['null', 'C', '']);\n }", "public function onOutOfBand (): void;", "public function checkisOnCurrentHostInvalidHosts() {}" ]
[ "0.5846149", "0.554881", "0.5212148", "0.52089965", "0.51529634", "0.50676537", "0.5060161", "0.50325316", "0.49669325", "0.4953693", "0.4910436", "0.4910436", "0.4902167", "0.49018475", "0.48875627", "0.48811358", "0.4879892", "0.48684302", "0.48649892", "0.48227948", "0.4822634", "0.48045918", "0.47970957", "0.4790029", "0.47817913", "0.47817913", "0.47482157", "0.4747474", "0.47449425", "0.4744202", "0.47411925", "0.4738627", "0.47066557", "0.46987122", "0.46937165", "0.4673244", "0.46536124", "0.4643817", "0.46419334", "0.46285766", "0.46257517", "0.46224385", "0.46090114", "0.4603974", "0.4602361", "0.4593713", "0.45914704", "0.45904225", "0.45853052", "0.45812055", "0.45788294", "0.45680523", "0.45645395", "0.45634893", "0.45609212", "0.45589498", "0.45492792", "0.45351866", "0.4534507", "0.4524365", "0.4518502", "0.45172438", "0.45168748", "0.45141384", "0.45099926", "0.4507753", "0.45072675", "0.4503646", "0.4496334", "0.4496172", "0.44938222", "0.44920418", "0.4491092", "0.44900197", "0.44862095", "0.44851172", "0.44770727", "0.4474051", "0.44733137", "0.446893", "0.44673324", "0.4462989", "0.44628167", "0.4460953", "0.445911", "0.44470888", "0.44466257", "0.44359905", "0.44349667", "0.44329336", "0.44304556", "0.44228715", "0.44223642", "0.44211861", "0.4420244", "0.44163948", "0.44130245", "0.44112042", "0.4408941", "0.44072688" ]
0.7406535
0
checks if a label can be break/continue'ed
private function check_label_break($node) { $lid = ident_to_str($node->id); if (!isset ($this->labels[$lid])) Logger::error_at($node->loc, 'can not break/continue undefined label `%s`', $lid); else { $label = $this->labels[$lid]; if (!$label->breakable) { Logger::error_at($node->loc, 'can not break/continue label `%s` from this position', $lid); Logger::info_at($label->loc, 'label was defined here'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function breakLoop( $label = null )\n {\n throw new \\FutoIn\\Error( \\FutoIn\\Error::InternalError );\n }", "private function check_jumps()\n {\n static $seen_loop_info = false;\n \n assert(is_array($this->gotos));\n \n foreach ($this->gotos as $lid => $gotos) { \n foreach ($gotos as $goto) {\n if ($goto->resolved === true)\n continue;\n \n if (!isset ($this->labels[$lid]))\n Logger::error_at($goto->loc, 'goto to undefined label `%s`', $goto->id);\n else {\n Logger::error_at($goto->loc, 'goto to unreachable label `%s`', $goto->id);\n Logger::info_at($this->labels[$lid]->loc, 'label was defined here');\n \n if (!$seen_loop_info) {\n $seen_loop_info = true;\n Logger::info_at($goto->loc, 'it is not possible to jump into a loop or switch statement');\n }\n }\n }\n }\n }", "public function continueLoop( $label = null )\n {\n throw new \\FutoIn\\Error( \\FutoIn\\Error::InternalError );\n }", "protected function check_label()\n {\n $regex = \"/^[a-zA-Z_\\-$&%*!?]{1}[a-zA-Z0-9_\\-$&%*!?]*$/\";\n\n $result = preg_match($regex, $this->token);\n\n if($result == 0 or $result == FALSE)\n {\n fwrite(STDERR, \"Error, expecting <label> function parameter! Line: \");\n fwrite(STDERR, $this->lineCount);\n fwrite(STDERR, \"\\n\");\n exit(23);\n } \n }", "public function hasLabel($label)\n {\n }", "public function loopBreak();", "public function hasAutoLabel();", "public function hasVariableLabel() {\n return $this->_has(8);\n }", "public function hasLabel()\n {\n return !empty($this->getLabel());\n }", "public function isLabel(){\n return $this->label;\n }", "private function isLabel($argument, $opcode){\n \n if($argument->Type != \"Unknown\"){\n $this->Error(ERROR_LEX_SYN_ERR, \"Wrong label name\\n\");\n }\n \n $argument->Type = \"label\";\n\n //Check if value start with letter,number, or some of special chars: _, -, $, &, %, *, !, ?\n $pattern = '/^[a-zA-Z\\_\\-\\$\\&\\%\\*\\!\\?][\\w\\_\\-\\$\\&\\%\\*\\!\\?]*$/';\n if(!preg_match($pattern,$argument->Value)){\n $this->Error(ERROR_LEX_SYN_ERR,\"Instruction \".$opcode.\" with wrong argument, invalid name \".$argument->Value.\"\\n\");\n }\n }", "abstract public function isLoop();", "public function getIsLabelHidden(): bool;", "public function hasLabels(){\n return $this->_has(2);\n }", "public function label();", "public function label();", "public function label();", "public function label();", "public function label();", "public function label();", "public function label();", "public function label();", "public function _break()\n {\n //set the internal execution flag to false, stopping execution\n $this->executing = false;\n }", "public function hasOptionalAutoLabel();", "public function hasContinueflag()\n {\n return $this->get(self::CONTINUEFLAG) !== null;\n }", "public function hasLabels(){\n return $this->_has(6);\n }", "public static function label()\n {\n }", "public abstract function label();", "protected function break_flow()\n\t{\n\t\t$this->_flow = PAGE_FLOW_BREAK;\n\t}", "public function isLabelEditable() {}", "public static function _break($self)\n {\n $self->_break();\n }", "public function loop( callable $func, $label = null )\n {\n throw new \\FutoIn\\Error( \\FutoIn\\Error::InternalError );\n }", "function isValidLongLabel($longLabel) {\n\tunset($longLabel);\n\treturn true;\n}", "public function onBlockBreak(\\pocketmine\\event\\block\\BlockBreakEvent $event) {\r\n\r\n if($event->getBlock()->getLevel()->getName() == $this->getName()) {\r\n\r\n $event->setCancelled();\r\n\r\n }\r\n\r\n }", "public function AcceptPageBreak() {\r\n\t\t$this->pagina_nueva = true;\r\n\t return false;\r\n\t}", "public function visitBreakAstNode( ezcTemplateBreakAstNode $break )\n {\n $this->generateOptionalUnaryControl( $break, \"break\" );\n }", "function setLabelBreak($HTML){\n\n\t\t$this->labelBreak = $HTML;\n\n\t}", "abstract protected function label(): string;", "public function contains($label);", "public function autoLabelNeeded();", "public function getType()\n\t{\n\t\treturn 'break';\n\t}", "function setNoBreak() {\t \r\n\t \t$this->noBreak = true;\r\n\t}", "public function isLabelPrivate()\n {\n return ($this->label == 'private');\n }", "abstract function labels();", "public function label() { }", "protected function hasLabels()\n {\n $showLabels = $this->getConfigParam('showLabels'); // plus abfrage $this-showLabels kombinieren.\n if ($this->autoPlaceholder && $showLabels !== ActiveForm::SCREEN_READER) {\n $showLabels = false;\n }\n\n return $showLabels;\n }", "public function canContinue()\n {\n return $this->number_of_rounds >= $this->getRoundsCount();\n }", "public function testGetLabelByInvalidName() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('getLabelByName')\n ->will($this->returnValue(NULL));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->getLabelByName($testCase['label_name']);\n $this->assertNull($result);\n }\n }", "abstract protected function isValidLabelsCount(array $data = []);", "function buildLabel($label) {\n return check_plain($label);\n }", "public function testSwitchCaseNeedBreak() {\r\n\t\t$phpcheckstyle = $GLOBALS['PHPCheckstyle'];\r\n\r\n\t\t$phpcheckstyle->processFiles(array(\r\n\t\t\t'./test/sample/switch_multi_case.php'\r\n\t\t));\r\n\r\n\t\t$errorCounts = $phpcheckstyle->getErrorCounts();\r\n\r\n\t\t$this->assertEquals(0, $errorCounts['error'], 'We expect 0 error');\r\n\t\t$this->assertEquals(0, $errorCounts['ignore'], 'We expect 0 ignored checks');\r\n\t\t$this->assertEquals(0, $errorCounts['info'], 'We expect 0 info');\r\n\t\t$this->assertEquals(1, $errorCounts['warning'], 'We expect 1 warnings');\r\n\t}", "function is_valid_for_label( $char, $pos=-1 ){\n // except for the first character that cannot be a numeral or an hyphen or a period.\n if( ($char>='A' && $char<='Z') || ($char>='a' && $char<='z') || ($char=='_') || (($char=='-')&&($pos!=0)) || (($char>='0' && $char<='9')&&($pos!=0)) || (($char=='.')&&($pos!=0)) ){\n return true;\n }\n return false;\n }", "protected function setBreakFlag()\n\t{\n\t\t$registry = Factory::getConfiguration();\n\t\t$registry->set('volatile.breakflag', true);\n\t}", "public function onBreakBlock(BlockBreakEvent $event) {\n\t\tif (!$event->getPlayer()->canPlaceBreakBlocks()) {\n\t\t\t$event->setCancelled(true);\n\t\t}\n\t\t$b = $event->getBlock();\n\t\t$area = $event->getPlayer()->currentArea;\n\t\tif ($b->x < $area->centerX - $area->kickSize || $b->z < $area->centerZ - $area->kickSize ||\n\t\t\t\t$b->x > $area->centerX + $area->kickSize || $b->z > $area->centerZ + $area->kickSize) {\n\t\t\t$event->setCancelled(true);\n\t\t\t$event->getPlayer()->sendLocalizedMessage(\"BREAK_BLOCK_ERROR\", array(), TextFormat::RED);\t\t\n\t\t\treturn;\n\t\t}\n\t}", "function is_sentence_breaker($char, $nextchar, $nextnextchar) {\n if (($char == '.' || $char == '-') && ($this->is_white_space($nextchar)))\n return 1;\n //,\n if (ord($char) == 239 && ord($nextchar) == 188 && ord($nextnextchar) == 140)\n return 3;\n //。\n if (ord($char) == 227 && ord($nextchar) == 128 && ord($nextnextchar) == 130)\n return 3;\n //、\n if (ord($char) == 227 && ord($nextchar) == 128 && ord($nextnextchar) == 129)\n return 3;\n //;\n if (ord($char) == 239 && ord($nextchar) == 188 && ord($nextnextchar) == 155)\n return 3;\n //:\n if (ord($char) == 239 && ord($nextchar) == 188 && ord($nextnextchar) == 154)\n return 3;\n //∙\n if (ord($char) == 226 && ord($nextchar) == 136 && ord($nextnextchar) == 153)\n return 3;\n //·\n if (ord($char) == 194 && ord($nextchar) == 183)\n return 2;\n return (strpos(',?()[]{}\"!:|;' . TP_GTXT_BRK . TP_GTXT_BRK_CLOSER . TP_GTXT_IBRK . TP_GTXT_IBRK_CLOSER, $char) !== false) ? 1 : 0; // TODO: might need to add < and > here\n }", "public function onBreak(BlockBreakEvent $event){\n\t\tif($event->getBlock()->getLevel()->getTile($event->getBlock()) instanceof CustomChest) $event->setCancelled();\n\t}", "static function unittest_loopBarrier () {\n PhlintTest::assertIssues('\n class A {\n function foo () {}\n }\n function foo () {\n /** @var A */\n $a = null;\n foreach ([1, 2, 3] as $x) {\n if (is_null($a))\n break;\n else\n $a->foo();\n $a->foo();\n }\n $a->foo();\n }\n ', [\n 'Unable to invoke undefined *mixed::foo* for the expression *$a->foo()* on line 14.',\n ]);\n }", "public function hasLabel($fieldName) {\n\t\t$field = $this->getField($fieldName);\n\t\treturn empty($field['label']) ? FALSE : TRUE;\n\t}", "public static function doesLeaveBlock(array $stmts, $check_continue = true, $check_break = true)\n {\n if (empty($stmts)) {\n return false;\n }\n\n for ($i = count($stmts) - 1; $i >= 0; --$i) {\n $stmt = $stmts[$i];\n\n if ($stmt instanceof PhpParser\\Node\\Stmt\\Return_ ||\n $stmt instanceof PhpParser\\Node\\Stmt\\Throw_ ||\n $stmt instanceof PhpParser\\Node\\Expr\\Exit_ ||\n ($check_continue && $stmt instanceof PhpParser\\Node\\Stmt\\Continue_) ||\n ($check_break && $stmt instanceof PhpParser\\Node\\Stmt\\Break_)\n ) {\n return true;\n }\n\n if ($stmt instanceof PhpParser\\Node\\Stmt\\If_) {\n if ($stmt->else &&\n self::doesLeaveBlock($stmt->stmts, $check_continue, $check_break) &&\n self::doesLeaveBlock($stmt->else->stmts, $check_continue, $check_break)\n ) {\n if (empty($stmt->elseifs)) {\n return true;\n }\n\n foreach ($stmt->elseifs as $elseif) {\n if (!self::doesLeaveBlock($elseif->stmts, $check_continue, $check_break)) {\n return false;\n }\n }\n\n return true;\n }\n }\n\n if ($stmt instanceof PhpParser\\Node\\Stmt\\Switch_) {\n $has_left = false;\n\n $has_default_leaver = false;\n\n // iterate backwards in a case statement\n for ($i = count($stmt->cases) - 1; $i >= 0; --$i) {\n $case = $stmt->cases[$i];\n\n $case_does_leave = self::doesEverBreakOrContinue($case->stmts, true);\n\n if ($case_does_leave) {\n $has_left = true;\n }\n\n if (!$case_does_leave && !$has_left) {\n return false;\n }\n\n if (!$case->cond && $case_does_leave) {\n $has_default_leaver = true;\n }\n }\n\n return $has_default_leaver;\n }\n\n if ($stmt instanceof PhpParser\\Node\\Stmt\\Nop) {\n continue;\n }\n\n return false;\n }\n\n return false;\n }", "public function branching()\n {\n }", "function CheckPageBreak($h){\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function setBreaks($label, $field, $option=\"*NONE*\"){\n\n\t\t$this->labelBreak = $label;\n\t\t$this->fieldBreak = $field;\n\t\tif($option!=\"*NONE*\") $this->optionBreak = $option;\n\n\t}", "public function continue() : StateMachine;", "private function recordLoopContextForBreakOrContinue(Context $child_context): void\n {\n for ($i = \\count($this->parent_node_list) - 1; $i >= 0; $i--) {\n $node = $this->parent_node_list[$i];\n switch ($node->kind) {\n // switch handles continue/break the same way as regular loops. (in PostOrderAnalysisVisitor::visitSwitch)\n case ast\\AST_SWITCH:\n case ast\\AST_FOR:\n case ast\\AST_WHILE:\n case ast\\AST_DO_WHILE:\n case ast\\AST_FOREACH:\n if (isset($node->phan_loop_contexts)) {\n $node->phan_loop_contexts[] = $child_context;\n } else {\n $node->phan_loop_contexts = [$child_context];\n }\n break;\n case ast\\AST_FUNC_DECL:\n case ast\\AST_CLOSURE:\n case ast\\AST_ARROW_FUNC:\n case ast\\AST_METHOD:\n case ast\\AST_CLASS:\n // We didn't find it.\n return;\n }\n }\n }", "public function checkControlExists($name);", "public function testLabelWithElement()\n {\n $input = new Formulaic\\Text;\n $label = new Formulaic\\Label('Label', $input);\n yield assert(\"$label\" == <<<EOT\n<label>Label</label>\n<input type=\"text\">\nEOT\n );\n }", "public function asyncBreak();", "private static function verifyIsNull(string $label, string $value = null)\n {\n if (is_null($value) || empty($label)) {\n throw new XLR8Exception(sprintf(self::ERROR_IS_REQUIRED, $label));\n }\n }", "protected function isThereHiddenError(): bool\n {\n // TODO when phpmd found a sintaxis error finish succefully instead of error.\n // for different versions of the tool the error output is different\n // if (is_int(strpos($this->exit[3], 'No mess detected'))) {\n // return false;\n // }\n return true;\n }", "public function ajaxProcessIsLabelReady()\n {\n $this->ajax = true;\n $id_order = (int)Tools::getValue('id_order');\n\n $attempts = 15;\n while ($attempts--) {\n if (!$this->getShipment($id_order)) {\n usleep(300000);\n continue;\n }\n return true;\n }\n return false;\n }", "abstract public function getLabel();", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "function CheckPageBreak($h)\n\t{\n\t if($this->GetY()+$h>$this->PageBreakTrigger)\n\t $this->AddPage($this->CurOrientation);\n\t}", "abstract function add_label();", "function CheckPageBreak($h)\r\n{\r\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n\t\t$this->AddPage($this->CurOrientation);\r\n}", "function CheckPageBreak($h)\r\n{\r\n\tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n\t\t$this->AddPage($this->CurOrientation);\r\n}", "function _checkGoto($a_target)\n\t{\n\t\tglobal $ilAccess;\n\t\t$t_arr = explode('_', $a_target);\n\t\tif ($t_arr[0] != 'orgu' || ((int)$t_arr[1]) <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif ($ilAccess->checkAccess('read', '', $t_arr[1])) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "static function checkFQDNLabel($label) {\n\n if (strlen($label) == 1) {\n if (!preg_match(\"/^[0-9A-Za-z]$/\", $label, $regs)) {\n return false;\n }\n } else {\n $fqdn_regex = \"/^(?!-)[A-Za-z0-9-]{1,63}(?<!-)$/\";\n if (!preg_match($fqdn_regex, $label, $regs)) {\n //check also Internationalized domain name\n $punycode = new TrueBV\\Punycode();\n $idn = $punycode->encode($label);\n if (!preg_match($fqdn_regex, $idn, $regs)) {\n return false;\n }\n }\n }\n\n return true;\n }", "function is_loop($i = 0)\n {\n }", "public static function isValidIdentifierName($name)\n {\n if (\\is_string($name) === \\false || $name === '' || \\strpos($name, ' ') !== \\false) {\n return \\false;\n }\n return \\preg_match(self::PHP_LABEL_REGEX, $name) === 1;\n }", "function _checkGoto($a_target)\n\t{\n\t\tglobal $ilAccess;\n\t\t\n\t\t$t_arr = explode(\"_\", $a_target);\n\n\t\tif ($ilAccess->checkAccess(\"read\", \"\", $t_arr[1]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function testShowHideLabel() {\r\n\t\t$this->testObject->setLabel ( 'testlabel' )->hideLabel ();\r\n\t\t$this->assertTrue ( '' == $this->testObject->getLabelHtml (), 'hidden label returned more than a blank string' );\r\n\t\t\r\n\t\t$this->testObject->showLabel ();\r\n\t\t$this->assertTrue ( '<label id=\"' . self::TEST_CONTROL_ID . '_label\" for=\"' . self::TEST_CONTROL_ID . '\">testlabel</label>' == $this->testObject->getLabelHtml (), 'incorrect label html returned' );\r\n\t}", "function CheckPageBreak1($h)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger)\r\n $this->AddPage($this->CurOrientation);\r\n}", "public function hasFeedback($label = null) {\n if ($label != null) {\n $hasFeedback = isset($this->feedback[$label]) && $this->feedback[$label] != '';\n\t\t} else {\n $hasFeedback = sizeof($this->feedback) > 0 && implode('', $this->feedback) != '';\n }\n return $hasFeedback;\n }", "function CheckPageBreak($h){\r\n \tif($this->GetY()+$h>$this->PageBreakTrigger)\r\n \t\t$this->AddPage($this->CurOrientation);\r\n }", "public function testCanInstantiate() : void\r\n {\r\n $this->assertInstanceOf(NonVoidElement::class, new Label);\r\n }", "function CheckPageBreak($h,$pru)\r\n{\r\n if($this->GetY()+$h>$this->PageBreakTrigger){\r\n $this->AddPage($this->CurOrientation);\r\n\t\t\t\t$x=$this->GetX();\r\n\t\t$this->SetX($pru);\r\n\t\t}\r\n}", "public function isButtonValidInvalidButtonGivenExpectFalse() {}", "public function next($basic)\n {\n $p = $this->parent;\n // find the first loop block to break\n while ($p && $p->isLoop() == false) {\n $p = $p->parent;\n }\n\n $this->parent->terminate($basic); // quit the parent block immediately (could be an IF Block)\n if ($p->parent) { // do not quit the outmost block.\n return $block = $p->terminate($basic); // quit the loop.\n return $p->parent->next($basic); // return the next statement after the loop.\n }\n\n throw new \\Exception (\"Can only break loops.\");\n\n }", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();" ]
[ "0.7005193", "0.65601", "0.65024096", "0.607465", "0.5874888", "0.5827079", "0.5648772", "0.5470186", "0.53847295", "0.5367501", "0.53097904", "0.5302873", "0.52961314", "0.5277466", "0.5272234", "0.5272234", "0.5272234", "0.5272234", "0.5272234", "0.5272234", "0.5272234", "0.5272234", "0.5262115", "0.5245861", "0.51887393", "0.5182865", "0.51679397", "0.515107", "0.50675213", "0.49626225", "0.49376574", "0.49372727", "0.49212283", "0.48829773", "0.48556283", "0.48251313", "0.48160315", "0.4815225", "0.48114195", "0.48109564", "0.47919527", "0.47846052", "0.47696", "0.4765241", "0.47461408", "0.47390068", "0.47292688", "0.47163346", "0.4711057", "0.46922898", "0.46847695", "0.46674553", "0.46660218", "0.46655968", "0.4648162", "0.46445784", "0.45925176", "0.4580682", "0.45780692", "0.45715436", "0.4530943", "0.45237464", "0.45202985", "0.45139676", "0.45095283", "0.45092267", "0.45074552", "0.4504794", "0.44984084", "0.449549", "0.44927153", "0.44809163", "0.44809163", "0.44788083", "0.44775268", "0.44775268", "0.4473825", "0.44697097", "0.44601628", "0.44555816", "0.4449142", "0.4444239", "0.44342798", "0.4431303", "0.4427673", "0.44260827", "0.44255248", "0.44229367", "0.4419533", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413", "0.44188413" ]
0.7716269
0
configration form for calculator data fetch from database.
protected function specific_definition($mform) { $arr = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16); $mform->addElement('header', 'configheader', get_string('blocksettings', 'block_caldata')); $mform->addElement('select','config_select', get_string('blocktxt', 'block_caldata'),$arr); $mform->setDefault('config_select',10); $mform->setType('config_select', PARAM_RAW); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getConfigForm()\n {\n $config_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Equivalence surcharge'),\n 'name' => 'PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED',\n 'is_bool' => true,\n 'desc' => $this->l('Enable equivalence surcharge when calculating profit'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n\n\n $available_taxes = $this->getAvailableTaxes();\n foreach ($available_taxes as $tax) {\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\",\n 'label' => $this->l($tax['name']),\n 'desc' => $this->l('Equivalence surcharge'),\n 'suffix' => '%', \n 'col' => 1,\n );\n }\n\n $config_form['form']['input'][] = array( // @TODO: Default shipping cost for each carrier\n 'type' => 'text',\n 'name' => 'PROFITMARGIN_DEFAULT_SHIPPING_COST',\n 'label' => $this->l('Default shipping cost'),\n 'suffix' => '€', \n 'col' => 1,\n );\n\n $config_form['form']['input'][] = array(\n 'type' => 'radio',\n 'name' => 'PROFITMARGIN_SHIPPING_COST_TAX',\n 'label' => $this->l('Shipping cost tax'),\n 'values' => array()\n );\n \n foreach ($available_taxes as $tax) {\n $shipping_cost_tax = &$config_form['form']['input'];\n $shipping_cost_tax[array_key_last($shipping_cost_tax)]['values'][] = array(\n 'id' => \"tax_{$tax['id_tax']}\",\n 'value' => $tax['id_tax'],\n 'label' => $this->l($tax['name'])\n );\n }\n \n foreach ($this->getAvailablePaymentModules() as $payment_module) {\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\",\n 'label' => $this->l($payment_module['name']),\n 'desc' => $this->l('Base fee'),\n 'suffix' => '€', \n 'col' => 1,\n );\n $config_form['form']['input'][] = array(\n 'type' => 'text',\n 'name' => \"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\",\n 'desc' => $this->l('Percentage fee'),\n 'suffix' => '%',\n 'col' => 1,\n );\n }\n\n return $config_form;\n }", "protected function calculator($calculatorId)\n {\n//echo 'function calculator(' . $calculatorId . ')' . \"\\n\\n\"; // debug\n // load the calculator\n $calculator['id'] = $calculatorId;\n \n if(!$Calculator = Doctrine::getTable('Calculator')->find($calculatorId))\n {\n \n \t// calculator does not exist\n \t\n $calculator['error'] = 1;\n $calculator['errorMessage'] = 'ERROR: Calculator does not exist';\n\n return $calculator;\n \n }\n elseif($Calculator->status_code != 700)\n {\n \n \t// calculator is not active\n \t\n $calculator['error'] = 1;\n $calculator['errorMessage'] = 'ERROR: Calculator is not active';\n \n return $calculator;\n \n }\n \n // calculator name\n \n $calculator['name'] = $Calculator->getName();\n \n $calculator['css'] = strtolower(str_replace(' ', '-', str_replace('/ ', '', $Calculator->getName())));\n \n // load the calculator values\n \n $query = Doctrine_Query::create()\n ->from('CalculatorValue cava')\n ->where('cava.calculator_id = ?', $calculatorId)\n ->orderBy('cava.display_order ASC');\n //->useResultCache(true); // use in production environment\n \n $calculatorValues = $query->execute();\n \n foreach ($calculatorValues as $i => $CalculatorsValue)\n {\n\n//echo $CalculatorsValue->getId();\n \t\n \t// load the calculators meta data\n \t\n \t$query = Doctrine_Query::create()\n ->from('CalculatorValueMeta cavm')\n ->where('cavm.calculator_value_id = ?', $CalculatorsValue->getId())\n ->andwhere('cavm.status_code = 700');\n \n $calculatorValueMetas = $query->execute();\n\n\t \n $iOption = 0;\n \n foreach ($calculatorValueMetas as $CalculatorsValueMeta)\n {\n \n\t\tif($CalculatorsValueMeta->getMetaName() == 'option')\n \t{\n\n \t\t// option as array\n \t\t\n\t\t\t$calculator['values'][$i][$CalculatorsValueMeta->getMetaName()][++$iOption]['option'] = $CalculatorsValueMeta->getMetaData();\n \t\t\n \t}\n \telseif($CalculatorsValueMeta->getMetaName() == 'option-value')\n \t{\n \t\t\n \t\t$calculator['values'][$i]['option'][$iOption]['value'] = $CalculatorsValueMeta->getMetaData();\n \t\t\n \t}\n \telse\n \t{\n \n \t\t$calculator['values'][$i][$CalculatorsValueMeta->getMetaName()] = $CalculatorsValueMeta->getMetaData();\n \n \t}\n\n }\n \n }\n \n//print_r($calculator);\n \n return $calculator;\n \n }", "private function setCalculate() {\n\n if($this->getType() == 2) {\n $det = new CalculateTwo($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n elseif($this->getType() == 3) {\n\n $det = new CalculateThree($this->array);\n $this->result = $det->getResult();\n $this->rule = $det->getRule();\n $this->ruleExplanation = $det->getRuleExplanation();\n }\n else {\n $this->getPivot();\n $this->result = $this->setResult();\n $this->rule = $this->getPivotRule();\n $this->ruleExplanation = $this->process;\n }\n }", "function result()\n\t\t{\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(10,50);\n\t\t\t$number1->generate_number();\n\n\t\t\t//generate second number\n\t\t\t$number2 = new Operand(10,50);\n\t\t\t$number2->generate_number();\n\t\t\t\n\t\t\t//generate operator\n\t\t\t$operator = new Operator('+-*');\n\t\t\t$operator->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator->Operator;\n\t\t\t$c= $number2->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$d= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$d= $a - $c;\n\t\t\t}\n\t\t\tif ($b=='*')\n\t\t\t{\n\t\t\t\t$d= $a * $c;\n\t\t\t}\n\t\n\t\t\t$this->expression =$a.$b.$c;\n\t\t\t$this->security_code=$d;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t}", "function result()\n\t\t{\t\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(1,10);\n\t\t\t$number1->generate_number();\n\n\t\t\t//generate second number\t\n\t\t\t$number2 = new Operand(1,10);\n\t\t\t$number2->generate_number();\n\t\n\t\t\t//generate operator\n\t\t\t$operator = new Operator('+-');\n\t\t\t$operator->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator->Operator;\n\t\t\t$c= $number2->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$d= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$d= $a - $c;\n\t\t\t}\n\t\t\t\n\t\t\t$this->expression =$a.$b.$c;\n\t\t\t$this->security_code=$d;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t}", "function result()\n\t\t{\n\t\t\t//generate first number\n\t\t\t$number1 = new Operand(1,10);\n\t\t\t$number1->generate_number();\n\t\t\t\n\t\t\t//generate second number\n\t\t\t$number2 = new Operand(1,10);\n\t\t\t$number2->generate_number();\n\t\t\t\n\t\t\t//generate third number\n\t\t\t$number3 = new Operand(1,10);\n\t\t\t$number3->generate_number();\n\t\t\t\n\t\t\t//generate first operator\n\t\t\t$operator1 = new Operator('+-*');\n\t\t\t$operator1->generate_operator();\n\t\t\t\n\t\t\t//generate second operator\n\t\t\t$operator2= new Operator('+-*');\n\t\t\t$operator2->generate_operator();\n\t\t\t\n\t\t\t//calculate result\n\t\t\t$a= $number1->number;\n\t\t\t$b= $operator1->Operator;\n\t\t\t$c= $number2->number;\n\t\t\t$d= $operator2->Operator;\n\t\t\t$e= $number3->number;\n\t\t\tif ($b=='+')\n\t\t\t{\n\t\t\t\t$temp= $a + $c;\n\t\t\t}\n\t\t\tif ($b=='-')\n\t\t\t{\n\t\t\t\t$temp= $a - $c;\n\t\t\t}\n\t\t\tif ($b=='*')\n\t\t\t{\n\t\t\t\t$temp= $a * $c;\n\t\t\t}\n\n\t\t\tif ($d=='+')\n\t\t\t{\n\t\t\t\t$result= $temp + $e;\n\t\t\t}\n\t\t\tif ($d=='-')\n\t\t\t{\n\t\t\t\t$result= $temp - $e;\n\t\t\t}\n\t\t\tif ($d=='*')\n\t\t\t{\n\t\t\t\t$result= $temp * $e;\n\t\t\t}\n\t\t\t\n\t\t\t$this->expression =$a.$b.$c.$d.$e;\n\t\t\t$this->security_code=$result;\n\t\t\t$this->a = $a;\n\t\t\t$this->b = $b;\n\t\t\t$this->c = $c;\n\t\t\t$this->d = $d;\n\t\t\t$this->e = $e;\n\t\t}", "function ShippingCalculator($config) {\n\t\tif($config) {\n\t\t\tforeach($config as $k => $v) $this->$k = $v;\n\t\t}\n\t}", "public function getCalculators();", "public function form()\n {\n $this->select('type', '计算类型')\n ->options(Interest::$typeMap)\n ->default(Interest::TYPE_FUTURE)->required();\n\n $this->number('value', '计算值')->required();\n $this->number('years', '存入年限')->required();\n $this->rate('rate', '年化利率')->required();\n }", "function conf()\n {\n $dato_anio = toba::memoria()->get_parametro('filtro_anio');\n $dato_ua = toba::memoria()->get_parametro('filtro_ua');\n if(isset($dato_anio)){//el anio es filtro obligatorio asi que siempre vuelve con este dato\n $auxiliar['valor']=$dato_anio;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['anio']=$auxiliar;\n\n if(isset($dato_ua)){//viene desde informe de estado actual\n $auxiliar['valor']=$dato_ua;\n $auxiliar['condicion']='es_igual_a';\n $auxiliar2['uni_acad']=$auxiliar;\n }\n $this->s__datos_filtro=$auxiliar2;\n }\n }", "protected function get_calculator($parameters){\n\t\t$parameters['i_effective'] = array(\n\t\t\t'name'=> 'i_effective',\n\t\t\t'label' => self::myMessage( 'fm-label_i_effective'),\n\t\t\t);\n\t\t$parameters['value'] = array(\n\t\t\t'name'=> 'value',\n\t\t\t'label' => self::myMessage( 'fm-label_value_total'),\n\t\t\t);\n\t\t$valid_options = array();\n\t\t$valid_options['i_effective'] = array(\n\t\t\t\t\t\t'type'=>'number',\n\t\t\t\t\t\t'decimal'=>'.',\n\t\t\t\t\t\t'min' => -0.99,\n\t\t\t\t\t);\n\t\t$valid_options['value'] = array(\n\t\t\t\t\t\t'type'=>'number',\n\t\t\t\t\t\t'decimal'=>'.',\n\t\t\t\t\t);\n\t\t$values = array();\n\t\t$form = array();\n\t\t$form['method'] = 'GET';\n\t\t$form['parameters'] = $parameters;\n\t\t$form['valid_options'] = $valid_options;\n\t\t$form['request'] = $this->get_request();\n\t\t$form['render'] = 'HTML';\n\t\t$form['introduction'] = self::myMessage( 'fm-value-cashflows') ;\n\t\t$form['submit'] = self::myMessage( 'fm-calculate');\n\t\t$form['exclude'] = array();\n\t\t$form['values'] = $values;\n\t\t$form['hidden'] = $this->get_hidden_cashflow_fields();\n\t\treturn $form;\n\t}", "public function loadConfig(){\n\t\t\n\t\t$opt[] = [\n\t\t\t'method' => 'setFormParams',\n\t\t\t'value'=>$this->paramsLoad(3, \\sevian\\s::getReq('command_idx'), \\sevian\\s::getReq('unit_idx'))\n\t\t\t\n\t\t];\n\t\t$this->info = $opt;//$form->getInfo();\n\t}", "private function setExercicio(){\n\t\t$this->Enunciado = $this->Data['enunciado'];\n\t\t$this->A = $this->Data['opA'];\n\t\t$this->B = $this->Data['opB'];\n\t\t$this->C = $this->Data['opC'];\n\t\t$this->D = $this->Data['opD'];\n\t\t$this->E = $this->Data['opE'];\n\t\t$this->Correta = $this->Data['correta'];\n\n\t\t$this->Query = ['c_enumexer' => $this->Enunciado,\n\t\t\t\t\t\t'c_altaexer' => $this->A,\n\t\t\t\t\t\t'c_altbexer' => $this->B,\n\t\t\t\t\t\t'c_altcexer' => $this->C,\n\t\t\t\t\t\t'c_altdexer' => $this->D,\n\t\t\t\t\t\t'c_alteexer' => $this->E,\n\t\t\t\t\t\t'c_correxer' => $this->Correta];\n\n\t}", "protected function setOperand () {\n $modelName = Str::camel($this->validation->master->data_model->name);\n $columnName = $this->validation->master->column_detail->name;\n\n $this->operand = $this->request[ $modelName ]->$columnName ?? 'INVALID';\n }", "function calculate_data() {\n $this->data = $this->get_default_data();\n\n // Get extra icons... send list of filters but don't include exceptions - as we do need the filter list here\n $exceptions = $this->get_filter_exceptions();\n $rest_of_filters = array();\n foreach ($this->filter->_fields as $key => $value) {\n if (!in_array($key,$exceptions)) {\n $rest_of_filters[] = $key;\n }\n }\n // Pass the rest_of_filters array, but then also let the method know this is a special config filter\n $extra_icons = $this->filter->get_sql_filter('',\n $rest_of_filters,\n $this->allow_interactive_filters(),\n $this->allow_configured_filters(),\n '',\n true);\n\n foreach ($this->data as $key => $value) {\n\n //If key is in choices array and not in extra_icons\n if (array_key_exists($key,$this->checkboxes_filter->options['choices']) &&\n !strpos($extra_icons,$key)) {\n // then we need to remove it from $this->data in fact...\n unset($this->data[$key]);\n continue;\n }\n //first step - try getting the item value directly\n $data_item = $this->get_data_item($key);\n\n if ($data_item !== FALSE) {\n $this->data[$key]->value = $data_item;\n } else {\n //backup plan - use SQL query to get the item value\n\n $use_filters = true;\n $sql = $this->get_data_item_sql($key, $use_filters);\n if ($sql !== FALSE) {\n //parse SQL for a WHERE clause\n\n $has_where_clause = php_report::sql_has_where_clause($sql);\n\n $conditional_symbol = 'WHERE';\n\n if($has_where_clause) {\n $conditional_symbol = 'AND';\n }\n\n // apply filters if applicable\n if(!empty($this->filter) && !empty($use_filters)) {\n // Include filter_exceptions here so that our config type filter is not included in the filters added to the final sql\n $sql_filter = $this->filter->get_sql_filter('',\n $this->get_filter_exceptions($key),\n $this->allow_interactive_filters(),\n $this->allow_configured_filters());\n if(!empty($sql_filter)) {\n $sql .= \" {$conditional_symbol} ({$sql_filter})\";\n }\n }\n //obtain field value\n if ($field_data = get_field_sql($sql)) {\n $this->data[$key]->value = $field_data;\n }\n }\n }\n }\n\n }", "function calculate() {\n switch($this->operator) {\n case \"add\":\n return $this->num1 + $this->num2;\n case \"sub\":\n return $this->num1 - $this->num2;\n case \"mult\":\n return $this->num1 * $this->num2;\n case \"div\":\n return $this->num1 / $this->num2;\n default:\n return \"Invalid Operator\";\n }\n }", "public function setConfiguration(){\n\t\t/* Check the attributes type supported by system */\n\t\t/* debugVar(unserialize(LEAD_ATTRIBUTE_INPUT_ELEMENT), true); */\n\t\t\n\t\t/* Check the attributes validation type supported by system */\n\t\t/* debugVar(unserialize(LEAD_ATTRIBUTE_INPUT_VALIDATION), true); */\n\t\t\n\t\t/* Creating form object */\n\t\t$objForm\t= new Form();\n\t\t\t\t\t\n\t\t/* variable initialization */\n\t\t$strConfigArr[\"exiting_attr\"]\t= array(\"policy\" => array('attri_value_list'=>$objForm->getDropDown(getArrByKeyvaluePairs($this->_setPolicyList(),\"id\",\"name\"),'',false,false)));\n\t\t\n\t\t/* if parent schema is passed then do needful */\n\t\tif(isset($this->_strDataSet[\"table\"]) && ($this->_strDataSet[\"table\"] != \"\")){\n\t\t\t/* Custom Query */\n\t\t\t$strConfigArr[\"customQuery\"]\t= array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"table\"=>$this->_strDataSet[\"table\"],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"column\"=>array(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"where\"=>array(),\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t/* removed used variables */\n\t\tunset($objForm);\n\t\t\n\t\t/* return configuration set */\n\t\treturn $strConfigArr;\n\t\t\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 6,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Ingrese un token de empresa - Vea la documentación'),\n 'name' => 'APISFACT_PRESTASHOP_TOKEN',\n 'label' => $this->l('Token'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese la serie para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEF',\n 'label' => $this->l('Serie Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROF',\n 'label' => $this->l('Numero de Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese la serie para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEB',\n 'label' => $this->l('Serie Boleta'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROB',\n 'label' => $this->l('Numero de Boleta'),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function calcular_cotizacion(){\t\n\t\tif (isset($_POST['envio']) && $_POST['envio']==\"Calcular\"){\n\t\t\t$this->asignar_valores();\n\t\t\t//$sql=\"INSERT INTO color VALUES ('', '$this->nombre', '$this->codigo')\";\n\t\t\t//$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$costante=array (24 => 0.0528711,36 => 0.0392329,48 => 0.0326018,60 => 0.0287680);\n\t\t\t\n\t\t\tif($this->tipo==\"Usado\"){ $porcentaje=0.4; $this->indicador=40;}\n\t\t\tif($this->tipo==\"Nuevo\"){ $porcentaje=0.3; $this->indicador=30;}\n\t\t\t\t$media=$this->valor_vehiculo*$porcentaje;\n\t\t\tif($this->valor_inicial>=$media){\n\t\t\t\t$this->saldo=$this->valor_vehiculo-$this->valor_inicial;\n\t\t\t\t$this->comision=$this->saldo*0.03;\n\t\t\t\t$this->cuotas=$this->saldo*$costante[$this->plazo];\n\t\t\t\t$this->total=$this->valor_inicial+$this->comision;\n\t\t\t\t$this->mensaje=1;\n\t\t\t}else{\n\t\t\t\t$this->mensaje=2;\n\t\t\t}\n\t\t}\t\t\t\n\t}", "public function calcMethod()\n {\n\n switch ($this->calc) {\n case \"Ditambah\":\n $result = $this->num1 + $this->num2;\n break;\n case \"Dikurang\":\n $result = $this->num1 - $this->num2;\n break;\n case \"Dikali\":\n $result = $this->num1 * $this->num2;\n break;\n case \"Dibagi\":\n $result = $this->num1 / $this->num2;\n break;\n default:\n $result = \"ERROR\";\n break;\n }\n\n return $result; //return the result\n\n }", "protected function evalConfig($config)\n {\n if (isset($config['width']))\n $this->width = $config['width'];\n\n if (isset($config['cssClass']))\n $this->cssClass = $config['cssClass'];\n\n if (isset($config['searchable']))\n $this->searchable = $config['searchable'];\n\n if (isset($config['sortable']))\n $this->sortable = $config['sortable'];\n\n if (isset($config['editable']))\n $this->editable = $config['editable'];\n\n if (isset($config['invisible']))\n $this->invisible = $config['invisible'];\n\n if (isset($config['valueFrom']))\n $this->valueFrom = $config['valueFrom'];\n\n if (isset($config['default']))\n $this->defaults = $config['default'];\n\n if (isset($config['select']))\n $this->sqlSelect = $config['select'];\n\n if (isset($config['relation']))\n $this->relation = $config['relation'];\n\n if (isset($config['attributes']))\n $this->attributes = $config['attributes'];\n\n if (isset($config['format']))\n $this->format = $config['format'];\n\n if (isset($config['path']))\n $this->path = $config['path'];\n\n if (isset($config['formatter']))\n $this->formatter = $config['formatter'];\n\n if (isset($config['iconCssClass']))\n $this->iconCssClass = $config['iconCssClass'];\n\n return $config;\n }", "public function setCalculation($calculation);", "function config()\n\t{\n\t\t$rows=$GLOBALS['SITE_DB']->query('SELECT price,name FROM '.get_table_prefix().'prices WHERE name LIKE \\''.db_encode_like('pop3_%').'\\'');\n\t\t$out=array();\n\t\tforeach ($rows as $i=>$row)\n\t\t{\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$hidden=new ocp_tempcode();\n\t\t\t$domain=substr($row['name'],strlen('pop3_'));\n\t\t\t$hidden->attach(form_input_hidden('dpop3_'.strval($i),$domain));\n\t\t\t$fields->attach(form_input_line(do_lang_tempcode('MAIL_DOMAIN'),do_lang_tempcode('DESCRIPTION_MAIL_DOMAIN'),'ndpop3_'.strval($i),substr($row['name'],5),true));\n\t\t\t$fields->attach(form_input_integer(do_lang_tempcode('MAIL_COST'),do_lang_tempcode('DESCRIPTION_MAIL_COST',escape_html('pop3'),escape_html($domain)),'pop3_'.strval($i),$row['price'],true));\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('ACTIONS'))));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('DELETE'),do_lang_tempcode('DESCRIPTION_DELETE'),'delete_pop3_'.strval($i),false));\n\t\t\t$out[]=array($fields,$hidden,do_lang_tempcode('EDIT_POP3_DOMAIN'));\n\t\t}\n\n\t\treturn array($out,do_lang_tempcode('ADD_NEW_POP3_DOMAIN'),$this->get_fields());\n\t}", "function config()\n\t{\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('*'),NULL,'ORDER BY id');\n\t\t$out=array();\n\t\tforeach ($rows as $i=>$row)\n\t\t{\n\t\t\t$fields=new ocp_tempcode();\n\t\t\t$hidden=new ocp_tempcode();\n\t\t\t$fields->attach($this->get_fields('_'.strval($i),get_translated_text($row['c_title']),get_translated_text($row['c_description']),$row['c_enabled'],$row['c_cost'],$row['c_one_per_member']));\n\t\t\t$fields->attach(do_template('FORM_SCREEN_FIELD_SPACER',array('TITLE'=>do_lang_tempcode('ACTIONS'))));\n\t\t\t$fields->attach(form_input_tick(do_lang_tempcode('DELETE'),do_lang_tempcode('DESCRIPTION_DELETE'),'delete_custom_'.strval($i),false));\n\t\t\t$hidden->attach(form_input_hidden('custom_'.strval($i),strval($row['id'])));\n\t\t\t$out[]=array($fields,$hidden,do_lang_tempcode('EDIT_CUSTOM_PRODUCT'));\n\t\t}\n\n\t\treturn array($out,do_lang_tempcode('ADD_NEW_CUSTOM_PRODUCT'),$this->get_fields());\n\t}", "public function getCalcData() {\n return $this->calcData;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 2,\n 'type' => 'text',\n 'suffix' => '<i class=\"icon icon-euro\"></i>',\n 'required' => true,\n 'label' => $this->l('Customer must spent'),\n 'desc' => $this->l('Enter the amount which your customers have to sepent to receibe the coupon.'),\n 'name' => 'WI_SPENT_AMOUNT',\n ),\n array(\n 'col' => 2,\n 'type' => 'text',\n 'suffix' => '<i class=\"icon icon-euro\"></i>',\n 'required' => true,\n 'label' => $this->l('Amount of the coupon'),\n 'desc' => $this->l('Enter the amount of the coupon for gift to your customers.'),\n 'name' => 'WI_SPENT_COUPON',\n ),\n array(\n 'col' => 1,\n 'type' => 'text',\n 'required' => true,\n 'label' => $this->l('Coupon validity in days'),\n 'desc' => $this->l('Enter the number of days while the coupon will be valid.'),\n 'name' => 'WI_SPENT_DAYS',\n ),\n array(\n 'col' => 6,\n 'type' => 'switch',\n 'label' => $this->l('Enabled'),\n 'name' => 'WI_SPENT_ENABLED',\n 'desc' => $this->l('Enable or disable this feature.'),\n 'values' => array(\n array('value' => 1, 'name' => $this->l('Yes')),\n array('value' => 0, 'name' => $this->l('No')),\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function create()\n {\n return view('site.admin.calculator.create');\n }", "public function getConfigData($config)\r\n\t{\r\n \treturn Mage::getStoreConfig('payment/Query_Cielo_Cc/' . $config);\r\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "function erpal_contract_helper_config_form($form, $form_state) {\n $form = array();\n \n $form['cancelation_precalculate_range'] = array(\n '#type' => 'textfield',\n '#title' => t('Precalculation range contract duration'),\n '#description' => t('Number of month the date items for contract calculation are precalculated.'),\n '#default_value' => _erpal_contract_helper_cancelation_precalculate_range(),\n ); \n \n $form['submit'] = array(\n '#value' => t('save'),\n '#type' => 'submit',\n '#submit' => array('_erpal_contract_helper_config_form_submit'),\n );\n\n return $form;\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 }", "function allinea_db(){\n\t\tif ($this->attributes['BYTB']!='' ) $this->fields_value_bytb($this->attributes['BYTB']);\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\n\t\t\t\t$ret[$i]=\"{$key} NUMBER\";\n\t\t\t\t$i++;\n\t\t\t\t$ret[$i]=\"D_{$key} VARCHAR2(200 CHAR)\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\telse return ;\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'radio',\n 'name' => 'ORDERREF_MODE',\n 'label' => $this->l('How to generate order references'),\n 'desc' => $this->l('Choose between generation methods'),\n 'values' => array(\n array(\n 'id' => 'ORDERREF_MODE_RANDOM',\n 'value' => self::ORDERREF_MODE_RANDOM,\n 'label' => $this->l('Random numbers'),\n ),\n array(\n 'id' => 'ORDERREF_MODE_CONSEQUENT',\n 'value' => self::ORDERREF_MODE_CONSEQUENT,\n 'label' => $this->l('Consequent'),\n ),\n array(\n 'id' => 'ORDERREF_MODE_PS',\n 'value' => self::ORDERREF_MODE_PS,\n 'label' => $this->l('Don\\'t change an order reference'),\n ),\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'name' => 'ORDERREF_LENGTH',\n 'label' => $this->l('Length of reference'),\n 'desc' => $this->l('Length of generated reference value'),\n 'required' => true,\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function run()\n {\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"1\",\n 'variable_etiqueta' => \"Activo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"2\",\n 'variable_etiqueta' => \"Inactivo\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"3\",\n 'variable_etiqueta' => \"Expirado\",\n ]);\n \n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"4\",\n 'variable_etiqueta' => \"Eliminado\",\n ]);\n\n Conf_variables_parametrizacion::create([\n 'tipo_variable' => \"estado_producto\",\n 'variable_valor' => \"5\",\n 'variable_etiqueta' => \"Bloqueado\",\n ]);\n }", "public function getCalculator($name);", "protected function getConfigFormCOP()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user\"></i>',\n 'desc' => $this->l('Ingrese la llave pública'),\n 'name' => 'KUSHKIPAGOS_PUBLIC_KEY',\n 'label' => $this->l('Public key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-user-secret\"></i>',\n 'desc' => $this->l('Ingrese la llave privada'),\n 'name' => 'KUSHKIPAGOS_PRIVATE_KEY',\n 'label' => $this->l('Private key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-address-card\"></i>',\n 'desc' => $this->l('Ingrese la razón social'),\n 'name' => 'KUSHKIPAGOS_RAZON_SOCIAL',\n 'label' => $this->l('Razon Social'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Permitir transferencia'),\n 'name' => 'KUSHKIPAGOS_TRANSFER',\n 'is_bool' => true,\n 'desc' => $this->l('Usar transferencia como forma de pago'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Entorno de pruebas'),\n 'name' => 'KUSHKIPAGOS_DEV',\n 'is_bool' => true,\n 'desc' => $this->l('Usar este módulo en entorno de pruebas'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n ),\n\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n\n ),\n\n );\n }", "public function loadFormulasValue()\n {\n $data = Yii::app()->db->createCommand()\n ->select('t1.id, t1.type_id, t1.title,t1.value,t1.tag,t1.fvalue,t1.type,t2.range,t3.user_title')\n ->from('formula as t1')\n ->leftJoin('resformulatitle as t2','t2.id=t1.title')\n ->leftJoin('resformulatitle_translation as t3','t3.id=t1.title AND t3.language_id=:lang',array(':lang'=>Yii::app()->language))\n ->where('t1.type_id=:item_type_id AND t1.is_locked=0', array(':item_type_id'=>$this->itemTypeId))\n ->order('t1.weight ASC')\n ->queryAll();\n //SELECT DISTINCT t1.title, t2.range, t3.user_title FROM formula as t1 LEFT JOIN resformulatitle as t2 ON t2.id=t1.title LEFT JOIN resformulatitle_translation as t3 ON t3.id=t1.title AND t3.language_id='ru' WHERE t1.type_id=50; \n \n //separate formulas by type\n foreach($data as $key=>$value)\n {\n if(!empty($value['value'])) {\n if($value['type']==1)\n $this->formulasValue[$key]=$value;\n } \n elseIf($value['type']==2)\n $this->rangeFormulas[$key]=$value;\n \n if(isset($this->rangeList[$value['range']]))\n $this->useRangeList[]=$this->rangeList[$value['range']];\n \n }\n \n// Helper::myPrint_r($this->formulasValue,true);\n }", "function evaluation(){\n\t\t\t$data['title']=\"Evaluation de paiement\";\n\t \t$data['users'] = $this->crud_model->fetch_connected($this->connected);\n\t\t $data['contact_info_site'] = $this->crud_model->Select_contact_info_site();\n\n\t $data['dates'] = $this->crud_model->fetch_categores_dates_compt();\n\t $data['chart_data'] = $this->crud_model->get_stat_paie();\n\t $this->load->view('backend/admin/evaluation_paiement', $data);\n\t\t}", "function __construct()\n {\n if (ConfigGlobal::is_dmz()) {\n $oDbl = $GLOBALS['oDBEP'];\n $oDbl_Select = $GLOBALS['oDBEP_Select'];\n $this->setoDbl($oDbl);\n $this->setoDbl_Select($oDbl_Select);\n $this->setNomTabla('u_centros');\n } else {\n $oDbl = $GLOBALS['oDBP'];\n $this->setoDbl($oDbl);\n $this->setoDbl_Select($oDbl);\n $this->setNomTabla('u_centros');\n }\n }", "function accommodation(){\n $sql= $this->chk(\n \"SELECT \n accommodation.name,\n accommodation.description,\n acccomodation.rate\n FROM \n accommodation \"\n );\n // \n $accomodation= $this->sqlData($sql);\n echo ($accomodation);\n }", "public function build($data)\n {\n $oCalculation = new CalculationEvent($this->oGateway, $this->oLogger);\n $sAlias = $this->getTableQueryAlias();\n \n $oCalculation->iScoringEventID = $this->getField($data,'event_id',$sAlias); \n $oCalculation->iSystemEP = $this->getField($data,'system_ep',$sAlias); \n $oCalculation->iSystemZoneEP = $this->getField($data,'zone_ep',$sAlias); \n $oCalculation->iEventTypeEP = $this->getField($data,'event_type_ep',$sAlias); \n $oCalculation->oCreatedDate = $this->getField($data,'created_date',$sAlias); \n $oCalculation->oProcessingDate = $this->getField($data,'processing_date',$sAlias); \n $oCalculation->oOccuredDate = $this->getField($data,'occured_date',$sAlias); \n $oCalculation->fCalRunValue = $this->getField($data,'calrunvalue',$sAlias); \n $oCalculation->fCalRunValueRound = $this->getField($data,'calrunvalue_round',$sAlias); \n \n \n // these come from join tables and will not be prefixes with alias \n $oCalculation->sSystemName = $data['system_name'];\n $oCalculation->sSystemZoneName = $data['zone_name'];\n $oCalculation->sEventName = $data['event_name'];\n \n \n return $oCalculation;\n \n }", "public function run()\n {\n Setting::insert([\n [\n 'key' => Setting::LEVY_RATE,\n 'current_value' => '7.5'\n ],\n [\n 'key' => Setting::VAT_RATE,\n 'current_value' => '16'\n ],\n [\n 'key' => Setting::INSURANCE_RATE,\n 'current_value' => '1.5'\n ],\n [\n 'key' => Setting::PIN_NUMBER,\n 'current_value' => 'P051304647Z'\n ],\n [\n 'key' => Setting::CURRENCY,\n 'current_value' => 'KES'\n ],\n [\n 'key' => Setting::PROFORMA_idf,\n 'current_value' => '3.5'\n ],\n [\n 'key' => Setting::PROFORMA_rdl,\n 'current_value' => '0.5'\n ],\n [\n 'key' => Setting::PROFORMA_kaa,\n 'current_value' => '0.5'\n ],\n [\n 'key' => Setting::PROFORMA_vat,\n 'current_value' => '16'\n ],\n [\n 'key' => Setting::CCK_LEVY,\n 'current_value' => '0.3'\n ],\n [\n 'key' => Setting::OUTBOUND_DISCOUNT,\n 'current_value' => '0'\n ],\n [\n 'key' => Setting::OUTBOUND_EXCHANGE_RATE,\n 'current_value' => '100'\n ]\n ]);\n }", "function mkConfigForm() {\r\n\t\tglobal $database;\r\n\r\n\t\t$database->setQuery(\t\"SELECT lft, rgt FROM #__core_acl_aro_groups WHERE name = 'Public Backend'\" );\r\n\t\t$borders\t\t\t=\t$database->loadRow();\r\n\t\t$database->setQuery(\t\"SELECT group_id AS id, name\" .\r\n\t\t\t\t\t\t\t\t\"\\n FROM #__core_acl_aro_groups\" .\r\n\t\t\t\t\t\t\t\t\"\\n WHERE lft > $borders[0]\" .\r\n\t\t\t\t\t\t\t\t\"\\n AND rgt < $borders[1]\" .\r\n\t\t\t\t\t\t\t\t\"\\n ORDER BY lft DESC\"\r\n\t\t);\r\n\t\t$groups = $database->loadObjectList();\r\n\r\n\t\t//load config values\r\n\t\t\t$database->setQuery(\t\"SELECT params FROM #__components WHERE link = 'ca=eventcal'\" );\r\n\t\t\t$text\t\t\t=\t$database->loadResult();\r\n\t\t\t$config_values\t=\tnew mosParameters( $text );\r\n\t\t\t\r\n\r\n\t\tHTML_admin_eventcal::configPage( $config_values, $groups );\r\n\t}", "public function getForm()\n {\n return new NumberDisplayConfigurationForm();\n }", "protected function configuration_definition() {\n global $CFG;\n $form = $this->_form;\n $form->addElement('text', 'prefix', get_string('prefix', 'cachestore_apcu'),\n array('maxlength' => 5, 'size' => 5));\n $form->addHelpButton('prefix', 'prefix', 'cachestore_apcu');\n $form->setType('prefix', PARAM_TEXT); // We set to text but we have a rule to limit to alphanumext.\n $form->setDefault('prefix', $CFG->prefix);\n $form->addRule('prefix', get_string('prefixinvalid', 'cachestore_apcu'), 'regex', '#^[a-zA-Z0-9\\-_]+$#');\n $form->addElement('header', 'apc_notice', get_string('notice', 'cachestore_apcu'));\n $form->setExpanded('apc_notice');\n $link = get_docs_url('Caching#APC');\n $form->addElement('html', nl2br(get_string('clusternotice', 'cachestore_apcu', $link)));\n }", "private function parse_total(){\n\t\t$production_formats = new \\gcalc\\db\\production\\formats();\n\t\t$product_constructor_name = '\\gcalc\\db\\product\\\\' . str_replace( '-', '_', $this->get_slug() );\n\t\t$product_constructor_exists = class_exists( $product_constructor_name );\n\t\t$product_constructor_cost_equasion_exists = $product_constructor_exists ? method_exists( $product_constructor_name, 'get_calc_data' ) : false;\n\n\n\n\t\t/*\n\t\tEquasion can be stored in product constructor or formats array.\n\t\tFormats array is a temporary means to keep data so product constructor is a preferred way\n\t\t */\n\t\t$total_cost_equasion = \n\t\t\t$product_constructor_cost_equasion_exists ? \n\t\t\t\t$product_constructor_name::get_calc_data( )\n\t\t\t\t: $production_formats->get_total_cost_equasion( $this->get_product_id() );\n\n\t\t$total_cost_equasion_string = $total_cost_equasion['equasion'];\n\n\t\t$total_cost_equasion = $total_cost_equasion_string;\n\t\t$total_pcost_equasion = $total_cost_equasion_string;\n\n\t\t\n\t\t/**\n\t\t * Keeps selling prices of used processes\n\t\t * @var array\n\t\t */\n\t\t$total_cost_array = array();\n\t\t/**\n\t\t * Keeps production costs of used processes\n\t\t * @var array\n\t\t */\n\t\t$total_pcost_array = array();\n\t\t/**\n\t\t * Keeps markups of used proceses\n\t\t * @var array\n\t\t */\n\t\t$total_markup_array = array();\n\t\t/**\n\t\t * All used in calculation formats\n\t\t * @var array\n\t\t */\n\t\t$used_formats_array = array();\n\t\t/**\n\t\t * All used in calculation media\t\t \n\t\t * @var array\n\t\t */\n\t\t$used_media_array = array();\n\n\t\t//checking credentials for data filter\t\t\n\t\t$credetials = $this->login();\n\t\t$al = $credetials['access_level'];\n\n\t\tforeach ($this->done as $key => $value) {\t\n\t\t\tif ( preg_match( '/'.$value->total['name'].'/', $total_cost_equasion_string )) {\n\t\t\t\t$total_cost_equasion = str_replace($value->total['name'], $value->total['total_price'], $total_cost_equasion);\t\t\t\t\t\t\n\t\t\t\t$total_pcost_equasion = str_replace($value->total['name'], $value->total['production_cost'], $total_pcost_equasion);\t\t\n\n\t\t\t\t$total_cost_array[ $value->total['name'] ] = $value->total['total_price'];\n\t\t\t\t$total_pcost_array[ $value->total['name'] ] = $value->total['production_cost'];\n\t\t\t\t$total_markup_array[ $value->total['name'] ] = $value->total['markup'];\n\t\t\t}\t\n\n\t\t\t//used formats total\n\t\t\tif ( preg_match( '/_format/', $value->total['name'] )) {\n\t\t\t\t$production_format_pieces = $value->total['extended']['production_format']['pieces'];\n\t\t\t\t$common_format_name = $value->total['extended']['production_format']['common_format']['name'];\n\t\t\t\t$common_format_width = $value->total['extended']['production_format']['common_format']['width'];\n\t\t\t\t$common_format_height = $value->total['extended']['production_format']['common_format']['height'];\n\n\t\t\t\t$production_format_format = $value->total['extended']['production_format']['format'];\n\t\t\t\t$production_format_width = $value->total['extended']['production_format']['width'];\n\t\t\t\t$production_format_height = $value->total['extended']['production_format']['height'];\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t* Filtering data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\t\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t$format_str = $production_format_pieces .' '. __('slots', 'gcalc') .' '. $common_format_name .'('.$common_format_width.'x'.$common_format_height.')' \n\t\t\t\t\t\t\t.' @ '. $production_format_format.'('.$production_format_width.'x'.$production_format_height.')';\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t$format_str = '';\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$format_str = $common_format_width.'x'.$common_format_height;\n\n\t\t\t\t}\n\n\n\t\t\t\t$used_formats_array[ $value->total['name'] ] = $format_str;\n\t\t\t}\n\t\t\t\n\t\t\t//used papers total\n\t\t\tif ( preg_match( '/_paper/', $value->total['name'] )) {\n\t\t\t\t$sheet_cost = $value->total['extended']['sheet_cost'];\n\t\t\t\t$sheets_quantity = $value->total['extended']['sheets_quantity'];\n\t\t\t\t$paper_price_per_kg = $value->total['extended']['paper']['price_per_kg'];\n\t\t\t\t$paper_label = $value->total['extended']['paper']['label'];\t\t\t\t\n\t\t\t\t$paper_thickness = $value->total['extended']['paper']['thickness'];\n\n\t\t\t\t/*\n\t\t\t\t* Filtering data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t$media_str = $sheets_quantity .' x ' . $paper_label . ' (' . $paper_thickness . 'mm)'\n\t\t\t\t\t\t.' @ ' . $sheet_cost . ' PLN / '. __('sheet','gcalc') .' (' . $paper_price_per_kg . '/kg) ';\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t$media_str = '';\t\n\t\t\t\t\t}\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$media_str = $paper_label;\n\n\t\t\t\t}\n\n\t\t\t\t$used_media_array[ $value->total['name'] ] = $media_str;\n\n\t\t\t}\n\t\t}\n\t\teval('$total_cost_ = ' . $total_cost_equasion . ';');\n\t\teval('$total_pcost_ = ' . $total_pcost_equasion . ';');\n\n\t\t$average_markup = count($total_markup_array) > 0 ? array_sum( $total_markup_array ) / count($total_markup_array) : 1;\n\n\n\n\n\t\t$total_ = array(\n\t\t\t'equasion' => $total_cost_equasion_string,\t\t\t\n\t\t\t'used_formats' => $used_formats_array,\n\t\t\t'used_media' => $used_media_array,\n\n\t\t\t'total_markup' => $total_markup_array,\n\t\t\t'total_cost_equasion' => $total_cost_array,\n\t\t\t'total_pcost_equasion' => $total_pcost_array,\n\t\t\t\n\t\t\t'average_markup' => ( ( $total_cost_ - $total_pcost_ ) / $total_pcost_ ) + 1, \n\t\t\t'total_cost_' => $total_cost_,\n\t\t\t'total_pcost_' => $total_pcost_\n\t\t);\n\n\t\t\t\t/*\n\t\t\t\t* Filtering total data\n\t\t\t\t*/\n\t\t\t\tif ( $al > 0) {\n\t\t\t\t\tif ($al > 5) { // admin, master only\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t} else { // no data for account, inner\n\t\t\t\t\t\t\n\t\t\t\t\t\tunset($total_['used_formats']);\n\t\t\t\t\t\tunset($total_['used_media']);\n\t\t\t\t\t}\n\t\t\t\t} else { // 0 - anonymous\n\t\t\t\t\t$media_str = $paper_label;\n\n\t\t\t\t}\n\n\n\t\t$total_ = $this->merge_children_totals( $total_ );\n\t\t$this->total_ = $total_;\n\n\t}", "public function __construct() {\n\n\t\t$this->bootstrap = true;\n\t\t$this->table = 'pfg';\n\t\t$this->className = 'PFGModel';\n\t\t$this->publicName = $this->la('Gestion de formulaire');\n\n\t\tparent::__construct();\n\t\t$this->context = Context::getContext();\n\t\tEmployeeConfiguration::updateValue('EXPERT_PFG_SCRIPT', $this->generateParaGridScript());\n\t\t$this->paragridScript = EmployeeConfiguration::get('EXPERT_PFG_SCRIPT');\n\n\t\tif (empty($this->paragridScript)) {\n\t\t\tEmployeeConfiguration::updateValue('EXPERT_PFG_SCRIPT', $this->generateParaGridScript());\n\t\t\t$this->paragridScript = EmployeeConfiguration::get('EXPERT_PFG_SCRIPT');\n\t\t}\n\n\t\tEmployeeConfiguration::updateValue('EXPERT_PFG_FIELDS', Tools::jsonEncode($this->getPFGModelFields()));\n\t\t$this->configurationField = Tools::jsonDecode(EmployeeConfiguration::get('EXPERT_PFG_FIELDS'), true);\n\n\t\tif (empty($this->configurationField)) {\n\t\t\tEmployeeConfiguration::updateValue('EXPERT_PFG_FIELDS', Tools::jsonEncode($this->getPFGModelFields()));\n\t\t\t$this->configurationField = Tools::jsonDecode(EmployeeConfiguration::get('EXPERT_PFG_FIELDS'), true);\n\t\t}\n\n\t}", "protected function setupShowOperation()\n {\n CRUD::addColumn(['name' => 'text_one', 'label' => 'Текст первый.']); // columns\n CRUD::addColumn(['name' => 'image_one', 'type' => 'image', 'label' => 'Изображение первое.']); // columns\n CRUD::addColumn(['name' => 'text_two', 'label' => 'Текст второй.']); // columns\n CRUD::addColumn(['name' => 'image_two', 'type' => 'image', 'label' => 'Изображение второе.']); // columns\n CRUD::addColumn(['name' => 'text_third', 'label' => 'Текст третий.']); // columns\n CRUD::addColumn(['name' => 'image_third', 'type' => 'image', 'label' => 'Изображение третье.']); // columns\n CRUD::addColumn(['name' => 'image_four', 'type' => 'image', 'label' => 'Изображение четвертое.']); // columns\n\n /**\n * Columns can be defined using the fluent syntax or array syntax:\n * - CRUD::column('price')->type('number');\n * - CRUD::addColumn(['name' => 'price', 'type' => 'number']);\n */\n }", "function setting()\n\t{\n\t\t// Tai cac file thanh phan\n\t\t$this->load->model('currency_model');\n\t\t$this->load->library('form_validation');\n\t\t$this->load->helper('form');\n\t\t\n\t\t// Lay cac bien cai dat\n\t\t$params = array_keys(array_merge($this->setting_default, $this->setting));\n\t \n\t\t// Tu dong kiem tra gia tri cua 1 bien\n\t\t$param = $this->input->post('_autocheck');\n\t\tif ($param)\n\t\t{\n\t\t\t$this->_setting_autocheck($param);\n\t\t}\n\t\t\n\t\t// Xu ly form\n\t\tif ($this->input->post('_submit'))\n\t\t{\n\t\t\t// Gan dieu kien cho cac bien\n\t\t\t$this->_setting_set_rules($params);\n\t\t\t\n\t\t\t// Xu ly du lieu\n\t\t\t$result = array();\n\t\t\tif ($this->form_validation->run())\n\t\t\t{\n\t\t\t // Goi ham xu ly setting cua payment\n\t\t\t $this->_setting_handle();\n\t\t\t \n\t\t\t //lay chiet khau goc cua nha cung cap\n\t\t\t $types = $this->get_types();\n\t\t\t $discount = array();\n\t\t\t \n\t\t\t\t// Lay gia tri setting tu form\n\t\t\t $setting_data = array();\n\t\t\t $default = $this->input->post('default');\n\t\t\t unset($params[0]);\n\t\t\t $total = 0;\n\t\t\t\tforeach ($params as $p => $v)\n\t\t\t\t{\n\t\t\t\t $val = $this->input->post($v);\n\t\t\t\t $total = count($val);\n\t\t\t\t $values[$v] = $val;\n\t\t\t\t}\n\t\t\t\t$keys = array_keys($values);\n\t\t\t\tfor ($i = 1;$i<= $total;$i++)\n\t\t\t\t{\n\t\t\t\t $d = array();\n\t\t\t\t foreach ($keys as $key)\n\t\t\t\t {\n\t\t\t\t if(isset($values[$key][$i]) && $values[$key][$i])\n\t\t\t\t {\n\t\t\t\t $d['default'] = $default;\n\t\t\t\t $d[$key] = $values[$key][$i];\n\t\t\t\t } \n\t\t\t\t }\n\t\t\t\t if(!empty($d))\n\t\t\t\t {\n\t\t\t\t $setting_data[$i] = $d;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t foreach ($types as $type)\n\t\t\t\t {\n\t\t\t\t $discount[$i][$type] = $this->input->post('discount_'.$type.'_'.$i);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmodel('payment_card')->set_setting($this->code, $setting_data);\t\n\t\t\t\tmodel('payment_card')->set_setting('discount_'.$this->code, $discount);\n\t\t\t\t\n\t\t\t\t// Khai bao ket qua tra ve\n\t\t\t\t$result['complete'] = TRUE;\n\t\t\t\t$result['location'] = admin_url('payment_card');\n\t\t\t\tset_message(lang('notice_update_success'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($params as $param)\n\t\t\t\t{\n\t\t\t\t\t$result[$param] = form_error($param);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$output = json_encode($result);\n\t\t\tset_output('json', $output);\n\t\t}\n\t\t\n\t\t// Loai bo cac bien mac dinh ra khoi params truoc khi gui den view\n\t\t/*\n\t\t$params_default = array_keys($this->setting_default);\n\t\tforeach ($params as $k => $p)\n\t\t{\n\t\t\tif (in_array($p, $params_default))\n\t\t\t{\n\t\t\t\tunset($params[$k]);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t\t$discounts = model('payment_card')->get_setting('discount_'.$this->code);\n\t\t$this->data['discounts'] = $discounts;\n\t\t\n\t\t// Luu bien gui den view\n\t\t$this->data['action'] \t= current_url();\n\t\t$this->data['params'] \t= $params;\n\t\t\n\t\t$this->data['code'] \t= $this->code;\n\t\t$this->data['setting'] \t= $this->setting_data;\n\t\treturn $this->data;\n\t}", "protected function getConfigFormValues()\n {\n $config_form_values = array(\n 'PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED' => Configuration::get('PROFITMARGIN_EQUIVALENCE_SURCHARGE_ENABLED', false),\n 'PROFITMARGIN_DEFAULT_SHIPPING_COST' => Configuration::get('PROFITMARGIN_DEFAULT_SHIPPING_COST', null),\n 'PROFITMARGIN_SHIPPING_COST_TAX' => Configuration::get('PROFITMARGIN_SHIPPING_COST_TAX', 0),\n );\n\n foreach ($this->getAvailableTaxes() as $tax) {\n $config_form_values[\"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\"] = Configuration::get(\"PROFITMARGIN_EQUIVALENCE_SURCHARGE_{$tax['id_tax']}\", 0);\n }\n\n foreach ($this->getAvailablePaymentModules() as $payment_module) {\n $config_form_values[\"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\"] = Configuration::get(\"PROFITMARGIN_PAYMENT_FEE_BASE_{$payment_module['id_module']}\", 0);\n $config_form_values[\"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\"] = Configuration::get(\"PROFITMARGIN_PAYMENT_FEE_PERCENTAGE_{$payment_module['id_module']}\", 0);\n }\n \n return $config_form_values;\n }", "protected function calculators()\n {\n \t//print_r($_COOKIE['caseInfo']);\n//echo 'function calculators()' . \"\\n\\n\"; // debug\n \n \t// load the calculators with an active status\n \t \n $query = Doctrine_Query::create()\n ->from('Calculator calc')\n ->where('calc.status_code = 700')\n ->orderBy('calc.display_order ASC')\n ;//->useResultCache(true);\n \n $calculators = $query->execute();\n \n $return = array();\n \n foreach ($calculators as $Calculator)\n {\n \n \t// add the calculator to the return array\n \t\n $return[$Calculator->getId()] = $Calculator->getName(); \n\n }\n \n return $return;\n \n }", "function commerce_product_pre_calculation_settings_form($form, &$form_state) {\n // Count the number of rows in the price pre-calculation table.\n $query = db_select('commerce_calculated_price')\n ->fields('commerce_calculated_price', array('created'))\n ->condition('module', 'commerce_product_pricing')\n ->condition('entity_type', 'commerce_product')\n ->condition('field_name', 'commerce_price')\n ->execute();\n\n $count = $query->rowCount();\n\n // If there are rows in the table or price pre-calculation is enabled, show\n // the management fieldset with its action buttons.\n if ($count > 0 || variable_get('commerce_product_sell_price_pre_calculation', 'disabled') != 'disabled') {\n // Build a description for the fieldset indicating how many rows are in the\n // table and when they were last processed.\n $description = format_plural($count,\n t('There is 1 product sell price in the calculated price table.'),\n t('There are @count product sell prices in the calculated price table.'));\n\n // If there are prices, add the timestamp for the last calculation.\n if ($count > 0) {\n $description .= ' ' . t('The last calculation occured on @date.', array('@date' => format_date($query->fetchField(), 'short')));\n }\n\n $form['database'] = array(\n '#type' => 'fieldset',\n '#title' => t('Manage calculated prices'),\n '#description' => '<p>' . $description . '</p>',\n );\n\n if ($count > 0) {\n $form['database']['delete'] = array(\n '#type' => 'submit',\n '#value' => t('Delete product sell prices'),\n );\n }\n else {\n $form['database']['batch_calculate'] = array(\n '#type' => 'submit',\n '#value' => t('Batch calculate prices now'),\n );\n }\n }\n\n $form['commerce_product_sell_price_pre_calculation'] = array(\n '#type' => 'radios',\n '#title' => t('Sell price pre-calculation method'),\n '#description' => t('If pre-calculation is disabled, code that integrates calculated prices into queries and price displays will ignore any existing calculated prices.'),\n '#options' => array(\n 'disabled' => t('Disabled'),\n 'manual_batch' => t('Manual batch calculation'),\n\n // TODO: Support automated re-calculation when Rules or Products that have\n // pre-calculated prices are updated.\n // 'automated_batch' => t('Manual batch pre-calculation with automated updates'),\n ),\n '#default_value' => variable_get('commerce_product_sell_price_pre_calculation', 'disabled'),\n );\n\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Save configuration'),\n );\n\n return $form;\n}", "public function sms_configuration_form(){\n $CI =& get_instance();\n $CI->load->model('dashboard/Sms_model','sms_model');\n $setting_detail = $CI->sms_model->retrieve_sms_editdata();\n return $setting_detail;\n }", "function configure()\n\t{\n\t\t$option = JRequest::getCMD('option');\n $mainframe=JFactory::getApplication();\n\t\t// orden\n\t\t$filter_order\t\t= $mainframe->getUserStateFromRequest( $this->_context.'filter_order', 'filter_order', $this->_orderfield, 'cmd' );\n\t\t$filter_order_Dir\t= $mainframe->getUserStateFromRequest( $this->_context.'filter_order_Dir', 'filter_order_Dir', 'asc', 'word' );\n\t\t// cadena de búsqueda\n\t\t$search = $mainframe->getUserStateFromRequest( $this->_context.'search', 'search', '', 'string' );\n\t\t$search\t= JString::strtolower( $search );\n\n\t\t// Configuramos el modelo\n\t\t$model =& $this->getModel();\n\t\t$model->_orderby_filter_order = $filter_order;\n\t\t$model->_orderby_filter_order_dir = $filter_order_Dir;\n\n\t\t// seteamos búsqueda en el modelo\n\t\t$db = JFactory::getDBO();\n\t\tif ( $search ) {\n\t\t\t$model->setWhere('LOWER('. $this->_searchfield . ') LIKE '. $db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ));\n\t\t}\n\n\t\t// table ordering\n\t\t$this->_lists['order_Dir']\t= $filter_order_Dir;\n\t\t$this->_lists['order']\t\t= $filter_order;\n\t\t$this->_lists['search'] \t= $search;\n\n\t\t$this->assignRef('lists', $this->_lists);\n\t}", "function calcular()\n\t\t{\n\t\t\tif ($_SERVER['REQUEST_METHOD']=='POST') {\n\t\t\t//Guardamos en un arreglo lo que recibimos de la vista via POST\t\n\t\t\t\t//enviamos ala funcion insertPersons del Modelo de personas \n\t\t\t\t//el arreglo previamente recibido\n\t\t\t\t $listado = $this->_estadisticaModel->getActividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado2 = $this->_estadisticaModel->getMateriales_x_actividades($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $listado1 = $this->_estadisticaModel->getCantidad($_POST['fechai'],$_POST['fechaf']);\n\t\t\t\t $this->_view->_fechai = $_POST['fechai'];\n\t\t\t\t $this->_view->_fechaf = $_POST['fechaf'];\n\t\t\t\t $this->_view->_listado2 = $listado2;\n\t\t\t\t $this->_view->_listado = $listado;\n\t\t\t\t $this->_view->_listado1 = $listado1;\n\t\t\t\t $this->_view->render(\"estadistica\",'','',$this->_sidebar_menu);\n\t\t\t\t \n\t\t\t\t//redireccionamos al listado\n\t\t\t}else{\n\t\t\t\t//se muestra la ventana si no es via post\n\t\t\t\t$this->_view->render(\"insert\",'','',$this->_sidebar_menu);\n\t\t\t}\n\t\t\t\n\t\t}", "public function splitCalcDataProvider() {}", "function calculator($firstNumber,$secondNumber,$operaton){\n \n\tif($operaton=='add'){ //Add Condition\n\t\techo 'The Add result is ';\t\n\t\treturn $result=$firstNumber+$secondNumber;\t\t\n\t}\n\t\n\telseif($operaton=='sub'){ //Substract Condition\n\t\techo 'The Substruct result is ';\n\t\treturn $result=$firstNumber - $secondNumber;\n\t}\n\t\n\telseif($operaton=='mul'){ //Multiplication Condition\n\t\techo 'The Multiplacation result is ';\n\t\treturn $result=$firstNumber * $secondNumber;\n\t}\n\t\n\telseif($operaton=='div'){ //Divided Condition\n\t\techo 'The Divided result is ';\n\t\treturn $result=$firstNumber / $secondNumber;\n\t}\n\t\n\telseif($operaton=='mod'){ //Modulas Condition\n\t\techo 'The Modulas result is ';\n\t\treturn $result=$firstNumber % $secondNumber;\n\t}\n\t\n\telse{\n\t\techo 'Please Input correct Number..';\n\t}\n}", "public function parseCalculations() {\n foreach($this->calculations as $calculation) {\n $this->parseCalculation($calculation);\n }\n $calculationResult = $this->calculationResults[count($this->calculationResults)-1];\n $calculationResultMethod = $calculationResult->getMethod();\n if ($this->parserMethodsExtra->isGMethod($calculationResultMethod)) {\n $calculationResult->insert();\n } else {\n foreach ($this->calculationResults as $calculationResult) {\n $calculationResult->insert();\n }\n }\n }", "function mostrar_operador(){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM operador WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_op'];\n\t\t\t$this->apellido=$resultado['apellido_op'];\n\t\t\t$this->cedula=$resultado['cedula_op'];\n\t\t\t$this->correo=$resultado['correo_op'];\n\t\t\t$this->cantidad=$resultado['cantidad_op'];\n\t\t\t$this->fecha=$resultado['fecha_op'];\t\t\n}", "public function __construct()\n {\n $this->calculator = new Calculator();\n }", "public function create_calculation_array_matrix(){\n\t\t/*\n\t\t* Public and private sets of date for more complex frontend managament\n\t\t*/\n\t\t$calculation_array_matrix = array(\n\t\t\t\"public\" => array(\n\t\t\t\t'calc' => array()\n\t\t\t),\n\t\t\t\"auth\" => array(\n\t\t\t\t'calc_details' => array()\n\t\t\t)\n\t\t);\n\t\treturn $calculation_array_matrix;\n\t}", "public function setConfig()\n {\n $this->postcode = isset($_POST['postcode']) ? htmlspecialchars($_POST['postcode']) : '000-0000';\n $this->maptype = isset($_POST['maptype']) ? htmlspecialchars($_POST['maptype']) : 'Static MAP';\n $this->unit = isset($_POST['unit']) ? htmlspecialchars($_POST['unit']) : 'CELSIUS';\n $this->apiLocation = isset($_POST['apiLocation']) ? htmlspecialchars($_POST['apiLocation']) : 'Google';\n $this->apiWeather = isset($_POST['apiWeather']) ? htmlspecialchars($_POST['apiWeather']) : 'OpenWeatherMap';\n }", "public function getCalculatorOptions()\n {\n return Driver::isShipping()->isConfigured()->orderBy('name')->lists('name', 'class');\n }", "public function form()\n {\n $this->number('month', '贷款月数')\n ->min(1)\n ->max(360)\n ->required();\n $this->number('total', '贷款总额')\n ->required();\n $this->rate('rate', '贷款利率')\n ->required();\n $this->radio('type', '还款方式')\n ->options(Loan::$typeMap)\n ->required();\n\n $this->html('等额本金法与等额本息法并没有很大的优劣之分,大部分是根据每个人的现状和需求而定的。');\n $this->html('<a target=\"_blank\" href=\"https://zhuanlan.zhihu.com/p/61140535\">等额本息和等额本金的区别!</a>');\n }", "private function configure()\n {\n\n $QryStr = \"SELECT SENDER, PORT,HOST, USER_ID,PASSWRD, EMAIL FROM SYSSETTINGS\";\n try {\n $stmt = $this->dbh->dbConn->prepare($QryStr);\n $stmt->execute();\n\n $result = $stmt->fetch(\\PDO::FETCH_OBJ);\n\n $this->sender = $result->sender;\n $this->port = $result->port;\n $this->host = $result->host;\n $this->user_id = $result->user_id;\n $this->password = $result->password;\n $this->sender_mail = $result->email;\n } catch (\\PDOException $ex) {\n $ex->getMessage();\n }\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'Calculatr', // Base ID\n\t\t\tesc_html__( 'Calculator', 'text_domain' ), // Name\n\t\t\tarray( 'description' => esc_html__('A stylish calculator to perform basic scientific calculations', 'text_domain' ), ) // Args\n\t\t);\n\t}", "protected function setParamConfig()\n {\n $this->paramConfig = ArrayManipulation::deepMerge($this->paramConfig, array(\n 'compact' => array(\n 'name' => 'Kompakte Anordnung der Auswahlfelder',\n 'type' => 'radio',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn' => array(\n 'name' => 'Datenspeicher: Trennung in Spalten',\n 'type' => 'radio',\n 'help' => '\n Normalerweise wird für dieses Feld im Datenspeicher eine Spalte erstellt, in welchem die getroffene Auswahl mit Komma separiert wird.\n Sofern diese Einstellung aktiviert wird, erscheint im Datenspeicher und Export eine Spalte pro getroffener Auswahl.\n ',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'multicolumn_label_prefix' => array(\n 'name' => 'Feld-Beschriftung pro Spalte voranstellen',\n 'type' => 'radio',\n 'help' => 'Damit die Spalten eindeutiger sind, kann der Feldname als Prefix vor jede generierte Spalte im Datenspeicher vorangestellt werden.',\n 'values' => array(\n 'ja' => 'Ja',\n 'nein' => 'Nein'\n )\n ),\n 'content' => array(\n 'name' => 'Auswahlmöglichkeiten',\n 'type' => 'textfieldArray',\n 'help' => 'Bitte geben Sie eine oder mehrere Möglichkeiten an.',\n 'separator' => Base::MULTI_ITEM_VALUES_SEPARATOR\n )\n ));\n\n // Set defaults for new fields\n $this->params['compact'] = 'nein';\n $this->params['multicolumn'] = 'nein';\n }", "function getConfigurationValues() ;", "private function generateFormConstantes()\n {\n $inputs = array();\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Seuil de Calcul Prime fichier',\n 'name' => 'co_seuil_prime_fichier',\n 'desc' => 'Montant du seuil de calcul de la prime',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime fichier',\n 'name' => 'co_prime_fichier',\n 'desc' => 'Montant de la prime fichier',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime parrainage',\n 'name' => 'co_prime_parrainage',\n 'desc' => 'Montant de la prime parrainage',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par jour',\n 'name' => 'co_prospects_jour',\n 'desc' => 'Nombre de prospects affectés par jour travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par heure',\n 'name' => 'co_prospects_heure',\n 'desc' => 'Nombre de prospects par heure travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Ancienneté des prospects',\n 'name' => 'co_prospects_jour_max',\n 'desc' => 'Nombre de jour maximum d\\'ancienneté des prospects pour l\\'atribution',\n 'class' => 'input fixed-width-md',\n 'suffix' => 'jour'\n );\n\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitConfiguration'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigConfiguration(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "public function setModuleData(){\n\t\t/* variable initialization */\n\t\t$this->_strSchemaName\t.= \"_\".$this->getCompanyCode();\n\t\t$intRespone\t\t\t\t= \"\";\n\t\t\n\t\t/* Setting the Pokicy filed */\n\t\tif((isset($this->_strDataSet['policy'])) && (!empty($this->_strDataSet['policy']))){\n\t\t\t/* Iterating the loop */\n\t\t\tforeach($this->_strDataSet['policy'] as $strPlicyKey => $strPolicyValue){\n\t\t\t\t/* Decoding the value */\n\t\t\t\t$this->_strDataSet['policy'][$strPlicyKey]\t= getDecyptionValue($strPolicyValue);\n\t\t\t}\n\t\t\t/* Imploding the value */\n\t\t\t$this->_strDataSet['policy']\t\t= implode(\",\",$this->_strDataSet['policy']);\n\t\t}else{\n\t\t\t/* Setting the value */\n\t\t\t$this->_strDataSet['policy']\t= \"\";\n\t\t}\n\t\t\n\t\t/* Set the operation filter array */\n\t\t$strEventFilterArr \t= array(\n\t\t\t\t\t\t\t\t\t\t'table' \t=> $this->_strSchemaName,\n\t\t\t\t\t\t\t\t\t\t'data' \t\t=> $this->_strDataSet,\n\t\t\t\t\t\t\t\t\t\t'where' \t=> array('id' => $this->_strDataSet['foreign']),\n\t\t\t\t\t\t\t\t\t);\n\t\t/* removed unwanted variables */\n\t\tunset($strEventFilterArr['data']['foreign']);\n\t\t\n\t\t/* Perfomaning the addition operation */\n\t\tif($this->_strDataSet['foreign'] == 0){\n\t\t\t/* add new records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setDataInTable($strEventFilterArr);\n\t\t/* Perfomaning the update operation */\n\t\t}else{\n\t\t\t/* update the existing records */\n\t\t\t$intResultStatus = $this->_objDataOperation->setUpdateData($strEventFilterArr);\n\t\t}\n\t\t/* removed used variables */\n\t\tunset($strResultArr);\n\t\t\n\t\t/* return the operation status */\n\t\treturn $intResultStatus;\n\t}", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "function format($form_name, $form_action, $form_method, $table_name, $column_key, $state, $default_value, $label);", "function get_form_query() {\n\n $my_table = new OrTable('table_query');\n $my_table->OP_[align_table]->set('center');\n $my_table->OP_[class_name]->set('tbl_query_body');\n $my_table->set_col($this->get_button_filter());\n $my_table->set_col('เงื่อนไข ');\n $my_table->set_col(' ค่าที่ค้นหา ');\n $my_table->set_row();\n foreach ($this->caption_fields AS $caption => $id) {\n if (!is_object($this->filter_controls[$id])) {\n $this->set_filter_controls(new OrTextbox($id));\n }\n $my_compare = new OrSelectbox('val_compare_' . $id . '_', 'val_compare[' . $id . ']');\n $my_compare->OP_[option]->set(array(\n '=' => '=',\n '<>' => '<>',\n '>=' => '>=',\n '<=' => '<=',\n 'BETWEEN' => 'BETWEEN',\n 'LIKE' => 'LIKE',\n 'IN' => 'IN'\n ));\n $my_compare->OP_[default_value]->set($this->get_filter_compare($id)); //สร้าง Function เพื่อค้นหาค่า Default compare\n $my_compare->OP_[auto_post]->set(true);\n //$my_table->set_col($my_control->OP_[caption]->get() , \"td_caption\");\n debug_mode(__FILE__, __LINE__, $this->filter_controls[$id]->OP_[caption]->get(), 'Filter_controls');\n $my_table->set_col($this->filter_controls[$id]->OP_[caption]->get(), \"td_query_caption\");\n $my_table->set_col($my_compare->get_tag(), \"td_query_compare\");\n $my_table->set_col($this->filter_controls[$id]->get_tag(), \"td_query_value\");\n $my_table->set_row('tr_query_body');\n }\n\n $my_table->set_col('ค้นคำ เรียงลำดับ');\n $my_table->set_col($this->get_control_filter());\n $my_table->set_col($this->get_control_order());\n $my_table->set_row();\n\n return $my_table->get_tag();\n }", "public function html()\n {\n return $this->builder()\n ->columns([\n 'id_ciudad' => ['title' => 'Id'],\n 'nombre_ciudad' => ['title' => 'Nombre Ciudad'],\n \n \n ])->addAction(['title' => 'acción'])->parameters([\n 'processing'=>' true',\n 'serverSide'=>'true',\n\n 'language' => [\n 'url' => url('//cdn.datatables.net/plug-ins/1.10.9/i18n/Spanish.json')\n ],\n 'dom' => 'Bfltip',\n \n \n 'buttons' => ['export', 'print', 'reset', 'reload'],\n \n ]);\n }", "public function settings_init() {\n\n register_setting( 'settcalc', 'settcalc_options' );\n\n add_settings_section(\n 'settcalc_section_developers',\n __( 'Getting Started:', 'settcalc' ),\n array($this,'section_developers_cb'),\n 'settcalc'\n );\n\n add_settings_field(\n 'settcalc_field_phonelabel',\n __( 'Phone Number Label', 'settcalc' ),\n array($this,'field_phonelabel_cb'),\n 'settcalc',\n 'settcalc_section_developers',\n [\n 'label_for' => 'settcalc_field_phonelabel',\n 'class' => 'settcalc_row',\n 'settcalc_custom_data' => 'custom',\n ]\n );\n\n add_settings_field(\n 'settcalc_field_phonenumber',\n __( 'Phone Number', 'settcalc' ),\n array($this,'field_phonenumber_cb'),\n 'settcalc',\n 'settcalc_section_developers',\n [\n 'label_for' => 'settcalc_field_phonenumber',\n 'class' => 'settcalc_row',\n 'settcalc_custom_data' => 'custom',\n ]\n );\n\n\n\n add_settings_field(\n 'settcalc_field_contact',\n __( 'Contact Page Link', 'settcalc' ),\n array($this,'field_contact_cb'),\n 'settcalc',\n 'settcalc_section_developers',\n [\n 'label_for' => 'settcalc_field_contact',\n 'class' => 'settcalc_row',\n 'settcalc_custom_data' => 'custom',\n ]\n );\n\n\n\n }", "public function definition() {\n\n \t$sphereLib = new setask_sphere();\n \t$compilers = $sphereLib->sphereGetCompilers(); //to be improved (maybe... - probably no need to rewrite here)\n # \tvar_dump($compilers);\n $mform = $this->_form;\n\n list($setask, $data) = $this->_customdata;\n $mform->addElement('select', 'compiler', 'Compilers: ',$compilers\t);\n\t\t\n $setask->add_submission_form_elements($mform, $data);\n\n $this->add_action_buttons(true, get_string('savechanges', 'setask'));\n if ($data) {\n\t\t\t//ugly (but working) way of extracting data from text editor\n \tforeach($data as $tes){\n \t\t$ii =0;\n \t\n \t\tforeach($tes as $tes2)\n \t\t{\n \t\t\tif($ii == 0)\n \t\t\t\t$textToSend = $tes2;//text from online editor - ugly way but it works...\n \t\t\t#\tvar_dump($textToSend);\n \t\t\t\t$ii++;\n \t\t}\n \t\n \t}\n \t\n \t//extracting selected compiler \n \t$selectedItem =& $mform->getElement('compiler')->getSelected();\n #\tvar_dump($selectedItem);\n $this->set_data($data);\n }\n \n }", "public function calculator($num1, $num2){\n // and if not, launch to exception\n if (!is_numeric($num1) || !is_numeric($num2)){\n throw new BadRequestHttpException(t('No numeric arguments specified.'));\n }\n\n //b) the results is show in list format html\n // each element of list add to array\n\n $list[] = $this->t(\"@num1 + @num2 = @sum\",\n [\n '@num1' => $num1,\n '@num2' => $num2,\n '@sum' => $num1 + $num2\n ]);\n\n $list[] = $this->t(\"@num1 - @num2 = @difference\",\n [\n '@num1' => $num1,\n '@num2' => $num2,\n '@difference' => $num1 - $num2\n ]);\n\n $list[] = $this->t(\"@num1 x @num2 = @product\",\n [\n '@num1' => $num1,\n '@num2' => $num2,\n '@product' => $num1 * $num2\n ]);\n //avoid division error for zero\n if ($num2 != 0){\n $list[] = $this->t(\"@num1 / @num2 = @division\",\n [\n '@num1' => $num1,\n '@num2' => $num2,\n '@division' => $num1 / $num2\n ]);\n }\n else {\n $list[] = $this->t(\"@num1 / @num2 = undefined (division by zero)\",\n [\n '@num1' => $num1,\n '@num2' => $num2\n ]);\n }\n // d) the list is transform in a array\n $output['dojo_pages_calculator'] = [\n '#theme' => 'item_list',\n '#items' => $list,\n '#title' => $this->t('Operations:'),\n ];\n return $output;\n }", "function _erpal_contract_helper_config_basic() {\n $form = drupal_get_form('erpal_contract_helper_config_form');\n\n return $form;\n}", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer name'),\n 'name' => 'MF_TITLE',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer description'),\n 'name' => 'MF_DESCRIPTION',\n 'label' => $this->l('Provide a description for the heading'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Number of manufacturers to display (Enter 0 to display all)'),\n 'name' => 'MF_MAN_NUMBER',\n 'label' => $this->l('Number of Manufacturers'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on desktops'),\n 'name' => 'MF_PER_ROW_DESKTOP',\n 'label' => $this->l('Logo\\'s per row (Desktop)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on tablets'),\n 'name' => 'MF_PER_ROW_TABLET',\n 'label' => $this->l('Logo\\'s per row (Tablet)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on mobiles'),\n 'name' => 'MF_PER_ROW_MOBILE',\n 'label' => $this->l('Logo\\'s per row (Mobile)'),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'desc' => 'How the logo\\'s should be sorted',\n 'name' => 'MF_MAN_ORDER',\n 'label' => $this->l('Order by'),\n 'options' => array(\n 'query' => array(\n array(\n 'id_option' => 'name_asc',\n 'name' => $this->l('Name ASC'),\n ),\n array(\n 'id_option' => 'name_desc',\n 'name' => $this->l('Name DESC'),\n ),\n array(\n 'id_option' => 'manu_asc',\n 'name' => $this->l('Manufacturer ID ASC'),\n ),\n array(\n 'id_option' => 'manu_desc',\n 'name' => $this->l('Manufacturer ID DESC'),\n ),\n ),\n 'id' => 'id_option',\n 'name' => 'name',\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'name' => 'MF_SHOW_MAN_NAME',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No'),\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function getResult() {\n $calculation = new Calculation();\n\n //Check for correct integer inputs\n if(preg_match(\"/^[0-9]+$/\", request('first')) && preg_match(\"/^[0-9]+$/\", request('second'))){\n //check for dividing by 0\n if(request('type') == '/' && request('second') == 0){\n return redirect('/')->with('flash_message', \"When Choosing to Divide the second integer must not be 0\");\n }\n $calculation->first = request('first');\n $calculation->second = request('second');\n $calculation->type = request('type');\n \n $calculation->result = $calculation->calculate();\n\n $calculation->save();\n\n return redirect('/')->with('flash_message', \"The answer is: $calculation->result\");\n }else{\n return redirect('/')->with('flash_message', \"Please enter numbers only\");\n }\n }", "public function calcularValorLlamada();", "function getData()\n{\n $operationTypes = ['+', '-', '*'];\n $number1 = random_int(1, 20);\n $number2 = random_int(1, 20);\n $operator = $operationTypes[random_int(0, 2)];\n\n $expression = $number1 . ' ' . $operator . ' ' . $number2;\n switch ($operator) {\n case '-':\n $resultExpression = $number1 - $number2;\n break;\n case '*':\n $resultExpression = $number1 * $number2;\n break;\n case '+':\n default:\n $resultExpression = $number1 + $number2;\n break;\n }\n\n return [$expression, $resultExpression];\n}", "public function displayCalc()\r\n {\r\n require_once ROOT . DIRECTORY_SEPARATOR . \"view\" . DIRECTORY_SEPARATOR . \"index.html\";\r\n }", "private function getConfigModel()\n {\n return Mage::getSingleton('wallee_payment/system_config');\n }", "function precioConsulta(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT precioConsulta\n\t\t\t\t\tFROM tb_configuraciones\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['precioConsulta'];\t\t\t\t\n\t\t\n\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'title',\n 'label' => $this->l('Titre'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'description',\n 'label' => $this->l('Description'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'legend',\n 'label' => $this->l('Légende'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'url',\n 'label' => $this->l('Url'),\n ), \n array(\n 'col' => 6,\n 'type' => 'file',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'image',\n 'label' => $this->l('Image_up'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a start date'),\n 'name' => 'debut',\n 'label' => $this->l('Debut'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a end date'),\n 'name' => 'fin',\n 'label' => $this->l('Fin'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "public function ADPost_Get_Post_Config(){\n\t \n\t $result_key = parent::Initial_Result('config');\n\t $result = &$this->ModelResult[$result_key];\n\t \n\t try{\n\t \n\t\t// 查詢資料庫欄位設定\n\t\t$DB_OBJ = $this->DBLink->prepare(SQL_AdPost::ADMIN_POST_GET_POST_TABLE());\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\t$data_list = array();\n\t\t$data_list = $DB_OBJ->fetchAll(PDO::FETCH_ASSOC);\t\t\n\t $field_set = array();\n\t\tforeach($data_list as $data){\n\t\t $field_set[$data['Field']] = array('type'=>'','default'=>'');\n\t\t \n\t\t // 選項欄位設定成介面選項\n\t\t if(strstr($data['Type'],'enum')){\n\t\t\t$field_set[$data['Field']]['type'] = 'select';\n\t\t\tif(preg_match_all(\"/\\'(.*?)\\'/\",$data['Type'],$match)){\n\t\t\t $field_set[$data['Field']]['default'] = $match[1];\t\t\n\t\t\t}\n\t\t }\n\t\t}\n\t\t\n\t\t// 取得群組設定\n\t\t// 查詢資料庫欄位設定\n\t\t$DB_OBJ = $this->DBLink->prepare(parent::SQL_Permission_Filter(SQL_AdPost::ADMIN_POST_GET_POST_GROUPS()));\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t\n\t\t$group_list = array();\n\t\twhile($tmp = $DB_OBJ->fetch(PDO::FETCH_ASSOC)){\n\t\t $group_list[$tmp['ug_code']] = $tmp['ug_name'];\n\t\t}\n\t\t\n\t\t$result['data']['field'] = $field_set;\n $result['data']['group'] = $group_list;\n \n\t\t$result['action'] = true;\n\t \n\t } catch (Exception $e) {\n $result['message'][] = $e->getMessage();\n }\n\t return $result;\n\t}", "function LLena_GridGeneral()\n { /*Instruccion de sql que manda los datos al dbgEstimacion*/\n global $sContrato;\n $sql= \"select\n iNumeroEstimacion as Estimacion,\n sNumeroOrden as No_Orden,\n iSemana as Sem,\n sNumeroGenerador as Gen,\n lStatus as Status,\n dFinancieroGenerador as Porcent,\n date_format(dFechaInicio,'%d/%m/%Y') as F_Inicio,\n date_format(dFechaFinal,'%d/%m/%Y') as F_Final,\n format(dMontoMN,2) as Monto_MN,\n format(dMontoDLL,2) as Monto_DLL,\n sFaseObra as Fase_Obra\n from\n estimaciones\n where\n sContrato='$sContrato'\";\n $this->qryGeneral->Active=false;\n $this->qryGeneral->setSQL($sql);\n $this->qryGeneral->Active=true;\n }", "public function getCssCustomCalculateCep()\n {\n return $this->_scopeConfig->getValue('estimatecep/cep_load_values/css_cep', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }", "public function index()\n {\n return view('calculator')->with('result', $this->getResult());\n }", "private function calculateInputData() {\n\t\t$this->inputValuesSetRawData();\n\t\t$this->explodeRowsToCells();\n\t\t$this->separateHeader();\n\t\t$this->validateValues();\n\t}", "public function calculate();", "public function calculate();", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\t\t\t\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = 'Specials products';\r\n }\r\n $response = Configuration::updateValue('FIELD_SPECIALPLS_NBR', 6);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_TITLE', $title);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_VERTICAL', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_COLUMNITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MAXITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MEDIUMITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_MINITEM', 1);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_AUTOSCROLLDELAY', 4000);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_PAGINATION', 0);\r\n $response &= Configuration::updateValue('FIELD_SPECIALPLS_NAVIGATION', 0);\r\n\r\n return $response;\r\n }", "public function getFormOptions(){\n $options = parent::getFormOptions();\n $padding = $this->getPadding(3);\n $eol = $this->getEol();\n $options .= $padding.'\\'image\\' => $this->getSkinUrl(\\'images/grid-cal.gif\\'),'.$eol;;\n $options .= $padding.'\\'format\\' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),'.$eol;\n return $options;\n }", "public function config()\r\n {\r\n return function (ConfigDB $config) {\r\n\r\n $config->titleTitle = 'ФИО';\r\n\r\n $config->hasOne = [\r\n 'User' => [\r\n 'user_id' => 'id',\r\n 'deleted_by' => 'id',\r\n 'created_by' => 'id',\r\n 'modified_by' => 'id',\r\n ],\r\n 'PlaceCountry' => [\r\n 'place_country_id' => 'id',\r\n ],\r\n 'UserCompany' => [\r\n 'user_company_id' => 'id',\r\n ],\r\n ];\r\n $config->hasMany = [\r\n 'EyufDocument' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufFile' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufInvoice' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufReport' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n 'EyufTicket' => [\r\n 'eyuf_scholar_id' => 'id',\r\n ],\r\n ];\r\n $config->title = Az::l('Стипендиат');\r\n\r\n return $config;\r\n };\r\n }", "public function UserCalculations($calculation)\n {\n $this->calculation = $calculation;\n }", "public function getSql()\n {\n $operators['='] = '=';\n $operators['like'] = 'like';\n $operators['>='] = '>=';\n $operators['<='] = '<=';\n\n $select = 'SELECT ';\n foreach ($this->columns as $key => $value)\n {\n $alias = '';\n //bairros::nome|bairro\n if(preg_match('/\\|/',$key) && !preg_match('/like/',$key)) \n {\n $explode_values = explode('|',$key);\n $table_field = str_replace('::', '.', $explode_values[0]);\n $alias = $explode_values[1]; \n $alias = \" as {$alias}\"; \n }\n // elseif(preg_match('/like/',$key))\n // {\n \n // $explode_values = explode('|',$key);\n // $exKey = explode('::',$explode_values[0]);\n // $alias = $explode_values[1]; \n // $alias = \" as {$alias}\";\n \n // $table_field = \"{$exKey[0]}.{$exKey[1]}\"; \n // }\n else\n {\n\n $table_field = str_replace('::', '.', $key); \n }\n \n $select.= \" {$table_field}{$alias},\";\n $table = explode('.', $table_field);\n $from[$table[0]] = $table[0];\n\n if ($value->relation)\n {\n $where.= ' ' . $value->relation . ' AND';\n }\n }\n\n if ($this->filter)\n {\n foreach ($this->filter as $key_filter => $filter)\n {\n if ($filter)\n {\n \n\n if(preg_match('/\\|/',$key_filter))\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $explode_values = explode('|',$key_filter[1]);\n $key_filter = $this->model->getTable() . '.' . $explode_values[0]; \n\n }\n else\n {\n $key_filter = explode('::', $key_filter);\n $operator = $key_filter[2];\n $key_filter = $this->model->getTable() . '.' . $key_filter[1]; \n }\n\n if ($operator)\n {\n if ($operator == 'like')\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n elseif ($operators[$operator])\n {\n $where.= \" {$key_filter} {$operators[$operator]} '{$filter}' AND\";\n }\n }\n else\n {\n $where.= \" {$key_filter} like '%{$filter}%' AND\";\n }\n }\n }\n }\n if ($where)\n {\n $where = ' WHERE ' . $where;\n }\n $where = substr($where, 0, -3);\n $select = substr($select, 0, -1);\n $from = implode(',', $from);\n \n return $select . ' from ' . $from . $where . ' limit 20';\n }", "function construct_settings()\r\n\t{\r\n\t\tglobal $ilance, $phrase;\r\n\t\t\t\r\n\t\t$sql = $ilance->db->query(\"SELECT * FROM \" . DB_PREFIX . \"fbbridge_configuration\", 0, null, __FILE__, __LINE__);\r\n\t\tif ($ilance->db->num_rows($sql) > 0)\r\n\t\t{\r\n\t\t\t\t$html = '';\r\n\t\t\t\twhile ($res = $ilance->db->fetch_array($sql))\r\n\t\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t\t$html .= '<td width=\"27%\" valign=\"top\" nowrap>'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t\t$html .= '<td width=\"34%\" align=\"left\" valign=\"top\">';\r\n\t\t\t\t\tif($res['inputtype'] == \"yesno\")\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$html .= '<input type=\"radio\" name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" value=\"1\" ';\r\n\t\t\t\t\t\tif ($res['value'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'\">'.$phrase['_yes'].'</label>';\r\n\r\n\t\t\t\t\t\t$html .= '<input name=\"'.$res['name'].'\" id=\"'.$res['name'].'2\" type=\"radio\" value=\"0\" ';\r\n\t\t\t\t\t\tif ($res['value'] == 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= 'checked=\"checked\">';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '>';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<label for=\"'.$res['name'].'2\">'.$phrase['_no'].'</label>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'textarea')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<textarea name=\"'.$res['name'].'\" id=\"'.$res['name'].'\" style=\"width:250px; height:100px;\">'.$res['value'].'</textarea>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($res['inputtype'] == 'text')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .='<input style=\"padding:2px; height:15px; width:150px; font-family: verdana;\" id=\"'.$res['name'].'\" type=\"text\" name=\"'.$res['name'].'\" value=\"'.$res['value'].'\" />';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t$html .= '</tr>';\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$html .= '<tr>';\r\n\t\t\t\t$html .= '<td width=\"27%\" height=\"15\">'.stripslashes($res['description']).'</td>';\r\n\t\t\t\t$html .= '</tr>';\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "public function getAdd()\n {\n return array(\n 'Currency.name' => array('type' => 'text', 'label' => __(\"Name\")),\n 'Currency.code' => array('type' => 'text', 'label' => __(\"Code\")),\n 'Currency.rate' => array('type' => 'text', 'label' => __(\"Rate\"))\n );\n }" ]
[ "0.5836843", "0.5739236", "0.56538063", "0.5642074", "0.56391007", "0.56011355", "0.55889744", "0.5574878", "0.55608547", "0.55520326", "0.5539804", "0.54964095", "0.5424134", "0.54030466", "0.5389703", "0.5365562", "0.53473526", "0.53434336", "0.5340556", "0.5339118", "0.53128433", "0.5282269", "0.5258066", "0.5250876", "0.5249427", "0.52473384", "0.5231624", "0.5228272", "0.5227811", "0.5222416", "0.5220796", "0.5219914", "0.5205192", "0.5175143", "0.5172619", "0.5165607", "0.51517534", "0.51358026", "0.51142687", "0.50838315", "0.5078775", "0.50754863", "0.50712276", "0.50699687", "0.5057826", "0.5055442", "0.5052708", "0.5042833", "0.5038528", "0.5032226", "0.5028097", "0.50172687", "0.50166994", "0.5009013", "0.50072616", "0.4986921", "0.49850377", "0.4984863", "0.49817693", "0.49775353", "0.49775204", "0.4973852", "0.49731678", "0.49629906", "0.49585283", "0.4942296", "0.494015", "0.49380884", "0.49351764", "0.49299613", "0.4927622", "0.4927189", "0.49220762", "0.4920079", "0.49113965", "0.49099213", "0.49077004", "0.49062955", "0.49059054", "0.49050608", "0.49046305", "0.49018344", "0.48959425", "0.4893274", "0.4889568", "0.48891044", "0.48797157", "0.48789692", "0.4877631", "0.48743388", "0.4871068", "0.4870531", "0.4859474", "0.4859474", "0.485792", "0.4856854", "0.48513317", "0.4842203", "0.48353562", "0.48350105", "0.48299283" ]
0.0
-1
OrderedFixtureInterface method Specifies in what order fixtures should be loaded
public function getOrder() { return 5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrder()\n {\n return 1; //the order in which fixtures will be loaded\n }", "public function getOrder()\n {\n return 100; //the order in which fixtures will be loaded\n }", "public function getOrder()\n {\n return 10; // the order in which fixtures will be loaded\n }", "public function testRunOrderedFixtures()\n {\n $this->loader->addFixture(new OrderedFixtureTwo());\n $this->loader->addFixture(new OrderedFixtureOne());\n\n $this->conn->expects($this->exactly(2))\n ->method('insert')\n ->withConsecutive(\n [$this->equalTo('table'), $this->equalTo(['one' => 1])],\n [$this->equalTo('table'), $this->equalTo(['two' => 2])]\n );\n\n $this->loader->run($this->conn);\n }", "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 2;\n }", "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 3;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 3;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 3;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 1;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 1;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 10;\n }", "public function getOrder() {\n // the lower the number, the sooner that this fixture is loaded\n return 4;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 5;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 15;\n }", "public function testFixtureLoadOnDemand(): void\n {\n $this->loadFixtures('Categories');\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 7;\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 25;\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "public function getOrder()\n {\n // the lower the number, the sooner that this fixture is loaded\n return 201;\n }", "public static function loadFixture()\n {\n //include __DIR__ .'/../_files/customer.php';\n include __DIR__ .'/../_files/order_fee_variation.php';\n\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => AdminUserFixture::class,\n 'dataFile' => codecept_data_dir() . 'admin_user.php',\n ],\n 'auth' => [\n 'class' => AuthItemFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_data.php',\n ],\n 'auth_child' => [\n 'class' => AuthItemChildFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_child_data.php',\n ],\n 'authAssignment' => [\n 'class' => AuthAssignmentFixture::class,\n 'dataFile' => codecept_data_dir() . 'auth_assigment_data.php',\n ],\n 'category' => [\n 'class' => CategoryFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_data.php',\n ],\n 'category_company_type' => [\n 'class' => CategoryCompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'category_company_type_data.php',\n ],\n 'company_type' => [\n 'class' => CompanyTypeFixture::class,\n 'dataFile' => codecept_data_dir() . 'company_type_data.php',\n ],\n\n ];\n }", "abstract protected function getFixtures();", "private function myLoadFixtures()\n {\n $em = $this->getDatabaseManager();\n\n // load fixtures\n $client = static::createClient();\n $classes = array(\n // classes implementing Doctrine\\Common\\DataFixtures\\FixtureInterface\n 'Demofony2\\AppBundle\\DataFixtures\\ORM\\FixturesLoader',\n );\n\n $this->loadFixtures($classes);\n }", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "protected function postFixtureSetup()\n {\n }", "protected function createFixtures()\n {\n // Due to a dubious bug(?) in doctrine - product types need to be loaded first.\n $typeFixtures = new LoadProductTypes();\n $typeFixtures->load($this->entityManager);\n $this->productType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ID);\n $this->addonProductType = $this->getProductTypeRepository()->find(self::PRODUCT_TYPE_ADDON_ID);\n\n $countries = new LoadCountries();\n $countries->load($this->entityManager);\n\n $this->contactTestData = new ContactTestData($this->container);\n\n $loadCurrencies = new LoadCurrencies();\n $loadCurrencies->load($this->entityManager);\n\n $this->currency = $this->getCurrencyRepository()->findByCode($this->defaultCurrencyCode);\n\n $unitFixtures = new LoadUnits();\n $unitFixtures->load($this->entityManager);\n $this->orderUnit = $this->getProductUnitRepository()->find(self::ORDER_UNIT_ID);\n\n $this->contentUnit = $this->getProductUnitRepository()->find(self::CONTENT_UNIT_ID);\n\n $taxClasses = new LoadTaxClasses();\n $taxClasses->load($this->entityManager);\n $this->taxClass = $this->getTaxClassRepository()->find(self::TAX_CLASS_ID);\n\n $countryTaxes = new LoadCountryTaxes();\n $countryTaxes->load($this->entityManager);\n\n $collectionTypes = new LoadCollectionTypes();\n $collectionTypes->load($this->entityManager);\n\n $mediaTypes = new LoadMediaTypes();\n $mediaTypes->load($this->entityManager);\n\n $attributeTypes = new LoadAttributeTypes();\n $attributeTypes->load($this->entityManager);\n $this->attributeType = $this->getAttributeTypeRepository()->find(self::ATTRIBUTE_TYPE_ID);\n\n $statusFixtures = new LoadProductStatuses();\n $statusFixtures->load($this->entityManager);\n $this->productStatus = $this->getProductStatusRepository()->find(Status::ACTIVE);\n $this->productStatusChanged = $this->getProductStatusRepository()->find(Status::CHANGED);\n $this->productStatusImported = $this->getProductStatusRepository()->find(Status::IMPORTED);\n $this->productStatusSubmitted = $this->getProductStatusRepository()->find(Status::SUBMITTED);\n\n $deliveryStatusFixtures = new LoadDeliveryStatuses();\n $deliveryStatusFixtures->load($this->entityManager);\n }", "public function testLoadAllFixtures(): void\n {\n $this->loadFixtures();\n $article = $this->getTableLocator()->get('Articles')->get(1);\n $this->assertSame(1, $article->id);\n $category = $this->getTableLocator()->get('Categories')->get(1);\n $this->assertSame(1, $category->id);\n }", "public function fixtures() \n {\n return [\n 'categories' => CategoryFixture::className(),\n ];\n }", "public function testLoadDulicateFixtures(): void\n {\n $this->expectException(UnexpectedValueException::class);\n $this->expectExceptionMessage('Found duplicate fixture `core.Articles`');\n (new FixtureHelper())->loadFixtures(['core.Articles','core.Articles']);\n }", "public function _fixtures()\n\t{\n\t\treturn [\n\t\t\t'user' => [\n\t\t\t\t'class' => UserFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'login_data.php'\n\t\t\t],\n\t\t\t'models' => [\n\t\t\t\t'class' => ModelsFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'models.php'\n\t\t\t],\n\t\t\t'files' => [\n\t\t\t\t'class' => FilesFixture::className(),\n\t\t\t\t'dataFile' => codecept_data_dir() . 'files.php'\n\t\t\t]\n\n\t\t];\n\t}", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => BookFixture::class,\n 'dataFile' => codecept_data_dir() . 'book.php'\n ],\n ];\n }", "public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => TicketsFixture::className(),\n 'dataFile' => codecept_data_dir() . 'tickets.php'\n ]\n ];\n }", "public function testSortingOrder2()\n {\n $this->sortingOrderGeneration();\n }", "public function testSortingOrder3()\n {\n $this->sortingOrderGeneration(false);\n }", "public function _fixtures()\n {\n return [\n 'user' => [\n 'class' => UserFixture::className(),\n 'dataFile' => codecept_data_dir() . 'login_data.php',\n ],\n ];\n }", "protected static function getDataFixtures()\n {\n return array(\n new LoadTestUser(),\n new LoadSuperUser(),\n );\n }", "public function testLoadWithCollection() {\n\t\t$options = $this->_loadOptions;\n\t\t$posts = Fixture::load('models/Posts', $options);\n\t\t$this->_testLoad($posts);\n\t}", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "public function testFixturesSetup() {\n $this->assertCount(3, $this->databaseDumpFiles);\n }", "public function setUp()\n {\n $this->loadFixtures([]);\n }", "protected function getFixtures()\n {\n return array(\n // __DIR__ . '/../../Resources/fixtures/majora_entitys.yml',\n );\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "protected function reloadDataFixtures()\n {\n $em = $this->getEntityManager();\n $loader = new Loader;\n foreach ($this->dataFixturePaths as $path) {\n $loader->loadFromDirectory($path);\n }\n $purger = new ORMPurger($em);\n $executor = new ORMExecutor($em, $purger);\n $executor->execute($loader->getFixtures());\n $this->fixturesReloaded = true;\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/card.yml',\n );\n }", "public function getDependencies()\n {\n return [UsersFixture::class,ThreadsFixture::class];\n }", "public function testRequiredFixtures() {\n\t\tif (!$this->_hasTrigger('getRequiredFixtures')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('getRequiredFixtures', $this->ObjectEvent);\n\n\t\t$result = $this->Event->trigger($this->ModelObject, $this->plugin . '.getRequiredFixtures');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }", "public function _fixtures()\n {\n return [\n\n 'base_date' => [\n 'class' => BaseDataFixture::class,\n 'dataFile' => codecept_data_dir() . 'base_data_data.php',\n ],\n\n ];\n }", "function getUserFixtures() {\n\t\t$proceed = $this->in(__('Bake could not detect fixtures, would you like to add some?', true), array('y','n'), 'n');\n\t\t$fixtures = array();\n\t\tif (strtolower($proceed) == 'y') {\n\t\t\t$fixtureList = $this->in(__(\"Please provide a comma separated list of the fixtures names you'd like to use.\\nExample: 'app.comment, app.post, plugin.forums.post'\", true));\n\t\t\t$fixtureListTrimmed = str_replace(' ', '', $fixtureList);\n\t\t\t$fixtures = explode(',', $fixtureListTrimmed);\n\t\t}\n\t\t$this->_fixtures = array_merge($this->_fixtures, $fixtures);\n\t\treturn $fixtures;\n\t}", "public function testGetOrder()\n {\n }", "protected static function getFixtures()\n {\n return new ArrayCollection([\n new EavTypeFixture(),\n new EavAttributeFixture(),\n ]);\n }", "public function getDependencies()\n {\n return [\n 'Elcodi\\Bundle\\StoreBundle\\DataFixtures\\ORM\\StoreData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductSizeData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductData',\n ];\n }", "protected function getFixtures()\n {\n return array(\n __DIR__ . '/../../Resources/fixtures/BlogArticle.yml',\n );\n }", "public function testOrderElements()\n {\n $this->todo('stub');\n }", "public function getDependencies()\n {\n return [\n 'Elcodi\\Bundle\\StoreBundle\\DataFixtures\\ORM\\StoreData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\PrintSideData',\n 'Elcodi\\Bundle\\ProductBundle\\DataFixtures\\ORM\\ProductColorsData',\n ];\n }", "public static function loadStockFixtures(): void\n {\n include __DIR__ . '/../../../_files/stockFixtures.php';\n }", "public function getDependencies()\n {\n return [CategoryFixtures::class];\n }", "function getDependencies()\n {\n return array(\n 'Shuffle\\CardBundle\\DataFixtures\\ORM\\LoadDeckData',\n );\n }", "public static function createOrderReferenceFixture()\n {\n PlacedOrderFixture::createOrderReferenceFixture();\n }", "private function loadFixture(Fixture $fixture)\n {\n $fixtureClassName = get_class($fixture);\n if (isset($this->fixtures[$fixture->getPriority()])) {\n throw new \\InvalidArgumentException(\n sprintf('Duplicate priority %d in fixture %s', $fixture->getPriority(), $fixtureClassName)\n );\n }\n if ($fixture->getPriority() >= 0) {\n $this->fixtures[$fixture->getPriority()] = $fixture;\n }\n $this->fixturesByNames[$fixtureClassName] = $fixture;\n }", "function getDependencies()\n {\n return [\n AddressFixtures::class,\n ContactFixtures::class\n ];\n }", "public function testLoadAll()\n {\n $config = [\n 'cryptors' => [\n 'rsa' => [\n 'foo' => [],\n 'bar' => [],\n ],\n 'aes' => [\n 'baz' => [\n 'key_size' => Fixtures::bits(),\n 'key_path' => $this->existentKeyFile,\n 'binary_output' => true,\n ],\n 'qux' => [\n 'key_size' => Fixtures::bits(),\n 'key_path' => $this->existentKeyFile,\n 'binary_output' => false,\n ],\n ],\n ],\n 'doctrine' => [\n 'dbal' => [\n 'encrypted_string' => [\n 'enabled' => false\n ]\n ]\n ]\n ];\n $this->load($config, function (ContainerBuilder $container) use ($config) {\n foreach ($config['cryptors'] as $cryptorType) {\n foreach ($cryptorType as $name => $cryptorConfig) {\n $this->assertTrue($container->hasDefinition(\"gtt.crypt.encryptor.$name\"));\n }\n }\n $this->assertTrue($container->has('gtt.crypt.rsa.zend_rsa.foo'));\n $this->assertTrue($container->has('gtt.crypt.rsa.zend_rsa.bar'));\n\n $this->assertTrue($container->has('gtt.crypt.aes.key_reader.baz'));\n $this->assertTrue($container->has('gtt.crypt.aes.key_reader.qux'));\n $this->assertEquals($this->existentKeyFile, $container->getDefinition('gtt.crypt.aes.key_reader.baz')->getArgument(0));\n $this->assertEquals($this->existentKeyFile, $container->getDefinition('gtt.crypt.aes.key_reader.qux')->getArgument(0));\n\n $this->assertTrue($container->getDefinition('gtt.crypt.encryptor.baz')->getArgument(1));\n $this->assertFalse($container->getDefinition('gtt.crypt.encryptor.qux')->getArgument(1));\n });\n }", "public function getDependencies()\n {\n return [\n UserFixture::class,\n DomaineFixture::class\n ];\n }", "public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n\n self::$reader = [\n 'username' => self::$faker->userName,\n 'email' => self::$faker->email,\n 'password' => self::$faker->password,\n ];\n\n // load user admin fixtures\n parent::$writer['id'] = Utils::loadUserData(\n parent::$writer['username'],\n parent::$writer['email'],\n parent::$writer['password'],\n true\n );\n\n // load user reader fixtures\n self::$reader['id'] = Utils::loadUserData(\n self::$reader['username'],\n self::$reader['email'],\n self::$reader['password'],\n false\n );\n }", "public static function loadProductFixtures(): void\n {\n include __DIR__ . '/../../../_files/productFixtures.php';\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function testLoad()\n {\n $this->todo('stub');\n }", "public function _before(TestCase $test)\n {\n $this->loadFixtures();\n }", "protected function fixture(){\n $this->clearAll();\n \n $venue_id = $this->createVenue('Pool');\n \n $this->createUser('foo');\n\n\n $seller = $this->createUser('seller');\n \n $evt = $this->createEvent('Barcelona vs Real Madrid', $seller->id, $this->createLocation()->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'aaa');\n $this->setEventGroupId($evt, '0010');\n $this->setEventVenue($evt, $venue_id);\n $this->setEventOtherTaxes($evt, 'VAT', 17.5, 'barb4d0s');\n $this->catA = $this->createCategory('Category A', $evt->id, 25.00, 100);\n $catB = $this->createCategory('Category B', $evt->id, 10.00);\n $catC = $this->createCategory('Category C', $evt->id, 5.00);\n \n /*\n $loc = $this->createLocation();\n $evt = $this->createEvent('Water March', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'bbb');\n $this->createCategory('Zamora Branch', $evt->id, 14.00);\n \n $evt = $this->createEvent('Third Event', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ccc');\n $this->createCategory('Heaven', $evt->id, 22.50);\n $this->createCategory('Limbo', $evt->id, 22.50);\n \n \n $this->seller = $this->createUser('seller2');\n $loc = $this->createLocation();\n $evt = $this->createEvent('Transformers Con', $this->seller->id, $loc->id, date('Y-m-d H:i:s', strtotime('+1 day')));\n $this->setEventId($evt, 'ttt');\n $this->createCategory('Autobots', $evt->id, 55.00);*/\n }", "public function testBefore()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests_opts');\n $fixture->load();\n $this->assertTrue($this->_recordExists(100));\n }", "public static function loadUserFixtures()\n {\n include __DIR__ . '/../../../_files/adminUserFixtures.php';\n }", "protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }", "public function testGetOrderFiles()\n {\n }", "protected function setUp()\n {\n $this->fixture = new Configuration();\n }", "public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }", "public static function loadInventoryFixtures(): void\n {\n include __DIR__ . '/../../../_files/source_items_on_default_source.php';\n }", "public function getDependencies(): array\n {\n return ['Dravencms\\Model\\Locale\\Fixtures\\CurrencyFixtures', 'Dravencms\\Model\\Location\\Fixtures\\CountryFixtures'];\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "protected function setupTestEntities() {\n // Create 4 entities with name1 and 3 entities with name2.\n $entity_1 = [\n 'name' => 'name1',\n ];\n\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n $this->storage->create($entity_1)->save();\n\n $entity_2 = [\n 'name' => 'name2',\n ];\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n $this->storage->create($entity_2)->save();\n }", "public function setUp() {\n $this->fixture= new TreeParser();\n }", "public function load(ObjectManager $manager)\n {\n // Fixtures are split into separate files\n }", "public function haveFixtures($fixtures)\n {\n $this->store = new FixturesStore($fixtures);\n $this->store->loadFixtures();\n $this->loadedFixtures[] = $this->store;\n }", "public function testGetOrderTags()\n {\n }", "public function getDependencies(): array\n {\n return [\n PartnerFixtures::class,\n PhoneFixtures::class\n ];\n }", "public function getDependencies(): array\n {\n return [CategoryFixtures::class, AuthorFixtures::class, CoverFixtures::class, LanguageFixtures::class, PublisherFixtures::class, StatusFixtures::class, TagFixtures::class];\n }", "public function getDependencies()\n {\n return [\n EstabelecimentoFixture::class\n ];\n }", "public function getDependencies(): array\n {\n return [ArticleFixtures::class, UserFixtures::class];\n }", "public function getDependencies()\n {\n return [RoleFixtures::class];\n }", "protected function postFixtureRestore()\n {\n }", "public function testPrepareLoad_Ordered()\n {\n \t$qs = $this->conn->prepare('SELECT * FROM test');\n \t$this->assertEquals(array(2, 'two', 'next row', 'ACTIVE'), $qs->load(2, DB::FETCH_ORDERED));\n }", "public function getDependencies(): array\n {\n return [QuestionFixtures::class, UserFixtures::class];\n }", "public function load(ObjectManager $manager)\n {\n $content1 = new Content();\n $content1->setName(\"Test_Content_1\");\n $content1->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content1->setOrdinance(1);\n $manager->persist($content1);\n\n $content2 = new Content();\n $content2->setName(\"Test_Content_2\");\n $content2->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content2->setOrdinance(2);\n $manager->persist($content2);\n\n $content3 = new Content();\n $content3->setName(\"Test_Content_3\");\n $content3->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content3->setOrdinance(3);\n $manager->persist($content3);\n\n $content4 = new Content();\n $content4->setName(\"Test_Content_4\");\n $content4->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content4->setOrdinance(4);\n $manager->persist($content4);\n\n $content5 = new Content();\n $content5->setName(\"Test_Content_5\");\n $content5->setPath(\"https://bitdash-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd\");\n $content5->setOrdinance(5);\n $manager->persist($content5);\n\n $manager->flush();\n }", "public function getDependencies()\n {\n return [CategoryFixtures::class, StateFixtures::class, UserFixtures::class, CountyFixtures::class,];\n }", "public function setUp()\n {\n $this->fixtures('unit_tests');\n }", "function getDependencies()\n {\n return [\n TaskFixtures::class\n ];\n }" ]
[ "0.83041817", "0.8266725", "0.81529915", "0.72548497", "0.7095297", "0.7081169", "0.7081169", "0.7081169", "0.7081169", "0.70628375", "0.70437634", "0.70437634", "0.70232695", "0.70232695", "0.70050603", "0.70006716", "0.68659383", "0.68503946", "0.68473136", "0.68441784", "0.6793887", "0.66287696", "0.6457936", "0.6427128", "0.64024585", "0.63683826", "0.6321399", "0.6289064", "0.62675774", "0.623662", "0.62209654", "0.6104351", "0.6066339", "0.60578126", "0.600478", "0.5915904", "0.58684695", "0.5834152", "0.5803218", "0.5790652", "0.5766963", "0.57638633", "0.5749863", "0.57486653", "0.57463145", "0.57197046", "0.571958", "0.5718893", "0.5700246", "0.5670723", "0.5667852", "0.5662561", "0.56620324", "0.5652239", "0.5621625", "0.56191736", "0.561389", "0.56002235", "0.55943584", "0.55887115", "0.5586312", "0.557116", "0.55663466", "0.55644894", "0.55491394", "0.5538529", "0.55285805", "0.5522995", "0.55029136", "0.5502297", "0.5501035", "0.5501035", "0.5501035", "0.5497377", "0.54927206", "0.5487462", "0.547223", "0.54713225", "0.546574", "0.5459878", "0.54581577", "0.54514664", "0.5449023", "0.54422843", "0.54400563", "0.5426212", "0.54255897", "0.5420728", "0.5419912", "0.53945655", "0.53846073", "0.5384251", "0.5371855", "0.53710395", "0.53447145", "0.53397286", "0.5336541", "0.53328234", "0.53319263", "0.5331557", "0.53285635" ]
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 index(){ $data['url'] = "/agent/joinAgent1"; $this->load->view("alert", $data); return; }
{ "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\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function index() {\n\t\t$this->display('index');\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 \n return view('welcome');\n }", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index()\n {\n return view('pages.welcome');\n }", "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 \treturn view(\"index\");\n\t}", "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}", "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 {\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 }", "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 index()\n {\n return view('front.welcome');\n }", "public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "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 }", "public function index()\n {\n return view('welcome');\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\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 {\n return View(\"pages.home\");\n }", "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 // 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.7656208", "0.7415378", "0.739705", "0.73165625", "0.722926", "0.722926", "0.71883744", "0.7164455", "0.71509767", "0.71431154", "0.71066415", "0.707623", "0.70758826", "0.7040675", "0.7028172", "0.7028172", "0.7028172", "0.7028172", "0.7028172", "0.697183", "0.696945", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69487256", "0.69303524", "0.6927715", "0.69133115", "0.6899643", "0.68959033", "0.6874349", "0.68583345", "0.6857129", "0.68409765", "0.6804193", "0.6804193", "0.6801996", "0.6795203", "0.6788503", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.67694515", "0.676519", "0.6762994", "0.67605215", "0.67605215", "0.67516255", "0.6751096", "0.6746958", "0.6741991", "0.6740252", "0.6727545", "0.6717911", "0.671309", "0.67119247", "0.6705847", "0.66986567", "0.6690381", "0.6673991", "0.6661683", "0.6659657", "0.66516685", "0.66298157", "0.66207856", "0.6614142", "0.6603182", "0.65990907", "0.6593946", "0.65919256", "0.65840274", "0.65757334", "0.65752256", "0.65748125", "0.6556026", "0.65462685", "0.65445244", "0.65428305", "0.6542043", "0.65415514", "0.65192914", "0.6514898", "0.6514898", "0.6514898", "0.6514898" ]
0.0
-1
Update position of rubric presration
public function updatePosition($iNewOrder) { if (!is_int($iNewOrder)) { throw new \InvalidArgumentException('Argument "$iNewOrder" expects an integer, "' . (is_object($iNewOrder) ? get_class($iNewOrder) : gettype($iNewOrder)) . '" given'); } $iOldOrder = $this->getOstTplPrestationOrder(); if ($iOldOrder !== $iNewOrder) { $oConnection = $this->getConnection(); $oConnection->beginTransaction(); try { $this->setOstTplPrestationOrder(-1); $this->save(); if ($iOldOrder < $iNewOrder) { $sOperator = '-'; $sConditionBetween = $iOldOrder . ' AND ' . $iNewOrder; $sOrder = 'ASC'; } else { $sOperator = '+'; $sConditionBetween = $iNewOrder . ' AND ' . $iOldOrder; $sOrder = 'DESC'; } $sQuery = 'UPDATE r_operation_type_sub_tpl_prestation SET ost_tpl_prestation_order = ost_tpl_prestation_order ' . $sOperator . ' 1 WHERE ost_tpl_prestation_order BETWEEN ' . $sConditionBetween . ' AND ost_tpl_rubrique_id = ' . $this->getOstTplRubriqueId() . ' ORDER BY ost_tpl_prestation_order ' . $sOrder; $oConnection->exec($sQuery); $this->setOstTplPrestationOrder($iNewOrder); $this->save(); $oConnection->commit(); } catch (\Exception $oException) { $oConnection->rollBack(); $this->addValidationFailed($oException->getMessage()); \CSErrorHandler::getInstance()->handleException($oException); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateEditotPosition()\n {\n $this->format->shiftCurrentXposition($this->shape->getWidth() + ($this->shape->getBorderWidth() / 2));\n }", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function restorePosition()\n {\n if ($this->value['y']==$this->_pdf->getY()) $this->_pdf->setY($this->value['yc'], false);\n }", "public function presetEditorPosition()\n {\n $editor = $this->format;\n\n $editor->shiftCurrentXposition($this->shape->getBorderWidth() / 2);\n\n // if there is no space left on the right of the convas to shift to,\n // we update the y axis to shift down to the next line\n if ($editor->getWidth() - $editor->getCurrentXposition() < $this->shape->getWidth(true)\n && $editor->getHeight() - $editor->getCurrentYposition() >= $this->shape->getHeight(true)) {\n\n $editor->shiftCurrentYposition($editor->biggestYpostion());\n $editor->resetCurrentXposition($this->shape->getBorderWidth() / 2);\n\n }\n }", "abstract function incrementPosition();", "public function setPosition() {\n }", "public function testUpdatePayslip()\n {\n }", "function SetPos($aRect) {\n\tassert( $this->prect != null ) ;\n\t$this->prect->SetPos($aRect);\n }", "function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}", "protected function calculateSpritePositions() {}", "public function update()\r\n {\r\n $this->x += $this->dx;\r\n $this->y += $this->dy;\r\n $this->z += $this->dz;\r\n }", "public function reposition_self($pos){ //TODO: could set 1 as default\n\t\t//throw new Exception('ha, gotcha!!');\n\t\t\n\t\t\n\t\t$this->__set('left',$pos++);\n\t\tforeach($this->kids as $kid) $pos = $kid->reposition_self($pos);\n\t\t$this->__set('right',$pos++);\n\t\t\n\t\t//TODO: BUGFIX, this shouldn't be necessary.\n\t\tif(get_class($this) == 'ContentBox')\n\t\t\t$this->reposition_kids();\n\t\t\n\t\t$this->store(); //we might need a writeback ...\n\n\t\treturn $pos;\n\t}", "function FundAdjustPosition($fRatio, $fVal, $fOldVal)\n{\n\treturn $fRatio * $fVal + (1.0 - $fRatio) * $fOldVal;\n}", "function update() {\n\n\t\t\t}", "private function update_positions(){\n // update the point positions\n $start_point = 0;\n $end_point = 0;\n $nr_points = count ($this->points);\n do{\n $continue = false;\n\n // find a stop point with specified position\n for ($i = $start_point; $i < $nr_points; $i++)\n {\n $end_point = $i ;\n if (! $this->points[$i]['auto_position'])\n {\n break;\n }\n }\n\n // update the positions for all the points between start point end endpoint\n //TODO:\n }while($continue);\n\n }", "function _updateCppp()\r\n\t{\r\n\t\t// Modifie la visibilite d'un round\r\n\t\t$drawId = kform::getData();\r\n\t\t$this->_dt->updateRankFromFede($drawId);\r\n\t\t$page = new utPage('none');\r\n\t\t$page->close();\r\n\t\texit();\r\n\t}", "public function image_reproportion()\n\t{\n\t\tif (($this->width === 0 && $this->height === 0) OR $this->orig_width === 0 OR $this->orig_height === 0\n\t\t\tOR ( ! ctype_digit((string) $this->width) && ! ctype_digit((string) $this->height))\n\t\t\tOR ! ctype_digit((string) $this->orig_width) OR ! ctype_digit((string) $this->orig_height))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Sanitize\n\t\t$this->width = (int) $this->width;\n\t\t$this->height = (int) $this->height;\n\n\t\tif ($this->master_dim !== 'width' && $this->master_dim !== 'height')\n\t\t{\n\t\t\tif ($this->width > 0 && $this->height > 0)\n\t\t\t{\n\t\t\t\t$this->master_dim = ((($this->orig_height/$this->orig_width) - ($this->height/$this->width)) < 0)\n\t\t\t\t\t\t\t? 'width' : 'height';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->master_dim = ($this->height === 0) ? 'width' : 'height';\n\t\t\t}\n\t\t}\n\t\telseif (($this->master_dim === 'width' && $this->width === 0)\n\t\t\tOR ($this->master_dim === 'height' && $this->height === 0))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->master_dim === 'width')\n\t\t{\n\t\t\t$this->height = (int) ceil($this->width*$this->orig_height/$this->orig_width);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->width = (int) ceil($this->orig_width*$this->height/$this->orig_height);\n\t\t}\n\t}", "abstract protected function update ();", "function pawn($original_position, $new_position){\n\t\t//if($vector == 1 move ahead\n\t\t//X movement\n\t\t//Y movement\n\t\t//E2 to E4\n\t\t//E minus the E\n\t\t//4 minus 2\n\t\n\t}", "public function setPR($r) {}", "public function lastPosition()\n {\n $numberOfPhotos = $this->whereUserId(auth()->id())->count();\n \n $this->update(['position' => $numberOfPhotos]);\n }", "private function calculatePoints()\n {\n $this->points += 100;\n $this->points = $this->points < 0 ? 0 : $this->points;\n }", "abstract public function update();", "abstract public function update();", "function image_reproportion()\n\t{\n\t\tif ( ! is_numeric($this->dst_width) OR ! is_numeric($this->dst_height) OR $this->dst_width == 0 OR $this->dst_height == 0)\n\t\t\treturn;\n\t\t\n\t\tif ( ! is_numeric($this->src_width) OR ! is_numeric($this->src_height) OR $this->src_width == 0 OR $this->src_height == 0)\n\t\t\treturn;\n\t\n\t\tif (($this->dst_width >= $this->src_width) AND ($this->dst_height >= $this->src_height))\n\t\t{\n\t\t\t$this->dst_width = $this->src_width;\n\t\t\t$this->dst_height = $this->src_height;\n\t\t}\n\t\t\n\t\t$new_width\t= ceil($this->src_width*$this->dst_height/$this->src_height);\t\t\n\t\t$new_height\t= ceil($this->dst_width*$this->src_height/$this->src_width);\n\t\t\n\t\t$ratio = (($this->src_height/$this->src_width) - ($this->dst_height/$this->dst_width));\n\n\t\tif ($this->master_dim != 'width' AND $this->master_dim != 'height')\n\t\t{\n\t\t\t$this->master_dim = ($ratio < 0) ? 'width' : 'height';\n\t\t}\n\t\t\n\t\tif (($this->dst_width != $new_width) AND ($this->dst_height != $new_height))\n\t\t{\n\t\t\tif ($this->master_dim == 'height')\n\t\t\t{\n\t\t\t\t$this->dst_width = $new_width;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->dst_height = $new_height;\n\t\t\t}\n\t\t}\n\t}", "abstract function update();", "public function setPosition($position);", "function getPosition() {\n\t\t}", "public function displayAjaxUpdatePosition()\n {\n $blocks = Tools::getValue('blocks');\n $result = false;\n\n if (!empty($blocks) && is_array($blocks)) {\n foreach ($blocks as $key => $id_block) {\n // Set the position of the Reassurance block\n $position = $key + 1;\n\n $dataToUpdate = ['position' => (int) $position];\n $whereCondition = 'id_psreassurance = ' . (int) $id_block;\n $updateResult = (bool) Db::getInstance()->update('psreassurance', $dataToUpdate, $whereCondition);\n\n // If the update can't be done, we return false\n if (!$updateResult) {\n break;\n }\n }\n $result = $updateResult ? true : false;\n }\n\n // Response\n $this->ajaxRenderJson($result ? 'success' : 'error');\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality--;\n\n // Update Sell in\n $this->updateSellIn();\n\n // Check if we need to decrease quality again\n if ($this->item->sell_in < 0) {\n $this->item->quality--;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "private function calcShifts() : void\n\t{\n\t\t$this->shiftY = $this->scaleY*abs($this->rangeYHigh);\n\n\t\t$this->shiftX = $this->scaleX*abs($this->rangeXLow);\n\t}", "public function position();", "public\n\tfunction reposition( Request $request ) {\n\t\tif ( $request->ajax() ) {\n\n\t\t\t$posts = Grandcategory::all();\n\t\t\tforeach ( $posts as $post ) {\n\t\t\t\tforeach ( $request->order as $order ) {\n\t\t\t\t\tif ( $order[ 'id' ] == $post->id ) {\\\n\t\t\t\t\t\tDB::table( 'grandcategories' )->where( 'id', $post->id )->update( [ 'position' => $order[ 'position' ] ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn response()->json( 'Update Successfully.', 200 );\n\n\t\t}\n\n\n\n\t}", "public function update(): void\n {\n // Update quality\n if ($this->item->sell_in > 10) {\n $this->item->quality++;\n }\n\n if ($this->item->sell_in <= 10 && $this->item->sell_in > 5) {\n $this->item->quality += 2;\n }\n\n if ($this->item->sell_in <= 5 && $this->item->sell_in > 0) {\n $this->item->quality += 3;\n }\n\n // Update Sell in\n $this->updateSellIn();\n\n if ($this->item->sell_in < 0) {\n $this->item->quality = 0;\n }\n\n $this->checkAndUpdateQualityByRange();\n }", "function fillPostIconPosition(){\n\t\t?>\n\n\t\t<label><input type=\"radio\" name=\"pi_left_right\" value = \"0\">Left</label>\n\t\t<label><input type=\"radio\" name=\"pi_left_right\" value = \"1\">Right</label>\n\n\t\t<?php\n\t}", "public function updateRootline() {}", "public function update($loyPrg);", "public function assignPos(Position $position);", "protected function tempPosition()\n {\n $this->{$this->getPositionColumn()} = static::$insanePosition;\n $this->save();\n }", "public abstract function update();", "public function testUpdatepoints(): void\n { \n $ma = [\"Bee A\", \"Bee B\"];\n $maa = [101, 10];\n list($b, $b1) = $ma;\n list($i, $i1) = $maa;\n \n $obj = new Points();\n $obj->setPoints($b, $i);\n $obj->setPoints($b1, $i1);\n \n // First set of substitution\n $obj->updatePoints($b, 90);\n $obj->updatePoints($b1, 4);\n \n $this->assertEquals(($i - 90), $obj->getPoints($b));\n $this->assertEquals(($i1 - 4), $obj->getPoints($b1));\n \n // Second set of substitution\n $obj->updatePoints($b, 10);\n $obj->updatePoints($b1, 4);\n \n $this->assertEquals(1, $obj->getPoints($b));\n $this->assertEquals(2, $obj->getPoints($b1));\n }", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "function moveRight()\n {\n $this->position++;\n if ($this->position >= count($this->line)) {\n array_push($this->line, '_');\n }\n }", "public function setRealations(){\n\n }", "public function setRect(\\SetaPDF_Core_DataStructure_Rectangle $rect) {}", "public function update() {\n parent::update();\n }", "public function update_position(Request $request)\n {\n $asset = Asset::findOrFail($request->get('id'));\n if(!$asset){\n return 0;\n }\n\n $asset->position_top = $request->get('position_top');\n $asset->position_left = $request->get('position_left');\n $asset->save();\n return 1;\n }", "public function positions(){\n $this->articlesModel->positions();\n }", "public function reprova()\n {\n $this -> estadoAtual -> reprova($this);\n }", "public function update(): void\n {\n // Update quality\n $this->item->quality = self::QUALITY_MAX;\n }", "function setPosition($s)\n\t{\n\t\t$this->Info['Position'] = $s;\n\t\tupdateTableByUser('Developer', 'Position', $s, $this->Username);\n\t}", "public function incrementPosition()\n {\n ++$this->positionA;\n }", "public function updateQuality(): void\n {\n $this->getItem()->quality = $this->getNewQuality();\n\n if ($this->isQualityOverHighestValue()) {\n $this->setToHighestQuality();\n }\n if ($this->isQualityUnderLowestValue()) {\n $this->setToLowestQuality();\n }\n }", "protected function _update()\n\t{\n\t}", "public function updateQuality() {\n\n if ($this->sellIn > 0) {\n //Not reached sellby date\n $this->quality -= 2;\n } else {\n //Passed sellby date, so decrease in quality twice as fast\n $this->quality -= 4;\n }\n\n //Quality cannot be less than zero\n if ($this->quality < 0){\n $this->quality = 0;\n }\n }", "public function testUpdatePayslipByID()\n {\n }", "public function update_custom_slideshow_group_boat_list_rank(){\r\n\t global $db, $cm;\r\n\t parse_str($_POST['data'], $recOrder);\r\n\t $i = 1;\r\n\t foreach ($recOrder['item'] as $value) {\r\n\t\t $value_ar = explode(\"!#!\", $value);\r\n\t\t $boat_id = round($value_ar[0]);\r\n\t\t $slideshow_id = round($value_ar[1]);\r\n\t\t \r\n\t\t $sql = \"update tbl_boat_slideshow_assign set rank = '\". $i .\"' where boat_id = '\". $boat_id .\"' and slideshow_id = '\". $slideshow_id .\"'\";\r\n\t\t $db->mysqlquery($sql); \r\n\t\t $i++;\t\r\n\t }\r\n\t}", "public function reset_pos() {\n\t\tFile::save( $this->_resetfile, time() , true );\n\n\t\t$this->_summary[ 'is_running' ] = 0;\n\t\tself::save_summary();\n\t}", "public function initializePositionSaving() {}", "public function initializePositionSaving() {}", "public function initializePositionSaving() {}", "public function setRelativePosition($value) {\r\n $this->relativePosition = $this->setDoubleProperty($this->relativePosition, $value);\r\n }", "function arreglaprecios(){\n\t\t$mSQL='UPDATE sinv SET precio2=precio1, base2=base1, margen2=margen1 WHERE precio2=0 OR precio2 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio3=precio2, base3=base2, margen3=margen2 WHERE precio3=0 OR precio3 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio4=ROUND(ultimo*100/(100-(margen3-0.5))*(1+(iva/100)),2), base4=ROUND(ultimo*100/(100-(margen3-0.5)),2), margen4=margen3-.5 WHERE precio4=0 OR precio4 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t}", "public function afterInsert() {\n\t\t\tparent::afterInsert();\n\t\t\t//$this->pos = 1;\n\t\t\t$this->updatePos(1);\n\t\t}", "public function update()\r\n {\r\n \r\n }", "function _set_new_y($size)\r\n {\r\n $this->new_y = $size;\r\n }", "public function savePosition() {}", "protected function update() {}", "function getPosition() ;", "public function update();", "public function update();", "public function update();", "public function update();", "private function updateImagePosition(Image &$psImage, array $imgArray): void\n {\n $position = $this->getImagePosition($imgArray);\n //====================================================================//\n // Update Image Position in List\n if (!is_null($position)) {\n $psImage->position = (int) $position;\n $this->needUpdate(\"Image\");\n }\n }", "public function Rule(){\n $prevousXY=$this->GetXY();\n $inicialX= $this->GetTMargin();\n $y= $this->CalculateYOffSet(10);\n $sumY=10;\n while($y<$this->h){\n $y= $this->CalculateYOffSet($sumY);\n $this->Line(0,$y,10,$y);\n $this->SetYOffSet($sumY);\n $this->Cell(4,10,$sumY);\n $sumY+=10;\n }\n\n $this->SetCoord($prevousXY);\n \n }", "public function setPosX($posX);", "public function addPictureOnSlide(int $picture, int $position): void;", "public function setPosition(int $position): Roulette\n {\n if ($position >= 0 && $position < 38)\n $this->position = $position;\n\n return $this;\n }", "public function setPos($pos)\n {\n $this->pos = $pos;\n }", "public function update(){\n\t\t$modifications[] = new Modification();\n\t}", "public function update() {\n \n }", "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 }", "private function updateImagePosition(&$psImage, $imgArray)\n {\n $position = $this->getImagePosition($imgArray);\n //====================================================================//\n // Update Image Position in List\n if (!is_null($position)) {\n $psImage->position = (int) $position;\n $this->needUpdate(\"Image\");\n }\n }", "public function updateFeaturePosition() {\n $this->autoRender = false;\n if (isset($_GET) && !empty($_GET)) {\n foreach ($_GET as $key => $val) {\n $this->StoreFeaturedSection->updateAll(array('StoreFeaturedSection.position' => $val), array('StoreFeaturedSection.id' => $this->Encryption->decode($key)));\n }\n }\n }", "public function tiltUpCamaraPresidencia() {\n\n self::$presidencia->moverArriba();\n\n }", "private function _setCrop()\n {\n if (isset($this->crop) && $this->crop && $this->bbox_rubberband && $this->_isResize()) {\n\n $bbox_rubberband = explode(',', $this->bbox_rubberband);\n\n //lower-left coordinate\n $ll_point = new \\stdClass();\n $ll_point->x = $bbox_rubberband[0];\n $ll_point->y = $bbox_rubberband[3];\n $ll_coord = $this->pix2Geo($ll_point);\n\n //upper-right coordinate\n $ur_point = new \\stdClass();\n $ur_point->x = $bbox_rubberband[2];\n $ur_point->y = $bbox_rubberband[1];\n $ur_coord = $this->pix2Geo($ur_point);\n\n //set the size as selected\n $width = abs($bbox_rubberband[2]-$bbox_rubberband[0]);\n $height = abs($bbox_rubberband[3]-$bbox_rubberband[1]);\n\n $this->map_obj->setSize($width, $height);\n if ($this->_isResize() && $this->_download_factor > 1) {\n $this->map_obj->setSize($this->_download_factor*$width, $this->_download_factor*$height);\n }\n\n //set the extent to match that of the crop\n $this->map_obj->setExtent($ll_coord->x, $ll_coord->y, $ur_coord->x, $ur_coord->y);\n }\n }", "public function updateValue(){\n\n\t\t$this->value += (int)max($this->left_parent_value,$this->right_parent_value);\n\t}", "public function update($x1,$y1,$a1,$z1,$x2,$y2,$a2,$z2,$x3,$y3,$a3,$z3,$x4,$y4,$a4,$z4,$x5,$y5,$a5,$z5,\n $x6,$y6,$a6,$z6,$x7,$y7,$a7,$z7,$x8,$y8,$a8,$z8,$x9,$y9,$a9,$z9,$x10,$y10,$a10,$z10,$x11,$y11,$a11,$z11,\n $x12,$y12,$a12,$z12,$x13,$y13,$a13,$z13,$x14,$y14,$a14,$z14,$x15,$y15,$a15,$z15,$x16,$y16,$a16,$z16)\n {\n $origenes = origenes::find(1);\n $origenesuto = origenesuto::find(1);\n if ($origenes != NULL){\n $origenes->x1=$x1;\n $origenes->y1=$y1;\n $origenes->a1=$a1;\n $origenes->z1=$z1;\n $origenes->x2=$x2;\n $origenes->y2=$y2;\n $origenes->a2=$a2;\n $origenes->z2=$z2;\n $origenes->x3=$x3;\n $origenes->y3=$y3;\n $origenes->a3=$a3;\n $origenes->z3=$z3;\n $origenes->x4=$x4;\n $origenes->y4=$y4;\n $origenes->a4=$a4;\n $origenes->z4=$z4;\n $origenes->x5=$x5;\n $origenes->y5=$y5;\n $origenes->a5=$a5;\n $origenes->z5=$z5;\n $origenes->x6=$x6;\n $origenes->y6=$y6;\n $origenes->a6=$a6;\n $origenes->z6=$z6;\n $origenes->x7=$x7;\n $origenes->y7=$y7;\n $origenes->a7=$a7;\n $origenes->z7=$z7;\n $origenes->x8=$x8;\n $origenes->y8=$y8;\n $origenes->a8=$a8;\n $origenes->z8=$z8;\n $origenes->x9=$x9;\n $origenes->y9=$y9;\n $origenes->a9=$a9;\n $origenes->z9=$z9;\n $origenes->x10=$x10;\n $origenes->y10=$y10;\n $origenes->a10=$a10;\n $origenes->z10=$z10;\n $origenes->x11=$x11;\n $origenes->y11=$y11;\n $origenes->a11=$a11;\n $origenes->z11=$z11;\n $origenes->x12=$x12;\n $origenes->y12=$y12;\n $origenes->a12=$a12;\n $origenes->z12=$z12;\n $origenes->x13=$x13;\n $origenes->y13=$y13;\n $origenes->a13=$a13;\n $origenes->z13=$z13;\n $origenes->x14=$x14;\n $origenes->y14=$y14;\n $origenes->a14=$a14;\n $origenes->z14=$z14;\n $origenes->x15=$x15;\n $origenes->y15=$y15;\n $origenes->a15=$a15;\n $origenes->z15=$z15;\n $origenes->x16=$x16;\n $origenes->y16=$y16;\n $origenes->a16=$a16;\n $origenes->z16=$z16;\n $origenesuto->x1=$x1;\n $origenesuto->y1=$y1;\n $origenesuto->a1=$a1;\n $origenesuto->z1=$z1;\n $origenesuto->x2=$x2;\n $origenesuto->y2=$y2;\n $origenesuto->a2=$a2;\n $origenesuto->z2=$z2;\n $origenesuto->x3=$x3;\n $origenesuto->y3=$y3;\n $origenesuto->a3=$a3;\n $origenesuto->z3=$z3;\n $origenesuto->x4=$x4;\n $origenesuto->y4=$y4;\n $origenesuto->a4=$a4;\n $origenesuto->z4=$z4;\n $origenesuto->x5=$x5;\n $origenesuto->y5=$y5;\n $origenesuto->a5=$a5;\n $origenesuto->z5=$z5;\n $origenesuto->x6=$x6;\n $origenesuto->y6=$y6;\n $origenesuto->a6=$a6;\n $origenesuto->z6=$z6;\n $origenesuto->x7=$x7;\n $origenesuto->y7=$y7;\n $origenesuto->a7=$a7;\n $origenesuto->z7=$z7;\n $origenesuto->x8=$x8;\n $origenesuto->y8=$y8;\n $origenesuto->a8=$a8;\n $origenesuto->z8=$z8;\n $origenesuto->x9=$x9;\n $origenesuto->y9=$y9;\n $origenesuto->a9=$a9;\n $origenesuto->z9=$z9;\n $origenesuto->x10=$x10;\n $origenesuto->y10=$y10;\n $origenesuto->a10=$a10;\n $origenesuto->z10=$z10;\n $origenesuto->x11=$x11;\n $origenesuto->y11=$y11;\n $origenesuto->a11=$a11;\n $origenesuto->z11=$z11;\n $origenesuto->x12=$x12;\n $origenesuto->y12=$y12;\n $origenesuto->a12=$a12;\n $origenesuto->z12=$z12;\n $origenesuto->x13=$x13;\n $origenesuto->y13=$y13;\n $origenesuto->a13=$a13;\n $origenesuto->z13=$z13;\n $origenesuto->x14=$x14;\n $origenesuto->y14=$y14;\n $origenesuto->a14=$a14;\n $origenesuto->z14=$z14;\n $origenesuto->x15=$x15;\n $origenesuto->y15=$y15;\n $origenesuto->a15=$a15;\n $origenesuto->z15=$z15;\n $origenesuto->x16=$x16;\n $origenesuto->y16=$y16;\n $origenesuto->a16=$a16;\n $origenesuto->z16=$z16;\n\n \n \n $origenes->save();\n $origenesuto->save();\n }\n else{\n \n $origenes = new origenes;\n $origenesuto = new origenesuto;\n\n $origenes->x1=$x1;\n $origenes->y1=$y1;\n $origenes->a1=$a1;\n $origenes->z1=$z1;\n $origenes->x2=$x2;\n $origenes->y2=$y2;\n $origenes->a2=$a2;\n $origenes->z2=$z2;\n $origenes->x3=$x3;\n $origenes->y3=$y3;\n $origenes->a3=$a3;\n $origenes->z3=$z3;\n $origenes->x4=$x4;\n $origenes->y4=$y4;\n $origenes->a4=$a4;\n $origenes->z4=$z4;\n $origenes->x5=$x5;\n $origenes->y5=$y5;\n $origenes->a5=$a5;\n $origenes->z5=$z5;\n $origenes->x6=$x6;\n $origenes->y6=$y6;\n $origenes->a6=$a6;\n $origenes->z6=$z6;\n $origenes->x7=$x7;\n $origenes->y7=$y7;\n $origenes->a7=$a7;\n $origenes->z7=$z7;\n $origenes->x8=$x8;\n $origenes->y8=$y8;\n $origenes->a8=$a8;\n $origenes->z8=$z8;\n $origenes->x9=$x9;\n $origenes->y9=$y9;\n $origenes->a9=$a9;\n $origenes->z9=$z9;\n $origenes->x10=$x10;\n $origenes->y10=$y10;\n $origenes->a10=$a10;\n $origenes->z10=$z10;\n $origenes->x11=$x11;\n $origenes->y11=$y11;\n $origenes->a11=$a11;\n $origenes->z11=$z11;\n $origenes->x12=$x12;\n $origenes->y12=$y12;\n $origenes->a12=$a12;\n $origenes->z12=$z12;\n $origenes->x13=$x13;\n $origenes->y13=$y13;\n $origenes->a13=$a13;\n $origenes->z13=$z13;\n $origenes->x14=$x14;\n $origenes->y14=$y14;\n $origenes->a14=$a14;\n $origenes->z14=$z14;\n $origenes->x15=$x15;\n $origenes->y15=$y15;\n $origenes->a15=$a15;\n $origenes->z15=$z15;\n $origenes->x16=$x16;\n $origenes->y16=$y16;\n $origenes->a16=$a16;\n $origenes->z16=$z16;\n $origenes->xactivo=0;\n $origenes->yactivo=0;\n $origenes->aactivo=0;\n $origenes->zactivo=0;\n $origenes->coordactivas=0;\n $origenesuto->x1=$x1;\n $origenesuto->y1=$y1;\n $origenesuto->a1=$a1;\n $origenesuto->z1=$z1;\n $origenesuto->x2=$x2;\n $origenesuto->y2=$y2;\n $origenesuto->a2=$a2;\n $origenesuto->z2=$z2;\n $origenesuto->x3=$x3;\n $origenesuto->y3=$y3;\n $origenesuto->a3=$a3;\n $origenesuto->z3=$z3;\n $origenesuto->x4=$x4;\n $origenesuto->y4=$y4;\n $origenesuto->a4=$a4;\n $origenesuto->z4=$z4;\n $origenesuto->x5=$x5;\n $origenesuto->y5=$y5;\n $origenesuto->a5=$a5;\n $origenesuto->z5=$z5;\n $origenesuto->x6=$x6;\n $origenesuto->y6=$y6;\n $origenesuto->a6=$a6;\n $origenesuto->z6=$z6;\n $origenesuto->x7=$x7;\n $origenesuto->y7=$y7;\n $origenesuto->a7=$a7;\n $origenesuto->z7=$z7;\n $origenesuto->x8=$x8;\n $origenesuto->y8=$y8;\n $origenesuto->a8=$a8;\n $origenesuto->z8=$z8;\n $origenesuto->x9=$x9;\n $origenesuto->y9=$y9;\n $origenesuto->a9=$a9;\n $origenesuto->z9=$z9;\n $origenesuto->x10=$x10;\n $origenesuto->y10=$y10;\n $origenesuto->a10=$a10;\n $origenesuto->z10=$z10;\n $origenesuto->x11=$x11;\n $origenesuto->y11=$y11;\n $origenesuto->a11=$a11;\n $origenesuto->z11=$z11;\n $origenesuto->x12=$x12;\n $origenesuto->y12=$y12;\n $origenesuto->a12=$a12;\n $origenesuto->z12=$z12;\n $origenesuto->x13=$x13;\n $origenesuto->y13=$y13;\n $origenesuto->a13=$a13;\n $origenesuto->z13=$z13;\n $origenesuto->x14=$x14;\n $origenesuto->y14=$y14;\n $origenesuto->a14=$a14;\n $origenesuto->z14=$z14;\n $origenesuto->x15=$x15;\n $origenesuto->y15=$y15;\n $origenesuto->a15=$a15;\n $origenesuto->z15=$z15;\n $origenesuto->x16=$x16;\n $origenesuto->y16=$y16;\n $origenesuto->a16=$a16;\n $origenesuto->z16=$z16;\n $origenesuto->save();\n $origenes->save();\n \n\n }\n\n }", "public function presetCamaraPresidencia($posicion) {\n\n self::$presidencia->preset($posicion);\n\n }", "public function update_midrub() {\n \n // Verify if Midrub can be updated\n (new MidrubBaseAdminCollectionUpdateHelpers\\Midrub)->verify();\n \n }", "public function update() {\n\t$stmt = $this->_database->prepare('UPDATE planetterrains SET terrainid = ?, x = ?, y = ? WHERE refid = ?');\n\t$stmt->bind_param('iiii', $this->terrainid, $this->x, $this->y, $this->refid);\n\t$stmt->execute();\n\tif (\\is_array($this->deposit) && \\count($this->deposit) > 0) {\n\t $this->deposit[$this->refid]->terrainid = $this->refid;\n\t $this->deposit[$this->refid]->commit();\n\t}\n\telse if (!\\is_array($this->deposit)) {\n\t $this->deposit->terrainid = $this->refid;\n\t $this->deposit->commit();\n\t}\n }", "public function update()\n {\n \n }", "public function update()\n {\n \n }", "public function get_position(){ return $this->_position;}", "function setMirrorMargins() {\t \r\n\t $this->mirrorMargins = true;\r\n\t}", "function setData()\n {\n list($this->x, $this->y, $this->radius, $this->radius2) = $this->getInput();\n }", "public function reposition_kids($start = 0){\n\t\t//print_r($this->{$this->kids_field});\n\t\t//exit();\n\t\t//only reposition from $start on!!\n\t\tif ($start > 0)\n\t\t\t$pos = $this->{$this->kids_field}[$start-1]->__get('right') + 1;\n\t\telse\n\t\t\t$pos = 1;\n\t\tforeach(array_slice($this->{$this->kids_field},$start) as $kid){\n\t\t\t$pos = $kid->reposition_self($pos);\t\n\t\t}\n\t\tdebug('wow I now have '.(($pos-1)/2).' kids!');\n\t\treturn $pos;\n\t}", "abstract public function setCurrentPoint(int $x, int $y);", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "function _set_new_x($size)\r\n {\r\n $this->new_x = $size;\r\n }" ]
[ "0.62926847", "0.58130276", "0.56078446", "0.55862963", "0.55846477", "0.541678", "0.5359156", "0.53160566", "0.5260406", "0.5256234", "0.5177793", "0.50816256", "0.50270927", "0.50015223", "0.49897853", "0.49728364", "0.494742", "0.49437383", "0.49351212", "0.4916311", "0.49081358", "0.48912412", "0.48619214", "0.48619214", "0.4830116", "0.48274362", "0.48128957", "0.4812814", "0.48094803", "0.48074847", "0.48066813", "0.4790076", "0.47730735", "0.47717628", "0.4768556", "0.47621247", "0.47531837", "0.4749676", "0.47464946", "0.4723044", "0.47215074", "0.47129363", "0.47129363", "0.4708156", "0.4688674", "0.4676171", "0.46746457", "0.46629125", "0.46624523", "0.46586132", "0.4656383", "0.4654018", "0.46480808", "0.4639011", "0.46330386", "0.4622766", "0.46202728", "0.46157166", "0.46117544", "0.46063954", "0.46059325", "0.46059325", "0.46045992", "0.45964414", "0.45933995", "0.45892835", "0.4583527", "0.45726582", "0.45715627", "0.45566872", "0.45372707", "0.45372707", "0.45372707", "0.45372707", "0.45288765", "0.4523157", "0.45175797", "0.45154956", "0.4514273", "0.45130974", "0.45125046", "0.45007372", "0.4493354", "0.4493055", "0.44786367", "0.4475909", "0.44667646", "0.4461877", "0.4461503", "0.445925", "0.44547632", "0.44530743", "0.44506732", "0.44506732", "0.44470164", "0.4435976", "0.44259608", "0.44226146", "0.44220185", "0.44218275", "0.4420606" ]
0.0
-1
Display a listing of the resource.
public function index() { $estados = Estado::orderBy('id','DESC')->paginate(15); return view('admin.estados.index')->with('estados',$estados); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('admin.estados.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\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) { $estados = new Estado($request->all()); $estados->save(); Flash::success("Se ha registrado el estado " .$estados->estado. " de manera Exitosa."); return redirect()->route('admin.estados.index'); }
{ "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(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\n }", "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.728708", "0.7144915", "0.7132209", "0.66401577", "0.66205436", "0.65682197", "0.6526531", "0.65085673", "0.6449452", "0.63749766", "0.63726056", "0.6364582", "0.6364582", "0.6364582", "0.6341498", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726", "0.63412726" ]
0.0
-1
Display the specified resource.
public function show($id) { $estado = Estado::find($id); return view('admin.estados.edit')->with('estado',$estado); }
{ "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) { $estado = Estado::find($id); return view('admin.estados.edit')->with('estado',$estado); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $estado = Estado::find($id); $estado->estado = $request->estado; $estado->save(); Flash::warning('El estado '.$estado->estado.' se ha modificado con exito.'); return redirect()->route('admin.estados.index'); }
{ "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) { $estado = Estado::find($id); $estado->delete(); Flash::error('Se eliminó '.$estado->estado.' de forma exitosa.'); return redirect()->route('admin.estados.index'); }
{ "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
Determine if application locale is the given locale.
public function isLocale($locale) { return $this->getLocale() == $locale; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSupportedLocale($locale);", "protected function requestHasLocale()\n {\n try {\n if ($this->locale($this->request)) {\n return true;\n }\n\n return false;\n } catch (Exception $ex) {\n return false;\n }\n }", "protected function matchLocaleInAvailableLanguages($locale)\n {\n foreach ($this->availableLanguages as $language) {\n // browser accept language matches an available language\n if ($locale == $language['locale']) {\n return $language['locale'];\n }\n // first part of browser accept language matches an available language\n if (substr((string) $locale, 0, 2) == substr((string) $language['locale'], 0, 2)) {\n return $language['locale'];\n }\n }\n\n return false;\n }", "public function isActiveLocale()\n {\n return $this->getActiveLocale();\n }", "function is_locale_switched()\n {\n }", "public function isAvailable($locale) {\n\t\treturn true;\n\t}", "public function isLocale($locale): bool\n {\n return $this->getLocale() == $locale;\n }", "function determine_locale()\n {\n }", "public function isSupportedLocale(?string $locale): bool\n {\n return in_array($locale, $this->getLocales());\n }", "public function getCurrentOrDefaultLocale();", "public function isDefaultLocaleSupported($defaultLocale);", "protected function checkSystemLocale() {}", "public function getLocale();", "public function getLocale();", "function isLocaleSurcharged($locale = null, $localizedFormats = null);", "public function isUsingLocaleFallback()\n {\n return $this->useLocaleFallbackByDefault;\n }", "public function hasLocale($locale)\n {\n $locale = \\Locale::canonicalize($locale);\n return in_array($locale, $this->availableLocales);\n }", "public function accepts(string $locale): bool\n {\n return array_key_exists($locale, $this->accept);\n }", "public function getLocale() {\n\t\treturn $this->getParameter('app_locale');\n\t}", "public function isDefaultLocale($locale)\n {\n $locale = \\Locale::canonicalize($locale);\n $default = $this->getDefaultLocale();\n\n return ($default === $locale);\n }", "public function isFallbackLocale(string $locale): bool {\n return config('translatable.fallback_locale') === $locale;\n }", "public function locale(string $locale = null);", "public static function getAppOrDefaultLocale(): string\n {\n return app()->getLocale() ?? static::default();\n }", "private function valid($locale)\n {\n return array_key_exists($locale, $this->langsSupported);\n }", "function getLocale();", "function currentLocale()\n {\n return supportedLocales()[app()->getLocale()];\n }", "public function getLocale() {}", "public function getLocale()\n {\n return $this['config']->get('app.locale');\n }", "public function getLocale()\n {\n return $this['config']->get('app.locale');\n }", "public function hasLocales(): bool\n {\n return count($this->getSupportedLocales()) > 0;\n }", "public function defaultLocale()\n {\n $locales = $this->app('locales');\n\n foreach ($locales as $locale)\n {\n if( isset( $locale['default'] ) )\n return $locale['key'];\n }\n\n return false;\n }", "function _get_default_locale($locale)\r\n\t{\r\n\t\tif ($locale == '') // emulate variable support\r\n\t\t\treturn getenv('LANG');\r\n\t\telse\r\n\t\t\treturn $locale;\r\n\t}", "protected function _getLanguageForLocale()\n {\n $locale = $this->worldpayhelper->getLocaleDefault();\n if (substr($locale, 3, 2) == 'NO') {\n return 'no';\n }\n return substr($locale, 0, 2);\n }", "public function hasLocale($code) {\n if (!is_string($code) || $code === '') {\n throw new I18nException('Could not check if the locale is available: provided code is empty or invalid');\n }\n\n $this->initializeLocales();\n\n return isset($this->locales[$code]);\n }", "public function isTestLocale() {\n return false;\n }", "function getLocale() {\n\t\tif ( !$this->getParam(self::PARAM_REQUEST_LOCALE) ) {\n\t\t\t$this->setLocale();\n\t\t}\n\t\treturn $this->getParam(self::PARAM_REQUEST_LOCALE);\n\t}", "static public function isEnglish() {\n\t\treturn (self::$language === 'us');\n\t}", "public function autodetectLocale()\n {\n if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $this->setDefault(\\Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE']));\n }\n\n return $this->_currentLocale;\n }", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale(): string;", "public function checkLocaleInSupportedLocales(string $locale): bool {\n $locales = config('translatable.locales');\n\n return in_array($locale, $locales);\n }", "public function getLocale()\n {\n return $this['settings']->get('app::locale', 'en');\n }", "function multilingual(): bool\n {\n return count(supportedLocaleKeys()) > 1;\n }", "public static function getLocale()\n {\n $locale = Auth::check() ? Auth::user()->locale : null;\n if (! $locale) {\n $locale = LanguageDetector::detect() ?: config('app.locale');\n }\n\n return $locale;\n }", "static function getLocale() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_LOCALE);\n\t}", "public function getLocale(): ?string;", "public function hasSimpleLocales(): bool\n {\n return is_numeric(key($this->getSupportedLocales()));\n }", "public function getLocale(): ?string;", "public function getLocale() {\n return $this->current_locale;\n }", "protected function getLocale()\n {\n @session_start();\n return isset($_SESSION['varaa_locale'])\n ? $_SESSION['varaa_locale']\n : $this->config('app.locale');\n }", "public static function current_locale(){\n $locale = Controller::curr()->getRequest()->getVar('Locale') ?: '';\n\n if (!$locale) $locale = Controller::curr()->getRequest()->getVar('locale') ?: '';\n\n if ($locale) return $locale;\n\n $class = self::config()->class;\n $localisation = new $class();\n return $localisation->current_locale();\n }", "function get_locale(): string\n{\n $locale = \\Locale::acceptFromHttp(input_server('HTTP_ACCEPT_LANGUAGE'));\n if (!$locale) {\n $locale = 'en_US';\n }\n return $locale;\n}", "function site_locale($locale = null)\n{\n if ($locale) {\n return config(['app.locale' => $locale]);\n }\n\n return config('app.locale');\n}", "public function detectLocaleFromTemplateLocale(Locale $locale)\n {\n $bestMatchingLocale = $this->localeCollection->findBestMatchingLocale($locale);\n\n if ($bestMatchingLocale !== null) {\n return $bestMatchingLocale;\n }\n\n return $this->localizationService->getConfiguration()->getDefaultLocale();\n }", "function getLocale()\n {\n if (defined('JENERATOR_LOCALE')) {\n return JENERATOR_LOCALE;\n }\n\n // Use the system's LANG variable, which usually is something like en_US.UTF-8\n $lang = getenv('LANG');\n return substr($lang, 0, strpos($lang, '.'));\n }", "public function getTargetLocale();", "public function has_language() {\r\n\t\treturn (is_lang($this->language));\r\n\t}", "function getLocale() {\n\t\t\t$ret = $this->locale;\n\t\t\treturn $ret;\n\t\t}", "public function getLocale(): string\n {\n return $this['config']->get('app.locale');\n }", "private function localeExist($entity, string $locale)\n {\n foreach ($entity->getI18ns() as $existingI18n) {\n if ($existingI18n->getLocale() === $locale) {\n return true;\n }\n }\n\n return false;\n }", "public function getUserLocale() {\n return $this->userLocale;\n }", "public static function getLocale()\n {\n return self::$_currentLocale;\n }", "public function hasTranslation($locale = null)\n {\n $locale = $locale ?: \\localizer\\locale()->id();\n\n foreach ($this->cachedTranslations() as $translation) {\n if ((int) $translation->getAttribute($this->getLocaleKey()) === (int) $locale) {\n return true;\n }\n }\n\n return false;\n }", "public function getLocale()\n {\n return $this->currentLocale;\n }", "public static function isValidFacebookLocale($locale){\n\t\treturn in_array($locale, self::$allFbLocales);\n\t}", "public function find($locale)\n {\n if (null === static::$language) {\n foreach ($this->fetchAll() as $item) {\n if ($item->locale() == $locale || $item->iso6391() == $locale) {\n static::$language = $item;\n break;\n }\n }\n }\n\n return static::$language;\n }", "public function getLocale()\n {\n return $this->parameters['hipay.locale'];\n }", "protected function getLocale() {\n return Mage::app()->getLocale();\n }", "private function hasChannelLocale(ChannelInterface $channel, LocaleInterface $locale)\n {\n foreach ($channel->getLocaleCodes() as $availableLocale) {\n if ($locale->getCode() === $availableLocale) {\n return true;\n }\n }\n\n return false;\n }", "public function restore_current_locale() {\n\t\tif ( empty( $this->locales ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->locales = array( $this->original_locale );\n\n\t\treturn $this->restore_previous_locale();\n\t}", "public function testLocale()\n {\n $f = new Formatter(['locale' => 'en-US']);\n $this->assertEquals('en-US', $f->locale);\n\n // if not, take from application\n $f = new Formatter();\n $this->assertEquals('ru-RU', $f->locale);\n }", "public function getLocaleManager();", "public function getLocale () {\n\t\treturn $this->locale;\n\t}", "public function getLocale() {\n\t\treturn $this->locale;\n\t}", "public function getLocale()\n\t{\n\t\treturn $this->locale;\n\t}", "private function excludeCurrent(?array $locale): bool\n {\n if (! is_array($locale)) {\n return false;\n }\n\n if (! Arr::has($locale, 'is_current')) {\n return false;\n }\n\n return ! $locale['is_current'];\n }", "public function getLocale()\n {\n return $this->getParameter('locale');\n }", "public function isFallbackLocaleHidden(): bool {\n return config('translatable.hide_fallback_locale');\n }", "function getLocale() {\n\t\treturn $this->getData('locale');\n\t}", "protected function get_locale() {\n\t\t\tif(!is_null($this->i18n_locale)) {\n\t\t\t\treturn $this->i18n_locale;\n\t\t\t} elseif($locale = Registry()->locale) {\n\t\t\t\treturn $this->set_locale($locale);\n\t\t\t} else {\n\t\t\t\treturn $this->set_locale(Config()->DEFAULT_LOCALE);\n\t\t\t}\n\t\t}", "public function getLocale()\n {\n return $this->locale;\n }", "public function getLocale()\n {\n return $this->locale;\n }", "public function getLocale()\n {\n return $this->locale;\n }", "public function getLocale()\n {\n return $this->locale;\n }", "public function getLocale()\n {\n return $this->locale;\n }", "public function getLocale()\n {\n return $this->locale;\n }", "public function hasLanguage() : bool;", "public function supportsLanguageSwitch(): bool;", "public function getActiveLocale()\n {\n return $this->getCurrentTranslation()->getActiveLocale();\n }", "public function locale()\n {\n return $this->locale;\n }", "static public function isGerman() {\n\t\treturn (self::$language === 'de');\n\t}", "public function isSillyLocale() {\n return false;\n }", "function resolveLanguageFromBrowser()\n {\n $ret = false;\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $env = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $aLangs = preg_split(\n ';[\\s,]+;',\n substr($env, 0, strpos($env . ';', ';')), -1,\n PREG_SPLIT_NO_EMPTY\n );\n foreach ($aLangs as $langCode) {\n $lang = $langCode . '-' . SGL_Translation::getFallbackCharset();\n if (SGL_Translation::isAllowedLanguage($lang)) {\n $ret = $lang;\n break;\n }\n }\n }\n return $ret;\n }", "public function getLocaleFromRequest(): string {\n $params = explode('/', request()->getPathInfo());\n\n // Dump the first element (empty string) as getPathInfo() always returns a leading slash\n array_shift($params);\n\n if (count($params) > 0) {\n $locale = $params[0];\n\n if ($this->checkLocaleInSupportedLocales($locale)) {\n return $locale;\n }\n }\n\n return app()->getLocale() ?? config('translatable.fallback_locale');\n }", "public function locale(?string $locale = null): ?string\n {\n /*if (null !== $locale)\n return Translation::getInstance()->$locale;*/\n return $locale;\n }", "public static function locale(): string\n {\n // in the end to handle that case\n return Arr::get(config('currencies'), strtolower(static::currency()).'.locale', 'en_US') ?? 'en_US';\n }", "public function preferredLocale()\n {\n return $this->locale;\n }" ]
[ "0.7204146", "0.6755258", "0.645721", "0.64476013", "0.64059967", "0.639299", "0.62304527", "0.61285305", "0.6008709", "0.59053516", "0.58972627", "0.5883156", "0.58702004", "0.58702004", "0.5861629", "0.58537626", "0.58362716", "0.58220536", "0.57815665", "0.5753695", "0.5719745", "0.5692927", "0.5667522", "0.56642914", "0.56623834", "0.56594765", "0.56540465", "0.5625309", "0.5625309", "0.56148", "0.55976385", "0.55913293", "0.55821747", "0.557987", "0.5573207", "0.55559653", "0.5550966", "0.5544921", "0.55436057", "0.55436057", "0.55436057", "0.5522501", "0.5480517", "0.54804003", "0.54732805", "0.5469277", "0.5453353", "0.5453353", "0.5453353", "0.5446174", "0.5440979", "0.5440486", "0.54296005", "0.5387661", "0.53834516", "0.5381605", "0.5374728", "0.5363355", "0.53535247", "0.5352447", "0.5330328", "0.531387", "0.52937686", "0.52885765", "0.52777594", "0.52714485", "0.52693385", "0.52596045", "0.5259419", "0.5253172", "0.5253129", "0.52396387", "0.52233315", "0.5219577", "0.52130455", "0.5195058", "0.51933426", "0.5191647", "0.5182354", "0.51784956", "0.51755166", "0.51695544", "0.51695544", "0.51695544", "0.51695544", "0.51695544", "0.51695544", "0.5163212", "0.5154678", "0.5148707", "0.51432633", "0.5136969", "0.51343066", "0.51315236", "0.51282763", "0.51277286", "0.5121043", "0.51140577" ]
0.63441133
8
ensure 'mysite' doesn't exist before creating it...
public function testCreate() { app(SiteRepository::class)->remove('my-site'); $data = [ 'type' => 'sites', 'id' => 'my-site', 'attributes' => [ 'name' => 'My Blog', 'domain' => 'http://blog.example.com', ], ]; $id = $this->doCreate($data)->assertCreatedWithId($data); $this->assertEquals('my-site', $id); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_empty_blog($domain, $path, $weblog_title, $site_id = 1)\n {\n }", "private function create_site_db_entry() {\n\t\t$data = array(\n\t\t\t'sitename' => $this->site_name,\n\t\t\t'site_type' => $this->site_type,\n\t\t\t'site_title' => $this->site_title,\n\t\t\t'proxy_type' => $this->proxy_type,\n\t\t\t'cache_type' => $this->cache_type,\n\t\t\t'site_path' => $this->site_root,\n\t\t\t'db_name' => $this->db_name,\n\t\t\t'db_user' => $this->db_user,\n\t\t\t'db_host' => $this->db_host,\n\t\t\t'db_port' => $this->db_port,\n\t\t\t'db_password' => $this->db_pass,\n\t\t\t'db_root_password' => $this->db_root_pass,\n\t\t\t'email' => $this->site_email,\n\t\t\t'created_on' => date( 'Y-m-d H:i:s', time() ),\n\t\t);\n\n\t\tif ( ! $this->skip_install ) {\n\t\t\t$data['wp_user'] = $this->site_user;\n\t\t\t$data['wp_pass'] = $this->site_pass;\n\t\t}\n\n\t\ttry {\n\t\t\tif ( $this->db::insert( $data ) ) {\n\t\t\t\tEE::log( 'Site entry created.' );\n\t\t\t} else {\n\t\t\t\tthrow new Exception( 'Error creating site entry in database.' );\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\t}", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "private function create_site_root() {\n\n\t\tif ( is_dir( $this->site_root ) ) {\n\t\t\tEE::error( \"Webroot directory for site $this->site_name already exists.\" );\n\t\t}\n\n\t\tif ( ! \\EE\\Utils\\default_launch( \"mkdir $this->site_root\" ) ) {\n\t\t\tEE::error( \"Cannot create directory $this->site_root. Please check that folder permission allows easyengine to create directory there.\" );\n\t\t}\n\n\t\ttry {\n\t\t\t$this->level = 1;\n\t\t\t$whoami = EE::launch( \"whoami\", false, true );\n\n\t\t\t$terminal_username = rtrim( $whoami->stdout );\n\n\t\t\tif ( ! chown( $this->site_root, $terminal_username ) ) {\n\t\t\t\tthrow new Exception( 'Could not change ownership of the site root. Please make sure you have appropriate rights.' );\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\n\t\treturn true;\n\t}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function create()\n {\n\n //create a new, empty site\n\n $newSiteID = $this->sitemodel->createNew();\n\n redirect('sites/' . $newSiteID);\n }", "private function _createSite(){\n $this->_site = new Site($this);\n }", "public function testCreateSite()\n {\n }", "public function setup() {\n // If .htaccess file or local settings file does not exit lets create them.\n if ((file_exists($this->getSiteRoot() . '.htaccess.default') && !file_exists($this->getSiteRoot() . '.htaccess')) || !file_exists($this->getSiteRoot() . 'sites/default/settings.local.php')) {\n $this->say(\"Missing .htaccess or settings.local.php\");\n $name = $this->confirm(\"Missing .htaccess or settings.local.php Copy the default?\");\n if ($name) {\n // Only copy the .htaccess.default if it default exists.\n if (file_exists($this->getSiteRoot() . '.htaccess.default')) {\n $this->_exec('cp ' . $this->getSiteRoot() . '.htaccess.default ' . $this->getSiteRoot() . '.htaccess');\n }\n\n $this->drupalCreateSettings();\n $this->npmInstall();\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }\n else {\n $this->dbGet();\n $this->siteInit = TRUE;\n $this->start();\n }\n }", "protected function setUpFakeSitePathAndHost() {}", "function do_pages_exist() {\n // Home\n if ( get_page_by_title( 'Home' ) == NULL ) create_page( 'Home' );\n}", "public function ensureExists() {\n\t\t$sql = <<<SQL\nCREATE TABLE IF NOT EXISTS $this->tableName (\n id int(10) NOT NULL AUTO_INCREMENT,\n title varchar(300) NOT NULL UNIQUE,\n year int(4) NOT NULL,\n rating int(2),\n PRIMARY KEY (id));\n\n insert into $this->tableName(title, year, rating)\n values(\"The Maltese Falcon\", 1941, 10),\n (\"Felis Noir\", 2016, 8)\nSQL;\n\n\t\t$this->site->pdo()->query($sql);\n\t}", "private function create_site( $assoc_args ) {\n\t\t$this->setup_site_network();\n\t\ttry {\n\t\t\t$this->maybe_verify_remote_db_connection();\n\t\t\t$this->configure_site();\n\t\t\t$this->level = 3;\n\t\t\tEE::log( 'Pulling latest images. This may take some time.' );\n\t\t\tchdir( $this->site_root );\n\t\t\t\\EE\\Utils\\default_launch( 'docker-compose pull' );\n\t\t\tEE::log( 'Starting site\\'s services.' );\n\t\t\tif ( ! $this->docker::docker_compose_up( $this->site_root ) ) {\n\t\t\t\tthrow new Exception( 'There was some error in docker-compose up.' );\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\n\t\t$this->wp_download_and_config( $assoc_args );\n\n\t\tif ( ! $this->skip_install ) {\n\t\t\t$this->create_etc_hosts_entry();\n\t\t\t$this->site_status_check();\n\t\t\t$this->install_wp();\n\t\t}\n\t\t$this->info( array( $this->site_name ) );\n\t\t$this->create_site_db_entry();\n\t}", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "public function create_missing_tables() {\n\n\t\t/* Create the network snippets table if it doesn't exist */\n\t\tif ( is_multisite() && ! self::table_exists( $this->ms_table ) ) {\n\t\t\t$this->create_table( $this->ms_table );\n\t\t}\n\n\t\t/* Create the table if it doesn't exist */\n\t\tif ( ! self::table_exists( $this->table ) ) {\n\t\t\t$this->create_table( $this->table );\n\t\t}\n\t}", "function install_site() {\n \n}", "function EnsureServerExists($servername) {\r\n $server = new dkpServer();\r\n $server->loadFromDatabaseByName($servername);\r\n if ($server->id == \"\") {\r\n $server->name = $servername;\r\n $server->saveNew();\r\n }\r\n return $server;\r\n }", "function createDBIfNotExist($type) {\n if($type !== 'account' && $type !== 'job' && $type !== 'store') {\n die(\"ERROR: createDBIfNotExist($type)\\n\");\n }\n\n global $dbconfig;\n // connect to the mysql host of account\n $host = $dbconfig->$type->host;\n $user = $dbconfig->$type->user;\n $password = $dbconfig->$type->password;\n $dbname = $dbconfig->$type->name;\n\n $conn = get_conn($host, $user, $password);\n\n // select the db of information_schema\n select_db('information_schema', $conn);\n\n // check if the account db exists\n if($res = mysql_query(\"select * from SCHEMATA where SCHEMA_NAME='$dbname'\", $conn)) {\n if($record = mysql_fetch_assoc($res)) {\n echo \"DONE: account db $dbname exists on $host\\n\";\n return false;\n } else {\n echo \"DONE: account db $dbname does not exist on $host\\n\";\n //need to create the account db\n createDB($type, $conn);\n return true;\n }\n } else {\n die(\"ERROR: select * from SCHEMATA where SCHEMA_NAME='$dbname'\");\n }\n\n}", "protected function _check(){\n\t\tif(Configure::read('Database.installed') == 'true') {\n\t\t\t$this->Session->setFlash(__(\"Website already configured\"));\n\t\t\t$this->redirect('/');\t\n\t\t}\n\t}", "function create_new_database($db, $name)\n{\n $error = $db->query(\"DROP DATABASE IF EXISTS {$name};\");\n $error = $db->query(\"CREATE DATABASE IF NOT EXISTS {$name};\");\n}", "function installCheck() {\n // Check if user table exists for check.\n $result = $this->db->exec('SELECT name FROM sqlite_master WHERE type=\"table\" AND name=\"users\"');\n if (empty($result)) {\n $this->installSetupForm();\n } else {\n echo 'The site has already been installed.';\n }\n }", "private function ensureSites()\n {\n\n if (is_null($this->settings)) {\n $this->setSites(\n OrganizationPlugin::getInstance()->getType()->findAllSettings($this)\n );\n }\n }", "public function create(): void {\r\n if (array_key_exists('SERVER_NAME', $_SERVER)) {\r\n $url = $_SERVER['SERVER_NAME'];\r\n } else {\r\n $url = self::UNKNOWN_SERVER_NAME;\r\n }\r\n $found = $this->loadByUrl($url);\r\n if (! $found) {\r\n $this->url = $url;\r\n $this->name = $url;\r\n $this->save();\r\n }\r\n }", "function website_exists( $site ) {\n\n\t$websites = get_website_data();\n\n\tif ( isset( $websites[ $site ] ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n\n}", "function createxmldatabase($databasename, $path = \".\", $mysql = false)\n{\n //----MYSQL---------------->\n if ( is_array($mysql) )\n {\n if ( false !== ($conn = mysql_connect($mysql['host'],$mysql['user'],$mysql['password'])) )\n {\n $ret = mysql_query(\"CREATE DATABASE $databasename\");\n mysql_close();\n return false;\n }\n else\n {\n return (mysql_error());\n }\n }\n //<----MYSQL----------------\n\n\n if ( file_exists(\"$path/$databasename\") )\n return \"database $databasename alredy exists\";\n\n if ( !is_writable(\"$path/\") )\n return \"database not writable\";\n\n mkdir(\"$path/$databasename\");\n return false;\n}", "protected function throwExceptionIfFrontendDoesNotExist() {}", "function check_db(){\n if( ! $this->database_exists() ){\n $this->create_table();\n }\n }", "private function createPedestalBasedSite()\n {\n $process = new Process('composer create-project -s dev versionpress/pedestal .', $this->siteConfig->path);\n $process->run();\n\n $this->updateConfigConstant('DB_NAME', $this->siteConfig->dbName);\n $this->updateConfigConstant('DB_USER', $this->siteConfig->dbUser);\n $this->updateConfigConstant('DB_PASSWORD', $this->siteConfig->dbPassword);\n $this->updateConfigConstant('DB_HOST', $this->siteConfig->dbHost);\n $this->updateConfigConstant('WP_HOME', $this->siteConfig->url);\n }", "protected function findOrCreateSite(Server $server): Site {\n $sites = $this->forge->sites($server->id);\n $domain = $this->generateOpsDomain();\n $this->output('Domain: ' . $domain);\n\n // Check if the site already exists\n foreach ($sites as $site) {\n if ($site->name === $domain) {\n $this->output('Found existing site.');\n\n if ($site->deploymentStatus === null) {\n $this->installSite($server, $site, $domain);\n }\n\n return $site;\n }\n }\n\n return $this->createSite($server, $domain);\n }", "function install_pages() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/pages.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the creation of a sample home page'));\n }\n return false;\n}", "function ms_site_check()\n {\n }", "public function getDatabaseFromSite($site = null){\n\n //get the site we want (either live or the passed site)\n if($site !== null){\n $site = FrontendManager::getSites()[$site] ?? false;\n } else {\n $site = FrontendManager::getLiveSite();\n }\n\n //we can only get and generate a database file if we have a valid site\n if($site !== false){\n //generate the database file\n $database = RestManager::getExternalSiteDetails($site['domain'], $site['key'], 'get-site-database');\n\n //if the request was successful we have a url to the database file\n if($database['response']['success']){\n\n //get and store the new database file\n file_put_contents(\n SITE_VERSION_CONTROL_ENTRY . DIRECTORY_SEPARATOR . '_temp.sql',\n file_get_contents($site['domain'] . $database['response']['data']['path'])\n );\n\n //assuming wp-cli is installed locally / on staging as you should only be importing on these environments\n //and we control both with our staging servers or local environments but clients can host live themselves\n //so I can't assume wp-cli is installed\n\n $localDomain = get_option('siteurl');\n\n //empty current database\n $resetResponse = exec(\"wp db reset --yes\");\n\n //import the new database\n $importResponse = exec(\"wp db import \" . SITE_VERSION_CONTROL_ENTRY . DIRECTORY_SEPARATOR . '_temp.sql');\n\n //TODO: MUTLISITE SUPPORT https://developer.wordpress.org/cli/commands/search-replace/\n\n //replace the url\n exec(\"wp search-replace '{$site['domain']}' '{$localDomain}' --all-tables\");\n\n //we've replaced the domain we've setup but wordpress may contain both https and http urls\n //so we'll replace both with the `siteurl`\n $secondaryReplacement = strpos($site['domain'], 'https://') !== false\n ? str_replace('https://', 'http://', $site['domain'])\n : str_replace('http://', 'https://', $site['domain']);\n\n exec(\"wp search-replace '{$secondaryReplacement}' '{$localDomain}' --all-tables\");\n //exec(\"wp search-replace '{$live['domain']}' '{$localDomain}' --all-tables --log=\" . SITE_VERSION_CONTROL_ENTRY . DIRECTORY_SEPARATOR . 'database_replace_log.txt');\n\n //delete the temporary file we created to handle the import\n unlink(SITE_VERSION_CONTROL_ENTRY . DIRECTORY_SEPARATOR . '_temp.sql');\n\n //TODO: Considering adding endpoint to delete the temp db file\n RestManager::getExternalSiteDetails(\n $site['domain'],\n $site['key'],\n 'delete-saved-database',\n [\n 'database' => $database['response']['data']['path']\n ]\n );\n\n return true;\n }\n }\n\n //we haven't successfully imported a new db file so return false\n return false;\n }", "function CreateDatabaseIfNoneExists() {\n $link = mysql_connect($this->servername, $this->username, $this->password);\n \n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n \n //Make Players the current database\n $db_selected = mysql_select_db($this->dbname, $link);\n \n //Checking if the database exists, if it doesn't make it\n if (!$db_selected) {\n $file_content = file('PlayerSpins.sql');\n $query = \"\";\n foreach($file_content as $sql_line){\n if(trim($sql_line) != \"\" && strpos($sql_line, \"--\") === false){\n $query .= $sql_line;\n if (substr(rtrim($query), -1) == ';'){\n //echo $query;\n $result = mysql_query($query)or die(mysql_error());\n $query = \"\";\n }\n }\n }\n }\n mysql_close($link);\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "public function checkInstall()\n {\n if (($this->get('db') == '' || !file_exists($this->get('db'))) || $this->get('passwd') == '')\n {\n Misc::redirect('install.php');\n }\n }", "public function ensureTestSiteIsReady()\n {\n if (!$this->isSiteSetUp()) {\n $this->setUpSite();\n }\n\n if (!$this->isVersionPressInitialized()) {\n $this->copyVersionPressFiles();\n $this->initializeVersionPress();\n }\n }", "function createPages() {\n\t// drop pages table (for development only)\n\tDB::exec(\"DROP TABLE IF EXISTS pages\");\n\n\t// `name` should be unique and cannot be null\n\t// `route` must be unique but can be null (e. g. when a page shouldn't be accessible via an URL)\n\t// `layout` is a foreign key that references ANOTHER row in the pages table,\n\t// \tif the referenced row is deleted the value will be set to NULL\n\tDB::exec(\"CREATE TABLE pages (\n\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\tname VARCHAR(50) NOT NULL UNIQUE,\n\t\troute VARCHAR(50) NULL UNIQUE,\n\t\tcontent TEXT NULL\n\t)\");\n\n\toutput(RESULT_INFO, \"Pages setup successfully completed\");\n\treturn 1;\n}", "function wp_maybe_clean_new_site_cache_on_update($new_site, $old_site)\n {\n }", "private function load_temp_wordpress() {\n\t\t$this->download_temp_wordpress();\n\n\t\t$cmd = 'config create --dbname=%s --path=%s --skip-check --force';\n\t\t$cmd .= ' --quiet';\n\t\tWP_CLI::runcommand(\n\t\t\tsprintf( $cmd, $this->uniqid, $this->wp_temp_path )\n\t\t);\n\n\t\t$cmd = 'db create --path=%s --quiet';\n\t\tWP_CLI::runcommand( sprintf( $cmd, $this->wp_temp_path ) );\n\n\t\t$cmd = 'core install --url=localhost --title=%1$s --admin_user=%1$s';\n\t\t$cmd .= ' [email protected] --path=%2$s --quiet';\n\t\tWP_CLI::runcommand(\n\t\t\tsprintf( $cmd, $this->uniqid, $this->wp_temp_path )\n\t\t);\n\n\t\tregister_shutdown_function(\n\t\t\tfunction () use ( $temp ) {\n\t\t\t\tif ( file_exists( $temp ) ) {\n\t\t\t\t\t$cmd = 'db drop --yes --path=%2$s';\n\t\t\t\t\tWP_CLI::runcommand( sprintf( $cmd, $this->wp_temp_path ) );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}", "private function ensureDirectoryExists($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "function new_db( $name )\n\t{\n\t $sql = \"CREATE DATABASE \" . $name;\n\t\tif ( $this->checkup( \"\", $sql ) != true ) {\n\t\t\treturn $this->error( \"an error occured!\" );\n\t\t}\n\t\tif ( mysql_query ( $sql , $this->CONN ) ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn $this->error ( \"error while creating database '$name'!\" );\n\t\t}\n\t}", "public function run()\n {\n $site = factory(Site::class)->create([\n 'user_id' => User::first()->id,\n ]);\n }", "function create() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"CREATE DATABASE IF NOT EXISTS stumbleupon\";\n\t\t$sqlStatements[] = \"USE stumbleupon\";\n\t\t$sqlStatements[] = \"CREATE TABLE IF NOT EXISTS `siteViews` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `siteName` varchar(40) NOT NULL,\n\t`rating` int(5) NOT NULL,\n `timestamp` int(11) NOT NULL,\n `age` int(5) NOT NULL,\n `gender` int(5) NOT NULL,\n `city` varchar(30) NOT NULL,\n `state` varchar(30) NOT NULL,\n `country` varchar(30) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2250\";\n\t\t$sqlStatements[] = \"CREATE TABLE IF NOT EXISTS `tags` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n\t`viewId` int(11) NOT NULL,\n `siteName` varchar(40) NOT NULL,\n\t`rating` int(5) NOT NULL,\n `tag` varchar(30) NOT NULL,\n `count` int(5) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2250\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "public function testRequireSilverstripeDB()\n {\n LivePubHelper::$init_code = array();\n\n // check that nothing happens when not publishing\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 0);\n\n // check that it does happen when publishing\n LivePubHelper::init_pub();\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 1);\n $this->assertEquals(preg_match('/\\$databaseConfig = array \\(.+\\);/ms', LivePubHelper::$init_code[0]), 1);\n\n // check that it's not included twice\n LivePubHelper::require_silverstripe_db();\n $this->assertEquals(count(LivePubHelper::$init_code), 1);\n\n LivePubHelper::stop_pub();\n }", "private function configure_site() {\n\n\t\t$site_conf_dir = $this->site_root . '/config';\n\t\t$site_docker_yml = $this->site_root . '/docker-compose.yml';\n\t\t$site_conf_env = $this->site_root . '/.env';\n\t\t$site_nginx_default_conf = $site_conf_dir . '/nginx/default.conf';\n\t\t$site_php_ini = $site_conf_dir . '/php-fpm/php.ini';\n\t\t$server_name = ( 'wpsubdom' === $this->site_type ) ? \"$this->site_name *.$this->site_name\" : $this->site_name;\n\t\t$process_user = posix_getpwuid( posix_geteuid() );\n\n\t\tEE::log( \"Creating WordPress site $this->site_name.\" );\n\t\tEE::log( 'Copying configuration files.' );\n\n\t\t$filter = array();\n\t\t$filter[] = $this->site_type;\n\t\t$filter[] = $this->cache_type;\n\t\t$filter[] = $this->le;\n\t\t$filter[] = $this->db_host;\n\t\t$site_docker = new Site_Docker();\n\t\t$docker_compose_content = $site_docker->generate_docker_compose_yml( $filter );\n\t\t$default_conf_content = $this->generate_default_conf( $this->site_type, $this->cache_type, $server_name );\n\t\t$local = ( 'db' === $this->db_host ) ? true : false;\n\t\t$env_data = [\n\t\t\t'local' => $local,\n\t\t\t'virtual_host' => $this->site_name,\n\t\t\t'root_password' => $this->db_root_pass,\n\t\t\t'database_name' => $this->db_name,\n\t\t\t'database_user' => $this->db_user,\n\t\t\t'user_password' => $this->db_pass,\n\t\t\t'wp_db_host' => \"$this->db_host:$this->db_port\",\n\t\t\t'wp_db_user' => $this->db_user,\n\t\t\t'wp_db_name' => $this->db_name,\n\t\t\t'wp_db_pass' => $this->db_pass,\n\t\t\t'user_id' => $process_user['uid'],\n\t\t\t'group_id' => $process_user['gid'],\n\t\t];\n\t\t$env_content = \\EE\\Utils\\mustache_render( SITE_TEMPLATE_ROOT . '/config/.env.mustache', $env_data );\n\t\t$php_ini_content = \\EE\\Utils\\mustache_render( SITE_TEMPLATE_ROOT . '/config/php-fpm/php.ini.mustache', [] );\n\n\t\ttry {\n\t\t\tif ( ! ( file_put_contents( $site_docker_yml, $docker_compose_content )\n\t\t\t\t&& file_put_contents( $site_conf_env, $env_content )\n\t\t\t\t&& mkdir( $site_conf_dir )\n\t\t\t\t&& mkdir( $site_conf_dir . '/nginx' )\n\t\t\t\t&& file_put_contents( $site_nginx_default_conf, $default_conf_content )\n\t\t\t\t&& mkdir( $site_conf_dir . '/php-fpm' )\n\t\t\t\t&& file_put_contents( $site_php_ini, $php_ini_content ) ) ) {\n\t\t\t\tthrow new Exception( 'Could not copy configuration files.' );\n\t\t\t}\n\t\t\tEE::success( 'Configuration files copied.' );\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\t}", "public function testCreateSiteMembership()\n {\n }", "private function create_etc_hosts_entry() {\n\n\t\t$host_line = LOCALHOST_IP . \"\\t$this->site_name\";\n\t\t$etc_hosts = file_get_contents( '/etc/hosts' );\n\t\tif ( ! preg_match( \"/\\s+$this->site_name\\$/m\", $etc_hosts ) ) {\n\t\t\tif ( \\EE\\Utils\\default_launch( \"/bin/bash -c 'echo \\\"$host_line\\\" >> /etc/hosts'\" ) ) {\n\t\t\t\tEE::success( 'Host entry successfully added.' );\n\t\t\t} else {\n\t\t\t\tEE::warning( \"Failed to add $this->site_name in host entry, Please do it manually!\" );\n\t\t\t}\n\t\t} else {\n\t\t\tEE::log( 'Host entry already exists.' );\n\t\t}\n\t}", "protected function ensure_path_exists() {\n global $CFG;\n if (!is_writable($this->path)) {\n if ($this->custompath && !$this->autocreate) {\n throw new coding_exception('File store path does not exist. It must exist and be writable by the web server.');\n }\n $createdcfg = false;\n if (!isset($CFG)) {\n // This can only happen during destruction of objects.\n // A cache is being used within a destructor, php is ending a request and $CFG has\n // already being cleaned up.\n // Rebuild $CFG with directory permissions just to complete this write.\n $CFG = $this->cfg;\n $createdcfg = true;\n }\n if (!make_writable_directory($this->path, false)) {\n throw new coding_exception('File store path does not exist and can not be created.');\n }\n if ($createdcfg) {\n // We re-created it so we'll clean it up.\n unset($CFG);\n }\n }\n return true;\n }", "function lti_maybe_create_db() {\n\tglobal $wpdb;\n\n\tget_lti_hash(); // initialise the remote login hash\n\n\t$wpdb->ltitable = $wpdb->base_prefix . 'lti';\n\tif ( lti_site_admin() ) {\n\t\t$created = 0;\n\t\tif ( $wpdb->get_var(\"SHOW TABLES LIKE '{$wpdb->ltitable}'\") != $wpdb->ltitable ) {\n\t\t\t$wpdb->query( \"CREATE TABLE IF NOT EXISTS `{$wpdb->ltitable}` (\n\t\t\t\t`id` bigint(20) NOT NULL auto_increment,\n\t\t\t\t`consumer_key` varchar(255) NOT NULL,\n\t\t\t\t`secret` varchar(255) NOT NULL,\n\t\t\t\t`active` tinyint(4) default '1',\n\t\t\t\tPRIMARY KEY (`id`)\n\t\t\t);\" );\n\t\t\t$created = 1;\n\t\t}\n\t\tif ( $created ) {\n\t\t\t?> <div id=\"message\" class=\"updated fade\"><p><strong><?php _e( 'LTI database table created.', 'wordpress-mu-lti' ) ?></strong></p></div> <?php\n\t\t}\n\t}\n\n}", "public function add_site( &$args )\n\t{\n\t\t// If site already exists, then update the user.\n\t\t$db_site = $this->get_site_by_blog_id( $args['blog_id'] );\n\t\tif( $db_site )\n\t\t{\n\t\t\treturn $this->update_site( $db_site['id'], $args );\n\t\t}\n\t\t\n\t\tglobal $wpdb;\n\t\t\n\t\t$db_fields_insert = array(\n\t\t\t\t'blog_id'\t\t\t=> $args['blog_id'],\n\t\t\t\t'url'\t\t\t\t=> $args['url'],\n\t\t\t\t'title'\t\t\t\t=> $args['title'],\n\t\t\t\t'num_posts'\t\t\t=> $args['num_posts'],\n\t\t\t\t'num_pages'\t\t\t=> $args['num_pages'],\n\t\t\t\t'num_comments'\t\t=> $args['num_comments'],\n\t\t\t\t'last_post_url'\t\t=> $args['last_post_url'],\n\t\t\t\t'last_post_date'\t=> $args['last_post_date'],\n\t\t\t\t'last_post_author' => $args['last_post_author'],\n\t\t\t\t'last_post_status'\t=> $args['last_post_status'],\n\t\t\t\t'last_comment_url'\t=> $args['last_comment_url'],\n\t\t\t\t'last_comment_date'\t=> $args['last_comment_date'],\n\t\t\t\t'admin_email'\t\t=> $args['admin_email'],\n\t\t\t\t'status'\t\t\t=> $args['status'],\n\t\t\t);\n\t\t$db_types_insert = array( '%d', '%s', '%s', '%d', '%d', '%d', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s');\n\n\t\t$db_fields_insert = apply_filters('orghub_db_fields_insert', $db_fields_insert);\n\t\t$db_types_insert = apply_filters('orghub_db_types_insert', $db_types_insert);\n\t\t\n\t\t// Insert new site into Sites table.\n\t\t$result = $wpdb->insert(self::$site_table,$db_fields_insert, $db_types_insert);\n\t\t\n\n\t\t// Check to make sure insertion was successful.\n\t\t$site_id = $wpdb->insert_id;\n\t\tif( !$site_id )\n\t\t{\n\t\t\t$this->model->last_error = 'Unable to insert site.';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $site_id;\n\t}", "protected function production() : void\n {\n File::ensureDirectoryExists(Path::storage('framework/cache'));\n File::ensureDirectoryExists(Path::storage('framework/sessions'));\n }", "function insert_blog($domain, $path, $site_id)\n {\n }", "function wb_create_database($db_name, $con)\n{ \n\tif( !mysql_query(\"CREATE DATABASE IF NOT EXISTS $db_name\", $con) )\n\t\tdie( 'Could not create database: ' . mysql_error() );\n\tif( !mysql_select_db($db_name, $con) )\n\t\tdie( 'Could not select database: ' . mysql_error() );\n\t\n\twb_create_sitemap_table($con);\n\twb_create_content_table($con);\n\twb_create_users_table($con);\n\twb_create_permissions_table($con);\n\twb_create_comments_table($con);\n}", "function wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta = array())\n {\n }", "public function testCreateSite(string $site_name, array $options = ['org' => NULL]) {\n $site_info = $this->siteInfo($site_name);\n if (empty($site_info)) {\n $home = $_SERVER['HOME'];\n $toReturn = $this->taskExec(static::$TERMINUS_EXE)\n ->args('site:create', $site_name, $site_name, 'drupal-composer-managed');\n if ( !empty( $options['org'] ) ) {\n $toReturn->option('org', $options['org']);\n }\n $toReturn->run();\n $this->waitForWorkflow($site_name);\n $site_info = $this->siteInfo($site_name);\n // Write to $HOME/.robo-sites-created to delete them later.\n exec(\"echo $site_name >> $home/.robo-sites-created\");\n }\n return $site_info;\n }", "private function createEnvironment() {\n\t\t$this->cache_folder = dirname(__FILE__) . \"/\" . $this->cache_folder;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($this->cache_folder))\n\t\t\tmkdir($this->cache_folder);\n\n\t\t// Get the index file path\n\t\t$indexFilepath = $this->cache_folder . \"/\" . $this->cache_index;\n\n\t\t// Create one if it doesn't exist\n\t\tif(!file_exists($indexFilepath))\n\t\t\ttouch($indexFilepath);\n\t}", "public function prepareDatabase()\n {\n // If SQLite database does not exist, create it\n if ($this->config->database['connection'] === 'sqlite') {\n $path = $this->config->database['database'];\n if ( ! $this->fileExists($path) && is_dir(dirname($path))) {\n $this->write(\"Creating $path ...\");\n touch($path);\n }\n }\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "protected function defineSitePath() {}", "protected function createMissingSqliteDatabase(string $path): bool\n {\n if ($this->option('force')) {\n return touch($path);\n }\n\n if ($this->option('no-interaction')) {\n return false;\n }\n\n $this->components->warn('The SQLite database does not exist: ' . $path);\n\n if (!$this->components->confirm('Would you like to create it?')) {\n return false;\n }\n\n return touch($path);\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "function db_make($conn) {\n $dbname = \"rush00\";\n $query = \"DROP database if exists $dbname;\";\n if (mysqli_query($conn, $query))\n echo \"DB deleted\";\n else\n echo \"Error during delet-process\";\n $sql = \"CREATE DATABASE $dbname\";\n $check = mysqli_query($conn, $sql) ? \"Database created successfully\\n\" : \"Error creating database: \" . mysqli_error($conn);\n echo $check;\n ?><br><br><?php\n return ($conn);\n }", "public function createStaticSite($domain)\n {\n $domain = strtolower($domain);\n\n output(\"Creating nginx entry for {$domain}...\");\n\n $config = $this->files->get(BEDIQ_STUBS . '/nginx/site/static.conf');\n $config = str_replace('{domain}', $domain, $config);\n\n $this->files->put('/etc/nginx/sites-available/' . $domain, $config);\n $this->files->symlink('/etc/nginx/sites-available/' . $domain, '/etc/nginx/sites-enabled/' . $domain);\n\n $this->addHostEntry($domain);\n\n $this->reloadNginx();\n }", "public function testCreateExistingDbFails()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n \n list($host, $port, $dbname) = $this->_getUrlParts();\n $dbname = trim($dbname, '/');\n \n try {\n $db = Sopha_Db::createDb($dbname, $host, $port);\n $this->fail(\"createDb was expected to fail with a 409 error code\");\n } catch (Sopha_Db_Exception $e) {\n $this->assertEquals(412, $e->getCode(), \"Error code is not 409\");\n }\n }", "function CreateDB() {\n $sql = \"CREATE SCHEMA IF NOT EXISTS `mydb`\" .\n \"DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\";\n performSQL($sql);\n}", "function createDatabase(){\r\n $servername = \"localhost\";\r\n $username = \"root\";\r\n $password = \"\";\r\n \r\n // Create connection\r\n $conn = new mysqli($servername, $username, $password);\r\n \r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n \r\n // Create database\r\n $sql = \"CREATE DATABASE IF NOT EXISTS myDB;\";\r\n if ($conn->query($sql) === FALSE) {\r\n echo \"Error creating database: \" . $conn->error. \"<br>\";\r\n }\r\n $conn->close();\r\n setUp();\r\n}", "public function createSite(array $data = array()) {\n if (empty($data['url']) || empty($data['email'])) {\n return FALSE;\n }\n $result = $this->query('POST', 'site', $data, array('site', 'publicKey'));\n return isset($result['site']) ? $result['site'] : $result;\n }", "function dbCreate() {\r\n $dbhost = 'localhost';\r\n $dbuser = 'admin';\r\n $dbpass = 'adminpass';\r\n $dbconn=mysqli_connect($dbhost,$dbuser,$dbpass);\r\n\r\n $query = \"DROP DATABASE IF EXISTS maindb;\";\r\n \r\n mysqli_query($dbconn, $query); \r\n\r\n $query = \"CREATE DATABASE IF NOT EXISTS maindb;\";\r\n \r\n mysqli_query($dbconn, $query);\r\n\r\n mysqli_close($dbconn);\r\n }", "public function ensureDirExists($dirs);", "function new_db($name) {\n\t\t\t$sql = \"CREATE DATABASE IF NOT EXISTS \".$name;\n\t\t\tif ($this->checkup(\"\", $sql) != true) {\n\t\t\t\treturn $this->error(\"an error occured!\");\n\t\t\t}\n\n\t\t\t#\t\tif ( mysqli_query ($this->CONN, $sql ) ) {\n\t\t\tif ($this->one_query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $this->error(\"error while creating database '$name'!\");\n\t\t\t}\n\t\t}", "public function test_set_site_temporary_is_not_stored_as_autoload_option() {\n\t\tif ( version_compare( $GLOBALS['wp_version'], '4.6', '<' ) ) {\n\t\t\t$this->markTestSkipped( 'Does not apply when in WordPress before version 4.6.' );\n\t\t}\n\n\t\tif ( is_multisite() ) {\n\t\t\t$this->markTestSkipped( 'Does not apply when used in multisite.' );\n\t\t}\n\n\t\t$key = rand_str();\n\t\t$value = rand_str();\n\n\t\t$this->assertTrue( WP_Temporary::set_site( $key, $value ) );\n\t\t$this->assertEquals( $value, WP_Temporary::get_site( $key ) );\n\n\t\t$options = wp_load_alloptions();\n\n\t\t$this->assertFalse( isset( $options[ '_site_temporary_' . $key ] ) );\n\t}", "private function ensureFolderStructure()\n {\n $localeDir = Strata::getLocalePath();\n if (!is_dir($localeDir)) {\n mkdir($localeDir);\n }\n }", "function install_site_theme()\n\t{\n\t\t// Set the site_short_name as default_site since that's used when\n\t\t// creating and saving template files\n\t\tee()->config->set_item('site_short_name', 'default_site');\n\n\t\tif ($this->userdata['theme'] != ''&& $this->userdata['theme'] != 'none')\n\t\t{\n\t\t\t// Install any default structure and content that the theme may have\n\t\t\tif (file_exists(APPPATH.'/site_themes/'.$this->userdata['theme'].'/channel_set.json'))\n\t\t\t{\n\t\t\t\t$theme = ee('ThemeInstaller');\n\t\t\t\t$theme->setInstallerPath(APPPATH);\n\t\t\t\t$theme->setSiteURL($this->userdata['site_url']);\n\t\t\t\t$theme->setBasePath($this->base_path);\n\t\t\t\t$theme->setThemePath($this->root_theme_path);\n\t\t\t\t$theme->setThemeURL($this->set_path('themes'));\n\t\t\t\t$theme->install($this->userdata['theme']);\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "protected function setUpWebsites()\n {\n\t Piwik_SitesManager_API::getInstance()->setGlobalSearchParameters($searchKeywordParameters='gkwd', $searchCategoryParameters='gcat');\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(200)->getDatetime(), 0, \"Site 1 - Site search\", $siteurl=false, $search=1, $searchKwd='q,mykwd,p', $searchCat='cats' );\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(400)->getDatetime(), 0, \"Site 2 - Site search use default\", $siteurl = false, $search=1, $searchKwd='', $searchCat='' );\n\t self::createWebsite(Piwik_Date::factory($this->dateTime)->subHour(600)->getDatetime(), 0, \"Site 3 - No site search\", $siteurl = false, $search=0);\n }", "private function createDiskIfNotExists(): void\n {\n if (!File::exists(config('filesystems.disks.starmap.root'))) {\n Storage::makeDirectory(config('filesystems.disks.starmap.root'));\n }\n }", "private function populate_site_info( $args ) {\n\n\t\t$this->site_name = \\EE\\Utils\\remove_trailing_slash( $args[0] );\n\n\t\tif ( $this->db::site_in_db( $this->site_name ) ) {\n\n\t\t\t$data = array( 'site_type', 'site_title', 'proxy_type', 'cache_type', 'site_path', 'db_name', 'db_user', 'db_host', 'db_port', 'db_password', 'db_root_password', 'wp_user', 'wp_pass', 'email' );\n\n\t\t\t$db_select = $this->db::select( $data, array( 'sitename' => $this->site_name ) );\n\n\t\t\t$this->site_type = $db_select[0]['site_type'];\n\t\t\t$this->site_title = $db_select[0]['site_title'];\n\t\t\t$this->proxy_type = $db_select[0]['proxy_type'];\n\t\t\t$this->cache_type = $db_select[0]['cache_type'];\n\t\t\t$this->site_root = $db_select[0]['site_path'];\n\t\t\t$this->db_user = $db_select[0]['db_user'];\n\t\t\t$this->db_name = $db_select[0]['db_name'];\n\t\t\t$this->db_host = $db_select[0]['db_host'];\n\t\t\t$this->db_port = $db_select[0]['db_port'];\n\t\t\t$this->db_pass = $db_select[0]['db_password'];\n\t\t\t$this->db_root_pass = $db_select[0]['db_root_password'];\n\t\t\t$this->site_user = $db_select[0]['wp_user'];\n\t\t\t$this->site_pass = $db_select[0]['wp_pass'];\n\t\t\t$this->site_email = $db_select[0]['email'];\n\n\t\t} else {\n\t\t\tEE::error( \"Site $this->site_name does not exist.\" );\n\t\t}\n\t}", "public static function checkInstall() {\n\t\t\t// TODO: Something awesoem\n\t\t\tif(!file_exists(\"engine/values/mysql.values.php\")){\n\t\t\t\tLayoutManager::redirect(\"INSTALL.php\");\n\t\t\t} else if(file_exists(\"INSTALL.php\")){\n\t\t\t\tFileHandler::delete(\"INSTALL.php\");\n\t\t\t\techo \"<center><img src=\\\"images/warning.png\\\" height=14px border=0/> Please delete 'INSTALL.php'. It's unsafe to have this in the root directory.</center>\";\n\t\t\t} \n\t\t}", "function newSQLiteDatabase($dbname){\n //Try opening or creating the database.\n if ($db = sqlite_open($dbname, 0666, $errorMsg)) { //If that executes smoothly:\n echo \"Database created successfully or already exists.\";\n }\n else //If that didn't work:\n {\n //Print out the error message and move on.\n echo \"Database could not be created: \" . $errorMsg;\n }\n }", "function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }", "protected function createNecessaryDirectoriesInDocumentRoot() {}", "protected function createNecessaryDirectoriesInDocumentRoot() {}", "function make_noindex( $noindex ) {\n\tif ( is_singular( 'make_site' ) ) {\n\t\t$noindex = true;\n\t}\n\n\treturn $noindex;\n}", "protected function createThumbDirectoryIfNotExists()\n {\n if( ! is_dir($this->thumbPath) )\n {\n mkdir($this->thumbPath);\n }\n }", "public function create_tables()\n\t{\n\t\tglobal $wpdb;\n\t\t\n $db_charset_collate = '';\n if( !empty($wpdb->charset) )\n\t\t\t$db_charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\";\n if( !empty($wpdb->collate) )\n\t\t\t$db_charset_collate .= \" COLLATE $wpdb->collate\";\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n\t\t$sql = \"CREATE TABLE \".self::$site_table.\" (\n\t\t\t\t id bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t\t blog_id bigint(20) unsigned NOT NULL UNIQUE,\n\t\t\t\t url text NOT NULL DEFAULT '',\n\t\t\t\t title text NOT NULL DEFAULT '',\n\t\t\t\t num_posts bigint(20) NOT NULL DEFAULT 0,\n\t\t\t\t num_pages bigint(20) NOT NULL DEFAULT 0,\n\t\t\t\t num_comments bigint(20) NOT NULL DEFAULT 0,\n\t\t\t\t last_post_url text NOT NULL DEFAULT '',\n\t\t\t\t last_post_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\t last_post_author text NOT NULL DEFAULT '',\n\t\t\t\t last_post_status text NOT NULL DEFAULT '',\n\t\t\t\t last_comment_url text NOT NULL DEFAULT '',\n\t\t\t\t last_comment_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n\t\t\t\t admin_email text NOT NULL DEFAULT '',\n\t\t\t\t status text NOT NULL DEFAULT ''\";\n\t\t$sql = apply_filters('orghub_create_table', $sql);\n\t\t$sql .= \"PRIMARY KEY (id)\n\t\t\t\t) ENGINE=InnoDB $db_charset_collate;\";\n dbDelta($sql);\n\t}", "function db_check() {\n global $wpdb;\n $table_name = $wpdb->prefix . \"bl_maintainers\";\n // if tables aren't installed then install them\n if ($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n $this->db_install();\n }\n }", "private function mustCreateFolder(){\n }", "protected function createBlankSite($path, PackageNameVersion $themePair)\n {\n $themeName = '';\n $packagePairs = $this->getInitialPackagePairs();\n\n if ($themePair->getName() !== self::BLANK_THEME) {\n $themeName = $themePair->getName();\n array_push($packagePairs, $themePair);\n }\n\n $orgDir = getcwd();\n chdir($path);\n\n $this->fs->mkdir([\n 'build',\n 'src/layouts',\n 'src/content',\n 'src/content/posts',\n 'src/content/assets',\n 'src/includes',\n 'src/plugins',\n ]);\n $this->renderFile('site/config.yml.twig', 'config.yml', [\n 'theme_name' => $themeName,\n ]);\n $this->renderFile('site/composer.json.twig', 'composer.json', [\n 'requires' => $this->generateRequirePackages($packagePairs),\n ]);\n $this->fs->dumpFile('src/content/index.html', '');\n\n chdir($orgDir);\n }", "function make_build_path($build_path) {\n static $saved_path;\n if (isset($saved_path)) {\n return $saved_path;\n }\n\n // Determine the base of the build.\n if (drush_get_option('tar')) {\n $build_path = dirname($build_path) . '/' . basename($build_path, '.tar.gz') . '.tar.gz';\n }\n elseif (isset($build_path) && (!empty($build_path) || $build_path == '.')) {\n $build_path = rtrim($build_path, '/');\n }\n // Allow tests to run without a specified base path.\n elseif (drush_get_option('test') || drush_confirm(dt(\"Make new site in the current directory?\"))) {\n $build_path = '.';\n }\n else {\n return drush_user_abort(dt('Build aborted.'));\n }\n if ($build_path != '.' && file_exists($build_path)) {\n return drush_set_error('MAKE_PATH_EXISTS', dt('Base path %path already exists.', array('%path' => $build_path)));\n }\n $saved_path = $build_path;\n return $build_path;\n}", "function require_wp_db()\n {\n }", "public function ensureMigrationBinExist()\r\n\t{\r\n\t\tif (!file_exists($this->migrationFiles)) {\r\n\t\t\tmkdir($this->migrationFiles);\r\n\t\t\tchmod($this->migrationFiles, 0777);\r\n\t\t}\r\n\t}", "function checkIfDatabaseIsCreated(){\n\tglobal $connect;\n\t$query1 = \"create table if not exists Register(id INT AUTO_INCREMENT PRIMARY KEY,firstname VARCHAR(20),lastname VARCHAR(20),email VARCHAR(30),password VARCHAR(20));\";\n\tmysqli_query($connect, $query1) or die (mysqli_error($connect));\n}", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "public function createFolderIfNotExisted($path)\n {\n if (!file_exists($path)) {\n mkdir($path);\n }\n }", "function __checkInstall() {\n\t\t$base = strpos($_SERVER['REQUEST_URI'], Dispatcher::getUrl());\n\t\t$base = substr($_SERVER['REQUEST_URI'], 0, $base);\n\t\tif (!file_exists(APP . 'config/INSTALLED') && !in_array(Dispatcher::getUrl($_SERVER['REQUEST_URI']), array('install', 'install/configure'))) {\n\t\t\theader('Location: '.$base.'install');exit;\n\t\t}\n\t}", "public function run_install()\n\t{\n\t\t// Create the database tables\n\t\t// Include the table_prefix\n\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_site`\n\t\t\t(\n\t\t\t\t`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t`site_name` varchar(150) NOT NULL COMMENT 'name that appears on the front end',\n\t\t\t\t`site_url` varchar(255) NOT NULL COMMENT 'url of the deployment to share with',\n\t\t\t\t`site_color` varchar(20) DEFAULT 'CC0000' COMMENT 'color that shows the shared reports',\n\t\t\t\t`site_active` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'sharing active or inactive ',\n\t\t\t\t`share_categories` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'sharing active or inactive ',\n\t\t\t\t`share_reports` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'sharing active or inactive ',\n\t\t\t\tPRIMARY KEY (id)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores sites we are getting shared reports from'\n\t\t\t\");\n\n\t\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_incident`\n\t\t\t(\n\t\t\t\t`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t`location_id` bigint(20) unsigned NOT NULL,\n\t\t\t\t`sharing_site_id` INT UNSIGNED NOT NULL,\n\t\t\t\t`remote_incident_id` BIGINT(20) UNSIGNED NOT NULL,\n\t\t\t\t`updated` datetime DEFAULT NULL,\n\t\t\t\t`incident_title` varchar(255) NOT NULL COMMENT 'title of the report',\n\t\t\t\t`incident_description` longtext,\n\t\t\t\t`incident_date` datetime DEFAULT NULL,\n\t\t\t\t`incident_mode` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - WEB, 2 - SMS, 3 - EMAIL, 4 - TWITTER',\n\t\t\t\t`incident_active` tinyint(4) NOT NULL DEFAULT '0',\n\t\t\t\t`incident_verified` tinyint(4) NOT NULL DEFAULT '0',\n\t\t\t\tPRIMARY KEY (id),\n\t\t\t\tKEY `location_id` (`location_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores shared reports'\n\t\t\t\");\n\n\t\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_incident_category` (\n\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t `sharing_incident_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t `category_id` int(11) unsigned NOT NULL DEFAULT '5',\n\t\t\t PRIMARY KEY (`id`),\n\t\t\t UNIQUE KEY `sharing_incident_category_ids` (`sharing_incident_id`,`category_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores shared reports categories'\n\t\t\t\");\n\n\t\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_incident_media` (\n\t\t\t `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,\n\t\t\t `sharing_incident_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t `media_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t PRIMARY KEY (`id`),\n\t\t\t UNIQUE KEY `sharing_incident_media_ids` (`sharing_incident_id`,`media_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores shared reports media'\n\t\t\t\");\n\t\t\t\n\t\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_incident_comment` (\n\t\t\t `id` int(11) NOT NULL AUTO_INCREMENT,\n\t\t\t `sharing_incident_id` bigint(20) unsigned NOT NULL DEFAULT '0',\n\t\t\t `comment_id` int(11) unsigned NOT NULL DEFAULT '5',\n\t\t\t PRIMARY KEY (`id`),\n\t\t\t UNIQUE KEY `sharing_incident_comment_ids` (`sharing_incident_id`,`comment_id`)\n\t\t\t) ENGINE=MyISAM AUTO_INCREMENT=14064 DEFAULT CHARSET=utf8 COMMENT='Stores shared reports comments'\n\t\t\t\");\n\t\t\t\n\t\t\t$this->db->query(\"\n\t\t\tCREATE TABLE IF NOT EXISTS `\".Kohana::config('database.default.table_prefix').\"sharing_category`\n\t\t\t(\n\t\t\t\t`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n\t\t\t\t`sharing_site_id` INT UNSIGNED NOT NULL,\n\t\t\t\t`category_id` BIGINT(20) UNSIGNED NOT NULL,\n\t\t\t\t`remote_category_id` BIGINT(20) UNSIGNED NOT NULL,\n\t\t\t\t`updated` datetime DEFAULT NULL,\n\t\t\t\tPRIMARY KEY (id),\n\t\t\t UNIQUE KEY `category_id` (`category_id`),\n\t\t\t UNIQUE KEY `remote_category_id` (`sharing_site_id`,`remote_category_id`)\n\t\t\t) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stores shared categories'\n\t\t\t\");\n\t\t\t\n\t\t\t// Create view for querying\n\t\t\t$this->db->query(\"\n\t\t\tCREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW `sharing_combined_incident` AS\n\t\t\t\tSELECT `incident`.`id` AS `id`,\n\t\t\t\t\t`incident`.`incident_title` AS `incident_title`,\n\t\t\t\t\t`incident`.`incident_description` AS `incident_description`,\n\t\t\t\t\t`incident`.`incident_date` AS `incident_date`,\n\t\t\t\t\t`incident`.`incident_mode` AS `incident_mode`,\n\t\t\t\t\t`incident`.`location_id` AS `location_id`,\n\t\t\t\t\t`incident`.`incident_active` AS `incident_active`,\n\t\t\t\t\t`incident`.`incident_verified` AS `incident_verified`,\n\t\t\t\t\t'main' AS `source`\n\t\t\t\tFROM `incident`\n\t\t\t\tUNION\n\t\t\t\tSELECT\n\t\t\t\t\t`sharing_incident`.`id` AS `id`,\n\t\t\t\t\t`sharing_incident`.`incident_title` AS `incident_title`,\n\t\t\t\t\t`sharing_incident`.`incident_description` AS `incident_description`,\n\t\t\t\t\t`sharing_incident`.`incident_date` AS `incident_date`,\n\t\t\t\t\t`sharing_incident`.`incident_mode` AS `incident_mode`,\n\t\t\t\t\t`sharing_incident`.`location_id` AS `location_id`,\n\t\t\t\t\t`sharing_incident`.`incident_active` AS `incident_active`,\n\t\t\t\t\t`sharing_incident`.`incident_verified` AS `incident_verified`,\n\t\t\t\t\t`sharing_incident`.`sharing_site_id` AS `source`\n\t\t\t\tFROM `sharing_incident`\n\t\t\t\");\n\t\t\t\n\t\t\t$this->db->query(\"\n\t\t\tCREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW `sharing_combined_incident_category` AS\n\t\t\t\tSELECT `incident_category`.`incident_id` AS `incident_id`,\n\t\t\t\t\tNULL AS `sharing_incident_id`,\n\t\t\t\t\t`incident_category`.`category_id` AS `category_id`\n\t\t\t\tFROM `incident_category`\n\t\t\t\tUNION\n\t\t\t\tSELECT\n\t\t\t\t\tNULL AS `incident_id`,\n\t\t\t\t\t`sharing_incident_category`.`sharing_incident_id` AS `sharing_incident_id`,\n `sharing_incident_category`.`category_id` AS `category_id`\n\t\t\t\tFROM `sharing_incident_category`\n\t\t\t\");\n\t\t\t\n\t\t\t//Dump the sharing scheduler item from bundled SQL dump file\n\t\t\t$this->db->query(\"DELETE FROM `\".Kohana::config('database.default.table_prefix').\"scheduler` where scheduler_name = 'Sharing' \");\n\t\t\t\n\t\t\t// Add sharing in to scheduler table\n\t\t\t$this->db->query(\"INSERT IGNORE INTO `\".Kohana::config('database.default.table_prefix').\"scheduler`\n\t\t\t\t(`scheduler_name`,`scheduler_last`,`scheduler_weekday`,`scheduler_day`,`scheduler_hour`,`scheduler_minute`,`scheduler_controller`,`scheduler_active`) VALUES\n\t\t\t\t('Sharing','0','-1','-1','-1','-1','s_sharing','1')\"\n\t\t\t);\n\t}", "function drush_dslm_new() {\n // Pull the args\n $args = drush_get_arguments();\n if (!isset($args[1])) {\n return drush_set_error('DSLM: Please provide a site destination');\n }\n else {\n $site_dest = $args[1];\n }\n\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n // Set the profile and core, either supplied on the CLI, set with --latest, or will prompt\n if (drush_get_option('latest', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['release'];\n }\n elseif (drush_get_option('dev', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['dev'];\n }\n else {\n $core = isset($args[2]) ? $args[2] : FALSE;\n }\n\n // If we still don't have a core string try to get on iteractively\n if (!$core) {\n $core_list = $dslm->getCores();\n $pick_core = drush_choice($core_list['all']);\n if (!$pick_core) {\n return FALSE;\n }\n $core = $core_list['all'][$pick_core];\n }\n\n if (!$res = $dslm->newSite($site_dest, $core)) {\n return drush_set_error($dslm->lastError());\n }\n else {\n drush_log(dt('Your site has been linked in !dir', array('!dir' => $site_dest)), 'ok');\n return TRUE;\n }\n}", "private function checkSite(string &$site): void\n {\n $site = $this->prepareUsername($site);\n }", "function check_create($name) {\n global $lsarray;\n if (!in_array($name, $lsarray)) { mkdir($name); return true; }\n else { echo \"Folder already exists: $name\".PHP_EOL; return false; }\n}", "private function createAzureSite($real_name) {\n\t\tshell_exec(SiteController::$AZURE_PATH.' site create --location \"'.SiteController::$LOCATION.'\" \"'.$real_name.'\" 2>&1');\t\n\t\tob_flush();\n\t\t$output = shell_exec(SiteController::$AZURE_PATH.' site list --json \"'.$real_name.'\" 2>&1');\n\t\tob_flush();\n\t\t$site_detail = json_decode($output);\t\n\t\tif(count($site_detail) > 0) {\t\n\t\t\t$site_uri = $site_detail[0]->uri;\n\t\t\tif(!empty($site_uri)) {\n\t\t\t\tSiteController::$SITE_FTP = SiteController::getFtpHost($site_uri);\t\n\t\t\t\tshell_exec(SiteController::$AZURE_PATH.' site scale mode standard \"'.$real_name.'\" 2>&1');\n\t\t\t\tob_flush();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.5888145", "0.5819147", "0.57722384", "0.56811035", "0.56370306", "0.56355697", "0.5617623", "0.5611238", "0.5505102", "0.55010116", "0.5472607", "0.5338334", "0.532136", "0.53017634", "0.52961844", "0.52343833", "0.5201341", "0.5196786", "0.518514", "0.5178497", "0.51547503", "0.51525027", "0.5152396", "0.51391166", "0.51138526", "0.5108073", "0.51032543", "0.5098081", "0.50825065", "0.5066229", "0.5042166", "0.5029493", "0.5010686", "0.50059295", "0.49982437", "0.49919707", "0.4989152", "0.49767256", "0.49476764", "0.49428323", "0.4922412", "0.49150673", "0.49093983", "0.49023303", "0.489287", "0.48851734", "0.4878949", "0.48764637", "0.4872694", "0.48700225", "0.48641258", "0.4857742", "0.48551598", "0.485412", "0.48411733", "0.4838059", "0.48337343", "0.4832805", "0.48292994", "0.4823285", "0.4823227", "0.48215735", "0.48201472", "0.4812699", "0.48105702", "0.47872996", "0.4782488", "0.47811607", "0.47695705", "0.4764881", "0.4760134", "0.47547323", "0.47466582", "0.4744761", "0.4744287", "0.47355786", "0.4732743", "0.4731505", "0.47307017", "0.4717796", "0.4712375", "0.4712375", "0.47111678", "0.4702526", "0.47005346", "0.46986368", "0.46914637", "0.4688626", "0.4683722", "0.46788716", "0.46716744", "0.4669713", "0.46647683", "0.4662908", "0.46596426", "0.46484974", "0.46237126", "0.46213943", "0.46163836", "0.46161458" ]
0.4715283
80
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }", "public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }", "public function isAuthorized() {}", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n return auth()->check() ? true : false;\n }", "public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }", "public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }", "public function authorize()\n {\n return is_client_or_staff();\n }", "public function isAuthorized() {\n\t\treturn true;\n\t}", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }", "public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }", "public function hasAuthorized() {\n return $this->_has(1);\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }", "public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }", "public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }", "public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n return \\Auth::check() ? true : false;\n }", "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return !empty(Auth::user());\n }", "public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}", "public function isAuthorized() {\n\t\t\n\t}", "public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }", "public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }", "public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return $this->auth->check();\n }", "public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->container['auth']->check();\n }", "function isAuthorized($request) {\n return true;\n }", "public function authorize()\n {\n return Auth::guest() || isMember();\n }", "public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }", "public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }", "public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }", "public function authorize()\n {\n return TRUE;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }", "public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }" ]
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.7891453", "0.7890965", "0.7862504", "0.78414804", "0.78414804", "0.7837965", "0.78248763", "0.7812292", "0.7809632", "0.77928597", "0.7788316", "0.7781619", "0.77815884", "0.7763308", "0.7754035", "0.7717961", "0.7717961", "0.77171147", "0.77138597", "0.7705001", "0.7693082", "0.7692783", "0.76915383", "0.76909506", "0.76733255", "0.7667128", "0.7665592", "0.7656238", "0.7650853", "0.764326", "0.76431626", "0.76431614", "0.7635147", "0.76311624", "0.76294273", "0.7627076", "0.76207024", "0.76207024", "0.76139116", "0.76036394", "0.76035625", "0.76035625", "0.76032084", "0.7602515", "0.76007926", "0.75971127", "0.7588128", "0.7586303", "0.7581912", "0.7563037", "0.7554785", "0.75526226", "0.755171", "0.75436753", "0.75432944", "0.7540682", "0.7538806", "0.75280696", "0.751548", "0.75149626", "0.7501161", "0.74959517", "0.74956346", "0.74911124", "0.7489147", "0.74858016", "0.748033", "0.7478443", "0.7472642", "0.7472576", "0.7465409", "0.7464371", "0.74630046", "0.7462218", "0.7461453", "0.7449168", "0.74399257", "0.74358094", "0.7433247", "0.7432659", "0.74248093" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|string|max:191', 'email' => 'required|email|max:191|unique:admins,id,' . $this->admin, 'password' => 'nullable|required_without:_method|string|max:191|confirmed', 'phone' => '|required_without:_method|required|numeric|unique:admins,phone,' . $this->admin, 'image' => 'nullable|image', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342797", "0.8013068", "0.79357624", "0.79257727", "0.7922943", "0.7903906", "0.7859204", "0.7789624", "0.7783409", "0.77624106", "0.773673", "0.7732383", "0.77094924", "0.7691624", "0.7684878", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.7682184", "0.76753145", "0.76747704", "0.76653886", "0.7656984", "0.7641385", "0.7629662", "0.7629557", "0.7617277", "0.76092637", "0.7607173", "0.7602176", "0.7598716", "0.7597812", "0.7591812", "0.75902253", "0.7587347", "0.7579866", "0.75553906", "0.7555079", "0.75503534", "0.75459445", "0.7540463", "0.7536189", "0.75356364", "0.75300074", "0.75181943", "0.7514811", "0.75078565", "0.7506201", "0.75052506", "0.7498871", "0.7495198", "0.7494957", "0.7493081", "0.74902064", "0.7489407", "0.74890095", "0.7485984", "0.74858546", "0.7478957", "0.74781555", "0.74693084", "0.74632835", "0.7461654", "0.746117", "0.745908", "0.74546385", "0.7453331", "0.7452256", "0.7449815", "0.74481654", "0.7441297", "0.74408644", "0.7435215", "0.743476", "0.7432712", "0.74296844", "0.74289936", "0.7423239", "0.7418971", "0.74155754", "0.7413715", "0.7413531", "0.7412177", "0.7409704", "0.740534", "0.74039155", "0.7403364", "0.740084", "0.73900056", "0.73831314", "0.73729247", "0.7370593", "0.73688376", "0.73608065", "0.7355452", "0.7346383", "0.73441696", "0.73426807", "0.73349255" ]
0.0
-1
Reset instagram access token.
function reset_instagram_access_token ( $params = array() ) { ob_end_clean(); $success = $this->model->set_instagram_access_token(); if ( $success ) { wp_redirect( add_query_arg( array( 'page' => $this->page . '&instagram_token=' . time() ), admin_url( 'admin.php' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeAccessToken();", "function RevokeAccessToken()\r\n {\r\n $this->Rest->RevokeAccessToken();\r\n }", "protected function unsetAccessTokenCookie()\n {\n setcookie('accessToken', '', time() - 3600, \"/\"); \n }", "public function logout() {\n\t\t$this->removeAccessToken();\n\t}", "public function unlink() {\n $this->credential->setAccessToken(null);\n $this->credential->setTokenType(null);\n }", "private function revoke_token() {\n $this->delete_refresh_token();\n $this->client->revokeToken();\n $this->store_access_token(null);\n }", "public function reset(string $token, User $user);", "public function reset()\n {\n reset($this->tokens);\n }", "public function clearAccessToken()\n {\n return LocalSetting::getInstance()->create(\n 'token',\n null,\n \\Chamilo\\Application\\Calendar\\Extension\\Google\\Manager::context()\n );\n }", "public function removeRefreshToken();", "function resetToken() {\n $this->setToken(make_string(40));\n }", "public function removeResetToken()\n {\n $this->reset_token = null;\n }", "public function logout() {\n $this->client->get( 'https://instagram.com/accounts/logout/', array() );\n }", "public function deAuthenticate()\n {\n $this->redis->del(\n request()->cookie('access_token')\n );\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function resetLogin()\n {\n //\n }", "public function refreshAccessToken(): AccessToken;", "public function resetTokens() {\n\t\t$this->tokens = $this->initialMarking;\n\t}", "protected function _clearAuthToken()\n {\n delete_transient($this->tokenOptionName);\n }", "public function refreshToken()\n {\n $token = $this->getToken();\n }", "function reset() {\n Ad::resetCounter();\n unset($_GET['reset']);\n }", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "public static function clear_session_token()\n {\n self::set_session_token('');\n }", "public function removeWebAccessToken()\n {\n if (session()->has('api_consumer_token')) {\n session()->pull('api_consumer_token');\n }\n }", "public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_UIN] = null;\n $this->values[self::_ACCESS_TOKEN] = null;\n $this->values[self::_RECHARGE_URL] = null;\n }", "public function deleteAuthenticationToken(){\r\n\t\t delete_transient(IHomefinderConstants::AUTHENTICATION_TOKEN_CACHE);\r\n\t\t}", "public function reset() {\n $plugin = $this->viewVars['vv_authenticator']['Authenticator']['plugin'];\n $this->Authenticator->$plugin->setConfig($this->viewVars['vv_authenticator']); \n \n try {\n $this->Authenticator->$plugin->reset($this->request->params['named']['copersonid'],\n $this->Session->read('Auth.User.co_person_id'));\n \n $this->Authenticator->provision($this->request->params['named']['copersonid']);\n \n $this->Flash->set(_txt('rs.authr.reset',\n array($this->viewVars['vv_authenticator']['Authenticator']['description'])),\n array('key' => 'success'));\n }\n catch(Exception $e) {\n $this->Flash->set(filter_var($e->getMessage(),FILTER_SANITIZE_SPECIAL_CHARS), array('key' => 'error'));\n }\n \n // No view, always redirect\n $this->performRedirect();\n }", "public function removePasswordResetToken() {\n \t$this->password_reset_token = null;\n }", "public function resetAuthentication()\n\t{\n\t\t$this->_authentication = false;\n\t}", "public function setAccessToken(string $accessToken): void\n {\n $this->accessToken = $accessToken;\n }", "public function disconnect() : void\r\n {\r\n $this->authorization_uri = '';\r\n $this->access_token = '';\r\n $this->refresh_token = '';\r\n $this->expires = 0;\r\n }", "abstract public function refreshAccessToken(OAuthToken $token);", "public function unauthorize () {\n\t\t$this->_plugin->setting(self::token_setting, NULL);\n\t}", "protected function reset(): void\n {\n }", "public function unsetVerificationToken(): void\n {\n $this->verificationToken = [];\n }", "public function removePasswordResetToken()\n {\n $this->pwd_reset_token = null;\n }", "public function reset(): void{\n curl_reset($this->handler);\n }", "public function resetApiKey()\n {\n $this->resetApiKeyWithHttpInfo();\n }", "public function removePasswordResetToken()\r\n {\r\n $this->password_reset_token = null;\r\n }", "public function removePasswordResetToken()\r\n {\r\n $this->password_reset_token = null;\r\n }", "public function removePasswordResetToken(): void\n {\n $this->password_reset_token = null;\n }", "private function clearTokenCache()\n {\n static $tokenStreams = null;\n if (!$tokenStreams) {\n $tokenStreams = new \\ReflectionProperty(get_parent_class(), 'tokenStreams');\n $tokenStreams->setAccessible(true);\n }\n $tokenStreams->setValue($this, array());\n }", "public function resetSession() {}", "public function logout()\n {\n $this->deleteAllPersistentData();\n $this->accessToken = null;\n $this->user = null;\n $this->idToken = null;\n $this->refreshToken = null;\n }", "public function reset()\n {\n return $this->authService->reset(\n request()->input('email'),\n request()->input('token'),\n request()->input('password')\n );\n }", "public function setAccessToken($accessToken = null)\n {\n $this->accessToken = $accessToken;\n }", "public function resetState()\n {\n $this->tokeniser->resetState($this->streamState);\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken()\n {\n $this->password_reset_token = null;\n }", "public function reset(): void;", "public function removePasswordResetToken()\n {\n $this->passwordResetToken = null;\n }", "protected function resetAttemptCount()\n {\n $this->attempted = 0;\n }", "public function endSession() {\n $this->state = 0;\n $_SESSION['authstate'] = 0;\n setcookie('access_token', '', 0);\n setcookie('access_token_secret', '', 0);\n }", "public function reset(){}", "public function removePasswordResetToken()\n {\n $this->password = null;\n }", "function setApiToken ($accessToken)\n {\n $this->setAccessToken($accessToken);\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function removePasswordResetToken() {\n $this->password_reset_token = null;\n }", "public function reset()\n {\n $this->currentUser->saveLastArticleTime(0);\n }", "private function reset()\r\n {\r\n $this->last_response = null;\r\n $this->last_request = null;\r\n }", "protected function reset() {}", "protected function reset() {}", "protected function reset() {}", "public static function set_token_access() {\n if (SesLibrary::_get('_uuid') || SesLibrary::_get('_uuid') == null) {\n $param = [\n 'uri' => config('app.base_api_uri') . '/generate-token-access?deviceid=' . SesLibrary::_get('_uuid'),\n 'method' => 'GET'\n ];\n $this->__init_request_api($param);\n }\n }", "public function clearAuthorization()\n {\n // So we just get rid of the token.\n $this->clearCrucibleSession();\n }", "public function removePasswordResetTokenf()\n {\n $this->password_reset_token = null;\n }", "public function revokeAccessToken(AccessTokenInterface $token);" ]
[ "0.64313895", "0.6429764", "0.6188019", "0.59707016", "0.5963501", "0.59036446", "0.58976984", "0.588495", "0.5854429", "0.5835461", "0.5833806", "0.5816112", "0.58063775", "0.5785386", "0.57298464", "0.5699851", "0.5684128", "0.5662317", "0.5661533", "0.5653401", "0.56306547", "0.5595176", "0.5579744", "0.5530347", "0.551554", "0.547521", "0.5428997", "0.54238856", "0.54185975", "0.54057133", "0.54056203", "0.5405004", "0.5389064", "0.5383619", "0.537872", "0.537771", "0.53759784", "0.5375843", "0.53684026", "0.53684026", "0.53656924", "0.53462034", "0.5340588", "0.53254324", "0.531433", "0.53120697", "0.5298471", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.52959156", "0.5288644", "0.5283841", "0.5283603", "0.5281713", "0.5281516", "0.5281131", "0.52789533", "0.5278165", "0.5273936", "0.5273936", "0.5273936", "0.5273936", "0.5273936", "0.5273936", "0.5266316", "0.52623236", "0.525918", "0.5258928", "0.52589035", "0.52502334", "0.5243776", "0.5236385", "0.5230224" ]
0.8210493
0
checked if the cookie used is the same with the encrypted cookie
function isCookieValid($db){ $isValid = false; if(isset($_COOKIE['rememberUserCookie'])){ /** * Decode cookies and extract user ID */ $decryptCookieData = base64_decode($_COOKIE['rememberUserCookie']); $user_id = explode("abcdefABCDEF1234567890", $decryptCookieData); $userID = $user_id[1]; /** * check if id retrieved from the cookie exists in the database */ $sqlQuery = "SELECT * FROM users WHERE id = :id"; $statement = $db->prepare($sqlQuery); $statement->exectue(array(':id' => $userID)); if($row = $statement->fetch()){ $id = $row['id']; $username = $row['username']; //create the user session variable $_SESSION['id']=$id; $_SESSION['username']=$username; $isValid = true; }else{ $isValid = false; signout(); } } return $isValid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCookieSet() {}", "private function verifyCookie()\n {\n if (isset($this->cookie['auth'])\n && isset($this->cookie['userid'])\n && !empty($this->cookie['auth'])\n && !empty($this->cookie['userid'])\n && ($this->cookie['userid'] > 0)\n ) {\n $this->db->prepare('SELECT `authSalt` FROM `' . $this->config['authTable'] . '` WHERE `' . $this->config['userColumn'] . '` = ?');\n $this->db->execute(array($this->cookie['userid']), 's');\n $result = $this->db->fetch();\n\n if (!$result) {\n return false;\n }\n\n $dbHash = hash('sha256', $result['authSalt'] . $this->cookie['userid']);\n\n if ($dbHash === $this->cookie['auth']) {\n return true;\n }\n }\n return false;\n }", "public static function kapee_cookikapee_accepted() {\n\t\treturn ( isset( $_COOKIE[self::$cookie['name']] ) && strtoupper( $_COOKIE[self::$cookie['name']] ) === self::$cookie['value'] );\n\t}", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function is_cookie_set()\n {\n }", "public static function isLogged()\n {\n $session = Session::Instance();\n\n if ( empty($session->get('uid')) ) {\n return false;\n }\n\n $redis = self::redisInstance();\n\n /** get data from cookie */\n $uid = Cookie::get('uid');\n $sid = Cookie::get('sid');\n $secret = Cookie::get('secret');\n $hash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n if ($redis->get($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash) && $hash == $secret) {\n\n // Создаем новую сессию\n $auth = new Model_Auth();\n $auth->recoverById($uid);\n\n $sid = $session->id();\n $uid = $session->get('uid');\n\n $redis->delete($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash);\n\n // генерируем новый хэш c новый session id\n $newHash = self::makeHash('sha256', self::SALT . $sid . self::AUTHSALT . $uid);\n\n // меняем хэш в куки\n Cookie::set('secret', $newHash, Date::MONTH);\n\n // сохраняем в редис\n $redis->set($_SERVER['REDIS_PACKAGE'] . ':sessions:secrets:' . $hash, $sid . ':' . $uid . ':' . Request::$client_ip, array('nx', 'ex' => 2629744));\n\n } else {\n return false;\n }\n\n return true;\n }", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "function is_authed()\n{\n \n //echo \"<br/>is_authed\";\n\n if (isset($_COOKIE['cookie_username']) && isset($_COOKIE['cookie_encrypted_username']))\n\t {\n $_SESSION['username'] = $_COOKIE['cookie_username'];\n $_SESSION['encrypted_name'] = $_COOKIE['cookie_encrypted_username'];\n $_SESSION['user_id'] = $_COOKIE['cookie_user_id'];\n \n //get first and last names from db\n $user_id = $_SESSION['user_id'];\n if($user_id){\n $user_obj = new user();\n $result = $user_obj -> get(\"user_id=$user_id\");\n $_SESSION['firstname'] = $result[0]['firstname'];\n $_SESSION['lastname'] = $result[0]['lastname'];\n }\n\t }\n \n // Check if the encrypted username is the same as the unencrypted one, if it is, it hasn't been changed\n if (isset($_SESSION['username']) && (md5($_SESSION['username']) == $_SESSION['encrypted_name'])){\n return true;\n } else {\n return false;\n }\n\n}", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "function check_auth_cookie($appword,$cookexp=0,$cookiename=\"login\",$username=\"\"){\n//debug_string(\"check_auth_cookie()\");\n//debug_string(\"appword\",$appword);\n//debug_string(\"cookexp\",$cookexp);\n//debug_string(\"cookiename\",$cookiename);\n//debug_string(\"username\",$username);\n\n\t$c_data = get_cook_data($cookiename);// get the cookie data\n//debug_array(\"c_data\",$c_data);\n if (!isset($c_data)){// if no data return false\n return false;\n }\n//parse out the data in the cookie\n\t$c_username = $c_data['name'];// get the username\n//debug_string(\"c_username\",$c_username);\n//debug_string(\"mark1\");\n if (\"\"==$username){$username=$c_username;}//use cookie username if none given\n//debug_string(\"mark2\");\n\t$c_time = $c_data['time'];\n\t$c_hash = $c_data['hash'];\n\t$c_expire = $c_data ['expire'];\n//check expiration time; delete cookie and return false if expired\n//debug_string(\"c_time\",$c_time);\n//debug_string(\"c_hash\",$c_hash);\n//debug_string(\"c_expire\",$c_expire);\n//debug_string(\"mark3\");\n\tif (0!=$c_expire && $c_expire<time()){\n//debug_string(\"mark4\");\n\t\tdelete_cookie($cookiename);\n\t\treturn false;\n\t}\n//calc hash\n//debug_string(\"mark5\");\n $hash = md5($appword.$username.$c_time.$cookexp);// calculate hash \n//debug_string(\"hash\",$hash);\n//debug_string(\"c_hash\",$c_hash);\n//debug_string(\"c_username\",$c_username);\n//debug_string(\"username\",$username);\n// check hash\n//debug_string(\"mark6\");\n if(strcmp($c_username,$username)==0 && strcmp($hash,$c_hash)==0 ){\n//debug_string(\"mark7 true\");\n\n return true;\n }else{\n//debug_string(\"mark8 false\");\n return false;\n }\n//debug_string(\"mark9\");\n}", "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "function auth()\n\t{\n\t\t$_aok_ = $_COOKIE['_aok_'];\n\t\tif (isset($_aok_))\n\t\t{\n\t\t\t$query = mysql_query(\"SELECT sessionId FROM auth WHERE sessionId = '$_aok_'\");\n\t\t\tif (mysql_num_rows($query) > 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "function checkCookie($remember){\t\n\tif(isset($_COOKIE['n']) && isset($_COOKIE['e'])){\n\t\t$cookNonce = $_COOKIE['n'];\n\t\t$userEmail = $_COOKIE['e'];\n\t\t \n\t\t//connect to database to check if nonce exists\n\t\tglobal $mysqli;\n\t\t$q = \"SELECT `Nonce` FROM `Nonce_MHT` WHERE `Email` = '$userEmail'\";\n\t\t$result = $mysqli->query($q);\n\t\t \n\t\t//if nonce matches, return 1\n\t\tif ($result->num_rows == 1){ \t\t \n\t\t\t$row = $result->fetch_assoc();\n\t\t\t \n\t\t\tif ($cookNonce == $row['Nonce']){\n\t\t\t\t//Regenerate new cookie\n\t\t\t\t//createCookie($userEmail);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Invalid nonce, delete cookies\n\t\tdate_default_timezone_set('America/Toronto');\n\t\tsetcookie(\"e\", \"\", time()-60*60*24*100, \"/\");\n\t\tsetcookie(\"n\", \"\", time()-60*60*24*100, \"/\");\n\t\treturn 0;\n\t}\n\telse\n\treturn 0;\n}", "private function cookieIsValid($hash) {\n //if hash in db\n $sql = \"SELECT username, expiredate, ip FROM \".PREFIX.\"sessions WHERE hash=:hash\";\n $cookie = $this->db->select($sql, array(\":hash\" => $hash));\n $count = count($cookie);\n if ($count == 0) {\n //hash did not exists deleting cookie\n Cookie::destroy(\"auth_cookie\", $hash);\n //Cookie::destroy(\"auth_cookie\", $hash, '');\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity('UNKNOWN', \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - Hash ({$hash}) didn't exist\");\n return false;\n } else {\n $username = $cookie[0]->username;\n $db_expiredate = $cookie[0]->expiredate;\n $db_ip = $cookie[0]->ip;\n if ($_SERVER['REMOTE_ADDR'] != $db_ip) {\n //hash exists but ip is changed, delete cookie and hash\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n Cookie::destroy(\"auth_cookie\", $hash);\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity($username, \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - IP Different ( DB : {$db_ip} / Current : \" . $_SERVER['REMOTE_ADDR'] . \" )\");\n return false;\n } else {\n $expiredate = strtotime($db_expiredate);\n $currentdate = strtotime(date(\"Y-m-d H:i:s\"));\n if ($currentdate > $expiredate) {\n //cookie has expired delete cookie and cookies\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n Cookie::destroy(\"auth_cookie\", $hash);\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity($username, \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - Cookie expired ( Expire date : {$db_expiredate} )\");\n } else {\n //all ok\n return true;\n }\n }\n }\n }", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "function _tsuiseki_tracking_validate_cookie_value($cookie_data) {\n $cookie_data = (string)trim($cookie_data);\n $time = time();\n $valid = FALSE;\n if (!empty($cookie_data)) {\n $parts = _tsuiseki_tracking_extract_cookie_data($cookie_data);\n if ($parts['expiration_time'] > $time) {\n $name = (string)trim($parts['name']);\n $expiration_time = (int)$parts['expiration_time'];\n $data = (string)trim($parts['data']);\n $hmac = (string)trim($parts['hmac']);\n $key = _tsuiseki_tracking_calculate_k($name, $expiration_time, TSUISEKI_TRACKER_HMAC_KEY);\n $t_hmac = hash_hmac(TSUISEKI_TRACKER_HMAC_ALGORITHM, $name . $expiration_time . $data . session_id(), $key);\n if ($hmac === $t_hmac) {\n $valid = TRUE;\n }\n }\n }\n return $valid;\n}", "function cp_is_logged($page_to_go_if_not = false){\r\n $isLogged = (isset($_SESSION['pseudo']) && isset($_SESSION['status']));\r\n\r\n if(!$isLogged){\r\n if(isset($_COOKIE['pseudo']) && isset($_COOKIE['status']) && isset($_COOKIE['key'])){\r\n\r\n \r\n // mysqli_close($db);\r\n if(!hash_equals($_COOKIE['key'],hash('sha256',$_COOKIE['pseudo']).hash('sha256',$_COOKIE['status']))){\r\n cp_session_exit('.');\r\n }\r\n\r\n\r\n $_SESSION['pseudo'] = $_COOKIE['pseudo'];\r\n $_SESSION['status'] = $_COOKIE['status'];\r\n return true;\r\n }\r\n }\r\n if($isLogged){\r\n return true;\r\n }\r\n \r\n if(!$page_to_go_if_not){\r\n return false;\r\n }\r\n \r\n cp_session_exit($page_to_go_if_not);\r\n\r\n}", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "public function hasRememberMe()\n\t{\n return $this->cookies->has('RMU');\n }", "public function checkAuth(){\n if( isset($_COOKIE['Auth']) ) {\n $result = $this->select(array(\"hash\"=>$_COOKIE['Auth']));\n if(!empty($result)){\n return $result[0];\n } else {\n return false;\n }\n \n } else {\n return false;\n }\n }", "function check_cookie($value){\n \n}", "public function checkingManipulatedCookies($cookie){\n if($this->cookieStorage->load(self::$cookiePassword) != $cookie[0] || //coockie password\n $this->loginModel->setCookieTime() != $cookie[1] || //coockie time\n $this->cookieStorage->load(self::$cookieName) != $cookie[2] || //coockie username\n $this->getUsersBrowser() != $cookie[3] ) //users browser\n {\n return $this->returnMessages('Wrong information in cookies');\n }\n return false;\n }", "function check_cookie($p)\n{\n\tif(isset($_COOKIE['star_'.$p])) \n\t{ \n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t} \n}", "function stronghold_check_cookie( $member_id, $member_log_in_key )\n\t{\n\t\t//-----------------------------------------\n\t\t// Check...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($this->vars['cookie_stronghold']) OR ! $this->vars['cookie_stronghold'] )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$ip_octets = explode( \".\", $this->my_getenv('REMOTE_ADDR') );\n\t\t$crypt_salt = md5( $this->vars['sql_pass'].$this->vars['sql_user'] );\n\t\t$cookie = $this->my_getcookie( 'ipb_stronghold' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $cookie )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Put it together....\n\t\t//-----------------------------------------\n\t\t\n\t\t$stronghold = md5( md5( $member_id . \"-\" . $ip_octets[0] . '-' . $ip_octets[1] . '-' . $member_log_in_key ) . $crypt_salt );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check against cookie\n\t\t//-----------------------------------------\n\t\t\n\t\treturn $cookie == $stronghold ? TRUE : FALSE;\n\t}", "function is_cookie_invalid($username, $expiration, $hmac, $scheme) {\n\t\t\tglobal $wpdb;\n\t\t\t$table_name = $wpdb->prefix.InvalidateLoggedOutCookies::db_table();\n\n\t\t\t$sql = $wpdb->prepare( \"\n\t\t\t\tSELECT ID\n\t\t\t\tFROM $table_name\n\t\t\t\tWHERE username = %s\n\t\t\t\tAND expiration = %d\n\t\t\t\tAND hash = %s\n\t\t\t\tAND scheme = %s\n\t\t\t\tAND logged_out = 1\n\t\t\t\tLIMIT 1\",\n\t\t\t\t$username, $expiration, $hmac, $scheme);\n\t\t\t$row = $wpdb->get_row( $sql );\n\t\t\tif ( is_object($row) )\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "function checkLogined()\r\n{\r\n if ($_COOKIE['userName'] != \"\") {\r\n $mes=\"logined\";\r\n return $mes;\r\n }\r\n}", "function Cookies()\n{\n //en bewaar zijn antwoord in een sessievariabele\n\n\n //check of eerder al een antwoord ivm de cookies opgeslagen werd in de sessievariabele,\n //zoniet toon dan de cookies-tekst en stop de PHP code uitvoering\n\n //toon in een hidden div waarop de gebruiker geklikt heeft (cookies geaccepteerd of niet)\n\n}", "function brute_force_authorized_login()\n{\n \t// Si le cookie n'existe pas \n\tif(!isset($_COOKIE['marqueur-try-connect']))\n\t{\n\t return true ;\n\t}\n\t// Si le cookie existe\n else\n {\n // Si le temps de blocage a été dépassé\n if($_COOKIE['marqueur-try-connect'] < time())\n {\n setcookie(\"marqueur-try-connect\", \"\", 0);\n }\n \n return false ;\n }\n}", "public function check($t)\n\t{\n\t\tif ( is_null($t) )\n\t\t\t$t = '';\t\n\n\t\t\n\t\t// first 32 digits : cookie name as seen in the token string\n\t\t$cnametoken = substr($t, 0, 32);\n\t\t// real cookie name in the client\n\t\t$cname = md5('md5-cookie-name!' . $cnametoken);\n\n\t\t// get cookie value from client, compute again the token with same parameters and compare with token $t\n\t\t$c = $this->_intf->get($cname);\n\t\t$b = hash_equals($this->compute($cnametoken, $c, basename(__FILE__)), $t);\n\t\t\n\t\t// deleting form token in client\n\t\t$this->_intf->delete($cname);\n\t\treturn $b;\n\t}", "function login_check() {\n global $logvar;\n session_start();\n $obj = new Cryptography();\n\n if (isset($_SESSION[\"login_user\"])) {\n $de_log_var = $obj->decoding($_SESSION[\"login_user\"]);\n if ($de_log_var == $logvar) {\n\n return true;\n\n } else {\n\n return false;\n }\n\n } else {\n return false;\n\n }\n /*check for real user end*/\n}", "function checkToken() {\n\t\t\t// Split the token up again to make sure the first 40 chars are the same (TOKEN)\n\t\t\t$splitToken = substr($this->tokenFromCookie, 0, 40);\n\t\t\t\n\t\t\t// Split the token up again to make sure the second 40 chars are the same (ZIPPED)\n\t\t\t$splitZipped = substr($this->tokenFromCookie, 40, 40);\n\t\t\t\n\t\t\t// Unzip the second 40 chars\n\t\t\t$result = $this->unzip($splitZipped);\n\n\t\t\t// Check if the sha of the zipped portion matches the token.\n\t\t\t// If so, no one has messed with the token\n\t\t\tif(strcmp($splitToken, sha1($splitZipped) == 0)) {\n\t\t\t\t// Grab all data from unzip\n\t\t\t\t$ip = base_convert($result[0], IP_ADDRESS, 10);\n\t\t\t\t$time = base_convert($result[1], REQUEST_TIME, 10);\n\t\t\t\t$user = $result[2];\n\t\t\t\t$random = $result[3];\n\t\t\t\t$expires = substr($this->tokenFromCookie, 80, strlen($this->tokenFromCookie));\n\n\t\t\t\t// Check if token is expired after one hour\n\t\t\t\tif(time() - $expires <= 3600) {\n\t\t\t\t\tif(strpos($_SERVER['REMOTE_ADDR'], \":\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\":\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($_SERVER['REMOTE_ADDR'], \".\") !== false) {\n\t\t\t\t\t\t$userIpAddImp = implode(explode(\".\", $_SERVER['REMOTE_ADDR']));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if userIp is the same as when s/he originally logged in\n\t\t\t\t\t$validity = (strcmp($ip, $userIpAddImp) == 0) ? true : false;\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\t$validity = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$validity = false;\n\t\t\t}\n\t\t\t\n\t\t\treturn $validity;\n\t\t}", "private function getCookie() {\n $Cookie = filter_input(INPUT_COOKIE, 'useronline', FILTER_DEFAULT);\n if (!$Cookie):\n return FALSE;\n else:\n return TRUE;\n endif;\n setcookie(\"useronline\", base64_encode(\"ccs\"), time() + 86400);\n }", "function renren_user_logined() {\n global $RR_config;\n return isset($_COOKIE[$RR_config->APIKey.'_session_key']) || !empty($_COOKIE[$RR_config->APIKey.'_session_key']);\n}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "function checkCookie(){\n global $cookie;\n\n // Check database to see if a user exists with this cookie\n if (getSingleValue(\"SELECT COUNT(`id`) FROM `private_users` WHERE `cookie` ='\" . $cookie . \"' LIMIT 0 , 1\") != 1){\n // Some user has this cookie, it is valid\n return false;\n }else{\n // Nobody has this cookie, therefore it's invalid\n return true;\n }\n}", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "public function testTamperedCookiesAreReturnedAsNull()\n\t{\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$this->assertEquals('bar', Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] .= '-baz';\n\t\t$this->assertNull(Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$_COOKIE['foo'] = 'aslk'.$_COOKIE['foo'];\n\t\t$this->assertNull(Cookie::get('foo'));\n\t}", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "public function hasRememberMe()\n {\n return $this->cookies->has('RMU');\n }", "function _checkRemembered($cookie) {\n list ($username, $cookie) = @ unserialize($cookie);\n\n if (!$username or !$cookie)\n return;\n\n $sql = \"SELECT * FROM user WHERE \" .\n \"(userid = \\\"$username\\\") AND (cookie = \\\"$cookie\\\");\";\n $result = $this->db->mysql_query($sql);\n $result = mysql_fetch_object($result);\n\n // if remember-me user is found in the database, set session for the user\n if (is_object($result)) {\n $this->_setSession($result, false, true);\n } else {\n $this->_logout();\n }\n }", "public static function restore_from_cookie(){\n\t\tglobal $con;\n\t\t\n\t\tif(isset($_COOKIE['id'])){\n\t\t\t$prep = $con->prepare(\"\n\t\t\t\tSELECT user_name FROM `users`\n\t\t\t\tINNER JOIN `tokens`\n\t\t\t\t\tON token_user = user_id\n\t\t\t\tWHERE token_val = ?\n\t\t\t\t\tAND token_created_on < DATE_ADD(NOW(), INTERVAL 30 DAY)\n\t\t\t\");\n\t\t\t\n\t\t\t$prep->bind_param(\"s\", $_COOKIE['id']);\n\t\t\t\n\t\t\tif($prep->execute()) {\n\t\t\t\t$prep->bind_result($user_name);\n\t\t\t\t\n\t\t\t\tif($prep->fetch()) {\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['user-name'] = $user_name;\n\t\t\t\t\t$prep->close();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$prep->close();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$prep->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function checkCookie( $cookie )\n {\n $query = $this->db->get_where( $this->_tablename, 'cookie = \\'' . $cookie . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 ) return false;\n \n foreach( $result as $row )\n {\n $this->setSessoin( $row );\n }\n \n return true;\n }", "function checkLogin(){\n /* Check if user has been remembered */\n if(isset($_COOKIE['cookname']) && isset($_COOKIE['cookpass'])){\n $_SESSION['usernameremember'] = $_COOKIE['cookname'];\n $_SESSION['passwordremember'] = $_COOKIE['cookpass'];\n }\n\n /* Username and password have been set */\n if(isset($_SESSION['usernameremember']) && isset($_SESSION['passwordremember'])){\n /* Confirm that username and password are valid */\n if(confirmUser($_SESSION['usernameremember'], $_SESSION['passwordremember']) != 0){\n /* Variables are incorrect, user not logged in */\n unset($_SESSION['usernameremember']);\n unset($_SESSION['passwordremember']);\n return false;\n }\n return true;\n }\n /* User not logged in */\n else{\n return false;\n }\n}", "function testCookies() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we didn't send a cookie.\n\tif (strpos($page['body'], \"Cookie named 'user' is not set!\") === false)\n\t\treturn 'The cookie shouldn\\'t be set on our first page access.';\n\t\t\n\t// Get the page again.\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we sent a cookie this time.\t\t\n\tif (strpos($page['body'], \"Cookie 'user' is set!\") === false ||\n\t\tstrpos($page['body'], \"Value is: John Doe\") === false)\n\t\treturn 'The cookie should be set on our second page access.';\n\t\t\n\treturn true;\n}", "public function isEncrypted() {\n return $this->sessionData[\"encrypted\"] > 0;\n }", "private function verificar_cookie_sesion()\n\t{\n\t\t$session = \\Config\\Services::session();\n\t\t//verificar cookies\n\t\tif (isset($_COOKIE['ivafacil_admin_nick']) && isset($_COOKIE['ivafacil_admin_pa']) ) {\n\n\t\t\t$nick= $_COOKIE['ivafacil_admin_nick'];\n\t\t\t$pass=$_COOKIE['ivafacil_admin_pa'];\n\t\t\t//comparar passw hasheadas\n\t\t\t$usuarioCookie = new Admin_model();\n\t\t\t$result_pass_comparison =\n\t\t\t$usuarioCookie->where(\"nick\", $nick) \n\t\t\t->where(\"session_id\", $pass)->first();\n\n\t\t\tif (is_null($result_pass_comparison)) {\n\t\t\t\t//MOSTRAR FORM\n\n\t\t\t\treturn view(\"admin/login\");\n\t\t\t} else {\n\n\t\t\t\t//Se pidio recordar password?\n\t\t\t\tif ($result_pass_comparison->remember == \"S\") {\n\t\t\t\t\t//recuperar sesion si es valida\n\t\t\t\t\t$hoy = strtotime(date(\"Y-m-d H:i:s\"));\n\t\t\t\t\t$expir = strtotime($result_pass_comparison->session_expire);\n\t\t\t\t\tif ($hoy > $expir) return view(\"admin/login\");\n\n\t\t\t\t\t//crear sesion \n\t\t\t\t\t$newdata = [\n\t\t\t\t\t\t'nick' => $nick, \n\t\t\t\t\t\t'pass_alt' => $pass,\n\t\t\t\t\t\t'remember'=> \"S\"\n\t\t\t\t\t];\n\t\t\t\t\treturn view(\"admin/login\", $newdata);\n\t\t\t\t} else {\n\t\t\t\t\treturn view(\"admin/login\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//MOSTRAR FORM\n\t\treturn view(\"admin/login\");\n\t}", "public function hasCrypt(): bool;", "static function tokenGatekeeper() {\n $token = getInput(\"token\");\n $session_token = Cache::get(\"token\", \"session\");\n if ($token == $session_token) {\n return true;\n }\n return false;\n }", "function loginCheck(){\r\n if (session_status() == PHP_SESSION_NONE) {\r\n session_start();\r\n }\r\n\r\n if(!isset($_COOKIE['UserID'])){//may need to change this\r\n header(\"Location: ../logout.php\");//log user out even if session has user ID in case they have been tampering with cookie data, this will destroy session\r\n return false;\r\n }else{\r\n //reset session variable since user has left and it has been deleted\r\n $mysqli = getDB();\r\n $userID = getEncryptedUserIDCookie($mysqli,$_COOKIE['UserID']);\r\n $mysqli->close();\r\n\r\n if(!isset($_SESSION['UserID'])){\r\n //here is where session variable will be reinitialized\r\n /*\r\n\r\n 1.check DB for encrypted cookie, if found set session variable to corresponing userID\r\n\r\n 2.if cookie has been changed or for some other reason there is no match unset the cookie and make the user login again.\r\n\r\n if session has expired 1. will take effect if cookie has been altered 2 will happen\r\n\r\n */\r\n\r\n if($userID == -1){\r\n header(\"Location: ../logout.php\");\r\n }else{\r\n $_SESSION['UserID'] = $userID;\r\n }\r\n }else{\r\n if($userID == -1){\r\n header(\"Location: ../logout.php\");\r\n //if session is active but cookie doesnt match that of database it means user has tampered with it. Log them out.\r\n }\r\n }\r\n\r\n\r\n\r\n hasEmailCheck($_SESSION['UserID']);\r\n\r\n return true;\r\n }\r\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 has_cookie($name) {\n if (isset($this->_cookies[$name])) {\n return true;\n } else {\n return false;\n }\n }", "private function attempt_cookie_login() {\n if (isset($_COOKIE['s']) && is_string($_COOKIE['s'])) {\n @list($user_id, $token) = explode('|', base64_decode($_COOKIE['s']));\n if (isset($user_id) && isset($token)) {\n $token = $this->attempt_token_login($user_id, $token);\n if ($token) {\n $this->save_login($token);\n return true;\n }\n }\n }\n\n return false;\n }", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "protected function isLogin()\n {\n $skey = \\Web\\Config\\Auth::$prefix . $this->sessionId;\n if (\\Web\\Config\\Auth::$username != $this->gdata($skey)) {\n return false;\n }else{\n $this->gexpire($skey, \\Web\\Config\\Auth::$expire);\n return true;\n }\n }", "function verifyCookies()\n\t{\n\t\tif (isset($_COOKIE['cookieUserName']))\n\t\t{\n\t\t\techo json_encode(array('cookieUserName' => $_COOKIE['cookieUserName']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Cookie not set yet\n\t\t die(json_encode(errors(417)));\n\t\t}\n\t}", "function check_login($password)\r\n{\r\n\t// Check for the delicios cookie!\r\n\tif(isset($_COOKIE['mytasks_pw']))\r\n\t{\r\n\t\tif($_COOKIE['mytasks_pw'] == md5($password))\r\n\t\t{\r\n\t\t\t// Hey, this is the right cookie! Let's eat it, nomnomnom!\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t// Password is set, but it's wrong! It's fake! Poisonous! Kill it with fire!\r\n\t\t\tlogout();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t} else {\r\n\t\t// No password set :(\r\n\t\treturn false;\r\n\t}\r\n}", "public function isSecure()\n {\n $base_hmac_str = $this->getTime() . $this->decodedCookie->s->a . $this->getScore() . $this->getUuid() . $this->getVid();\n\n /* hmac string with ip - for backward support */\n $hmac_str_withip = $base_hmac_str . $this->pxCtx->getIp() . $this->pxCtx->getUserAgent();\n\n /* hmac string with no ip */\n $hmac_str_withoutip = $base_hmac_str . $this->pxCtx->getUserAgent();\n\n if ($this->isHmacValid($hmac_str_withoutip, $this->getHmac()) or $this->isHmacValid($hmac_str_withip, $this->getHmac())) {\n return true;\n }\n\n return false;\n }", "public function setSecret() {\r\n $rand = $this->psl['crypt/rand'];\n\n $this->secret = $rand->bytes(32);\r\n $cookieParam = session_get_cookie_params();\r\n setcookie(\r\n $this->keyCookie,\r\n base64_encode($this->secret),\r\n $cookieParam['lifetime'],\r\n $cookieParam['path'],\r\n $cookieParam['domain'],\r\n $cookieParam['secure'],\r\n $cookieParam['httponly']\r\n );\r\n return true;\r\n }", "function checkUserAuth()\n{\n\t$link = dbConnect();\n\n\tif (!isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\t$output = \"Access Denied. Please login.\";\n\t\tsetcookie(\"csp1_jag13047_cookie4\", $output, 0, \"/CSE4707/prj1jag13047/\", \"localhost\"); \n\t\theader('Location: ../html/error.html.php');\n\t}\n\telse\n\t{\n\t\t#$uname = $_COOKIE['csp1_jag13047_cookie1'];\n\t\t$uname = decryptUsername();\n\t\t$ip = $_COOKIE['csp1_jag13047_cookie2'];\n\t\t$seckey = $_COOKIE['csp1_jag13047_cookie3'];\n\t\t$query = \"SELECT * FROM cookie_information WHERE username = '{$uname}' and IP = '{$ip}'\";\n\t\t$result = mysqli_query($link, $query);\n\n\t\tif (!$result) \n\t\t{ \n\t\t $output = 'Error fetching rows: ' . mysqli_error($link); \n \t \t setcookie(\"csp1_jag13047_cookie4\", $output, 0, \"/CSE4707/prj1jag13047/\", \"localhost\"); \n \t \t header('Location: ../html/error.html.php');\n \t \t exit(); \n\t\t}\n\n\t\t$row = mysqli_fetch_array($result);\n\t\tif($row['security_key'] == $seckey)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output = 'Authentication Error';\n\t\t\tsetcookie(\"csp1_jag13047_cookie4\", $output, 0, \"/CSE4707/prj1jag13047/\", \"localhost\"); \n \t \t\theader('Location: ../html/error.html.php');\n \t \t\texit(); \n\t\t}\n\t}\n}", "public function hasQueueingCookie(): bool;", "function getCookie($key)\n{\n $key = str_rot13(\"$key\");\n if(isset($_COOKIE[\"$key\"])) return str_rot13($_COOKIE[\"$key\"]);\n return \"\";\n}", "function exists() {\n $this->log .= \"exists() called<br />\";\n if (!isset($_COOKIE['sid'])) {\n $this->log .= \"sid cookie does not exist.<br />\";\n return false;\n }\n $this->id = $_COOKIE['sid'];\n $this->filename = $this->dir.\"sid_\".$this->id;\n return true;\n }", "function checkLoginPageAuth()\n{\n\tif(isset($_COOKIE['csp1_jag13047_cookie3']))\n\t{\n\t\theader('Location: ../html/user.html.php');\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "function PMA_cookie_cmp(&$a, $b)\n {\n return (strcmp($a[1], $b[1]));\n }", "public function resume() {\n \n if (!isset($_COOKIE) || !\\array_key_exists($this->name, $_COOKIE)) {\n\n //coookie prob expired\n $this->forget();\n return false;\n }\n\n\n\n if (!$this->sessionStarted()) {\n\n if (\\session_start()) {\n $this->refresh();\n }\n }\n if (!$this->isFingerprint()) { //UA doesnt match\n $this->forget();\n return false;\n }\n\n return true;\n }", "public function is_cookie_login_name()\n {\n return true;\n }", "protected function validateRememberMeCookie()\r\n\t{\r\n\t\t$cookieValue = $this->getCookie()->getValue();\r\n\r\n\t\tif (!$cookieValue) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$triplet = PersistentTriplet::fromString($cookieValue);\r\n\r\n\t\tif (!$triplet->isValid()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "function exists() {\r\n\t\t$this->log .= \"exists() called<br />\";\r\n\t\tif (!isset($_COOKIE['sid'])) {\r\n\t\t $this->log .= \"sid cookie does not exist.<br />\";\r\n\t\t return false;\r\n\t\t}\r\n\t\t$this->id = $_COOKIE['sid'];\r\n\t\t$this->filename = $this->dir.\"sid_\".$this->id;\r\n\t\treturn true;\r\n\t}", "protected function cookie_authenticate()\n {\n if ( !empty( $_COOKIE[ USER_COOKIE ] ) \n && !empty( $_COOKIE[ PASS_COOKIE ] )\n ) {\n try {\n $this->authenticate(\n $_COOKIE[ USER_COOKIE ],\n $_COOKIE[ PASS_COOKIE ],\n true\n );\n return true;\n } catch ( Exception $e ) {\n // TODO\n }\n }\n return false;\n }", "function isLogged()\n\t{\n\t\t//проверяем наличие в куки данных\n\t\tif (array_key_exists('login_id', $_COOKIE) and is_string($_COOKIE['login_id']) //проверка на массив\n\t\t\tand\n\t\t\tarray_key_exists('token', $_COOKIE) and is_string($_COOKIE['token'])\n\t\t) {\n\t\t\t$loginID = (int)$_COOKIE['login_id'];\n\t\t\t$token = (string)$_COOKIE['token'];\n\t\t\t$loginMapper = new LoginMapper($this->pdo);\n\t\t\t//проверяем наличие id (серии) токена в бд\n\t\t\t$hash = $loginMapper->getHash($loginID);\n\t\t\t//делаем что-то только если хэш найден в базе\n\t\t\tif ($hash != false) {\n\t\t\t\t//если хэши из бд и куки совпали\n\t\t\t\tif (hash_equals($hash, hash('sha256', $token))) {\n\t\t\t\t\t//пользователь обладает нужными данными - он залогинен\n\t\t\t\t\t$this->islogged = true;\n\t\t\t\t} else {\n\t\t\t\t\t//пользователь дал нужный айди, но провалил проверку пароля => воровство\n\t\t\t\t\t$this->islogged = false;\n\t\t\t\t}\n\n\t\t\t} else $this->islogged = false;\n\n\t\t} else $this->islogged = false;\n\n\t\treturn $this->islogged;\n\t}", "public function loginViaCookies()\r\n {\r\n $cookieValues = $this->getCookieValues();\r\n\r\n if (!$cookieValues) {\r\n return false;\r\n }\r\n\r\n $loginResult = false;\r\n\r\n switch ($this->storage->findTriplet($cookieValues[0], $cookieValues[1] . $this->tokenGenerator->getSalt(), $cookieValues[2] . $this->tokenGenerator->getSalt())) {\r\n\r\n case Storage\\StorageInterface::TRIPLET_FOUND:\r\n $expire = time() + $this->expireTime;\r\n $newToken = $this->tokenGenerator->generate();\r\n $this->storage->replaceTriplet($cookieValues[0], $newToken . $this->tokenGenerator->getSalt(), $cookieValues[2] . $this->tokenGenerator->getSalt(), $expire);\r\n $this->cookie->setCookie($this->cookieName, implode(\"|\", array($cookieValues[0], $newToken, $cookieValues[2])), $expire);\r\n $loginResult = $cookieValues[0];\r\n break;\r\n\r\n case Storage\\StorageInterface::TRIPLET_INVALID:\r\n $this->cookie->setCookie($this->cookieName, \"\", time() - $this->expireTime);\r\n $this->lastLoginTokenWasInvalid = true;\r\n\r\n if ($this->cleanStoredTokensOnInvalidResult) {\r\n $this->storage->cleanAllTriplets($cookieValues[0]);\r\n }\r\n\r\n break;\r\n }\r\n return $loginResult;\r\n }", "function is_logged_in() {\n\tif( !isset($_COOKIE['1337h4x0rz']) ) {\n\t\techo \"Fails on isset <br />\";\n\t\treturn FALSE;\n\t}\n\n\tlist($userId, $ts, $hash) = explode(\"|\", $_COOKIE[\"1337h4x0rz\"], 3);\n\t$timeStamp = (int) $ts;\n\n\tif( $timeStamp <= time() && $timeStamp > time() - THIRTY_DAYS /*1 month === 30 days*/ ) {\n\t\t$password = get_password($userId);\n\n\t\t// if there is no user found with that id\n\t\tif($password === FALSE) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// if the hash is not valid\n\t\tif($hash !== sha1($userId . $timeStamp . $password . OVERKILL_SECURITY_CHECK_STRING )) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $userId;\n\t}\n\techo \"Timestamp check fails\";\n\treturn FALSE;\n}", "function check_login(){\n\t\tif(!empty(yii::app()->request->cookies['uid']) && !empty(yii::app()->request->cookies['pass'])){\n\t\t\n\t\t\t//get the user's email\n\t\t\t$email=get_user_by_id(yii::app()->request->cookies['uid'])->email;\n\t\t\t\n\t\t\t//log the user in\n\t\t\tif($this->user_login($email,yii::app()->request->cookies['pass'],true)){\n\t\t\t\t//renew cookies for n days more\n\t\t\t\t$this->remember_login(yii::app()->request->cookies['pass'],true);\n\t\t\t}\n\t\t}\n\t}", "function logged_in(){\n\n // if the user loging session is active return true \n // otherwise the user needed to reenter the critentials\n if(isset( $_SESSION['email']) || isset($_COOKIE['email'])){\n\n return true ;\n\n }\n else\n {\n\n return false; \n }\n }", "public function test_public_getCookies_SameUrl()\n {\n // Verify that our cookie is available.\n $cookies = $this->object->getCookies($this->serviceUrl_1);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "public function get_cookie_decrypt($name){\n\t\t$this->load->helper('cookie');\n\t\tif ($this->input->cookie($name,true)!=NULL) {\n\t\t\techo $this->openssl('decrypt',$this->input->cookie($name,true));\n\t\t}else{\n\t\t\techo \"no cookie\";\n\t\t}\n\t}", "public function test_protected_storeCookie_WithDuplicates()\n {\n\t$headers = array('Set-Cookie: SID=\"hello world\"; path=/');\n $cookiesToSet = $this->object->parseCookieHeaders($headers, 'service.example.com');\n $this->object->storeCookie($cookiesToSet[0]);\n\n $headers = array('Set-Cookie: SID=\"goodbye world\"; path=/');\n $cookiesToSet = $this->object->parseCookieHeaders($headers, 'service.example.com');\n $this->object->storeCookie($cookiesToSet[0]);\n\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertInternalType('array', $cookies);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('goodbye world', $cookies['SID']);\n }", "function checkLogin() {\n /* Check if user has been remembered */\n if (isset($_COOKIE['cook_VenusetP_UserEmail']) && isset($_COOKIE['cook_Venueset_UserPassword'])) {\n $varUserEmail = $_COOKIE['cook_VenusetP_UserEmail'];\n $varUserPassword = $_COOKIE['cook_Venueset_UserPassword'];\n /* Confirm that username and password are valid */\n $arrUserFlds = array('pkUserID', 'UserEmail', 'UserPassword', 'UserFirstName');\n $varUserWhere = ' 1 AND UserEmail = \\'' . $varUserEmail . '\\' AND UserPassword = \\'' . md5(trim($varUserPassword)) . '\\'';\n //echo '<pre>';print_r($varUserWhere);exit;\n $arrUserList = $this->select(TABLE_USERS, $arrUserFlds, $varUserWhere);\n if (count($arrUserList) > 0) {\n /* $_SESSION['VenusetP_UserEmail'] = $arrUserList[0]['UserEmail'];\n $_SESSION['VenusetP_UserID'] = $arrUserList[0]['pkUserID'];\n $_SESSION['VenusetP_UserName'] = $arrUserList[0]['UserFirstName']; */\n }\n return true;\n } else {\n return false;\n }\n }", "function cookie_login($conn)\n {\n if (!isset($_SESSION['signed_in']))\n { \n if(isset($_COOKIE[\"new\"]) && isset($_COOKIE[\"pass\"]))\n {\n $email=test_input($_COOKIE[\"new\"]);\n\t $pass=$_COOKIE[\"pass\"];\n $sql= \"select email from users where email='$email' and password='$pass'\";\n $result = $conn->query($sql);\n if ($result->num_rows > 0) \n {\n\t $_SESSION['signed_in']=$email;\n }\n \n }\n\n }\n }", "public function deserialize()\n {\n // only deserialize once\n if ($this->decodedCookie !== null) {\n return true;\n }\n\n if ($this->pxConfig['encryption_enabled']) {\n $cookie = $this->decrypt();\n } else {\n $cookie = $this->decode();\n }\n $cookie = json_decode($cookie);\n if ($cookie == null) {\n return false;\n }\n\n if (!isset($cookie->t, $cookie->s, $cookie->s->b, $cookie->u, $cookie->v, $cookie->h)) {\n return false;\n }\n\n $this->decodedCookie = $cookie;\n\n return true;\n }", "function validate_auth_cookie( $user_id, $cookie ) {\n\t\tif ( wp_validate_auth_cookie( $cookie, 'logged_in' ) == $user_id ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function is_logged_in() {\r\n\tglobal $db;\t\r\n\r\n\tif( isset( $_SESSION['hyr'] ) ) {\r\n\t\treturn true;\r\n\t}\r\n\telseif( isset( $_COOKIE['hyr'] ) ) {\r\n\r\n\t\tlist($username, $password) = explode('|', $_COOKIE['hyr'] );\r\n\t\t\r\n\t\t$result = mysql_query(\"SELECT id, user, password FROM users WHERE user='$username' AND password='$password'\");\r\n\t\tif( $result ) {\r\n\t\t\t$error = 'Error: ' . mysql_error();\r\n\t\t\t$_SESSION['test'] = $error;\r\n\t\t}\r\n\t\t\r\n\t\t$row = mysql_num_rows( $result );\r\n\t\t\r\n\t\tif( $row != 0 ) {\r\n\r\n\t\t\t$login = mysql_fetch_array( $result );\r\n\t\t\t\r\n\t\t\t$_SESSION['hyr'] = true;\r\n\t\t\t$_SESSION['user_id'] = $login['id'];\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\treturn true;\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n}", "function validaSession(){\n\tif(!isset($_COOKIE['id'])){\n\t\t//@header(\"location:login\");\n\t\treturn false;\n\t}else{\n\t\t\n\t\treturn true;\n\t}\n}", "function wpgplus_get_cookie($name) {\n\t$my_cookie = get_transient('wpgplus_cookie_'. $name);\n\t// wpgplus_debug(\"\\nCookie is \" . print_r($my_cookie,true) . \"\\n\");\n\t// Cookies which have an expiration date and it is passed should not be returned\n\tif(!$my_cookie || ((!empty($my_cookie->expires)) && ($my_cookie->expires < time()))) {\n\t\t//wpgplus_debug(\"\\nNo cookies found for \". $name . \"\\n\");\n\t\treturn false;\n\t} else {\n\t\t//wpgplus_debug(\"\\nGetting cookie for \". $my_cookie->name . \"\\n\");\n\t\treturn $my_cookie;\n\t}\n}", "public function isCookieHttpOnly()\n {\n return $this->_cookieHttpOnly;\n }", "function wp_validate_auth_cookie($cookie = '', $scheme = '')\n {\n }", "function checkUserLogined(){\n if(@$_SESSION['userId']==''&&$_COOKIE['userId']==''){\n messageTips(\"请先登录\",\"login.php\");\n exit;\n }\n}", "function isUserLoggedIn()\n{\n\tstatic $_is_logged_in = false;\n\n\tif(isset($_COOKIE[$GLOBALS['c_email']]) && isset($_COOKIE[$GLOBALS['c_hash']])) {\n\t\t\n\t\tif ($_is_logged_in === false) {\n\t \n\t\t $cookie_uname = validateInput($_COOKIE[$GLOBALS['c_email']]);\n\t\t $cookie_hash = $_COOKIE[$GLOBALS['c_hash']];\n\n\t\t if (isValidEmailAddress($cookie_uname) === false) {\n\t\t // return false;\n\t\t $_is_logged_in = false;\n\t\t }\n\n\t\t $db = new db_util();\n\n\t\t $sql = \"SELECT * FROM vm_users WHERE user_email='$cookie_uname'\";\n\t\t $result = $db->query($sql);\n\n\t\t if ($result !== false) {\n\t\t // if there any error in sql then it will false\n\t\t if ($result->num_rows > 0) {\n\t\t // if the sql execute successful then it give \"num_ruws\"\n\n\t\t $row = $result->fetch_assoc();\n\t\t $twoPassHash = hash('sha512', $row['user_password']);\n\n\t\t if ($cookie_uname . $twoPassHash == $cookie_hash) {\n\t\t // return true;\n\t\t $_is_logged_in = true;\n\t\t }\n\t\t }\n\t\t }\n\t }\n\t}\n\n return $_is_logged_in;\n}", "function isCookieValid( $db ) {\n\n\t$isValid = false;\n\n\tif ( isset( $_COOKIE['rememberUserCookie']) ) {\n\n\t\t/**\n\t\t * Decode cookies and extract user ID\n\t\t */\n\t\t$decryptCookieData = base64_decode( $_COOKIE['rememberUserCookie'] );\n\t\t$user_id = explode( \"UaQteh5i4y3dntstemYODEC\", $decryptCookieData );\n\t\t$userID = $user_id[1];\n\n\t\t/**\n\t\t * check if id retrieved from the cookie exist in the database\n\t\t */\n\t\t$sqlQuery = \"SELECT * FROM users WHERE id = :id\";\n\t\t$statement = $db->prepare($sqlQuery);\n\t\t$statement->execute( array( ':id' => $userID) );\n\n\t\tif ( $row = $statement->fetch() ) {\n\n\t\t\t$id = $row['id'];\n\t\t\t$username = $row['username'];\n\n\t\t\t/**\n\t\t\t * Create the user session variable\n\t\t\t */\n\t\t\t$_SESSION['id'] = $id;\n\t\t\t$_SESSION['username'] = $username;\n\t\t\t$isValid = true;\n\n\t\t}else {\n\t\t\t/**\n\t\t\t * cookie ID is invalid destroy session and logout user\n\t\t\t */\n\t\t\t$isValid = false;\n\t\t\tsignout();\n\t\t}\n\n\t}\n\n\treturn $isValid;\n}", "function cemhub_campaign_tracking_use_cookie_instead_session() {\n return (bool)variable_get('cemhub_cookies_enabled');\n}", "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "function is_logged()\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. we'll need the information from the cookies.\n $id = array_key_exists('id', $_COOKIE) ? $_COOKIE['id'] : 0;\n $auth_code = array_key_exists('auth_code', $_COOKIE) ? $_COOKIE['auth_code'] : '';\n\n // 3. Protect variables to avoid any SQL injection\n $id = mysqli_real_escape_string($link, $id);\n $auth_code = mysqli_real_escape_string($link, $auth_code);\n $expiration = mysqli_real_escape_string($link, time());\n\n // 4. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT user_id\n FROM tbl_user_auth\n WHERE\n user_id = {$id} AND\n auth_code = '{$auth_code}' AND\n expiration > {$expiration}\n \");\n\n // 5. Disconnect from the database.\n disconnect($link);\n\n // 6. There should only be one row, or FALSE if nothing.\n return mysqli_num_rows($result) == 1;\n }" ]
[ "0.6714111", "0.67138165", "0.66813517", "0.6663355", "0.66002077", "0.65192115", "0.6462233", "0.64327425", "0.6417164", "0.6415013", "0.63827664", "0.635519", "0.635519", "0.63541013", "0.63356435", "0.6334229", "0.6322053", "0.63122267", "0.62944686", "0.62944686", "0.62798923", "0.62745", "0.6244801", "0.62446076", "0.62445974", "0.6236048", "0.62144", "0.62088686", "0.619811", "0.61382616", "0.61305475", "0.6117481", "0.6112256", "0.61118674", "0.6111308", "0.6093491", "0.6082915", "0.60776657", "0.6067896", "0.60598975", "0.60590374", "0.60109967", "0.60005254", "0.5981061", "0.59783185", "0.5978021", "0.59700805", "0.59552014", "0.59549", "0.59515744", "0.59252626", "0.59208536", "0.5913399", "0.58773506", "0.58710337", "0.58654934", "0.58612007", "0.5853174", "0.5852632", "0.5840676", "0.5837789", "0.5827666", "0.580746", "0.57938796", "0.57917374", "0.57862115", "0.5780583", "0.5775662", "0.5774181", "0.5774108", "0.5773167", "0.57680404", "0.57642365", "0.5758106", "0.5752713", "0.5742317", "0.5735753", "0.57278836", "0.5727686", "0.57235265", "0.5722406", "0.5720709", "0.5707229", "0.5694077", "0.5684114", "0.567577", "0.56647986", "0.56646127", "0.56620604", "0.56506544", "0.56407684", "0.5634191", "0.5632519", "0.5626639", "0.5622191", "0.5616673", "0.56151754", "0.5600689", "0.5596023", "0.5585825" ]
0.58298075
61
Get the batch history
public function getHistory() { return $this->history; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHistory()\n {\n return $this->history;\n }", "function get_history() {\n\t\treturn $this->history;\n\t}", "public function fetchHistory(): array;", "public function getHistory()\n {\n return $this->_history;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getHistory(): array\n {\n return $this->history;\n }", "public function getStepHistory();", "public function getHistory()\n\t{\n\t\t$log = $this->getLog();\n\t\t$history = array($this->initial);\n\t\t/* if our log is empty (or incorrect), then we cannot walk it at all */\n\t\tif (!isset($log[$this->initial]))\n\t\t\treturn $history;\n\t\t$next = $log[$this->initial]->next_action_id;\n\t\t/* log always has the latest entry,\n\t\t\t so build it walking to the next item,\n\t\t\t starting from the initial step */\n\t\twhile (!is_null($next)) {\n\t\t\t$history[] = $next;\n\t\t\tif (isset($log[$next])) {\n\t\t\t\t$next = $log[$next]->next_action_id;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $history;\n\t}", "public function getLogHistory() {\n\t\treturn $this->log;\n\t}", "public function getBreakHistory()\n {\n return $this->get(self::_BREAK_HISTORY);\n }", "public function getQueryHistory(): array\n {\n return $this->History;\n }", "protected function getDatastreamHistory() {\n return $this->repository->api->m->getDatastreamHistory($this->parent->id, $this->id);\n }", "public function getHistory() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->history;\n }", "function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}", "public function getRawHistory()\n {\n return $this->raw_history;\n }", "function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}", "public function getQueryHistory(): array;", "public function getHistory() {\n\n if ($this->history) {\n return $this->history;\n }\n\n if (file_exists(static::FILE_HISTORY)) {\n\n $history = file_get_contents(static::FILE_HISTORY);\n\n if (file_exists($history)) {\n return $history;\n }\n }\n }", "public function getIdHistory()\n {\n return $this->idHistory;\n }", "public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }", "public function event_history(/* ... */)\n {\n return $this->_event_history;\n }", "public function history()\n\t{\n\t\t$migration = new \\Hubzero\\Content\\Migration();\n\t\t$history = $migration->history();\n\t\t$items = [];\n\t\t$maxFile = 0;\n\t\t$maxUser = 0;\n\t\t$maxScope = 0;\n\n\n\t\tif ($history && count($history) > 0)\n\t\t{\n\t\t\t$items[] = [\n\t\t\t\t'File',\n\t\t\t\t'By',\n\t\t\t\t'Direction',\n\t\t\t\t'Date'\n\t\t\t];\n\n\t\t\tforeach ($history as $entry)\n\t\t\t{\n\t\t\t\t$items[] = [\n\t\t\t\t\t$entry->scope . DS . $entry->file,\n\t\t\t\t\t$entry->action_by,\n\t\t\t\t\t$entry->direction,\n\t\t\t\t\t$entry->date\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$this->output->addTable($items, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->addLine('No history to display.');\n\t\t}\n\t}", "public static function getAllHistory()\n\t{\n\t\tglobal $mysql;\n\t\t$output = array();\n\t\t\n\t\t$result = $mysql->query(\"SELECT * FROM `history`\");\n\t\twhile ( $d = mysqli_fetch_array($result) )\n\t\t{\n\t\t\tif ( !empty($d) )\n\t\t\t\t$output[] = $d;\n\t\t}\n\t\treturn $output;\n\t}", "public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }", "public function getHistory()\n {\n return Wrapper\\Player\\Senior::history($this->getId());\n }", "public function getRecipeHistory()\n {\n $recipe_ids = $this->getAttribute('recipe_history', array());\n return RecipePeer::retrieveByPKs($recipe_ids);\n }", "public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}", "#[Pure]\n public function getHistory() {}", "public function getBatches()\n {\n return $this->batches;\n }", "public function history()\n\t{\n\t\t$res = $this->hasManyThrough(Revision::class, RevisionSet::class, 'id', 'revision_set_id', 'revision_set_id')\n\t\t\t->where(\n\t\t\t\tfunction ($query) {\n\t\t\t\t\treturn $query->where('revisions.created_at', '<', $this->created_at);\n\t\t\t\t})\n\t\t\t->select('revisions.id', 'revisions.title', 'revisions.created_at', 'revisions.layout_name', 'revisions.layout_version');\n\t\treturn $res;\n\t}", "public function get_history()\n\t{\n return array(\n 'result' => array(\n 'error' => array(\n 'code' => '404',\n 'message' => 'Not Found'\n )\n )\n );\n\t}", "public function getHistoryStrings(): array\n {\n return $this->historyAsStrings;\n }", "public function actionHistory()\n {\n /*$auditdata = AuditTrailSearch::find()\n ->select(['entry_id', 'model_id', 'user_id', 'created', 'old_value'])\n ->where([\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event',\n ])\n ->andFilterWhere(['>', 'old_value', \"''\"])\n ->orderBy(['model_id' => SORT_DESC])\n ->all();*/\n// $historyData = \\yii\\helpers\\ArrayHelper::map($auditdata, 'model_id', 'old_value');\n// \\yii\\helpers\\VarDumper::dump($historyData);\n\n $searchModel = new AuditTrailSearch;\n $searchFilter = [\n 'AuditTrailSearch' => [\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event'\n ]\n ];\n $dataProvider = $searchModel->search(\\yii\\helpers\\ArrayHelper::merge(Yii::$app->request->get(), $searchFilter));\n //var_dump(Yii::$app->request->get());\n //\\yii\\helpers\\VarDumper::dump($searchModel);\n $message = \"<ol>恢复操作指引<li><删除内容>中输入内容筛选</li><li>点击复选框选中需要恢复的记录</li><li>点击<恢复记录>按钮</li></ol>\";\n Yii::$app->session->setFlash('info', $message);\n return $this->render('history', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }", "public function actionCron_jobs_history()\n {\n $request = Yii::app()->request;\n $model = new ConsoleCommandListHistory('search');\n $model->unsetAttributes();\n\n $model->attributes = (array)$request->getQuery($model->modelName, array());\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('cronjobs', 'View cron jobs history'),\n 'pageHeading' => Yii::t('cronjobs', 'View cron jobs history'),\n 'pageBreadcrumbs' => array(\n Yii::t('cronjobs', 'Cron jobs history'),\n )\n ));\n\n $this->render('cron-jobs-history', compact('model'));\n }", "public function GetHistoryInfo()\n\t{\n\t if ($this->m_Stateless == \"Y\")\n\t return;\n\t if (!$this->m_NoHistoryInfo)\n\t {\n\t $histInfo[] = $this->m_RecordId;\n $histInfo[] = $this->m_CurrentPage;\n $histInfo[] = $this->m_SearchRule;\n $histInfo[] = $this->m_SortRule;\n\t return $histInfo;\n\t }\n\t return null;\n\t}", "public function history()\n\t{\n\t\treturn $this->morphMany('History', 'historable');\n\t}", "public function getBatch()\n {\n return $this->_batch;\n }", "public function testGetHistoricBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function cmn_history()\r\n\t{\r\n $content = $this->input->get(\"content\") ? trim($this->input->get(\"content\", TRUE)) : \"\";\r\n $start = $this->input->get(\"start\") ? trim($this->input->get(\"start\", TRUE)) : \"\";\r\n $end = $this->input->get(\"end\") ? trim($this->input->get(\"end\", TRUE)) : \"\";\r\n $date_arr = \"\";\r\n if (! empty($start) || ! empty($end))\r\n {\r\n $this->load->helper(\"common\");\r\n $date_arr = make_date_start_before_end($start, $end);\r\n }\r\n\r\n\t\t$limit = $this->_get_limit();\r\n\t\t$history = $this->model->get_cmn_history($limit, $content, $date_arr);\r\n\r\n\t\tif ( empty($history))\r\n\t\t\t$this->meret(NULL, MERET_EMPTY);\r\n\t\telse\r\n\t\t\t$this->meret($history);\r\n\t}", "public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }", "public function getHistory($where,$table)\n {\n return $this->db->get_where($table, $where);\n }", "public function getNewUniqueStatHistory()\n\t{\n\t\treturn $this->new_stat_history;\n\t}", "protected function getHistoryRecord() {\n\t\tif (!$this->model->isNew()) {\n\t\t\t/** @var HasHistory $model */\n\t\t\t$model = $this->model->getStoredCopy();\n\n\t\t\t// Using stored copy, in order to safeguard partial representations of\n\t\t\t// existing models.\n\t\t\t$this->historyRecord = $model->getHistory();\n\t\t}\n\n\t\tif (empty($this->historyRecord)) {\n\t\t\t$this->historyRecord = $this->createHistoryRecord();\n\t\t}\n\n\t\treturn $this->historyRecord;\n\t}", "public function viewHistory() {\n $historyRows = $this->db->query(\"SELECT * FROM history\");\n if (!$historyRows) die(\"Fatal Error.\");\n\n // Looping through all rows in the histoy table.\n $history = [];\n foreach($historyRows as $historyRow) {\n $regNr = htmlspecialchars($historyRow[\"regNr\"]);\n $ssNr = htmlspecialchars($historyRow[\"ssNr\"]);\n $checkOut = htmlspecialchars($historyRow[\"checkOutTime\"]);\n $checkIn = htmlspecialchars($historyRow[\"checkInTime\"]);\n $days = htmlspecialchars($historyRow[\"days\"]);\n $cost = htmlspecialchars($historyRow[\"cost\"]);\n\n // Setting 0 as default value on days and cost if car not checked in yet.\n if (!$checkIn) {\n $checkIn = \"Checked Out\";\n $days = 0;\n $cost = 0;\n }\n \n $histor = [\"regNr\" => $regNr,\n \"ssNr\" => $ssNr, \n \"checkOut\" => $checkOut,\n \"checkIn\" => $checkIn, \n \"days\" => $days,\n \"cost\" => $cost,\n \"days\" => $days];\n \n $history[] = $histor;\n }\n return $history;\n }", "public function testGetHistoricBatches()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getFullHistory($id)\n {\n $data = [];\n if (!$id) {\n throw new InputException(__('Id required'));\n }\n /** @var OrderInterface $entity */\n $order = $this->_objectManager->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($id);\n if (!$order->getEntityId()) {\n throw new NoSuchEntityException(__('Requested entity doesn\\'t exist'));\n }\n\n $history = [];\n foreach ($order->getAllStatusHistory() as $orderComment) {\n $history['order'][] = $this->_prepareHistoryItem(\n $orderComment->getStatusLabel(),\n $orderComment->getIsCustomerNotified(),\n $orderComment->getCreatedAt(),\n $orderComment->getComment()\n );\n }\n\n foreach ($order->getCreditmemosCollection() as $_memo) {\n $history['memo'][] = $this->_prepareHistoryItem(\n __('Credit memo #%1 created', $_memo->getIncrementId()),\n $_memo->getEmailSent(),\n $this->getOrderAdminDate($_memo->getCreatedAt())\n );\n\n foreach ($_memo->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Credit memo #%1 comment added', $_memo->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getShipmentsCollection() as $_shipment) {\n $history['shipment'][] = $this->_prepareHistoryItem(\n __('Shipment #%1 created', $_shipment->getIncrementId()),\n $_shipment->getEmailSent(),\n $_shipment->getCreatedAt()\n );\n\n foreach ($_shipment->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Shipment #%1 comment added', $_shipment->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getInvoiceCollection() as $_invoice) {\n $history['invoice'][] = $this->_prepareHistoryItem(\n __('Invoice #%1 created', $_invoice->getIncrementId()),\n $_invoice->getEmailSent(),\n $_invoice->getCreatedAt()\n );\n\n foreach ($_invoice->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Invoice #%1 comment added', $_invoice->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getTracksCollection() as $_track) {\n $history['tracking'][] = $this->_prepareHistoryItem(\n __('Tracking number %1 for %2 assigned', $_track->getNumber(), $_track->getTitle()),\n false,\n $_track->getCreatedAt()\n );\n }\n\n $data[] = $history;\n\n return $data;\n }", "public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }", "public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }", "private function getRollbackList(int $batch): array\r\n {\r\n $listRs = DB::table('migrations')->select('id', 'migration')\r\n ->where('batch', $batch)\r\n ->orderBy('id', 'desc')\r\n ->get();\r\n $return = array();\r\n foreach ($listRs as $v) {\r\n $return[] = [\r\n 'id' => $v->id,\r\n 'migration' => $v->migration,\r\n ];\r\n }\r\n return $return;\r\n }", "private function getHistory()\n {\n $history = [];\n\n foreach ($this->getResponse()->data as $k => $v) {\n $history[$k]['tanggal'] = Utils::setDate($v->Tanggal);\n\n switch ($v->StatusInternal) {\n case 'Baru':\n $history[$k]['posisi'] = preg_replace('/Diterima di Sales Counter (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Manifest Pickup':\n $posisi = preg_replace('/Di pickup oleh petugas (.*)/', '$1', $v->TrackStatusNama);\n $history[$k]['posisi'] = $posisi;\n $this->kotaPengirim = strtoupper($posisi);\n break;\n\n case 'Serah Terima Pickup':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Moda Angkutan':\n $history[$k]['posisi'] = preg_replace('/Pengiriman dari (.*) ke (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Surat Muatan':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Manifest':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Surat Jalan Kurir':\n $history[$k]['posisi'] = preg_replace('/Proses pengantaran oleh kurir (.*), (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Terkirim/Diterima':\n $history[$k]['posisi'] = 'Diterima';\n $this->tanggalTerima = $v->Tanggal;\n $this->namaPenerima = preg_replace('/Diterima oleh (.*)\\((.*)/', '$1', $v->TrackStatusNama);\n break;\n\n default:\n $history[$k]['posisi'] = null;\n break;\n }\n\n $history[$k]['message'] = $v->TrackStatusNama;\n }\n\n return $history;\n }", "public function getBatch()\n {\n return isset($this->batch) ? $this->batch : null;\n }", "protected function _getHistory($addressHistoryMode = FALSE){\n $result = array(\n 'operations' => array()\n );\n $address = $this->getParam(0, FALSE);\n if($address){\n $address = strtolower($address);\n }\n if((!$address && $addressHistoryMode) || ((FALSE !== $address) && (!$this->db->isValidAddress($address)))){\n $this->sendError(104, 'Invalid address format');\n }\n $maxLimit = is_array($this->defaults) && isset($this->defaults['limit']) ? $this->defaults['limit'] : 10;\n $options = array(\n 'type' => $this->getRequest('type', FALSE),\n 'limit' => min(abs((int)$this->getRequest('limit', 10)), $maxLimit),\n );\n if(FALSE !== $address){\n $options['address'] = $address;\n }\n if(FALSE !== $this->getRequest('timestamp', FALSE)){\n $options['timestamp'] = (int)$this->getRequest('timestamp');\n }\n if($addressHistoryMode){\n $token = $this->getRequest('token', FALSE);\n if(FALSE !== $token){\n $token = strtolower($token);\n if(!$this->db->isValidAddress($token)){\n $this->sendError(104, 'Invalid token address format');\n }\n $options['token'] = $token;\n }\n $options['history'] = TRUE;\n }\n $operations = $this->db->getLastTransfers($options);\n if(is_array($operations) && count($operations)){\n for($i = 0; $i < count($operations); $i++){\n $operation = $operations[$i];\n $res = array(\n 'timestamp' => $operation['timestamp'],\n 'transactionHash' => $operation['transactionHash'],\n 'tokenInfo' => $operation['token'],\n 'type' => $operation['type'],\n 'value' => $operation['value'],\n );\n if(isset($operation['address'])){\n $res['address'] = $operation['address'];\n }\n if(isset($operation['from'])){\n $res['from'] = $operation['from'];\n $res['to'] = $operation['to'];\n }\n $result['operations'][] = $res;\n }\n }\n return $result;\n }", "public function getStatusHistories();", "function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\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 : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}", "public function getBatches($data);", "public function getItemHistorysAt($offset)\n {\n return $this->get(self::_ITEM_HISTORYS, $offset);\n }", "public function get_user_history(){\n \t$s = \"SELECT * FROM user_history WHERE username = ? group by ETF order by Date ASC\";\n \tif($stmt = $this->connection->prepare($s)){\n \t\t$stmt->bind_param(\"s\", $_SESSION['username']);\n \t\t$stmt->execute();\n \t\t$res = $stmt->get_result();\n \t\twhile($row = $res->fetch_object()){\n \t\t\t$history[] = $row;\n \t\t}\n \t\treturn $history;\n \t}\n \t \t\n }", "public function getUserHistory()\n {\n try {\n $history = array();\n $hasHistory = $this->coreSession->getHistory();\n if (!$hasHistory) {\n $history['productHistory'] = array();\n $history['lastVisitedCategory'] = array(\n 'name' => null,\n 'link' => null\n );\n } else {\n $latestViewedProducts = $this->coreSession->getUserViewedProducts();\n $productHistory = array();\n if (!empty($latestViewedProducts)) {\n $productList = array_unique(explode(',', $latestViewedProducts));\n foreach ($productList as $productId) {\n $productHistory[] = $this->getProductInformation($productId);\n }\n }\n\n $history['productHistory'] = $productHistory;\n $history['lastVisitedCategory'] = $this->getLastVisitedcategory();\n }\n\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n $history = array(\n 'productHistory' => array(),\n 'lastVisitedCategory' => array(\n 'name' => null,\n 'link' => null\n )\n );\n }\n\n return $history;\n }", "public function userHistory() {\n\t\t[ $response, $error ] = $this->api('user/history');\n\n\t\tif($error) return $this->response($response, $error);\n\n\t\treturn $this->response($response['links']);\n\t}", "public function actionHistory()\n {\n $id = Yii::app()->request->getQuery('id');\n $model = Order::model()->findByPk($id);\n\n if (!$model)\n $this->error404(Yii::t('CartModule.admin', 'ORDER_NOT_FOUND'));\n if ($model->is_deleted)\n throw new CHttpException(404, Yii::t('CartModule.admin', 'ORDER_ISDELETED'));\n $this->render('_history', array(\n 'model' => $model\n ));\n }", "public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }", "public function actionHistory()\n {\n $model= User::findOne(['id' => Yii::$app->user->identity->getId()]);\n $orders = Order::find()->where(['id_user' => $model->id])->with('orderProds')->orderBy('date DESC')->all();\n return $this->render('history', [\n 'model' => $model,\n 'orders' => $orders,\n 'page' => SmapPages::find()->where(['id_class'=>4,'alias' => 'history'])->one()\n ]);\n }", "function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}", "public function getRequestsHistory()\n {\n /** @var \\App\\User $user */\n $user = auth()->user();\n\n $requestsHistory = RequestsHistory::where('user_id', $user->id)\n ->orderBy('created_at', 'asc')\n ->get();\n\n $result = response()->view('requests-history.history_table',\n ['requestsHistory' => $requestsHistory],\n Response::HTTP_OK\n );\n\n return $result;\n }", "public function fetch($sessionId)\n {\n // Create query to find the distinct history\n $query = $this->db->createQueryBuilder();\n $query->select('l.name')\n ->from('location', 'l')\n ->join('l', 'history', 'h', 'l.locationId = h.locationId')\n ->where('h.sessionId = :sessionId')\n ->setParameter('sessionId', $sessionId)\n ->groupBy('l.name')\n ->orderBy('MAX(h.timestamp)', 'DESC');\n\n // Execute the query\n $stmt = $query->execute();\n\n // Fetch the rows\n $history = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $history;\n }", "public function history()\n {\n $streams = Auth::user()->streams()\n // Select 1st chunk created_at\n // Select last chunk created_at\n ->with(['firstChunk', 'lastChunk'])\n ->orderBy('id', 'desc')\n ->paginate();\n\n return view('streams_history', ['streams' => $streams]);\n }", "public function getChanges();", "public function getChanges();", "public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}", "public function getMarketHistory() {\n\n\t\t$response = $this->noCfCURLQuery( \"https://bittrex.com/api/v1.1/public/getmarkethistory?market={$this->pair}\" );\n\t\t$response = json_decode( $response, true );\n\t\tif ( $response['success'] ) {\n\t\t\treturn $response['result'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getBatchActions(): array;", "function getHistory(){\r\n\t\t// pobranie informacji o poprzedniej erze\r\n\t\t$zapytanie=\"select * from historia_koalicje where nr_ery = (select max(nr_ery) from historia_koalicje) and nazwa='\".$this->getName().\"';\";\r\n\t\t$historia=mysql_query($zapytanie)or Die(\"ups :)\");\r\n\t\tif(mysql_num_rows($historia)>0){\r\n\t\t\t$wiersz_h->dane=mysql_fetch_array($historia);\r\n\t\t\t$wiersz_h->czyJest='ok';\r\n\t\t}else{\r\n\t\t\t$wiersz_h->czyJest=false;\r\n\t\t}\r\n\t\treturn $wiersz_h;\r\n\t}", "public function getAllHistoricFilterEntries() {\n $historicFilterDataClass = new HistoricFilterData();\n $allHistoricFilterDataObjects = $historicFilterDataClass -> readHistoricFilter();\n $allHistoricFilterData = array();\n\n foreach ($allHistoricFilterDataObjects as $historicFilterArray) {\n $historicFilterObject = new HistoricFilter($historicFilterArray['idHistoricFilter'], stripcslashes($historicFilterArray['historicFilterName']), $historicFilterArray['dateStart'], $historicFilterArray['dateEnd'], stripcslashes($historicFilterArray['description']), $historicFilterArray['buttonColor']);\n\n array_push($allHistoricFilterData, $historicFilterObject);\n }\n return $allHistoricFilterData;\n }", "public function getHistoryCount() {\n return count($this->getHistory());\n }", "public function getPaymentHistory(){\r\n\t\t$result = array();\r\n\t\treturn $result;\r\n\t}", "public function getRealTimeHistory()\n {\n // Get Acquisitions Data\n if (!$this->hasILS()) {\n return [];\n }\n try {\n return $this->ils->getPurchaseHistory($this->getUniqueID());\n } catch (ILSException $e) {\n return [];\n }\n }", "public function getLastSaved(){\n return [];\n }", "public function history(): morphMany\n {\n return $this->morphMany(History::class, 'historable');\n }", "public function export(){\n\n return json_encode($this->history);\n \n }", "public function getLog()\n\t{\n\t\t$models = CWizardLog::model()->forSession($this->session)->findAll();\n\t\tfor ($log = array(); list(, $model) = each($models);\n\t\t $log[$model->action_id] = $model) ;\n\t\tif (!count($log))\n\t\t\t$log = array(new CWizardLog);\n\t\treturn $log;\n\t}", "protected function populateDatastreamHistory() {\n if ($this->datastreamHistory === NULL) {\n $this->datastreamHistory = $this->getDatastreamHistory();\n }\n }", "static function getJobHistory( $numberOfDays, $maxNumRecords = null ) {\n\n // include those records from the given number of days\n global $wpdb;\n $resultset = $wpdb->get_results($wpdb->prepare(\n \"SELECT job_id, classname, status, start_date, end_date\n FROM wp_lh_jobs\n WHERE IFNULL(last_updated_date, created_date) > NOW() - INTERVAL %d DAY\n ORDER BY job_id DESC \" . \n ($maxNumRecords != null ? \"LIMIT $maxNumRecords\" : \"\"), $numberOfDays));\n\n $jobHistories = array();\n foreach( $resultset as $record ) {\n $jobHistories[$record->job_id] = $record;\n }\n return $jobHistories;\n }", "public function getEntityRenderHistory() {\n if (empty($this->entityRenderHistory)) {\n $this->entityRenderHistory = \\Drupal::service('views_exclude_previous.render_history');\n }\n return $this->entityRenderHistory;\n }", "public function getHistory() {\n $rentalModel = new RentalModel($this->db);\n\n try {\n $rentals = $rentalModel->getAll();\n } catch (\\Exception $e) {\n $properties = ['errorMessage' => 'Error getting rental history.'];\n return $this->render('error.twig', $properties);\n }\n\n $properties = [\"rentals\" => $rentals];\n return $this->render('history.twig', $properties);\n }", "function get_batch($batch_id)\n {\n return $this->db->get_where('batch',array('batch_id'=>$batch_id))->row_array();\n }", "private function get_user_history() {\n\n\t\t// Grab user history from the current session\n\t\t$session_history = it_exchange_get_session_data( 'user_history' );\n\n\t\t// If user has an established history, return that\n\t\tif ( isset( $session_history ) && ! empty( $session_history ) ) {\n\t\t\treturn (array) $session_history;\n\n\t\t// Otherwise, return an array with the original referrer\n\t\t} else {\n\t\t\t$referrer = isset( $_SERVER['HTTP_REFERER'] )\n\t\t\t\t? $_SERVER['HTTP_REFERER']\n\t\t\t\t: __( 'Direct Traffic', 'LION' );\n\n\t\t\treturn array( array( 'url' => $referrer, 'time' => time() ) );\n\t\t}\n\n\t}", "function get_history_ambil_paket(){\r\n\t\t$dapaket_dpaket = isset($_POST['dapaket_dpaket']) ? $_POST['dapaket_dpaket'] : 0;\r\n\t\t$start = (integer) (isset($_POST['start']) ? $_POST['start'] : $_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? $_POST['limit'] : $_GET['limit']);\r\n\t\t//$result = $this->m_master_ambil_paket->get_history_ambil_paket($dpaket_master,$dpaket_paket,$start,$end);\r\n\t\t$result = $this->m_master_ambil_paket->get_history_ambil_paket($dapaket_dpaket,$start,$end);\r\n\t\techo $result;\r\n\t}", "function history() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n\n if ($id > 0) {\n $query = \"select * from videos where id in (select video_id from history where user_id=$id group by video_id order by view_date desc);\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n }\n }", "function get_all_batch($params = array())\n {\n $this->db->order_by('batch_id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('batch')->result_array();\n }", "public function taskhistory(){\n\n // SQL statement\n $sql = \"SELECT user_id FROM user WHERE user_name = '\".$_SESSION['user'].\"'\";\n $result = $this->con->query($sql);\n $result = $result->fetch_assoc();\n $id = $result['user_id'];\n\n\n // Get Task History Based on user ID\n\n // SQL statement\n $sql = \"SELECT * FROM approval WHERE user_id = '\".$id.\"' ORDER BY date DESC LIMIT 10\";\n $result = $this->con->query($sql);\n if ($result->num_rows > 0){\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }", "public function actionHistory()\n {\n $this->pageTitle = 'Your Viewing History';\n\n $data['pageHistory'] = History::model()->all('page');\n $data['pdfHistory'] = History::model()->all('pdf');\n\n $this->render('//content/history', $data);\n }", "public function testDeleteHistoricBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function stock_history(){\n\t\treturn $stock_info = $this->db->select('*')\n\t\t ->from('store')\n\t\t ->where('isactive',1)\n\t\t ->get()\n\t\t ->result();\n\t}", "public function getHistory($controller)\n {\n $sql = 'select count(*) c, s.name choice from gamelog ' .\n 'inner join sign s on computer_choice = s.id group by computer_choice order by computer_choice;';\n\n $computerArray = $this->query($controller, $sql, true);\n\n $sql = 'select count(*) c, s.name choice from gamelog ' .\n 'inner join sign s on player_choice = s.id group by player_choice order by player_choice;';\n\n $humanArray = $this->query($controller, $sql, true);\n\n return ['human' => $humanArray, 'computer' => $computerArray];\n }", "public function getResourceId()\n {\n return 'HistoryLogChanges';\n }", "public function getHistory($id){\n\t\t$myissues = Issues::find_by_sql(\"SELECT * FROM issues WHERE issue_mem_id=\".$id);\n\t\treturn $myissues;\n\t}", "function getBatchObj()\n\t\t{\n\t\t\treturn $this->BatchObj;\n\t\t}", "public function actionGetChatHistory(){\n header(\"content-type:application/json\");\n $data = array();\n if(isset($_GET['chat_from']) && isset($_GET['chat_to'])){\n $sql = \"SELECT * \n FROM chat\n WHERE (TRIM(chat_from) = '\".trim($_GET['chat_from']).\"' AND TRIM(chat_to) = '\".$_GET['chat_to'].\"') \n OR (TRIM(chat_to) = '\".trim($_GET['chat_from']).\"' AND TRIM(chat_from) = '\".$_GET['chat_to'].\"')\n ORDER BY chat_id DESC\n\t\t\t\t\t\".(isset($_GET['offset']) ? \"OFFSET \".$_GET['offset'] : \"\").\"\n LIMIT 10\";\n $loadDatas = Yii::app()->db->createCommand($sql)->queryAll();\n if(count($loadDatas) > 0){\n\t\t\t\tforeach($loadDatas AS $i => $val){\n\t\t\t\t\t$data[$i] = $val;\n\t\t\t\t\t$data[$i]['user_1'] = $val['chat_from'];\n\t\t\t\t\t$data[$i]['user_2'] = $val['chat_to'];\n\t\t\t\t}\n }\n }\n $encode = CJSON::encode($data);\n echo \"jsonCallback(\".$encode.\")\";\n Yii::app()->end();\n }", "public function filterHistory($id)\n {\n return $this->legalEntityRepository->getHistoryData($id); \n }", "public function scopeGetHistory($query, $model)\n {\n \t$class = class_basename(get_class($model));\n\n \treturn $query\n \t\t->where('type_id', $model->id)\n \t\t->where('type', $class);\n }" ]
[ "0.74262446", "0.74169755", "0.7376191", "0.73581314", "0.73498124", "0.73498124", "0.7290355", "0.72162133", "0.7142417", "0.69719785", "0.68925184", "0.68900967", "0.6832276", "0.68256617", "0.679343", "0.67659026", "0.67343724", "0.6709853", "0.6642699", "0.6619283", "0.6606059", "0.6604395", "0.65248555", "0.6512871", "0.6433017", "0.6358314", "0.63419807", "0.63308424", "0.63139194", "0.62707067", "0.6183935", "0.6174643", "0.616641", "0.6165515", "0.6147356", "0.6135031", "0.612056", "0.60837287", "0.6069051", "0.60671616", "0.6062863", "0.60420203", "0.6018853", "0.5998135", "0.5981051", "0.59793335", "0.5975701", "0.5975701", "0.5973994", "0.59591573", "0.59419954", "0.5925269", "0.5781288", "0.57811195", "0.5761336", "0.57598746", "0.57433206", "0.5742347", "0.57351905", "0.57193476", "0.57066685", "0.5693854", "0.56921697", "0.5670485", "0.5662159", "0.565253", "0.56361115", "0.56361115", "0.56167", "0.56153506", "0.5601371", "0.5594933", "0.558481", "0.55795205", "0.55776465", "0.5576927", "0.55736274", "0.55724084", "0.554929", "0.5541679", "0.5541038", "0.55402213", "0.554006", "0.5532512", "0.55295175", "0.55144", "0.5510876", "0.5510862", "0.550947", "0.55058235", "0.54962367", "0.5492931", "0.5480233", "0.5466477", "0.545157", "0.54408497", "0.54408056", "0.5428384", "0.5426565", "0.54253674" ]
0.7440319
0
Clear the batch history
public function clearHistory() { $this->history = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearHistory() {}", "public function erase_history()\n {\n $this->_event_history = [];\n }", "public function clear()\n {\n $this->batch = [];\n }", "public function clearHistorys()\n\t{\n\t\t$this->collHistorys = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function reset()\n {\n $this->values[self::_ITEM_HISTORYS] = array();\n }", "public function reset()\n {\n $this->values[self::_EXCAVATE_HISTORY] = array();\n }", "protected function cleanHistory()\n\t{\n\t\t$this->taskHistoryRepository->deleteOlderThanDays($this->maxHistoryDays);\n\t\t$this->taskHistoryRepository->deleteOverCount($this->maxHistoryRecords);\n\t}", "public function test_clear_batches() {\n\t\t$this->register_successful_batch( 'hello' );\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 1, $batches );\n\n\t\tlocomotive_clear_existing_batches();\n\t\t$batches = locomotive_get_all_batches();\n\t\t$this->assertCount( 0, $batches );\n\t}", "function erase_history()\n{\n return XPSPL::instance()->erase_history();\n}", "public function cleanHistory()\n\t\t{\n\t\t\t$result = pg_query(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t'delete from history where date_from < (CURRENT_TIMESTAMP - interval \\'1 month\\')');\n\t\t}", "public function clear()\n {\n $this->log = [];\n }", "public function reset()\n {\n $this->cbuff = [];\n }", "function clearHistoryData(){\n\tdeleteAllFiles('/home/dingz/exp5/output/ubm_gmm/scores/nonorm/eval/*');\n\t$scoresevalfile = '/home/dingz/exp5/output/ubm_gmm/scores/nonorm/scores-eval';\n\tif(file_exists($scoresevalfile))\n\t\tunlink($scoresevalfile);\n\t#echo \"delete scores-eval file\";\n\tdeleteAllFiles('/home/dingz/exp5/tmp/ubm_gmm/models/eval/*');\n\tdeleteAllFiles('/home/dingz/exp5/tmp/ubm_gmm/scores/zt_norm_A/eval/*');\n}", "public function clear() {\n\t\t$this->_where\t\t= array();\n\t\t$this->_order\t\t= array();\n\t\t$this->_isAddingNew\t= false;\n\t\t$this->_currentRow\t= 0;\n\t\t$this->_relationship\t= array();\n\t\t$this->_recordset\t= array();\n\t\t$this->_updateBuffer\t= array();\n\t\t$this->_limit\t\t= NULL;\n\t\t$this->_offset\t\t= NULL;\n\t\t$this->isDirty( false );\n\t}", "public function clearState() {}", "public function reset()\n {\n $this->values[self::_GUILD_LOG] = array();\n }", "public function clearlogAction()\n {\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n $bizlogModel = new Core_Model_Bizlog;\n $bizlogModel->deleteAllEntries();\n $this->_helper->FlashMessenger('Cleared log');\n $this->_helper->redirector('viewlog', 'status', 'admin');\n }", "public function reset()\r\n {\r\n $this->_session->remove($this->_branchKey);\r\n $this->_session->remove($this->_stepsKey);\r\n $this->_session->remove($this->_timeoutKey);\r\n }", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset();", "public function reset(): void\n {\n $this->set([]);\n }", "public function reset(){}", "public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }", "private function clear_log()\n {\n if ($this->_log && is_array($this->_log)) {\n $this->_log = array();\n }\n }", "public function clear_log() {\n\t\tglobal $wpdb;\n\n\t\t$tableprefix = $wpdb->prefix;\n\n\t\t$simple_history_table = self::DBTABLE;\n\t\t$simple_history_context_table = self::DBTABLE_CONTEXTS;\n\n\t\t// Get number of rows before delete.\n\t\t$sql_num_rows = \"SELECT count(id) AS num_rows FROM {$tableprefix}{$simple_history_table}\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$num_rows = $wpdb->get_var( $sql_num_rows, 0 );\n\n\t\t// Use truncate instead of delete because it's much faster (I think, writing this much later).\n\t\t$sql = \"TRUNCATE {$tableprefix}{$simple_history_table}\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$wpdb->query( $sql );\n\n\t\t$sql = \"TRUNCATE {$tableprefix}{$simple_history_context_table}\";\n\t\t// phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t$wpdb->query( $sql );\n\n\t\tHelpers::get_cache_incrementor( true );\n\n\t\treturn $num_rows;\n\t}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function reset() {}", "public function flushlogs()\n\t{\n\t\t$this->deleteAll(array('1 = 1'));\n\t}", "public function testDeleteHistoricBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "private function clear_saved_xml_history()\n {\n $_result = FALSE;\n \n // Save history file full path\n $_filename = preg_replace(\"@\\/|\\\\\\@\", self::DS, getenv(self::ENV_VAR)) . SELF::DS . self::HISTORY_FILE;\n \n $this->add_to_log(__FUNCTION__, \"Clear xml history log\");\n \n if (file_exists($_filename)) {\n if (unlink($_filename)) {\n $this->add_to_log(__FUNCTION__, \"XML history log file deleted. file: $_filename\");\n $_result = TRUE;\n }\n }\n }", "function removeHistory()\n {\n $db = eZDB::instance();\n $orderID = (int)$this->OrderNr;\n $db->query( \"DELETE FROM ezorder_status_history WHERE order_id=$orderID\" );\n }", "public function clearAll();", "public function clearAll();", "public function reset()\n {\n $this->values[self::_LINE] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_STATUS] = null;\n $this->values[self::_TASK_TARGET] = null;\n }", "public function reset()\n {\n $this->values[self::_LAST_CHANGE] = null;\n $this->values[self::_TODAY_TIMES] = null;\n }", "function clearState() ;", "public function clearMemo()\n {\n $this->listMemo = [];\n }", "public function reset()\n\t{\n\t\t$this->queries = [];\n\t\t$this->count = [\n\t\t\t'total' => 0, 'slow' => 0, 'select' => 0, 'insert' => 0, 'update' => 0, 'delete' => 0, 'other' => 0\n\t\t];\n\n\t\t$this->modelsActions = [];\n\t\t$this->modelsCount = [\n\t\t\t'retrieved' => [], 'created' => [], 'updated' => [], 'deleted' => []\n\t\t];\n\n\t\t$this->nextQueryModel = null;\n\t}", "public function CleanHistoryInfo()\n\t{\n\t $this->m_RecordId = null;\n $this->m_CurrentPage = 1;\n $this->m_SearchRule = null;\n $this->m_SortRule = null;\n $this->m_NoHistoryInfo = true;\n\t}", "public function rewindHistory();", "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 flushBatch()\n\t{\n\t\tif ($this->batching)\n\t\t{\n\t\t\t$this->batching = FALSE;\n\t\t\t\n\t\t\t$this->statpro->endBatch();\n\t\t}\n\t}", "public function clearAll() {}", "function undo()\n {\n $this->document->eraseLast();\n }", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear();", "public function clear() {}", "public function clear() {}", "public function clear() {}", "public function clear() {}", "protected function discardUndo()\n\t{\n\t\t$this->undoArray = array();\n\t}", "function clean($history = false)\n{\n return XPSPL::instance()->clean($history);\n}", "public function clearAllCommand()\n {\n $this->eventRepository->removeAll();\n $this->eventSourceRepository->removeAll();\n }", "protected static function clearState() {}", "public function reset() : void\n {\n $this->_modified = [];\n $this->_errors = [];\n }", "public function clean($history = false)\n {\n $storages = [\n self::HASH_STORAGE, self::COMPLEX_STORAGE, self::INTERRUPT_STORAGE\n ];\n foreach ($storages as $_storage) {\n if (count($this->_storage[$_storage]) == 0) continue;\n foreach ($this->_storage[$_storage] as $_index => $_node) {\n if ($_node[1] instanceof Handle && $_node[1]->is_exhausted() ||\n $_node[1] instanceof Queue && $this->queue_exhausted($_node[1])) {\n unset($this->_storage[$_storage][$_index]);\n if ($history) {\n $this->erase_signal_history(\n ($_node[0] instanceof signal\\Complex) ?\n $_node[0] : $_node[0]->info()\n );\n }\n }\n }\n }\n }", "private function clearLog() {\n $this -> log = array();\n $this -> log[\"success\"] = array();\n $this -> log[\"failure\"] = array();\n }", "public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_START_BAT] = null;\n $this->values[self::_END_BAT] = null;\n $this->values[self::_RESET] = null;\n $this->values[self::_DRAW_REWARD] = null;\n }", "public function reset(): void\n {\n $this->data = [];\n }", "public function reset(): void;" ]
[ "0.78067863", "0.7727706", "0.7478689", "0.73747796", "0.6943168", "0.6910923", "0.6788837", "0.6619707", "0.6585738", "0.6566311", "0.64597607", "0.64114946", "0.64042985", "0.63591176", "0.6358566", "0.6307073", "0.629841", "0.6264602", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.62280047", "0.6219727", "0.6193685", "0.6189541", "0.6186223", "0.61738276", "0.61680615", "0.61680615", "0.61680615", "0.61680615", "0.61680615", "0.61680615", "0.61680615", "0.61677665", "0.61677665", "0.61677665", "0.6155912", "0.6155506", "0.61363506", "0.6120323", "0.6102788", "0.6102788", "0.6099048", "0.6095588", "0.6088544", "0.60828745", "0.6073826", "0.606445", "0.6059587", "0.60474575", "0.60352665", "0.6024332", "0.60172486", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.60110253", "0.6008168", "0.6008168", "0.6008168", "0.6008168", "0.60049415", "0.5999841", "0.5991974", "0.59917045", "0.5979178", "0.5967054", "0.59584856", "0.595511", "0.5951947", "0.594681" ]
0.7937457
0
Define static to avoid connecting more than once
function db_connect() { static $connection; //Check the connection if (!isset($connection)){ $config = parse_ini_file('./db/config.ini'); $connection = mysqli_connect($config['localhost'],$config['username'],$config['password'],$config['dbname']); } //for everything else that goes wrong if ($connection == false){ return mysqli_connect_error(); } return $connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect() {\r\n static $conn;\r\n if ($conn === NULL){ \r\n $conn = mysqli_connect('localhost','root','','socialnetwork');\r\n }\r\n return $conn;\r\n}", "protected static function setConnection(){\n static::$conn = connection\\DBconnect::makeInstance();\n }", "private static function getConnection(){\n\t\tself::$cnx = Connect::conn();\n\n\t}", "static function connect(): void;", "static function init(){\n if (!self::$conn) {\n $KEYS = new Keys();\n $hostname = $KEYS->DATABASE_HOST;\n $dbname = $KEYS->DATABASE_NAME;\n $username = $KEYS->DATABASE_USERNAME;\n $password = $KEYS->DATABASE_PASSWORD;\n $db = $db = ($KEYS->DATABASE_TYPE == \"\")? \"mysql\": $KEYS->DATABASE_TYPE;\n $port = $port = ($KEYS->DATABASE_PORT == \"\")? \"\": \"port={$KEYS->DATABASE_PORT};\";\n \n self::$conn = null;\n \n try {\n self::$conn = new PDO(\"{$db}:host={$hostname};{$port}dbname={$dbname}\", $username, $password);\n self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $exception) {\n Response::send(null, 500, \"Connection error: \" . $exception->getMessage());\n }\n }\n }", "protected function connect() {}", "function __construct() {\r\n\r\n\t\t$this->link = @mysql_connect(SQL_HOST, SQL_LOGIN, SQL_PASSE);\r\n\t // or Database::busy();\r\n\t\tif ($this->link) {\r\n\t\t \tif (!@mysql_select_db (SQL_DBASE)) {\r\n\t\t\t\t$this->link = FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//or Database::busy();\r\n\t}", "function GetSqlConnection()\n{\n global $config;\n static $conn = null;\n \n if(!is_null($conn)) \n {\n //echo \"Repeat Connection<br>\";\n return $conn;\n }\n \n //echo \"New Connection<br>\";\n $conn = new mysqli(\n $config[\"db\"][\"host\"], \n $config[\"db\"][\"username\"],\n $config[\"db\"][\"password\"],\n $config[\"db\"][\"dbname\"]);\n \n if ($conn->connect_error) {\n log_error(\"databaselib.php->GetSqlConnection\", \n array(\"Database Connection failed.\", $conn->connect_error));\n die(\"Database Connection failed: \" . $conn->connect_error);\n }\n return $conn;\n}", "static public function getConnection()\n {\n return self::call(__FUNCTION__ , func_get_args());\n }", "private static function get_connect(){\n static::$db = pg_connect(static::$host . \" \" . static::$port . \" \" . static::$database . \" \" . static::$user . \" \" . static::$pass);\n }", "public static function connection() \n {\n \n // if static variable isn't defined or is null, try to make the connection again\n if (!isset(CouchbaseConnect::$cb) || CouchbaseConnect::$cb == NULL) {\n return CouchbaseConnect::connect();\n }\n \n return CouchbaseConnect::$cb;\n }", "function ConnectStatic(){\r\n\t\t$conn = mysql_connect(\"localhost\",\"root\",\"\") or die(\"Loi ket noi !\");\r\n\t\tmysql_query(\"SET NAMES 'UTF8'\",$conn);\r\n\t\tmysql_select_db(\"webvexe\",$conn);\r\n\t\treturn $conn;\r\n\t}", "function __construct()\n\t{\n\t\t// Set connection and store it in self::$link\n\t\tself::$link = Connection::setConnect();\n\t}", "function db_connect(){\n static $db;\n if( $db === null){\n $db = new PDO('mysql:host=localhost;dbname=WMI TEst','root','');\n $db ->exec('SET NAMES UTF8');\n return $db;\n }\n\n}", "public function __constructor() {\n //la variabile debug mi distingue i casi online o offline\n \n //return $this->getConnection();\n }", "public abstract function Connect();", "public function get_connection()\n {\n }", "static public function init() {\n }", "abstract protected function connect();", "abstract protected function connect();", "abstract protected function connect();", "public function __construct(){\n\n // If the connection to server has already been made this will return a instance without creating a new connection to the server\n if(!isset(static::$serverConnection)) {\n\n // If connection to server is not established, new connection will be made and instance will be stored in $serverConnection property\n $dbConnection = new DBConnect();\n static::$serverConnection = $dbConnection->serverInstance();\n }\n\n // Will return the instance of the database aka server connection\n return static::$serverConnection;\n }", "abstract function getConnect();", "public static function connect(){\n\t\t\t$mysql = $_ENV['database']['mysql'];\n\n\t\t\t# Connect to mysql\n\t\t\tself::$con = mysql_connect($mysql['host'], $mysql['username'], $mysql['password']);\n\t\t\tmysql_select_db($mysql['dbname']);\n\n\t\t\t# Pass the table along\n\t\t\tself::$table = static::$table;\n\n\t\t\t# \n\t\t\tif (empty(self::$table)) :\n\n\t\t\t\tself::$table = strtolower(basename(str_replace(\"\\\\\", \"/\", get_called_class())));\n\n\t\t\tendif; \n\n\t\t}", "public static function initialize(){\n self::getInstance();\n }", "private function __construct()\n \n {\n $config = Config::getConfig(); // set singleton config object\n $host = $this->host = Config::getKeys('host');\n $user = $this->username = Config::getKeys('username');\n $password = $this->password = Config::getKeys('password');\n $database = $this->db = Config::getKeys('db');\n $this->newConnection($host, $user, $password, $database);\n // return $dbid; //dbid to the registrey\n \n }", "function dbconnect() {\n\tstatic $con;\n\n\tdefine('DB_SERVER','localhost');\n\tdefine('DB_USERNAME','clandust_dk');\n\tdefine('DB_PASSWORD','Euro2018');\n\tdefine('DB_NAME','clandust_dk');\n\n\t$con = new mysqli(DB_SERVER,DB_USERNAME,DB_PASSWORD,DB_NAME);\n\n\t//check conneciton\n\tif($con === false){\n\t\treturn mysqli_connect_error();\n\t}\n\n\treturn $con;\n}", "final public function p_connect() {\n \t$this->connect('', '', '', '', true);\n \t}", "static function getConnect()\r\n {\r\n /**\r\n * VERIFICA SE A VARIAVEL ESTATICA QUE SEGURA A CONEXAO ESTA NULA, CASO\r\n * NAO SEJA NULA, ISSO EQUIVALE À UMA VARIAVEL QUE JA POSSUI UM OBJETO COM\r\n * CONEXAO COM O BANCO\r\n */\r\n if (self::$con == null) {\r\n /**\r\n * FAZ INSTANCIA DA CLASSE DATABASE\r\n */\r\n $data = new Database();\r\n /**\r\n * CHAMA O METODO QUE ATRIBUI À VARIAVEL ESTATICA UM OBJETO DE\r\n * CONEXAO COM O BANCO\r\n */\r\n $data->connect();\r\n }\r\n\r\n /**\r\n * RETORNA O OBJETO DE CONEXAO COM O BANCO\r\n */\r\n return self::$con;\r\n }", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "private function _connect() {\r\n\t\t$this->sql = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t\t$this->sql2 = mysql_connect(\r\n\t\t\t$this->dataSource->config['host'],\r\n\t\t\t$this->dataSource->config['login'],\r\n\t\t\t$this->dataSource->config['password']\r\n\t\t);\r\n\t}", "function __construct() {\n if(is_null(self::$instance)) {\n $this->dbName = Config::get('database.name');\n $this->connect();\n $this->setPrefix(Config::get('database.prefix'));\n self::$instance = [\n 'link' => $this->link,\n 'db' => $this->dbName,\n 'prefix' => $this->prefix\n ];\n } else {\n $this->link = self::$instance['link'];\n $this->dbName = self::$instance['db'];\n $this->setPrefix(self::$instance['prefix']);\n }\n }", "public static function getDefaultConnection()\n {\n }", "public static function Instance()\n {\n // until $connection is null until it is set for the first time\n static $connection = null;\n\n // so if $connection is null, then lets set it\n if ($connection === null) {\n\n try {\n\n // we connect to the database via the constants loaded at the start\n $connection = new PDO(\n 'mysql:host='. MY_DATABASE_HOSTNAME .';dbname='. MY_DATABASE_DATABASE .';charset=utf8', \n MY_DATABASE_USERNAME, // username\n MY_DATABASE_PASSWORD // password\n );\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n \n } catch (PDOException $e) {\n $dbOutput = [\n 'status' => 'error',\n 'message' => 'Unable to connect to the database server: ' . \n $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine()\n ];\n Logging::writeToFile( json_encode($dbOutput) );\n }\n\n }\n\n // send the singleton version of the connection back\n return $connection;\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "public function connect()\n {\n }", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "abstract public function connect();", "function db_connect() {\n /*\n * Create new persistent database connection, or return the existing one\n */\n static $database;\n\n if(!isset($database)) {\n $database = new mysqli('localhost', 'root', '', 'auto_company', 3306);\n }\n\n if(!$database) {\n // Couldn't connect\n echo db_error();\n return false;\n }\n\n return $database;\n}", "public function __construct() {\n\n return $this->mySQLConnect();\n }", "public static function _init()\n\t{\n\t\tstatic::$client = new \\Evernote\\Client();\n\t}", "function db_connect() {\n static $conn;\n\n if (!isset($conn))\n if (!($conn = mysqli_connect(\"localhost:3306\", \"root\", \"samsung\", \"rush00\")))\n die (\"Connection failed: \" . mysqli_error($conn));\n return ($conn);\n }", "public static function getUniqueInstance(){\r\n if(self::$UniqueInstance == null){\r\n return new connectionBD();\r\n }else{\r\n return self::$UniqueInstance;\r\n }\r\n }", "function db_connect() {\r\n\tstatic $connection;\r\n\r\n\t// Try and connect to the database, if a has not been established yet\r\n\tif(!isset($connection)) {\r\n\t\t// Load configuration as an array. Use the actual location of the configuration file\r\n\t\t$config = parse_ini_file(__DIR__.'/../config.ini');\r\n\t\t$connection = new mysqli('localhost', $config['username'], $config['password'], $config['dbname']);\r\n\t\t//$connection = mysqli_connect('localhost', $config['username'], $config['password'], $config['dbname']);\r\n\t}\r\n\r\n\t// If connection was not successful, handle the error\r\n\tif($connection === false) {\r\n\t\t// Handle error\r\n\t\treturn mysqli_connect_error();\r\n\t}\r\n\r\n\treturn $connection;\r\n\r\n}", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "public function connect();", "function __construct() {\n $this->_connect();\n }", "function __construct() {\n $connection= new Connection;\n $this->link = $connection->conect();\n }", "public function connect()\r\n\t{\r\n\t\t//$this->link = mysql_connect();\r\n\t}", "function Cofiguration()\n\t{\n\t\t//$this->objConMgr = new ConnectionMgr();\n\t}", "private function __construct()\n {\n $this->connect();\n }", "function get_link($db_conf)\n{\n static $link;\n if (($link instanceof mysqli) AND !$link->errno())\n {\n return $link;\n }\n\n for ($i = 0; $i < 3; $i++)\n {\n // ToDo optimize\n $link = new mysqli($db_conf['host'],\n $db_conf['user'],\n $db_conf['pass'],\n $db_conf['schema'],\n $db_conf['port'],\n $db_conf['socket']);\n if (!mysqli_connect_error ())\n {\n return $link;\n }\n }\n throw new Exception(\"Connect failed: %s\\n\", mysqli_connect_error());\n}", "public static function init(): void {\r\n self::getInstance();\r\n }", "public abstract function connect();", "public function getConnect()\n {\n $this->conn = Registry::get('db');\n }", "function __construct()\n\t\t{\n\t\t\t$this->conn = $this->connect();\n\t\t}", "public function __construct(){\n self::connect(self::$classname);\n }", "abstract public function getConnection();", "abstract function connect();", "public static function getConexion(){\n\n\t/**\n\t * self: invocar la clase en si\n\t */\n\t\n\tself::$cn = Conexion::conectar();\n\t}", "public function static_construct()\n {\n if (!self::$pdo instanceof PDO) {\n self::$pdo = new PDO(DB_CONNECTION_STRING, DB_USERNAME, DB_PASSWORD);\n }\n }", "function __construct(){\n\n\t\t $this->connect() ;\n\t}", "function __construct() {\r\n global $conn;\r\n $this->conn = $conn;\r\n }", "public static function init(){\n \n }", "public static function init() {\n if (getenv('ENV') == 'HEROKU') {\n self::$client = new Client(getenv('REDIS_URL'));\n } else {\n self::$client = new Client([\n 'host' => '127.0.0.1',\n ]);\n }\n }", "function __construct()\n {\n $this->connect();\n }", "function __construct() {\n $this->open_connection();\n }", "private static function connect()\n\t{\n\t\tself::$dbh = new EHandler();\n\t}", "function __construct() {\n $this->createConnection();\n }", "public function connect()\r\n\t{\r\n\t\t//$this->link = qracle_connect();\r\n\t}", "function mysqli_connection() {\n\tglobal $MYSQLI_CONNECTION;\n\n\tif($MYSQLI_CONNECTION) {\n\t\treturn $MYSQLI_CONNECTION;\n\t}\n\n\t$MYSQLI_CONNECTION = new mysqli(Setting::get('Mysql.host'), Setting::get('Mysql.user'), Setting::get('Mysql.pass'), Setting::get('Mysql.db'));\n\n\tif (mysqli_connect_errno()) {\n \tthrow new ConnerException(\"Connect failed: %s\\n\". mysqli_connect_error());\n \texit();\n\t}\n\n\treturn $MYSQLI_CONNECTION;\n}", "function __construct() {\n\t\t\trequire_once __DIR__ . '/db_connect.php';\n\t\t\t// connecting to db\n\t\t\tself::$connection = new DB();\n\t\t}", "private function static_things()\n\t{\n\n\t\t# code...\n\t}", "public static function getConnection()\n {\n return static::getInstance();\n }", "public static function init() {\n\t\t\n\t\t// get various user info\n\t\t$defaultUser = Config::getOption(\"user\");\n\t\t$defaultPass = Config::getOption(\"pass\");\n\t\t$readwriteUser = Config::getOption(\"readwrite.user\");\n\t\t$readwritePass = Config::getOption(\"readwrite.pass\");\n\t\t\n\t\t// set-up the database connection info\n\t\t$name = Config::getOption(\"name\");\n\t\t$host = Config::getOption(\"host\");\n\t\t$user = (!$readwriteUser || empty($readwriteUser)) ? $defaultUser : $readwriteUser;\n\t\t$pass = (!$readwritePass || empty($readwritePass)) ? $defaultPass : $readwritePass;\n\t\t$port = Config::getOption(\"port\");\n\t\tPheasant::setup(\"mysql://\".$user.\":\".$pass.\"@\".$host.\":\".$port.\"/\".$name);\n\t\t\n\t}", "function __construct() {\n $this->conx = Connexion::getconnexion();\n }", "function db_connect() {\n // Define connection as a static variable, to avoid connecting more than once \n static $connection;\n\n // Try and connect to the database, if a connection has not been established yet\n if(!isset($connection)) {\n\t\t// Load configuration as an array. Use the actual location of your configuration file\n\t\t// Put the configuration file outside of the document root\n\t\t$config = parse_ini_file('config.ini'); \n $connection = mysqli_connect('localhost',$config['username'],$config['password'],$config['dbname']);\n }\n\n // If connection was not successful, handle the error\n if($connection === false) {\n // Handle error - notify administrator, log to a file, show an error screen, etc.\n return mysqli_connect_error(); \n echo \"error connecting\";\n }\n else{\n echo '<script>console.log(\"Connection successful\")</script>';\n }\n return $connection;\n}", "public function __construct() {\n\t\t$this->db = MySQLConnectivity::get_instance();\n\t\t$this->conn = $this->db->get_connection(); \n\t}", "public function connection(){\n //connect only once \n\n if($this->connect !== NULL){\n return $this->connect;\n }\n\n list($host,$username,$password,$database) = $this->config;\n\n if(($this->connect = @mysqli_connect($host,$username,$password,$database))){\n unset($host,$username,$password,$database);\n return $this->connect;\n }\n throw new MySqlAdapterException('Please check you configuration !!!! Error Connecting to the server:'.mysqli_connect_error());\n }", "protected function CeateDatabaseConnection()\r\n\t{\r\n\t\t// Create an instance of the database for use in the system\r\n\t\tif($this->InProduction($_SERVER['SERVER_NAME']))\r\n\t\t\t//$this->Database\t= new Database('gstour.db.4628821.hostedresource.com','gstour','Golf1215','gstour');\r\n\t\t\t$this->Database\t= new Database('97.74.149.114','gstour','Golf1215','gstour');\r\n\t\telse\r\n\t\t\t$this->Database\t= new Database('localhost','root','','test');\r\n\t}", "function db_connect() {\n static $db;\n\n // Try and connect to the database, if a connection has not been established yet\n if(!isset($db)) {\n // Load configuration as an array. Use the actual location of your configuration file\n\t\t\t $db_server = getIniProp('db_host'); //your mysql server\n\t\t\t $db_user = getIniProp('db_user'); //your mysql server username\n\t\t\t $db_pass = getIniProp('db_pass'); //your mysql server password\n\t\t\t $db_name = getIniProp('db_name'); //the mysql database to use\n\n\t\t\t $db = new mysqli($db_server, $db_user, $db_pass, $db_name);\n }\n\n // If connection was not successful, handle the error\n if($db->connect_error) {\n // Handle error - notify administrator, log to a file, show an error screen, etc.\n return $db->connect_error;\n }\n return $db;\n}", "public static function getConnections()\n {\n }", "function __construct(){\n $this->open_connection();\n }", "function __construct() {\n\t\t \ttry {\n\t\t \t\t$mysqli = @mysqli_connect(servidorMysql, usuarioMysql, passwordMysql, databaseMysql);\n\t\t\t\tif(!$mysqli) {\n\t\t\t\t\tif(ambiente == 'DEV') { echo '<strong>[email protected]:</strong> Falló la conexión contra la base de datos: <em><b>Mysql dijo</b>: '.mysqli_connect_error().\"</em> <br />\"; }\n\t\t\t\t\treturn false;\n\t\t\t\t}else{\n\t\t\t\t\t$this->conexion = $mysqli;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}catch(Exception $e) {\n\t\t\t\tif(ambiente == 'DEV') { echo $e->getMessage(); }\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public static function useCurrentConnection(){\r\n //Use by default PDO in WHMCS 6 and 7 \r\n if(class_exists('\\Illuminate\\Database\\Capsule\\Manager') && \\Illuminate\\Database\\Capsule\\Manager::connection()->getPdo())\r\n {\r\n self::$usePDO = true;\r\n self::$_instance = new self();\r\n self::$_instance->connection['default'] = \\Illuminate\\Database\\Capsule\\Manager::connection()->getPdo();\r\n }\r\n else\r\n {\r\n self::$_instance = new self();\r\n self::$_instance->connection['default'] = false;\r\n }\r\n }" ]
[ "0.71635103", "0.6987068", "0.69010854", "0.6814388", "0.6813643", "0.6626743", "0.6538886", "0.646851", "0.6437422", "0.6396151", "0.63728756", "0.63723934", "0.636151", "0.6359343", "0.6336624", "0.6259939", "0.6242334", "0.621289", "0.6210461", "0.6210461", "0.6210461", "0.61841476", "0.6174312", "0.61726934", "0.6163417", "0.6161131", "0.61569524", "0.61549944", "0.6140569", "0.61316144", "0.6122575", "0.611078", "0.61043036", "0.6100552", "0.6094709", "0.6094709", "0.6094709", "0.6092691", "0.6092691", "0.6092691", "0.6092691", "0.6092691", "0.6092691", "0.6092691", "0.60876757", "0.6073769", "0.6069586", "0.6064701", "0.60578877", "0.6047796", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.603034", "0.6023327", "0.6016925", "0.6016381", "0.6013571", "0.6008867", "0.6007764", "0.6007149", "0.6006358", "0.6000859", "0.6000201", "0.59937567", "0.5982702", "0.5961498", "0.595613", "0.5950234", "0.59482867", "0.5933814", "0.5924866", "0.59238017", "0.591803", "0.5914548", "0.5911564", "0.59092873", "0.59069204", "0.5905314", "0.5901885", "0.58965814", "0.5895906", "0.58868194", "0.58837396", "0.5879657", "0.5870704", "0.5870672", "0.5867181", "0.5862591", "0.5861506", "0.5860712", "0.5854005", "0.5849124" ]
0.6149256
28
Determines the current asset version.
public function version(Request $request) { return parent::version($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_asset_version_string() {\n return Wordless::preference('assets.version', NULL);\n }", "public function getAssetsVersion(): string\n\t{\n\t\treturn Config::getProjectVersion();\n\t}", "public function getCurrentVersion();", "public static function get_current_version() {\n\t\t// $db = JFactory::getDbo();\n\t\t// $db->setQuery('SELECT manifest_cache FROM #__extensions WHERE element = \"mod_slideshowck\"');\n\t\t// $manifest = json_decode($db->loadResult(), true);\n\t\t// $installed_version = $manifest['version'];\n\t\t\n\t\t// get the version installed\n\t\t$installed_version = 'UNKOWN';\n\t\t$file_url = JPATH_SITE .'/modules/mod_slideshowck/mod_slideshowck.xml';\n\t\tif ($xml_installed = JFactory::getXML($file_url)) {\n\t\t\t$installed_version = (string)$xml_installed->version;\n\t\t}\n\n\t\treturn $installed_version;\n\t}", "function getCurrentVersion() {\n return json_decode(file_get_contents(storage_path('app/version.json')), true);\n}", "public function get_version();", "function currentVersion() {\n if($this->current_version === false) {\n $this->current_version = DB::executeFirstCell('SELECT version FROM ' . TABLE_PREFIX . 'update_history ORDER BY created_on DESC LIMIT 0, 1');\n if(empty($this->current_version)) {\n $this->current_version = '1.0';\n } // if\n \t \n \t // activeCollab 2.0.2 failed to record proper version into update \n \t // history so we need to manually check if we have 2.0.2. This is done \n \t // by checking if acx_attachments table exists (introduced in aC 2).\n \t if((version_compare($this->current_version, '2.0') < 0) && DB::tableExists(TABLE_PREFIX . 'attachments')) {\n \t $this->current_version = '2.0.2';\n \t } // if\n } // if\n return $this->current_version;\n }", "abstract public function get_version();", "private function getCurrentVersion() {\n\t\t\n\t\t// Migration from SB3 to SB4\n\t\tif ($this->previous_version = false && $this->actual_version == key($this->versions)) {\n\t\t\treturn;\n\t\t}\n\t}", "public function getVersion(){\n $client = Yii::$app->infoServices;\n return $client->getVersion()->return->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}", "public function getCurrentVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 0 ? $versions[0] : 0;\n }", "function get_version() {\n\n\t\treturn $this->version;\n\n\t}", "public function getResourceVersion();", "public function getVersion(): string\n {\n return $this->fileVersion;\n }", "function armin_version()\n { \n $composer = json_decode(File::get(base_path('composer.json')));\n\n return optional($composer)->version;\n }", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion(): string\n {\n return $this->data->version;\n }", "public static function getVersion()\r\n {\r\n \t$i = self::getVersionInfo();\r\n \treturn trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\r\n \t. \"-{$i['stability']}{$i['number']}\", '.-');\r\n }", "public static function get_version() {\n return self::$version;\n }", "protected function getVersion()\n {\n return $this->getRequest()->args('version') ?: strftime('%y%m%d.%H%M.%S');\n }", "static function version ()\r\n\t{\r\n\t\treturn json_decode(file_get_contents(dirname(__FILE__).'/../composer.json'))->version;\r\n\t}", "function asset_version($source) {\n $version = $this->get_asset_version_string();\n\n if (isset($version))\n $source .= sprintf(\"?ver=%s\", $version);\n return $source;\n }", "public function getVersion(): string {}", "public static function getCurrent() {\n global $CFG;\n\n if ($data = file_get_contents(\"$CFG->dirroot/mod/amvonetroom/revision\"))\n return new amvonetroom_Version($data);\n else\n return new amvonetroom_Version(0);\n }", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion() {}", "public function getVersion(): string;", "public function getVersion(): string;", "public function getVersion() {\n return isset($this->data['version']) ? $this->data['version'] : null;\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 get_version() { \n\n\t\treturn $this->version; \n\n\t}", "function GetVersion()\n {\n return '1.0';\n }", "public function getVersion()\n {\n return $version;\n }", "private static function get_asset_version( $entry_arr ) {\n\n\t\t$version = false;\n\n\t\tif ( 2 < count( $entry_arr ) && !empty( trim( $entry_arr[ 2 ] ) ) )\n\t\t{\n\t\t\t$version = esc_attr( trim( $entry_arr[ 2 ] ) );\n\t\t}\n\n\t\treturn $version;\n\n\t}", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "abstract public function getVersion();", "public function get_version(): string\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public function get_version()\n {\n return $this->version;\n }", "public static function version()\r\n {\r\n return self::$version;\r\n }", "function getFileVersion()\n\t{\n\t\treturn $this->fileVersion;\n\t}", "public function get_version() {\n return $this->version;\n }", "public static function get_version() {\n\t\tif (is_null(static::$version)) {\n\t\t\t$plugin_data = get_plugin_data(BLOBMIMES_INDEX, false, false);\n\t\t\tif (isset($plugin_data['Version'])) {\n\t\t\t\tstatic::$version = $plugin_data['Version'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\tstatic::$version = '0.0';\n\t\t\t}\n\t\t}\n\n\t\treturn static::$version;\n\t}", "public function getVersion()\n {\n return $this->values[\"version\"];\n }", "public function getVersion(){\n\t\treturn $this->version;\n\t}", "function &getCurrentVersion() {\n\t\treturn $this->currentVersion;\n\t}", "function get_version() {\n return self::VERSION;\n }", "function get_version() {\n return self::VERSION;\n }", "public function getVersion() {\r\n\t\t$response = $this->Client->execute('show version');\r\n\t\tpreg_match('/Version:\\s+VyOS\\s([0-9\\.]+)/', $response, $matches );\r\n\t\t$version = $matches[1];\r\n\t\treturn $version;\r\n\t}", "static public function get_Version()\n {\n $version = self::get_version_number();\n \n $build_num = self::get_build_number();\n \n return \"v{$version[2]}.{$version[1]}.{$build_num}\";\n }", "public function getVersion()\n {\n return static::$version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion()\n {\n return $this->get(self::_VERSION);\n }", "public function version()\n\t{\n\t\treturn static::$version;\n\t}", "public static function getVersion()\n {\n global $application_version;\n return $application_version;\n }" ]
[ "0.7693832", "0.7364559", "0.7172281", "0.69250774", "0.6907489", "0.68270165", "0.6762231", "0.6759932", "0.67484266", "0.67248553", "0.66621083", "0.65719867", "0.65532917", "0.65320975", "0.6502384", "0.6486281", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6456022", "0.6454804", "0.64428705", "0.64422125", "0.6440743", "0.643561", "0.6426077", "0.64258057", "0.64166135", "0.6415791", "0.6415791", "0.6415791", "0.6415791", "0.64144903", "0.6393295", "0.6393295", "0.63918483", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63912064", "0.63831526", "0.6378685", "0.6375842", "0.6364807", "0.63550764", "0.63550764", "0.63550764", "0.63550764", "0.63550764", "0.63550764", "0.63550764", "0.63550764", "0.6346994", "0.63441026", "0.63441026", "0.63441026", "0.63441026", "0.63362265", "0.6329454", "0.6329454", "0.63255364", "0.6324489", "0.6313879", "0.6297104", "0.6295541", "0.628663", "0.62846154", "0.62805814", "0.62805814", "0.6277514", "0.62738717", "0.6272072", "0.62428415", "0.62428415", "0.6242465", "0.62420446", "0.6227417" ]
0.0
-1