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
Remove the specified resource from storage.
public function destroy(Request $request, $id) { $country = Country::findOrFail($id); $country->delete(); $request->session()->flash('danger', 'Country deleted from the database.'); return redirect()->route('admin.countries.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
indicates ASC or DESC
public function getSort() { return $this->sort; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function publisher_getOrderBy($sort)\r\n{\r\n if ($sort == \"datesub\") {\r\n return \"DESC\";\r\n } else if ($sort == \"counter\") {\r\n return \"DESC\";\r\n } else if ($sort == \"weight\") {\r\n return \"ASC\";\r\n }\r\n}", "public function getSortOrder();", "public function getSortOrder();", "public function getSortOrder();", "public function getAscendingOrder()\n\t{\n\t\treturn 'ASC';\n\t}", "public function &getOrderBy();", "public function sortDirection();", "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}", "public function getSortOrder(): int;", "public function getXXXOrdering()\n\t{\n\t\treturn array('title_asc', 'title_desc');\n\t}", "public function getOrder(): string\n {\n return strtolower($this->order) === 'desc' ? 'desc' : 'asc';\n }", "public static function setorderby($orderval) {\n\t\tif($orderval==1) {\n\t\t\treturn \"teachers.teachingexp desc\";\n\t\t} else if($orderval==2) {\n\t\t\treturn \"pricelist.maxprice desc\";\n\t\t} else if($orderval==3) {\n\t\t\treturn \"pricelist.minprice asc\";\n\t\t} else if($orderval==4) {\n\t\t\treturn \"teachers.rating desc\";\n\t\t} else {\n\t\t\treturn \"pricelist.maxprice asc\";\n\t\t}\n\n\t}", "function ajan_esc_sql_order( $order = '' ) {\n\t$order = strtoupper( trim( $order ) );\n\treturn 'DESC' === $order ? 'DESC' : 'ASC';\n}", "public function order(string $order, bool $asc);", "public function getOrderByAllowed(): string;", "public function getDescendingOrder()\n\t{\n\t\treturn 'DESC';\n\t}", "function sort_order($sort, $order)\n {\n if( $order ):\n \n if( strtolower($order) == 'asc' ):\n return \"/admin/search?sort={$sort}&order=desc\";\n else:\n return \"/admin/search?sort={$sort}&order=asc\";\n endif;\n\n else:\n return \"/admin/search?sort={$sort}&order=desc\";\n endif;\n \n }", "protected function getDefaultSort(): string {\n return 'score desc,sys_modified desc';\n }", "protected function getDefaultDirection()\n {\n return self::ORDER_DESC;\n }", "function getSort(){\n return 100;\n }", "public static function orderAsc($parameter);", "public function order($field, $order = 'desc');", "public function getSorting();", "protected function get_sort_order() {\n return 111;\n }", "public function getSortBy();", "function isAscending ( $bisAscending=null )\n{\n if ( isset($bisAscending) ) {\n settype($bisAscending,'boolean');\n if ( $this->_isAscending != $bisAscending ) {\n $this->_isAscending = $bisAscending;\n /*---- 頁次/順序皆已不正確, 使用者必須執行RefreshPage()重新顯示資料\n $this->_ReversedRecord = !$this->_ReversedRecord;\n $this->_KeyFirstList = array();\n $this->_KeyLastList = array();\n $this->_SQLCurrPage = '';\n */\n }\n return true;\n } else {\n return $this->_isAscending;\n }\n}", "function getSort(){ return 301; }", "private function get_link_order() {\n $ordertext = '<i class=\"fa fa-sort-desc\"></i> ';\n\n $url = $this->page->url;\n\n if (isset($this->viewoptions['filter'])) {\n $url->param('filter', $this->viewoptions['filter']);\n }\n\n $url->param('order', 'desc');\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $url->param('order', 'asc');\n }\n\n if (isset($this->viewoptions['order']) && $this->viewoptions['order'] == 'desc') {\n $this->page->url->order = 'asc';\n $ordertext = '<i class=\"fa fa-sort-asc\"></i> ';\n $ordertext .= get_string('orderasc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }\n\n $ordertext .= get_string('orderdesc', 'format_timeline');\n\n return html_writer::link($url, $ordertext, ['class' => 'btn btn-outline-primary']);\n }", "public function getElementSortOrder();", "public function order();", "public function orderBy($direction = \"ASC\",$column);", "public static function orderDesc($parameter);", "function getSort(){\n return 999;\n }", "function getSort(){\n return 999;\n }", "public function sortDesc(/* variable arguments */) {\n $this->sort = func_get_args();\n $this->descending = ' DESC';\n return $this;\n }", "function getSort(){\n return 301;\n }", "function order_func($a, $b) \n{\n\treturn $a <=> $b;\n}", "protected function decksOrderAsc()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('decks_current_condition', $request['decks_order_asc'])\n ->changeRequest('decks_current_order', 'ASC')\n ->setCurrent('Decks_shared');\n }", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->tanggal->setSort(\"DESC\");\n\t\t\t\t$this->auc_number->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function getSortOrder() { return $this->m_sortOrder; }", "public function isSortedDesc()\n {\n return $this->sorting === Grid::SORT_DESC;\n }", "public function setCustomOrderAsc()\n {\n $this->customOrder = \"asc\";\n }", "public function isSortedAsc()\n {\n return $this->sorting === Grid::SORT_ASC;\n }", "public function getSort() { return ''; }", "public function sortBy(){\n global $SnickerPlugin;\n\n if($SnickerPlugin->getValue(\"frontend_order\") === \"date_asc\"){\n uasort($this->db, function($a, $b){\n return $a[\"date\"] > $b[\"date\"];\n });\n } else if($SnickerPlugin->getValue(\"frontend_order\") === \"date_desc\"){\n uasort($this->db, function($a, $b){\n return $a[\"date\"] < $b[\"date\"];\n });\n }\n return true;\n }", "function getSort() {\n return 999;\n }", "function LoadSortOrder() {\r\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($this->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $this->SqlOrderBy();\r\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\r\n\t\t\t\t$this->created_time->setSort(\"DESC\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function sort_flag() {\n return SORT_STRING;\n }", "public function orderASC()\n {\n $this->order = 'ASC';\n\n return $this;\n }", "function getSortDirection($sortDir)\n{\n if (!is_null($sortDir)) {\n if ($sortDir == 'ASC')\n return 'DESC';\n else\n return 'ASC';\n } else\n return \"ASC\";\n}", "protected function prepareOrderByStatement() {}", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->created_at->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "private function sql_orderBy()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $arr_order = null;\n $arr_order = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'order.' ];\n\n // Order field\n switch ( true )\n {\n case( $arr_order[ 'field' ] == 'uid' ):\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n break;\n case( $arr_order[ 'field' ] == 'value' ):\n default:\n $orderField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n break;\n }\n // Order field\n // Order flag\n switch ( true )\n {\n case( $arr_order[ 'orderFlag' ] == 'DESC' ):\n $orderFlag = 'DESC';\n break;\n case( $arr_order[ 'orderFlag' ] == 'ASC' ):\n default:\n $orderFlag = 'ASC';\n break;\n }\n // Order flag\n // Get ORDER BY statement\n $orderBy = $orderField . ' ' . $orderFlag;\n\n // RETURN ORDER BY statement\n return $orderBy;\n }", "public function sortStrategy();", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "function getSort(){\n return 155;\n }", "public function orderDESC()\n {\n $this->order = 'DESC';\n\n return $this;\n }", "function LoadSortOrder() {\n\t\tglobal $tbl_slide;\n\t\t$sOrderBy = $tbl_slide->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($tbl_slide->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $tbl_slide->SqlOrderBy();\n\t\t\t\t$tbl_slide->setSessionOrderBy($sOrderBy);\n\t\t\t\t$tbl_slide->order_by->setSort(\"ASC\");\n\t\t\t}\n\t\t}\n\t}", "function convertorderbyin($orderby)\n{\n $orderby = ((isset($orderby)) && ('' != trim($orderby))) ? trim($orderby) : '';\n switch ( $orderby )\n {\n case \"titleA\":\n $orderby = \"title ASC\";\n break;\n case \"hitsA\":\n $orderby = \"hits ASC\";\n break;\n case \"ratingA\":\n $orderby = \"rating ASC\";\n break;\n case \"dateA\":\n $orderby = \"date ASC\";\n break;\n case \"titleD\":\n $orderby = \"title DESC\";\n break;\n case \"hitsD\":\n $orderby = \"hits DESC\";\n break;\n case \"ratingD\":\n $orderby = \"rating DESC\";\n break;\n case\"dateD\":\n default:\n $orderby = \"date DESC\";\n break;\n }\n return $orderby;\n}", "private function getOrdering()\n {\n return [[\n 'column' => 0,\n 'dir' => 'asc',\n ]];\n }", "function LoadSortOrder() {\n\t\t$sOrderBy = $this->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($this->getSqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $this->getSqlOrderBy();\n\t\t\t\t$this->setSessionOrderBy($sOrderBy);\n\t\t\t\t$this->id->setSort(\"DESC\");\n\t\t\t}\n\t\t}\n\t}", "function convertorderbyin($orderby)\r\n {\r\n switch (trim($orderby))\r\n {\r\n case 'titleA':\r\n $orderby = 'title ASC';\r\n break;\r\n case 'dateA':\r\n $orderby = 'published ASC';\r\n break;\r\n case 'hitsA':\r\n $orderby = 'hits ASC';\r\n break;\r\n case 'ratingA':\r\n $orderby = 'rating ASC';\r\n break;\r\n case 'titleD':\r\n $orderby = 'title DESC';\r\n break;\r\n case 'hitsD':\r\n $orderby = 'hits DESC';\r\n break;\r\n case 'ratingD':\r\n $orderby = 'rating DESC';\r\n break;\r\n case 'dateD':\r\n default:\r\n $orderby = 'published DESC';\r\n break;\r\n } \r\n return $orderby;\r\n }", "public function sortBy($callback, $dir = \\SORT_DESC, $type = \\SORT_NUMERIC);", "public function implicitOrderby() {\n\t\treturn true;\n\t}", "protected function _getBrowseDefaultSort()\n {\n return array('added', 'd');\n }", "function custom_sort($sorted_by) {\r\n if (!sizeof($sorted_by->rules))\r\n $sorted_by->add(\"menuOrder\", \"ASC\");\r\n}", "public function andThenAscendingBy(string $field): ExtensibleSorting;", "public function getSort()\n {\n return 125;\n }", "function order_by($params, $default_field, $default_order = 'ASC') {\r\n \tif (isset($params['sortby'])) {\r\n \t\t$default_field = $params['sortby'];\r\n \t}\r\n\r\n \tif (isset($params['sortdir'])) {\r\n \t\t$default_order = $params['sortdir'];\r\n \t}\r\n\r\n \treturn \"ORDER BY $default_field $default_order\";\r\n\r\n }", "function SetUpSortOrder() {\n\t\tglobal $tbl_slide;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$tbl_slide->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$tbl_slide->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->title); // title\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->images); // images\n\t\t\t$tbl_slide->UpdateSort($tbl_slide->order_by); // order_by\n\t\t\t$tbl_slide->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "function yy_r87(){ $this->_retvalue = new Stmt\\Expr(\"ASC\", $this->yystack[$this->yyidx + 0]->minor); }", "public static function getDefaultSorting()\n {\n\n }", "function getSort(){\n\treturn 281;\n}", "public function stripOrderByForOrderByKeywordDataProvider() {}", "function usort_reorder($a,$b){\r\r\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'chat_date'; //If no sort, default to title\r\r\n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'asc'; //If no order, default to asc\r\r\n $result = strcmp($a[$orderby], $b[$orderby]); //Determine sort order\r\r\n return ($order==='asc') ? $result : -$result; //Send final sort direction to usort\r\r\n }", "public function getSortMenu();", "function orderby($column) {\n\treturn \"<span class='orderby'><a href='?orderby={$column}&order=asc'>&darr;</a><a href='?orderby={$column}&order=desc'>&uarr;</a></span>\";\n}", "function fPosts($orderCol=\"id\",$orderType=\"DESC\"){\n \n $sql = \"SELECT * FROM post ORDER BY $orderCol $orderType\";\n \n return fetchAll($sql);\n}", "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 _buildContentOrderBy() {\r\n\t\tglobal $mainframe, $context;\r\n\t\t\r\n\t\t$filter_order = $mainframe->getUserStateFromRequest ( $context . 'filter_order', 'filter_order', '1' );\r\n\t\t$filter_order_Dir = $mainframe->getUserStateFromRequest ( $context . 'filter_order_Dir', 'filter_order_Dir', '' );\r\n\t\t\r\n\t\tif ($filter_order == 'h.ordering' || $filter_order == 'ordering') {\r\n\t\t\t$orderby = ' ORDER BY 1 ';\r\n\t\t} else {\r\n\t\t\t$orderby = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir;\r\n\t\t}\r\n\t\treturn $orderby;\r\n\t}", "protected function getAllAvailableSortDescendingOptions() {}", "private function sort_data( $a, $b ) {\n\n\t\t// Set defaults and check for query strings.\n\t\t$ordby = ! empty( $_GET['orderby'] ) ? $_GET['orderby'] : 'review_date';\n\t\t$order = ! empty( $_GET['order'] ) ? $_GET['order'] : 'desc';\n\n\t\t// Set my result up.\n\t\t$result = strcmp( $a[ $ordby ], $b[ $ordby ] );\n\n\t\t// Return it one way or the other.\n\t\treturn 'desc' === $order ? -$result : $result;\n\t}", "function LoadSortOrder() {\r\n\t\tglobal $fs_multijoin_v;\r\n\t\t$sOrderBy = $fs_multijoin_v->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($fs_multijoin_v->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $fs_multijoin_v->SqlOrderBy();\r\n\t\t\t\t$fs_multijoin_v->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function getSort(){\n return 188;\n }", "public function ascending(): self\n {\n $this->filter['ascending'] = 'true';\n\n return $this;\n }", "function sort_link($text, $order=false){\n global $db, $order_by, $order_dir;\n\n if(!$order)\n $order = $text;\n\n $link = '<a href=\"?order=' . $order;\n if($order_by==$order && $order_dir=='ASC')\n $link .= '&inverse=true';\n $link .= '\"';\n if($order_by==$order && $order_dir=='ASC')\n $link .= ' class=\"order_asc\"';\n elseif($order_by==$order && $order_dir=='DESC')\n $link .= ' class=\"order_desc\"';\n $link .= '>' . $text . '</a>';\n\n return $link;\n}", "private function sort_data($a, $b)\r\n {\r\n // Set defaults\r\n $orderby = 'name';\r\n $order = 'decs';\r\n // If orderby is set, use this as the sort column\r\n if (!empty($_GET['orderby'])) {\r\n $orderby = $_GET['orderby'];\r\n }\r\n // If order is set use this as the order\r\n if (!empty($_GET['order'])) {\r\n $order = $_GET['order'];\r\n }\r\n $result = strcmp($a[$orderby], $b[$orderby]);\r\n if ($order === 'desc') {\r\n return $result;\r\n }\r\n return -$result;\r\n }", "function getOrderBy()\n\t{\n\t\tglobal $log;\n $log->debug(\"Entering getOrderBy() method ...\");\n\t\tif (isset($_REQUEST['order_by']))\n\t\t\t$order_by = $_REQUEST['order_by'];\n\t\telse\n\t\t\t$order_by = (isset($_SESSION['NOTES_ORDER_BY'])?($_SESSION['NOTES_ORDER_BY']):($this->default_order_by));\n\t\t$log->debug(\"Exiting getOrderBy method ...\");\n\t\treturn $order_by;\n\t}", "function orderByClause( $orderby ) {\n\t global $wpdb;\n\t return \"dm.meta_value+0 {$this->order}, $wpdb->posts.post_title ASC\";\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}", "function woocommerce_cookbook_get_catalog_ordering_args( $args ) {\n $orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );\n\n // if the orderby value matches our custom option\n if ( 'oldest_to_newest' == $orderby_value ) {\n $args['orderby'] = 'date';\n $args['order'] = 'ASC';\n }\n return $args;\n}", "public function getSort() {\n return 30;\n }", "public function isOrderAscending(): bool\n {\n return $this->order;\n }", "public function andThenDescendingBy(string $field): ExtensibleSorting;", "public function testAddOrderBy()\n {\n $query = new SQLSelect();\n $query->setSelect('ID', \"Title\")->setFrom('Page')->addOrderBy('(ID % 2) = 0', 'ASC')->addOrderBy('ID > 50', 'ASC');\n $this->assertSQLEquals(\n 'SELECT ID, Title, (ID % 2) = 0 AS \"_SortColumn0\", ID > 50 AS \"_SortColumn1\" FROM Page ORDER BY \"_SortColumn0\" ASC, \"_SortColumn1\" ASC',\n $query->sql($parameters)\n );\n }", "public function getSortOrder()\n {\n return $this->sort_order;\n }", "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 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}", "function LoadSortOrder() {\r\n\t\tglobal $rekeningju;\r\n\t\t$sOrderBy = $rekeningju->getSessionOrderBy(); // Get ORDER BY from Session\r\n\t\tif ($sOrderBy == \"\") {\r\n\t\t\tif ($rekeningju->SqlOrderBy() <> \"\") {\r\n\t\t\t\t$sOrderBy = $rekeningju->SqlOrderBy();\r\n\t\t\t\t$rekeningju->setSessionOrderBy($sOrderBy);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function LoadSortOrder() {\n\t\tglobal $t_tinbai_mainsite;\n\t\t$sOrderBy = $t_tinbai_mainsite->getSessionOrderBy(); // Get ORDER BY from Session\n\t\tif ($sOrderBy == \"\") {\n\t\t\tif ($t_tinbai_mainsite->SqlOrderBy() <> \"\") {\n\t\t\t\t$sOrderBy = $t_tinbai_mainsite->SqlOrderBy();\n\t\t\t\t$t_tinbai_mainsite->setSessionOrderBy($sOrderBy);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.70766985", "0.7051552", "0.7051552", "0.7051552", "0.6900853", "0.6900486", "0.6810814", "0.6762881", "0.6760198", "0.67590964", "0.67122966", "0.654588", "0.6534121", "0.6499739", "0.6495423", "0.6465736", "0.64362425", "0.6406368", "0.64058876", "0.6404613", "0.6396132", "0.63825005", "0.6369846", "0.636735", "0.6358474", "0.63347346", "0.63303363", "0.6328028", "0.6293948", "0.628139", "0.62752825", "0.62283087", "0.6225739", "0.6225739", "0.62224245", "0.62165654", "0.6179837", "0.6156188", "0.6154701", "0.6144957", "0.6128615", "0.6125363", "0.610752", "0.61031836", "0.60928744", "0.6083226", "0.6073222", "0.6067705", "0.606759", "0.6058649", "0.6051195", "0.60466224", "0.6046498", "0.60324216", "0.6025613", "0.6025613", "0.6025613", "0.60216385", "0.6018948", "0.6018335", "0.60068935", "0.6004657", "0.5979974", "0.5964591", "0.5957426", "0.59554803", "0.595043", "0.5915715", "0.5912581", "0.5893582", "0.5884543", "0.58822715", "0.58671314", "0.5863802", "0.5858433", "0.5852931", "0.58410984", "0.58378077", "0.58367187", "0.58356917", "0.580683", "0.5804329", "0.57897955", "0.578734", "0.57789075", "0.5778571", "0.5774683", "0.5772022", "0.5757718", "0.57569855", "0.5755919", "0.57558674", "0.5754835", "0.5741966", "0.5740953", "0.57261723", "0.57253253", "0.57252085", "0.5720268", "0.57169825", "0.571171" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('categories')->insert([ 'cat_name' => 'DSLR', ]); DB::table('categories')->insert([ 'cat_name' => 'Mirrorless', ]); DB::table('categories')->insert([ 'cat_name' => 'Lenses', ]); DB::table('categories')->insert([ 'cat_name' => 'Speedlights', ]); DB::table('categories')->insert([ 'cat_name' => 'Tripods', ]); }
{ "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(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 // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\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 // $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 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(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 \\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 // $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\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\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 // $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 //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.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
Base composite pattern : A Node contains instances of itself. \ArrayObject is all right for that pattern
public function addNode(self $node) : self { $this->append($node); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getNewChildren(): array ;", "public function getChildren(): array;", "public function __construct($input)\n {\n $this->type = gettype($input);\n $types = array('object', 'array');\n\n if (!in_array($this->type, $types)) {\n $this->value = $input;\n } else {\n foreach ($input as $key => $value) {\n $this->nodes[$key] = new self($value);\n $this->nodes[$key]->setParent($this);\n }\n }\n }", "protected function node() : Node\n {\n return $this->array;\n }", "public function __construct()\n {\n $this->children = new ArrayCollection();\n }", "abstract public function object();", "function __construct()\n {\n $this->isEnd = false;\n //$this->children = array_fill(0, 26, null); //这种也可以 感觉有点浪费\n $this->children = [];\n }", "private function parent_list_construct($item=array()){#\n\t\tif (!is_a($this->master,\"elem\")){\n\t\t\treturn $item;\n\t\t}\n\t\tarray_push($item,$this->master);\n\t\treturn $this->master->parent_list_construct($item);\n\t}", "abstract protected function getCurrentChildren(): array ;", "abstract protected function &container() : array ;", "public function getChildren(): ?array;", "public function getChilds();", "public function __clone()\n {\n foreach ($this->children as $key => $value) {\n if (is_object($value)) {\n $this->children[$key] = clone $value;\n }\n }\n }", "public function __construct()\n {\n $this->children = [];\n }", "public function __construct(NodeInterface $node);", "function __construct(){\n\t\t$this->head = NULL;\n\t\t$this-> tail = NULL;\n\t}", "public function __clone()\n\t{\n\t\t$this->children=[];\n\t}", "public function getChildNodes() {}", "public function getChildNodes() {}", "private function prepareObjectArray(){\n\t//scorro l' array $this->objarr settando su ciascun oggetto gli attributi children\n\tforeach($this->objarr as $key=>$object){\n\t\t//echo \"-\".$object->getAppendToIndex().\"<br />\";\n\t\t\n\t\tif(($appind=$object->getAppendToIndex()) != \"\"){\n\t\t\n\t\t$object->setIntegrated(true); //indico che l' oggetto è stato incluso come figlio di un altro.\t\n\t\t\n\t\t $objparent=$this->objarr[$appind];\n\t\t\t$objparent->appendChild($object);\t\n\t\t\t//echo $objparent->getIndex();\n\t\t}\n\t}\n}", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "function buildAllNodeInstance( $cms, $parent )\n\t\t{\n\t\t$ni = $this->buildNodeInstance( $cms, $parent ) ;\n\t\tforeach( $this->childs as $nc )\n\t\t\t{\n\t\t\t$nni = $nc->buildAllNodeInstance( $cms, $ni ) ;\n\t\t\t$ni->addChild( $nni ) ;\n\t\t\t}\n\t\treturn $ni ;\n\t\t}", "protected function __construct() \r\n {\r\n parent::__construct();\r\n // to do: instantiate members representing substructures/blocks\r\n }", "public function __construct()\n {\n $this->parent = null;\n $this->children = array();\n }", "function array_cycle() {\n $y = array();\n $x = new Cycler();\n $x->x =& $y;\n $y[\"one\"][\"bar\"] = $x;\n $y[\"two\"][\"bar\"] =& $y;\n $y[\"three\"] = \"string data\";\n}", "public function getChildren() {}", "public function getChildren() {}", "public function getChildren() {}", "public function initRecursion()\n {\n $this->recursiveObjects[0] = $this;\n\n $this->recursiveObjects[1] = new $this();\n $this->recursiveObjects[1]->recursiveObjects[0] = $this;\n\n $this->recursiveObjects[2] = $this->recursiveObjects[1];\n }", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_NAME:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}", "public function __construct($element = null) { \r\n\t\t\r\n\t if (isset($element)) {\r\n\t\t\t\r\n\t\t\tif (@get_class($element) === 'DOMElement') {\r\n\t\t\t\t$this->add($element);\r\n\t\t\t} elseif (is_array($element)) {\r\n\t\t\t\tforeach ($element as $node) {\r\n\t\t\t\t\tif (is_object($node) AND get_class($node) === 'DOMElement') {\r\n\t\t\t\t\t\t$this->add($node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getChildren()\n\t{\n\t\t$children = $this->current()->getChildren();\n\n\t\t// Using ref as per PHP source\n\t\tif (empty($this->ref))\n\t\t{\n\t\t\t$this->ref = new \\ReflectionClass($this);\n\t\t}\n\n\t\treturn $this->ref->newInstance($children);\n\t}", "function add_children(){\n\t\t\t\t\t//if the array has a parent add it to the parents child array\n\t\tforeach ($this->nodes as $node){\n\t\t\tif($node->parent!=-1){\n\t\t\t\tif(isset($this->nodes[$node->parent])){\n\t\t\t\t\t$parent=$this->nodes[$node->parent];\n\t\t\t\t\t$parent->add_child($node->id);\n\t\t\t\t}else{\n\t\t\t\t\tprint_error('nonode','socialwiki');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getChildren()\n {\n }", "public function getChildren()\n {\n }", "public function getChildNodes();", "public function getTestNodes(){\n\t\treturn array($this);\n\t}", "public function it_creates_object_graph()\n {\n $a = $this->get('spec\\Aspire\\DIC\\A');\n\n $a->b->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\B');\n $a->b->c->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\C');\n $a->b->c->d->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\D');\n $a->b->c->e->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\E');\n $a->b->c->e->d->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\D');\n }", "public function get_children();", "public function iterateChildren();", "public function getNodes();", "public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}", "function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_URL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WIDTH:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_HEIGHT:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}", "public function getNodes(): array\n {\n return \\array_merge(\n parent::getNodes(),\n $this->constraints,\n $this->indexes\n );\n }", "public function children (){\n\t\treturn array();\n\t}", "public static function fromArray(array $node) : \\GraphQL\\Language\\AST\\Node\n {\n }", "public function makeNew() {\n\t\t$class = get_class($this);\n\t\t$newArray = $this->wire(new $class($this->parent, $this->field));\n\t\treturn $newArray;\n\t}", "function __construct()\n {\n $this->firstNode = NULL;\n $this->lastNode = NULL;\n $this->count = 0;\n }", "abstract public function isNode ( );", "function getChildNodes() ;", "public function __CONSTRUCT(){\n\t}", "function basefrndObj($data=null)\n\t{\n\t\tif($data==null)\n\t\treturn 0;\n\t\t\n\t\t$list = array();\n\t\tforeach($data as $k=>$node)\n\t\t{\n\t\t\t$obj = new stdclass;\n\t\t\t$obj->id = $node->id;\n\t\t\t$obj->name = $node->name;\n\t\t\t$obj->username = $node->username;\n\t\t\t$obj->email = $node->email;\n\t\t\t\n\t\t\tforeach($node->avatars As $ky=>$avt)\n\t\t\t{\n\t\t\t\t$avt_key = 'avtar_'.$ky;\n\t\t\t\t$obj->$avt_key = JURI::root().'media/com_easysocial/avatars/users/'.$node->id.'/'.$avt;\n\t\t\t}\n\t\t\t$list[] = $obj;\n\t\t}\n\t\t\n\t\treturn $list;\n\t\t\n\t}", "public function extractSelf (): \\ArrayObject\n {\n /** @noinspection NullPointerExceptionInspection */\n return $this->arrayHelper()->extract([$this]);\n }", "public function __clone() {\n\t\tif ($this->dimensions instanceof Collection) {\n\t\t\t$existingDimensions = $this->dimensions->toArray();\n\t\t\t$this->dimensions = new ArrayCollection();\n\t\t\t/** @var NodeDimension $existingDimension */\n\t\t\tforeach ($existingDimensions as $existingDimension) {\n\t\t\t\t$this->dimensions->add(new NodeDimension($this, $existingDimension->getName(), $existingDimension->getValue()));\n\t\t\t}\n\t\t}\n\t}", "public function getChildElements() {}", "public function __construct() {\n parent::__construct(array(\n 'Id' => array(\n \t \t\t'name' => 'id', 'type' => 'integer', 'readonly' => true),\n 'Alias' => array('name' => 'alias', 'type' => 'string'),\n 'Language' => array('name' => 'language', 'type' => 'string'),\n 'Name' => array('name' => 'name', 'type' => 'string'),\n 'Description' => array('name' => 'description', 'type' => 'string'),\n 'Groupables' => array(\n 'name' => 'groupables', 'type' => 'ArrayAccess'),\n ));\n \n $this->groupables = new ArrayObject();\n }", "function __construct() {\n $this->root = new TrieNode(); // 构建根节点\n }", "protected function createVirtualElement()\n {\n $id = uniqid();\n\n $depth = $this->reader->depth;\n\n $parent = isset($this->parents[$depth - 1]) ? $this->parents[$depth - 1] : null;\n\n $attributes = [\n '@id' => $id,\n '@parent' => $parent,\n '@element' => $this->reader->name,\n ];\n\n $element = new Collection($attributes);\n\n $this->parents[$depth] = $id;\n\n $this->references[$id] = $element;\n\n return $element;\n }", "function _nodeArrayizeData(&$node) {\n\tif (is_array($node->data) && $node->children == true) {\n\t\t// This node has children, so we need to find them\n\t\t$childs = $this->_gatherChildren($node->id);\n\t\t// We've gathered all our children's data and are ready to use it\n\t\t$key = key($node->data);\n\t\t$key = empty($key) ? 0 : $key;\n\t\t// If it's an array, add to it of course\n\t\tif (isset ($node->data[$key])) {\n\t\t\tif (is_array($node->data[$key])) {\n\t\t\t$node->data[$key] = $this->_array_kmerge($node->data[$key],$childs);\n\t\t\t} else {\n\t\t\t$node->data[$key] = $childs;\n\t\t\t}\n\t\t} else {\n\t\t\t$node->data[$key] = $childs;\n\t\t}\n\t} elseif (!is_array($node->data) && $node->children == true) {\n\t\t// Same as above, find the children of this node\n\t\t$childs = $this->_gatherChildren($node->id);\n\t\t$node->data = array();\n\t\t$node->data[] = $childs;\n\t}\n\n\t// We edited $node by reference, so just return true\n\treturn true;\n\t}", "function __construct(){\r\n\t\t$this->listLength = 0;\r\n\t\t$this->head = null;\r\n\t\t$this->tail = null;\r\n\t}", "function parse() {\n while (true) {\n $object = $this->readObject();\n\n if (!$object) {\n break;\n }\n\n if (!$object->ischild) {\n $this->objects[] = $object;\n }\n }\n\n return $this->objects;\n }", "function __construct()\n {\n $this->root = new TrieNode();\n }", "public abstract function getObjects():?object ;", "function _init(){\n\t\t$total = $this->node->childCount;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\n\t\t switch ($tagName) {\n\t\t case DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t $this->categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t break;\n case DOMIT_RSS_ELEMENT_ENCLOSURE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_enclosure($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_SOURCE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_source($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_GUID:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_guid($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_AUTHOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COMMENTS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}", "abstract public function getChildrenTypes();", "public function object(){\n try {\n // Sparql11query.g:294:3: ( graphNode ) \n // Sparql11query.g:295:3: graphNode \n {\n $this->pushFollow(self::$FOLLOW_graphNode_in_object1023);\n $this->graphNode();\n\n $this->state->_fsp--;\n\n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "function append($node) {\n\t\tif (!is_array($node)) {\n\t\t\t$this->child[]=$node;\n\t\t} else if (is_array($node)) {\n\t\t\tfor ($childIdx=0; $childIdx<count($node); $childIdx++)\n\t\t\t\t$this->child[]=$node[$childIdx];\n\t\t}\n\t}", "private function setParentChildrenClass() {\n $tmp_schemedata = $this->schemedata;\n \n // replace parents with primary key.\n foreach($this->schemedata as $index => $class) {\n $parents = array();\n $see = array();\n foreach ($class['parents'] as $parent=>$cols) {\n foreach($tmp_schemedata as $tmp_class) {\n if ($tmp_class['table'] == $parent) {\n $tmp = $tmp_class['pkFields'];\n $tmp_cols = $cols;\n $tmp2 = array();\n foreach ($tmp as $key=>$val) {\n $key = array_shift($tmp_cols);\n $tmp2[$key] = $val;\n }\n $parents[$tmp_class['name']] = $tmp2;\n $see[] = $tmp_class['name'];\n }\n }\n }\n $this->schemedata[$index]['parents'] = $parents;\n $this->schemedata[$index]['see'] = $see;\n }\n\n // children\n foreach($this->schemedata as $index => $class) {\n foreach ($class['parents'] as $parent=>$cols) {\n foreach($tmp_schemedata as $tmp_class) {\n if ($tmp_class['table'] == $this->schemedata[$parent]['table']) {\n if ($class['type'] != 'TO' AND $class['type'] != 'TS' AND $class['type'] != 'TB') {\n $tmp = $class['parents']; // children's parent def\n $tmp2 = array();\n foreach ($tmp as $key=>$val) {\n if($key == $tmp_class['name']) {\n $tmp2 = $val;\n }\n }\n if($class['name']) {\n $this->schemedata[$tmp_class['name']]['children'][$class['name']] = $tmp2;\n $this->schemedata[$tmp_class['name']]['see'][] = $class['name'];\n } else {\n $this->schemedata[$tmp_class['name']]['children'][$index] = $tmp2;\n }\n }\n }\n }\n }\n }\n\n // relationships\n foreach($this->schemedata as $class) {\n if ($class['type'] == 'TO' OR $class['type'] == 'TS' OR $class['type'] == 'TB') {\n foreach ($class['parents'] as $parent=>$pkFields) {\n if(!isset($this->schemedata[$parent]['relationships'])) {\n $this->schemedata[$parent]['relationships'] = array();\n }\n // add parent to another parent list getter\n foreach ($class['parents'] as $p=>$fs) {\n if ($parent != $p) {\n $type = 'List';\n $mname = '';\n foreach($fs as $k => $v) {\n $name = $k;\n }\n foreach($class['params'] as $param) {\n if($name == $param['name']) {\n $type = ($param['pair']=='N')?'List':'Class';\n break;\n }\n }\n\n $this->schemedata[$parent]['relationships'][$p]= array(\n 'table' => $class['table'],\n 'myFields' => $pkFields,\n 'fields' => $fs,\n 'type' => $type\n );\n }\n }\n }\n }\n }\n\n // rewrite relation key for parents, children and relations\n foreach($this->schemedata as $key => $class) {\n // parent\n foreach($class['parents'] as $k1 => $values) {\n foreach($values as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$k2) {\n unset($this->schemedata[$key]['parents'][$k1][$k2]);\n $this->schemedata[$key]['parents'][$k1][$param['mname']] = $value;\n break;\n }\n }\n }\n }\n // children\n foreach($class['children'] as $k1 => $values) {\n foreach($values as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['children'][$k1][$k2] = $param['mname'];\n break;\n }\n }\n }\n }\n // relations\n if(isset($class['relationships'])) {\n foreach($class['relationships'] as $k1 => $values) {\n foreach($values['myFields'] as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['relationships'][$k1]['myFields'][$k2] = $param['mname'];\n break;\n }\n }\n }\n foreach($values['fields'] as $k2 => $value) {\n foreach($class['params'] as $param) {\n if($param['name']==$value) {\n $this->schemedata[$key]['relationships'][$k1]['fields'][$k2] = $param['mname'];\n break;\n }\n }\n }\n }\n }\n }\n }", "public function __construct($item) {\n $this->value = $item;\n // new nodes are leaf nodes\n $this->left = null;\n $this->right = null;\n }", "public function __construct() {\n\t\t$this->_count = 0;\n\t\t$this->_root = null;\n\t}", "public function testChildArrayToConfigObject()\n {\n $this->specify(\n \"Child node don't converted to the config object\",\n function () {\n $config = new Config(['childNode' => ['A', 'B', 'C']]);\n expect($config->childNode)->isInstanceOf('Phalcon\\Config');\n expect($config->get('childNode'))->isInstanceOf('Phalcon\\Config');\n expect($config->offsetGet('childNode'))->isInstanceOf('Phalcon\\Config');\n }\n );\n }", "public function __construct($content) {\n if ($content instanceof Traversable || is_array($content)) {\n foreach ($content as $key => $value) {\n $this->components[$key] = $value;\n }\n } else {\n $this->components[] = $content;\n }\n }", "function toBuffer()\n {\n foreach ($this->children as $child) {\n $child->toBuffer();\n }\n return $this;\n }", "public function __construct() {\n // Sentinel is dummy object before head and after tail.\n $sentinel = new Node(NULL);\n $sentinel->setNext($sentinel);\n $sentinel->setPrev($sentinel);\n\n $this->_sentinel = $sentinel;\n $this->_head = $this->_sentinel;\n }", "public function testSetChildByNodes() {\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$objNode1 = new LeftRightTreeTraversal\\Node(1);\n\t\t$objNode2 = new LeftRightTreeTraversal\\Node(2);\n\n\t\t$this->boolean($objBuilder->setChildByNodes($objNode2, $objNode1))->isTrue();\n\t\t$hashChecks = array(\n\t\t\t\t1 => array(\n\t\t\t\t\t\t'id' \t\t=> 1,\n\t\t\t\t\t\t'parent'\t=> null,\n\t\t\t\t\t\t'left'\t\t=> 0,\n\t\t\t\t\t\t'right'\t\t=> 3\n\t\t\t\t),\n\t\t\t\t2 => array(\n\t\t\t\t\t\t'id' \t\t=> 2,\n\t\t\t\t\t\t'parent'\t=> 1,\n\t\t\t\t\t\t'left'\t\t=> 1,\n\t\t\t\t\t\t'right'\t\t=> 2\n\t\t\t\t)\n\t\t);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\t\t$this->array($arrayResult)->size->isEqualTo(2);\n\t\tforeach ($arrayResult as $hashNode) {\n\t\t\t$this\n\t\t\t->array($hashNode)\n\t\t\t->hasKey('id')\n\t\t\t->hasKey('left')\n\t\t\t->hasKey('right')\n\t\t\t->integer($hashNode['id'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['id'])\n\t\t\t->integer($hashNode['left'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['left'])\n\t\t\t->integer($hashNode['right'])\n\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['right'])\n\t\t\t;\n\t\t}\n\t}", "public function testRecursiveObjectProp1()\n {\n $test = new TestObj();\n $test->propPublic = array();\n $test->propPublic[] = &$test->propPublic;\n $this->debug->log('test', $test);\n $abstraction = $this->debug->data->get('log/0/args/1');\n self::assertEquals(\n Abstracter::RECURSION,\n $abstraction['properties']['propPublic']['value'][0],\n 'Did not find expected recursion'\n );\n $output = $this->debug->output();\n $select = '.m_log\n > .t_object > .object-inner\n > .property\n > .t_array .array-inner > li\n > .t_recursion';\n self::assertSelectCount($select, 1, $output);\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\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 aObjeto() {\t}", "public function reference() {\r\n\t\t$this->parseJavaName();\r\n\t\t$this->parseMultiObject();\r\n\t\tif (count($this->properties)) {\r\n\t\t\tforeach ($this->properties as $prop) {\r\n\t\t\t\t$prop->reference();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->arrayType) {\r\n\t\t\t$this->arrayType->reference();\r\n\t\t}\r\n\t\t// add to classes array so we can generate the java classes easily (but only \"global objects\").\r\n\t\tif ($this->id) {\r\n\t\t\tif (!array_key_exists($this->javaClass, self::$classes)) {\r\n\t\t\t\tself::$classes[$this->javaClass] = array();\r\n\t\t\t}\r\n\t\t\tself::$classes[$this->javaClass][$this->javaType] = $this;\r\n\t\t}\r\n\t}", "final public function getChildren() {\n\t\treturn array();\n\t}", "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "function add($n)\n\t{\n\t\tif (is_array($n))\n\t\t{\n\t\t\tfor($i = 0; $i < count($n); ++$i)\n\t\t\t{\n\t\t\t\t$this->children[] = $n[$i];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->children[] = $n;\n\t\t}\n\t}", "public function __construct()\n {\n //to be extended by children\n }", "public function iterator () {\n\t\t$ret = new \\Array_hx();\n\t\tBalancedTree::iteratorLoop($this->root, $ret);\n\t\treturn new ArrayIterator($ret);\n\t}", "public function toRoot() {\n\t\t$this->elements = array($this->root);\n\t\treturn $this;\n//\t\treturn $this->newInstance(array($this->root));\n\t}", "public function toRoot() {\n\t\t$this->elements = array($this->root);\n\t\treturn $this;\n//\t\treturn $this->newInstance(array($this->root));\n\t}" ]
[ "0.624063", "0.5700885", "0.5683667", "0.5617259", "0.560002", "0.55993694", "0.55747837", "0.55195546", "0.5508527", "0.5489932", "0.54553366", "0.5423928", "0.5420041", "0.53978455", "0.5395345", "0.5387947", "0.5367448", "0.5335978", "0.53347844", "0.53294957", "0.52770525", "0.52279085", "0.52130985", "0.51698244", "0.51243514", "0.51142627", "0.51142627", "0.51142627", "0.5100403", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.50786686", "0.5069754", "0.5064246", "0.506389", "0.5039362", "0.50293875", "0.50293875", "0.50264037", "0.5012028", "0.50119245", "0.5005111", "0.49857304", "0.4985198", "0.49782673", "0.49693725", "0.49598646", "0.49300548", "0.49266627", "0.4922456", "0.49199674", "0.49169067", "0.49101353", "0.49019033", "0.48980305", "0.48820835", "0.4879189", "0.48720405", "0.48648936", "0.48625904", "0.48484403", "0.4838948", "0.483226", "0.48296276", "0.4823425", "0.48158127", "0.4811829", "0.480955", "0.4809526", "0.4808882", "0.48072636", "0.48071763", "0.48067227", "0.47988003", "0.47930884", "0.47883585", "0.47784576", "0.47709647", "0.4766723", "0.47604713", "0.47604713", "0.47604713", "0.47604713", "0.47604713", "0.47604713", "0.4758528", "0.47530952", "0.4752912", "0.4750776", "0.47479266", "0.47479266", "0.47367963", "0.47360456", "0.47353923", "0.47353923" ]
0.0
-1
A node is displayable through __toString() Displays all its children
final public function __toString() { $ret = $this->getContent(); foreach ($this as $node) { $ret .= PHP_EOL . (string)$node; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ToString()\n {\n if ( $this->Level == 0 )\n {\n // This is the root node, only walk through children\n $out = \"\";\n foreach($this->ChildNodes as $node)\n $out .= $node->ToString();\n }\n else\n {\n // Print node depending of it's type\n $indent = str_repeat(\"\\t\", $this->Level - 1);\n\n if ( count($this->ChildNodes) <= 0 )\n {\n // A node without children\n if ( $this->Value == \"\" )\n $out = $indent . \"<\" . $this->Name . \" />\\n\";\n else\n $out = $indent . \"<\" . $this->Name . \">\" . $this->Value . \"</\" . $this->Name . \">\\n\";\n }\n else\n {\n // A node with children\n $out = $indent . \"<\" . $this->Name . \">\" . $this->Value . \"\\n\";\n foreach($this->ChildNodes as $node)\n $out .= $node->ToString();\n $out .= $indent . \"</\" . $this->Name . \">\\n\";\n }\n }\n\n return $out;\n }", "public function __toString() {\n return $this->getTree();\n }", "public function show() {\n // abre tag\n $this->open();\n echo \"\\n\";\n // si tiene contenido\n if ($this->children) {\n \n \n // recorre todos los objetos hijos\n foreach ($this->children as $child) {\n // si es objeto\n if (is_object($child)) {\n $child->show();\n }\n elseif ((is_string($child)) or (is_numeric($child))) {\n // si es texto\n echo $child;\n }\n }\n // cierra la tag\n $this->close();\n }\n }", "public function toHtml() {\n\t\techo '<pre '.$this->getAttributes().'>'.$this->renderChildren().'</pre>';\n\t}", "public function renderChildren()\n\t{\n\t\t$children = '';\n\t\t\n\t\tforeach($this->_children as $child)\n\t\t{\n\t\t\t$children .= \"$child\";\n\t\t}\n\t\t\n\t\treturn $children;\n\t}", "public function __toString()\n {\n return $this->root;\n }", "final public function renderChildren() {\n\t\treturn '';\n\t}", "public function renderChildren(): string\n {\n $html = [];\n\n foreach ($this->children as $child) {\n $html[] = $child->render();\n }\n\n $html = implode('', $html);\n\n if ($this instanceof HasTextChild && $this->escapeHtml) {\n $html = htmlspecialchars($html);\n }\n\n return $html;\n }", "public function toHtml() {\n\t\techo '<em '.$this->getAttributes().'>'.$this->renderChildren().'</em>';\n\t}", "public function showData(){\n echo \"<li>Data: \";\n if(gettype($this->data) == \"array\"){\n print_r(implode(', ', $this->data));\n }\n else{\n print_r($this->data);\n }\n echo \"</li>\";\n\n echo \"<ul><li>is a \".$this->type.\"</li>\"; // Print the type of the node\n\n if($this->parentNode != NULL){\n echo \"<li>Parent: \";\n if(gettype($this->parentNode->getData()) == \"array\"){\n print_r(implode(', ', $this->parentNode->getData()));\n }\n else{\n print_r($this->parentNode->getData());\n }\n\n echo \"</li>\";\n }\n else{\n echo \"<li>has no parent node.</li>\";\n }\n\n // echo \"<li>Children: </li>\";\n // // Show left child\n // if($this->childNodes[\"left\"] != NULL){\n // $d = $this->childNodes[\"left\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"L: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"L: \".$d.\"\\t\";\n // }\n //\n // }\n // // Show left-right child if we have it\n // if($this->childNodes[\"LR\"] != NULL){\n // $d = $this->childNodes[\"LR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"LR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"LR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... middle child\n // if($this->childNodes[\"mid\"] != NULL){\n // $d = $this->childNodes[\"mid\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"M: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"M: \".$d.\"\\t\";\n // }\n // }\n // // ... middle-right child\n // if($this->childNodes[\"MR\"] != NULL){\n // $d = $this->childNodes[\"MR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"MR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"MR: \".$d.\"\\t\";\n // }\n // }\n //\n // // ... right child\n // if($this->childNodes[\"right\"] != NULL){\n // $d = $this->childNodes[\"right\"]->getData();\n // if(gettype($d) == \"array\"){\n // echo \"R: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"R: \".$d.\"\\t\";\n // }\n // }\n // // ... right-right child\n // if($this->childNodes[\"RR\"] != NULL){\n // $d = $this->childNodes[\"RR\"]->getData();\n //\n // if(gettype($d) == \"array\"){\n // echo \"RR: \".implode(', ', $d).\"\\t\";\n // }\n // else{\n // echo \"RR: \".$d.\"\\t\";\n // }\n // }\n\n echo \"</ul>\";\n }", "public function toHtml() {\n\t\techo '<ol '.$this->getAttributes().'>'.$this->renderChildren().'</ol>';\n\t}", "public function renderChildren() {}", "function __toString(){\n\t\tif( $this->is_terminal() ){\n\t\t\treturn parent::__toString();\n\t\t}\n\t\t$src = '';\n\t\tforeach( $this->children as $i => $Child ){\n\t\t\tif( $Child->is_terminal() ){\n\t\t\t\t$s = (string) $Child->value;\n\t\t\t\tswitch( $Child->t ){\n\t\t\t\t// these terminals will may or may not be followed by an identifier\n\t\t\t\t// but always by the next terminal in this node.\n\t\t\t\tcase J_FUNCTION:\n\t\t\t\tcase J_CONTINUE:\n\t\t\t\tcase J_BREAK;\n\t\t\t\t\t$identFollows = isset($this->children[$i+1]) && $this->children[$i+1]->is_symbol(J_IDENTIFIER);\n\t\t\t\t\t$identFollows and $s .= ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t// these terminals will always be followed by an idenfifer\n\t\t\t\tcase J_VAR:\n\t\t\t\t// these terminals are followed by a non terminal;\n\t\t\t\t// adding a space to be on the safe side.\n\t\t\t\tcase J_DO:\n\t\t\t\tcase J_ELSE:\n\t\t\t\tcase J_RETURN:\n\t\t\t\tcase J_CASE:\n\t\t\t\tcase J_THROW:\n\t\t\t\tcase J_NEW:\n\t\t\t\tcase J_DELETE:\n\t\t\t\tcase J_VOID:\n\t\t\t\tcase J_TYPEOF:\n\t\t\t\t\t$s .= ' ';\n\t\t\t\t\tbreak;\n\t\t\t\t// these terminals require a space on either side\n\t\t\t\tcase J_IN:\n\t\t\t\tcase J_INSTANCEOF:\n\t\t\t\t\t$s = ' '.$s.' ';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// recursion into non-terminal\n\t\t\t\t$s = $Child->__toString();\n\t\t\t}\n\t\t\t$src .= $s;\n\t\t}\n\t\treturn $src;\n\t}", "public function __toString()\n {\n $text = '<'.$this->getType().$this->getAttributeList().'>';\n foreach ($this->getChildren() as $child) {\n $text .= (string) $child;\n }\n $text .= '</'.$this->getType().'>';\n\n return $text;\n }", "public function getChildNodes() {}", "public function getChildNodes() {}", "function printCollectionTree(){\n\n\t\t/* Return HTML */\n\t\treturn $output;\n\t}", "public function toHtml() {\n\t\techo '<mark '.$this->getAttributes().'>'.$this->renderChildren().'</mark>';\n\t}", "public function get_children();", "public function __toString()\n {\n // prevent recursion up the widget tree for UI objects\n $parent = $this->parent;\n $this->parent = get_class($parent);\n\n return parent::__toString();\n\n // set parent back again\n $this->parent = $parent;\n }", "public function toString() {\n return $this->getClassName().'{'.$this->form->getTest()->getDom()->saveXML($this->node).'}';\n }", "public function getChildNodes();", "public function __toString()\n {\n $result = \"<{$this->getTagName()}\";\n foreach ($this->getAttributes() as $key => $value) {\n $result .= \" {$key}=\\\"\" . Util::escape($value) . \"\\\"\";\n }\n if ($this->hasChild()) {\n $result .= '>';\n foreach ($this->getChildren() as $node) {\n $result .= $node->toString();\n }\n $result .= \"</{$this->getTagName()}>\";\n } else {\n $result .= ' />';\n }\n return $result;\n }", "function getChildNodes() ;", "public function __toString()\n {\n return sprintf(\"[%s, %s]\", $this->getLeft(), $this->getRight());\n }", "public final function getHtml() : string\n {\n return \\implode('', $this->children);\n }", "public function toString($include_parent = null) {}", "public function PrintAsList()\n {\n $items = array();\n /** @var Node $current */\n $current = $this->head;\n while($current != null) \n\t\t{\n\t\t\t\n array_push($items, $current->data);\n $current = $current->next;\n }\n\t\t\n\t\t$this->bubbleSort($items);\n\t\t\n foreach($items as $item)\n {\n\t\t\techo $item . \"->\";\n }\n\n echo PHP_EOL;\n }", "public function __toString()\n {\n echo '<pre>';\n print_r($this);\n echo '</pre>';\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function get_nodes()\n {\n }", "public function show(Node $node)\n {\n //\n }", "public function show(Node $node)\n {\n //\n }", "public function getChildren() {}", "public function getChildren() {}", "public function getChildren() {}", "public function __toString()\n {\n $content = '';\n foreach ($this->getContent() as $item) {\n $content .= $item->__toString();\n }\n return $content;\n }", "public function toString()\n {\n\n }", "public function __toString(){\n\t\treturn $this->combineElements();\n\t}", "public function __toString()\n\t{\n\t\treturn PHP_EOL.$this->_name.' '.implode($this->_glue, $this->_elements);\n\t}", "private function printItems()\n {\n foreach ($this->items as $item) {\n $thisItems = $item->getElements();\n\n\n echo $this->startItem($thisItems['link']['content']);\n\n foreach ($thisItems as $feedItem) {\n echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']);\n }\n echo $this->endItem();\n }\n }", "public function getInnerHtml() {\n\t\t$html = \"\";\n\n\t\tforeach($this->childs as $child) {\n\t\t\tif( is_object($child) ) {\n\t\t\t\t$html .= $child->__toString();\n\t\t\t} else {\n\t\t\t\t$html .= $child;\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function __toString()\r\n\t{\r\n\t\treturn $this->dom->saveXML();\r\n\t}", "public function renderTree()\n {\n $structure = $this->_module->treeStructure + $this->_module->dataStructure;\n extract($structure);\n $nodeDepth = $currDepth = $counter = 0;\n $jsSelect = '$('.$this->id.').treeview(\"collapseAll\");';\n $out = Html::beginTag('ul', ['class' => 'kv-tree']) . \"\\n\";\n foreach ($this->_nodes as $node) {\n /**\n * @var Tree $node\n */\n if (!$this->isAdmin && !$node->isVisible() || !$this->showInactive && !$node->isActive()) {\n continue;\n }\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeDepth = $node->$depthAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeLeft = $node->$leftAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeRight = $node->$rightAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeKey = $node->$keyAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeName = $node->$nameAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIcon = $node->$iconAttribute;\n /** @noinspection PhpUndefinedVariableInspection */\n $nodeIconType = $node->$iconTypeAttribute;\n\n $isChild = ($nodeRight == $nodeLeft + 1);\n $indicators = '';\n\n if (isset($this->nodeLabel)) {\n $label = $this->nodeLabel;\n $nodeName = is_callable($label) ? $label($node) :\n (is_array($label) ? ArrayHelper::getValue($label, $nodeKey, $nodeName) : $nodeName);\n }\n if ($nodeDepth == $currDepth) {\n if ($counter > 0) {\n $out .= \"</li>\\n\";\n }\n } elseif ($nodeDepth > $currDepth) {\n $out .= Html::beginTag('ul') . \"\\n\";\n $currDepth = $currDepth + ($nodeDepth - $currDepth);\n } elseif ($nodeDepth < $currDepth) {\n $out .= str_repeat(\"</li>\\n</ul>\", $currDepth - $nodeDepth) . \"</li>\\n\";\n $currDepth = $currDepth - ($currDepth - $nodeDepth);\n }\n if (trim($indicators) == null) {\n $indicators = '&nbsp;';\n }\n $nodeOptions = [\n 'data-key' => $nodeKey,\n 'data-lft' => $nodeLeft,\n 'data-rgt' => $nodeRight,\n 'data-lvl' => $nodeDepth,\n 'data-readonly' => static::parseBool($node->isReadonly()),\n 'data-movable-u' => static::parseBool($node->isMovable('u')),\n 'data-movable-d' => static::parseBool($node->isMovable('d')),\n 'data-movable-l' => static::parseBool($node->isMovable('l')),\n 'data-movable-r' => static::parseBool($node->isMovable('r')),\n 'data-removable' => static::parseBool($node->isRemovable()),\n 'data-removable-all' => static::parseBool($node->isRemovableAll()),\n ];\n\n $css = [];\n if (!$isChild) {\n $css[] = 'kv-parent ';\n }\n if (!$node->isVisible() && $this->isAdmin) {\n $css[] = 'kv-invisible';\n }\n if ($this->showCheckbox && in_array($node->id, $this->selected)) {\n $css[] = 'kv-selected ';\n $jsSelect .= '$('.$this->id.').treeview(\"checkNode\", \"'.$node->id.'\");';\n }\n if ($node->isCollapsed()) {\n $css[] = 'kv-collapsed ';\n }\n if ($node->isDisabled()) {\n $css[] = 'kv-disabled ';\n }\n if (!$node->isActive()) {\n $css[] = 'kv-inactive ';\n }\n $indicators .= $this->renderToggleIconContainer(false) . \"\\n\";\n $indicators .= $this->showCheckbox ? $this->renderCheckboxIconContainer(false) . \"\\n\" : '';\n if (!empty($css)) {\n Html::addCssClass($nodeOptions, $css);\n }\n $out .= Html::beginTag('li', $nodeOptions) . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-tree-list']) . \"\\n\" .\n Html::beginTag('div', ['class' => 'kv-node-indicators']) . \"\\n\" .\n $indicators . \"\\n\" .\n '</div>' . \"\\n\" .\n Html::beginTag('div', ['tabindex' => -1, 'class' => 'kv-node-detail']) . \"\\n\" .\n $this->renderNodeIcon($nodeIcon, $nodeIconType, $isChild) . \"\\n\" .\n Html::tag('span', $nodeName, ['class' => 'kv-node-label']) . \"\\n\" .\n '</div>' . \"\\n\" .\n '</div>' . \"\\n\";\n ++$counter;\n }\n if (isset($jsSelect)) {\n $this->view->registerJs(\n $jsSelect,\n View::POS_READY,\n 'treeviewinput-selected'\n );\n }\n $out .= str_repeat(\"</li>\\n</ul>\", $nodeDepth) . \"</li>\\n\";\n $out .= \"</ul>\\n\";\n return Html::tag('div', $this->renderRoot() . $out, $this->treeOptions);\n }", "function display(){\n\n\t\t$current = $this->head;\n\t\tif($this->head == NULL){\n\t\t\techo \"List is empty\\n\";\n\t\t\treturn;\n\t\t}\n\t\techo \"Total Nodes are : \" . $this->countNodes() . \"\\n\";\n\t\techo \"Single Linked List nodes are: \";\n\t\twhile($current != NULL){\n\t\t\tif($current != NULL){\n\t\t\techo $current->data ;\n\t\t\tif($current->next != NULL)\n\t\t\techo \"->\";\n\t\t\t}\n\t\t\t$current = $current->next;\n\t\t}\n\t\techo \"\\n\";\n\t}", "public function render()\n {\n return $this->renderChildren();\n }", "function dump_nodes($drupal_content_type, $format = 'php') {\n $result = db_query('SELECT nid FROM node WHERE type = \"%s\"', $drupal_content_type);\n $num = 0;\n while ($obj = db_fetch_object($result)) {\n $num++;\n $node = node_load($obj->nid);\n // if web app use function drupal_json() which sets headers, then invokes drupal_to_js()\n // print($num . \"\\n\");\n if ($format == 'json') {\n print(drupal_to_js($node));\n } else {\n print_r($node, false);\n }\n print(\"\\n\");\n }\n // return(\"\\nListed \" . $num . \" objects for content type \" . $drupal_content_type . \"\\n\");\n}", "function dump_nodes($node, $indent) {\n\n if($node->hasChildren()) {\n foreach($node->child as $child) {\n if($child->attribute['class'] == 'test') {\n $node_value = new Node_Value();\n echo (\"!!!!-\" . $node_value->get_value($child) . \"-!!!<br/>\");\n unset($node_value);\n }\n dump_nodes($child, $indent+1);\n }\n }\n}", "public function getChildren()\n {\n }", "public function getChildren()\n {\n }", "public abstract function __toString();", "function show_tree(){\n\t\t\t\t\tswitch(LINK_TYPE){\n\t\t\t\t\t\tcase \"static\":\n\t\t\t\t\t\t\treturn $this->show_tree_static();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"burc\":\n\t\t\t\t\t\tcase \"dynamic\":\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn $this->show_tree_dynamic();\n\t\t\t\t\t}\n\t\t\t\t}", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "abstract public function __toString();", "public function getNodes();", "abstract public function __toString() ;", "public function getChilds();", "function printt($node, $i){\n\tif($node == NULL)\n\t\treturn NULL;\n\n\tprintt($node->right, $i+1);\n\n\tfor($x = 0; $x < $i; $x++)\n\t\techo \" \";\n\techo \"[ \".$node->type.\" | \".$node->value.\" ]\\n\";\n\n\tprintt($node->left, $i+1);\n}", "function render()\n {\n $res = \"\";\n foreach($this->m_childs as $abstractframe)\n {\n $res.=$abstractframe->render(false);\n }\n return $res;\n }", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "public function getChildren();", "protected function printTestTree(): void\n {\n echo ' Menu Structure '.\"\\n\";\n echo ' rt '.\"\\n\";\n echo ' / \\ '.\"\\n\";\n echo ' pt1 pt2 '.\"\\n\";\n echo ' / | \\ | '.\"\\n\";\n echo ' ch1 ch2 ch3 ch4 '.\"\\n\";\n echo ' | '.\"\\n\";\n echo ' gc1 '.\"\\n\";\n }", "public function __toString()\n\t{\n\t\treturn $this->_toString();\n\t}", "public function __toString() {\n\t\treturn $this->toString();\n\t}", "public function __toString() {\n\t\treturn $this->toString();\n\t}", "public function __toString()\n {\n $dot = 'digraph ' . $this->workflowName . \" {\\n\";\n\n foreach ( $this->nodes as $key => $data ) {\n $dot .= sprintf(\n \"node%s [label=\\\"%s\\\", color=\\\"%s\\\"]\\n\",\n $key,\n $data['label'],\n $data['color']\n );\n }\n\n $dot .= \"\\n\";\n\n foreach ( $this->edges as $fromNode => $toNodes ) {\n foreach ( $toNodes as $toNode ) {\n $dot .= sprintf(\n \"node%s -> node%s%s\\n\",\n\n $fromNode,\n $toNode[0],\n $toNode[1]\n );\n }\n }\n\n if (!empty($this->workflowVariables)) {\n $dot .= 'variables [shape=none, label=<<table>';\n\n foreach ($this->workflowVariables as $name => $value) {\n $dot .= sprintf(\n '<tr><td>%s</td><td>%s</td></tr>',\n\n $name,\n htmlspecialchars( Util::variableToString( $value ) )\n );\n }\n\n $dot .= \"</table>>]\\n\";\n }\n\n return $dot . \"}\\n\";\n }", "public function toString()\n {\n }", "public function __toString(){\n\t\treturn \"\".var_dump($this);\n\t}", "public function __toString() {\n\t\treturn $this->build ();\n\t}", "public function __toString () {\n\t\treturn $this->Render();\n\t}", "static function dump_html_tree($node, $show_attr=true, $deep=0)\n\t{\n\t\t$node->dump($node);\n\t}", "public function __toString()\n\t{\n\t\treturn $this->dump();\n\t}", "private function rec_renderChildren(array $nodes)\n\t{\n\t\tforeach($nodes AS $v)\n\t\t{\n\t\t\tif($v instanceof Component)\n\t\t\t{\n\t\t\t\techo $v->render();\n\t\t\t}\n\t\t\telse\n\t\t\t// Standard HTML\n\t\t\tif(is_array($v))\n\t\t\t{\n\t\t\t\tif(strncmp($v['name'], '{}', 2) != 0)\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception('Unrecognized component namespace ' . $v['name']);\n\t\t\t\t}\n\n\t\t\t\t$markup = preg_replace('/{(.*)}/', '', $v['name']);\n\n\t\t\t\tif($markup == 'br')\n\t\t\t\t{\n\t\t\t\t\techo '<br/>';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\techo '<', $markup;\n\t\t\t\tif(!empty($v['attributes']))\n\t\t\t\t{\n\t\t\t\t\t$attributes = array();\n\t\t\t\t\tforeach($v['attributes'] AS $attr => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$attributes[] = $attr . '=\"' . $value . '\"';\n\t\t\t\t\t}\n\t\t\t\t\techo ' ', join(' ', $attributes);\n\t\t\t\t}\n\t\t\t\techo '>';\n\n\t\t\t\tif(is_array($v['value']))\n\t\t\t\t{\n\t\t\t\t\t$this->rec_renderChildren($v['value']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo $v['value'];\n\t\t\t\t}\n\n\t\t\t\techo '</', $markup, '>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $v;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "public function __toString() {\n\t\t\t$html = \"<{$this->tag}\";\n\n\t\t\t// Add all the attributes\n\t\t\tforeach ($this->attributes as $key => $value) {\n\t\t\t\t$html .= \" {$key}=\\\"{$value}\\\"\";\n\t\t\t}\n\t\t\t$html .= \">\";\n\n\t\t\t// Add the inner html\n\t\t\t$html .= $this->inner;\n\n\t\t\t// Add children\n\t\t\tforeach ($this->children as $element) {\n\t\t\t\t$html .= $element;\n\t\t\t}\n\n\t\t\t// Close the tag\n\t\t\t$html .= \"</{$this->tag}>\";\n\n\t\t\treturn $html;\n\t\t}", "public function __toString()\n {\n return $this->toHtml();\n }", "public function render(): string\n {\n if ($this instanceof IsTextNode) {\n $html = implode('', $this->children);\n\n if ($this->escapeHtml) {\n $html = htmlspecialchars($html);\n }\n\n return $html;\n }\n\n $html = [\n '<'.$this->getName(),\n ];\n\n foreach ($this->attributes as $key => $value) {\n if (in_array($key, $this->booleanAttributes)) {\n if (! $value) {\n continue;\n }\n\n $html[] = ' '.$key;\n continue;\n }\n\n if ($value === null) {\n $html[] = ' '.$key;\n continue;\n }\n\n $value = htmlspecialchars((string) $value);\n\n $html[] = <<<EOL\n {$key}=\"{$value}\"\nEOL;\n }\n\n if ($this instanceof IsSingleton) {\n $html[] = ' />';\n } else {\n $html[] = '>';\n\n $html[] = $this->renderChildren();\n\n $html[] = '</'.$this->getName().'>';\n }\n\n $html = implode('', $html);\n\n return $html;\n }", "public function __toString() {\n\t\treturn get_class($this) . '-object ' . \"\\n\" .\n\t\t\t 'attributes: ' . print_r($this->attributes, 1) . \"\\n\";\n\t}", "function __toString () {\n \n \n \n }", "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "public function generateTreeHtml()\n {\n $htmlWriter = new Writer();\n\n return $htmlWriter->render( $this->mapRedisSchema(), $this->getNamespaceSeparator() );\n }", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString()\n {\n return print_r($this, true);\n }", "public function __toString() {\n\t\treturn $this->getHtml();\n\t}", "public function __tostring()\n\t{\n\t\treturn '<pre>' . print_r($this, true) . '</pre>';\n\t}" ]
[ "0.70736414", "0.6942445", "0.68213433", "0.677516", "0.67311156", "0.6724975", "0.6720872", "0.67094123", "0.6638178", "0.6607054", "0.65930605", "0.65775317", "0.65398896", "0.65095794", "0.64452183", "0.6443773", "0.6377824", "0.63743883", "0.62876564", "0.62808686", "0.6204325", "0.6200197", "0.61998636", "0.61947644", "0.6138507", "0.6128306", "0.6119866", "0.6111018", "0.61034167", "0.61012626", "0.61012626", "0.61012626", "0.61012626", "0.61012626", "0.61012626", "0.60792416", "0.60792416", "0.60696757", "0.60696757", "0.60696757", "0.60549736", "0.6043633", "0.6036926", "0.60364735", "0.60336727", "0.60286", "0.6011106", "0.5996861", "0.5987414", "0.59857464", "0.5985125", "0.5983283", "0.59470356", "0.59470356", "0.5941102", "0.59300977", "0.5929937", "0.5929937", "0.5929937", "0.5929937", "0.5929937", "0.5929937", "0.5922766", "0.5922546", "0.59134114", "0.590834", "0.58929724", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887768", "0.5887299", "0.5880353", "0.58790064", "0.58790064", "0.5878728", "0.58729297", "0.58706075", "0.58693475", "0.5861353", "0.5859673", "0.5854102", "0.5852677", "0.5844129", "0.5842619", "0.5841061", "0.5839779", "0.58397555", "0.5833817", "0.58248067", "0.58220375", "0.58220375", "0.5813891", "0.58002466", "0.57995224" ]
0.7287501
0
Returns the content of the node without its children
abstract public function getContent() : string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function emptyNode() {\r\n\t\t\r\n\t\tforeach ($this as $node) $node->nodeValue = '';\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "public function noContent()\n {\n return $this->factory->noContent();\n }", "function the_content_without_images() {\n\n $innerHTML = \"XX\";\n $html = \"\";\n\n // Buffer the HTML\n ob_start();\n the_content();\n $html = ob_get_contents();\n ob_end_clean();\n\n // Manipulate DOM\n $doc = new DOMDocument();\n $doc->loadHTML($html);\n $doc->encoding = 'UTF-8';\n\n $xpath = new DOMXPath( $doc );\n $childs = $xpath->query(\".//div\");\n foreach ( $childs as $node ) {\n if ( $node->getElementsByTagName(\"img\")->length ) {\n $node->parentNode->removeChild($node);\n }\n }\n\n // Return only the body contents of DOM\n return utf8_decode($doc->saveHTML($doc->getElementsByTagName(\"body\")->item(0)));\n}", "public function text()\n {\n return $this->node->textContent;\n }", "public function getUndefinedContent()\n {\n return $this->undefinedContent;\n }", "public function removeNodes($content)\r\n\t{\r\n\t\treturn preg_replace($this->_patterns['node'], '', $content);\r\n\t}", "public function noContent() {\n $this->noContent = 'NOCONTENT';\n return $this;\n }", "public function getParsedContent(): string\n {\n return $this->XMLTree;\n }", "public final function getHtml() : string\n {\n return \\implode('', $this->children);\n }", "public function get_text()\r\n\t{\r\n\t\t$text = '';\r\n\t\t\r\n\t\tforeach($this->children as $child)\r\n\t\t\t$text .= $child->get_text();\r\n\t\t\r\n\t\treturn $text;\r\n\t}", "public function contents() {\n\t\tif ( $this->is_empty() ) {\n\t\t\t// The sitemap should have at least the root element added to the DOM.\n\t\t\t$this->get_root_element();\n\t\t}\n\t\treturn $this->doc->saveXML();\n\t}", "public function getUnsaturatedFatContent()\n {\n return $this->unsaturatedFatContent;\n }", "public function text () { return trim($this[0]->textContent); }", "public function getAllChildNode()\r\n {\r\n return $this->_childNodes;\r\n }", "final public function __toString()\n {\n $ret = $this->getContent();\n foreach ($this as $node) {\n $ret .= PHP_EOL . (string)$node;\n }\n return $ret;\n }", "public function getContent () {\r\n\t\treturn $this->content;\r\n\t}", "public function popNode();", "protected function nodeContent($oNode, $bOuter = false)\n {\n $oDom = new DOMDocument('1.0');\n $b = $oDom->importNode($oNode->cloneNode(true), true);\n $oDom->appendChild($b);\n $h = $oDom->saveHTML();\n\n if (!$bOuter) {\n $h = substr($h, strpos($h, '>') + 1, -(strlen($oNode->nodeName) + 4));\n }\n\n return $h;\n }", "public function & getRoot()\n\t{\n\t\t$r = null;\n\t\tforeach($this->m_document->childNodes as $c)\n\t\t{\n\t\t\tif($c->nodeType == XML_ELEMENT_NODE)\n\t\t\t{\n\t\t\t\t$r = new ZXmlTag($c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(!$r)\n\t\t\t$r = new ZXmlTag($this->m_document);\n\n\t\treturn $r;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->_content;\n\t}", "public function getContent() {\r\n\t\treturn $this->content;\r\n\t}", "public function getSodiumContent()\n {\n return $this->sodiumContent;\n }", "function getContent()\n {\n return $this->getAttribute(\"content\");\n }", "public function getContent()\n\t{\n\t\treturn $this->content_;\n\t}", "public function getTextContent()\n {\n return $this->textContent;\n }", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "public function getContent() {\n\t\treturn $this->content;\n\t}", "private function removeIrrelevantChildren(\\DOMNode $node)\n {\n if ($node->hasChildNodes()) {\n foreach ($node->childNodes as $child) {\n if (is_a($child, \\DOMText::class) && strlen(trim($child->wholeText)) === 0) {\n $node->removeChild($child);\n $this->removeIrrelevantChildren($node);\n }\n }\n }\n }", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getContent()\n\t{\n\t\treturn $this->content;\n\t}", "public function getChildNodes() {}", "public function getChildNodes() {}", "public function getContent()\n {\n return $this->_content;\n }", "public function getContent()\r\n {\r\n return $this->_content;\r\n }", "public function getPanelContent()\n {\n return null;\n }", "public function get_content() {\n return $this->content;\n }", "protected function getRawContent() {\n @trigger_error('AssertLegacyTrait::getRawContent() is deprecated in drupal:8.2.0 and is removed from drupal:10.0.0. Use $this->getSession()->getPage()->getContent() instead. See https://www.drupal.org/node/3129738', E_USER_DEPRECATED);\n return $this->getSession()->getPage()->getContent();\n }", "public function getNode()\n {\n return parent::getNode();\n }", "public function filter_empty_content(): self {\n\t\treturn $this->filter(\n\t\t\tfunction( Tab $tab ) {\n\t\t\t\treturn ! empty( $tab->get_content() );\n\t\t\t}\n\t\t);\n\t}", "public function getText() {\n return iconv('utf-8', xp::ENCODING, $this->node->textContent);\n }", "function getTextContent() {\n\t\treturn $this->lobSub->lobText;\n\t}", "public function content()\n {\n return $this->content;\n }", "public function content()\n {\n return $this->content;\n }", "public function content()\n {\n return $this->content;\n }", "public function content()\n {\n $Parsedown = new Parsedown();\n return $Parsedown->text($this->_content);\n }", "public function strip_empty_tags( $content ) {\n\t\treturn preg_replace( '/<([a-z][\\w]*) ?><\\\\/\\\\1>/', '', $content );\n\t}", "public function removeChildNodes() {}", "public function getContent()\r\n {\r\n return $this->content;\r\n }", "public function getChildNodes()\n {\n return array_values($this->getChildNodesById());\n }", "public function getContent(){\n\t\treturn $this->content;\n\t}", "public function getContent() {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "public function getContent()\n {\n return $this->content;\n }", "final public function clearChildren() {\n\t\treturn $this;\n\t}", "public function contents()\n\t{\n\t\treturn $this->contents;\n\t}", "public function innertext()\n {\n return [];\n }", "public function getChildNodes();", "public function getRootNode() {}", "public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "function get_content() {\r\n\t\treturn $this->content;\r\n\t}", "public static function getEmptyContentObeobeko()\n {\n $obeobekos = Obeobeko::where('content', '')\n ->whereDate('created_at', '<', Carbon::now()->subDay()->toDateString())\n ->get();\n\n return $obeobekos;\n }", "public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }", "public function content(): string\n {\n return $this->outputStack->pop();\n }", "public static function getContent() {\n\t\treturn self::$_content;\n\t}", "public function getContent()\n {\n return $this->content;\n }", "protected function childNodesToHtml()\n {\n return array_reduce($this->childNodes, function ($html, $childNode) {\n return $html . $childNode->toHtml();\n }, '');\n }", "public function getContent() {\n\t\treturn $this->current_content;\n\t}", "public function remove () {\r\n\t\t\r\n\t\tforeach ($this as $node) \r\n\t\t $node->parentNode->removeChild($node);\r\n\t}", "public function contents() { return $this->_m_contents; }", "function getChildNodes() ;", "public function getContent() {\n if (empty($this->content)) {\n $this->refreshContent();\n }\n\n return $this->content;\n }", "function trim ($a_node)\n\t{\n\t\tif ($a_node->has_child_nodes()) {\n\t\t\t$childs = $a_node->child_nodes();\n\n\t\t\tforeach ($childs as $child) {\n\t\t\t\t$content = trim($child->get_content());\n\n\t\t\t\tif (empty($content)) {\n\t\t\t\t\t$child->unlink_node();\n\t\t\t\t} else {\n\t\t\t\t\t$this->trim($child);\n\t\t\t\t} \n\t\t\t} \n\t\t} \n\t}", "public function getEmpty()\n\t{\n\t\t$entity = new $this->entityClass();\n\t\treturn $this->loadRelations($entity);\n\t}", "public function getContent()\n {\n if ($this->_oContent === null) {\n $this->_oContent = false;\n if ($this->getContentId()) {\n return $this->_oContent;\n }\n }\n\n return $this->_oContent;\n }", "public function removeNodeNewContent()\n\t{\n\t\t$this->removeNode( 'new-content' );\n\t}" ]
[ "0.6529196", "0.6478429", "0.6455268", "0.6412828", "0.6154205", "0.5983346", "0.5929184", "0.5873453", "0.5861097", "0.57997483", "0.5777165", "0.5763351", "0.5751558", "0.5662479", "0.56602407", "0.565209", "0.5644931", "0.56203353", "0.56187326", "0.55932736", "0.55932736", "0.5588298", "0.5582272", "0.55819064", "0.55794567", "0.55784255", "0.55758816", "0.55758816", "0.55758816", "0.557263", "0.554911", "0.554911", "0.554911", "0.5537459", "0.5537109", "0.5520231", "0.55074215", "0.5496863", "0.54938287", "0.54902685", "0.54845", "0.5478984", "0.54709065", "0.546586", "0.5450343", "0.5450343", "0.5450343", "0.5436211", "0.54309297", "0.5425723", "0.5424953", "0.54238856", "0.54192215", "0.54155296", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.5413197", "0.54108095", "0.5401959", "0.5397129", "0.5396176", "0.53944856", "0.53913754", "0.53860384", "0.53860384", "0.53860384", "0.53811735", "0.53784794", "0.53777725", "0.5362256", "0.5357766", "0.53575915", "0.5351601", "0.5349702", "0.5347705", "0.5346661", "0.5336862", "0.53240657", "0.5323312", "0.53229666", "0.5321398", "0.53193986" ]
0.0
-1
Magic method to return the meta data like the post original fields.
public function __get($key) { if (!isset($this->$key)) { if (isset($this->term->$key)) { return $this->term->$key; } } return parent::__get($key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function meta()\n {\n return array_merge(parent::meta(), [\n 'fields' => 'adasd'\n ]);\n }", "public function meta()\n {\n return $this->meta;\n }", "public function getMeta();", "public function getMeta();", "public function getMeta(){\n // $this->meta();\n }", "public function get_meta() {\n\t\treturn $this->meta;\n\t}", "public function get_meta() {\n\t\treturn $this->meta;\n\t}", "protected function meta() {\n if (!$this->_meta) {\n // Initialize at first call\n $this->_meta = new \\stdClass();\n if (!$this->isNewRecord && $this->{static::meta_id_field()}) {\n foreach ($this->meta as $meta_row) {\n $this->_meta->{static::meta_prefix() . $meta_row->meta_key} = $meta_row->meta_value;\n }\n }\n }\n return $this->_meta;\n }", "public function getMeta() {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->meta;\n }", "public function getMeta()\n {\n return $this->getValue('meta');\n }", "public function getMeta()\n {\n return $this->getValue('meta');\n }", "public function getMeta() {\n return $this->meta;\n }", "public function prepareMetaData() {\n if ($this->mt instanceof folksoPageDataMeta) {\n return $this->mt;\n }\n\n if (! $this->ptags instanceof folksoPagetags) {\n $this->ptags = new folksoPagetags($this->loc, $this->url);\n }\n\n\n $this->mt = $this->ptags->buildMeta();\n if (! $this->e13 instanceof folksoEanList) {\n $this->e13 = new folksoEanList($this->loc, $this->url);\n }\n // this is supposed to be a reference. it had better be!\n $this->mt->e13 = $this->e13;\n return $this->mt;\n }", "public function get_meta() : array\n {\n return $this->additional['meta'] ?? [];\n }", "public function getMeta()\n {\n return $this->Meta;\n }", "public function getDataMetas()\n\t {\n\t \treturn get_option('metas-custom');\n\t }", "public static function getMetaData()\n {\n // _deprecated_function( __FUNCTION__, '1.4.1');\n\n global $post;\n\n $meta = new stdClass();\n\n $active = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ACTIVE, true);\n $meta->active = filter_var($active, FILTER_VALIDATE_BOOLEAN);\n\n $meta->latitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LATITUDE, true);\n if ($value != '') {\n $meta->latitude = (float)$value;\n }\n $meta->longitude = null;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_LONGITUDE, true);\n if ($value != '') {\n $meta->longitude = (float)$value;\n }\n\n $meta->mapType = self::MAP_TYPE_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_MAP_TYPE, true);\n if ($value != '') {\n $meta->mapType = $value;\n }\n\n $meta->zoom = self::MAP_ZOOM_DEFAULT;\n $value = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ZOOM, true);\n if ($value != '') {\n $meta->zoom = (int)$value;\n }\n\n $meta->title = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_TITLE, true);\n\n $description = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_DESCRIPTION, true);\n if (!is_admin()) {\n $description = apply_filters('pronamic_google_maps_item_description', $description);\n }\n $meta->description = $description;\n\n $meta->address = get_post_meta($post->ID, Pronamic_Google_Maps_Post::META_KEY_ADDRESS, true);\n\n $meta = apply_filters('pronamic_google_maps_post_meta', $meta);\n\n return $meta;\n }", "function getPostMeta( $_req )\n{\n $m = $_req;\n unset( $m['ID'], $m['post_author'], $m['post_date'], $m['post_date_gmt'], $m['post_title'], $m['post_content'] );\n unset( $m['post_excerpt'], $m['post_status'], $m['post_comment_status'], $m['ping_status'], $m['post_password'] );\n unset( $m['post_name'], $m['to_ping'], $m['pinged'], $m['post_modified'], $m['post_modified_gmt'] );\n unset( $m['post_content_filtered'], $m['post_parent'], $m['guid'], $m['menu_order'], $m['post_type']);\n unset( $m['post_mime_type'], $m['comment_count']);\n return $m;\n}", "public function getAllMeta()\n {\n return $this->meta;\n }", "public function getAllMeta()\n {\n return $this->meta;\n }", "function getMetaData()\n {\n $meta = parent::getMetaData();\n\n $meta[\"sum_bankcodes\"] = floatval($this->sum_bankcodes);\n $meta[\"sum_accounts\"] = floatval($this->sum_accounts);\n\n return $meta;\n }", "public function getAllMeta() {\n return $this->meta;\n }", "public function getMetas()\n {\n return $this->metas;\n }", "function getMeta()\n {\n if (!$this->meta)\n $this->meta = new DataEntity;\n\n return $this->meta;\n }", "public function getMeta(): array;", "public function metaFields()\n {\n $metaFields = [];\n foreach ($this->metaFieldDefinitions() as $fieldData) {\n $metaFields[] = Field::createFromData($fieldData);\n }\n return $metaFields;\n }", "public function getMetas(): object\n {\n return (object) $this->metas->pluck('value', 'key')->toArray();\n }", "private function getMeta() {\n $metadata = array(\n 'title' => 'User', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'User | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sidebar' => View::make('user.sidebar')\n );\n\n return $metadata;\n }", "public function getMetaInfo() {\n return $this->meta;\n }", "public function getMetaData()\n {\n if (is_null($this->_metaData)) {\n list($app, $name) = explode('/', $this->_config['name']);\n $args = array($name, $this->_config['params']);\n $this->_metaData = $GLOBALS['registry']->callByPackage(\n $app, 'getTableMetaData', $args);\n\n // We need to make vars for the columns.\n foreach ($this->_metaData['sections'] as $secname => $section) {\n foreach ($section['columns'] as $col) {\n $title = isset($col['title']) ? $col['title'] : '';\n $typename = isset($col['type']) ? $col['type'] : 'text';\n $params = isset($col['params']) ? $col['params'] : array();\n // Column types which begin with % are pseudo-types handled\n // directly.\n if (substr($typename, 0, 1) != '%') {\n $type = Horde_Form::getType($typename, $params);\n $var = new Horde_Form_Variable(\n $title, $col['name'], $type, false, true, '');\n $this->_formVars[$secname][$col['name']] = $var;\n }\n }\n }\n }\n\n return $this->_metaData;\n }", "function brag_rest_meta_get_flamingo( $object, $field_name, $request ) {\n\n\t$meta = get_post_meta( $object[ 'id' ], '_meta' );\n\n\treturn $meta;\n}", "private function prepareMeta() {\n\t\tif (is_array($this->meta) && count($this->meta)) {\n\t\t\tforeach ($this->meta as $label => $value) {\n\t\t\t\t$this->meta[$label] = str_replace(\"\\r\", '', str_replace(\"\\n\", '<br />', $value));\n\t\t\t}\n\t\t}\n\n\t\t// add generator string\n\t\t$this->meta['generator'] = 'LFEditor';\n\n\t\treturn $this->meta;\n\t}", "public static function getMeta() {\n return json_decode(\n '['\n . ' {'\n . ' \"name\":\"appointment_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_patient_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_time\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_date\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_doctor_id\",'\n . ' \"type\":\"int\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_reason\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"doctor_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_firstname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"user_lastname\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_state_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' },'\n . ' {'\n . ' \"name\":\"appointment_cncl_descr\",'\n . ' \"type\":\"varchar\",'\n . ' \"default\": null'\n . ' }'\n . ']'\n );\n }", "function enlight_get_api_post_meta($object, $field, $request)\n{\n return get_post_meta($object['id'], 'enlight_' . $field, true);\n}", "function wp_api_encode_acf($data,$post,$context){\n $customMeta = (array) get_fields($post['ID']);\n\n $data['meta'] = array_merge($data['meta'], $customMeta );\n return $data;\n}", "protected function get_meta_data() {\n\t\t$file_data = $this->get_main_file_data();\n\n\t\tif ( isset( $file_data['Theme Name'] ) ) {\n\t\t\t$name = $file_data['Theme Name'];\n\t\t\t$author = $file_data['Author'];\n\t\t\t$bugs_address = sprintf( 'https://wordpress.org/support/theme/%s', $this->slug );\n\t\t} else {\n\t\t\t$name = $file_data['Plugin Name'];\n\t\t\t$author = $name;\n\t\t\t$bugs_address = sprintf( 'https://wordpress.org/support/plugin/%s', $this->slug );\n\t\t}\n\n\t\t$meta = [\n\t\t\t'name' => $name,\n\t\t\t'version' => $file_data['Version'],\n\t\t\t'comments' => sprintf(\n\t\t\t\t\"Copyright (C) %1\\$s %2\\$s\\nThis file is distributed under the same license as the %3\\$s package.\",\n\t\t\t\tdate( 'Y' ),\n\t\t\t\t$author,\n\t\t\t\t$name\n\t\t\t),\n\t\t\t'msgid-bugs-address' => $bugs_address,\n\t\t];\n\n\t\tif ( isset( $file_data['License'] ) ) {\n\t\t\t$meta['comments'] = sprintf(\n\t\t\t\t\"Copyright (C) %1\\$s %2\\$s\\nThis file is distributed under the %3\\$s.\",\n\t\t\t\tdate( 'Y' ),\n\t\t\t\t$author,\n\t\t\t\t$file_data['License']\n\t\t\t);\n\t\t}\n\n\t\treturn $meta;\n\t}", "protected function get_fields() {\n\t\treturn rwmb_get_registry( 'field' )->get_by_object_type( 'post' );\n\t}", "public function get_post_data() {\n\t\treturn $this->post;\n\t}", "public function meta(){\n $table_meta = new \\stdClass();\n\n // get fields in the database table\n if(count($this->_model_meta)==0){\n $this->_meta();\n }\n\n\n foreach ($this->_model_meta as $meta) {\n $table_meta->{$meta->name} = $meta;\n }\n\n return $table_meta;\n }", "public function metaReLoad()\n {\n return $this->meta = $this->meta()->get();\n }", "public static function meta();", "function get_post_data() {\n\t\tif (empty($this->post)) :\n\t\t\t$this->post = get_post( $this->id );\n\t\tendif;\n\t\t\n\t\treturn $this->post;\n\t}", "public function meta()\n {\n return array_merge([\n 'meta' => [\n 'cardHeight' => $this->getHeight(),\n 'seriesLabels' => $this->seriesLabels(),\n 'colors' => $this->colors(),\n 'showMarkers' => $this->showMarkers(),\n 'refreshRate' => $this->refreshRate()\n ]\n ], $this->withMeta([]));\n }", "public function getMetaData(): object\n\t{\n\t\treturn $this->metaData;\n\t}", "protected function get_post_custom( $pid ) {\n\t\t$post_meta = array();\n\n\t\t/**\n\t\t * Filters post meta data before it is fetched from the database.\n\t\t *\n\t\t * Timber loads all meta values into the post object on initialization. With this filter,\n\t\t * you can disable fetching the meta values through the default method, which uses\n\t\t * `get_post_meta()`, by returning `false` or an non-empty array.\n\t\t *\n\t\t * @example\n\t\t * ```php\n\t\t * // Disable fetching meta values.\n\t\t * add_filter( 'timber_post_get_meta_pre', '__return_false' );\n\t\t *\n\t\t * // Add your own meta data.\n\t\t * add_filter( 'timber_post_get_meta_pre', function( $post_meta, $post_id, $post ) {\n\t\t * $post_meta = array(\n\t\t * 'custom_data_1' => 73,\n\t\t * 'custom_data_2' => 274,\n\t\t * );\n\t\t *\n\t\t * return $post_meta;\n\t\t * }, 10, 3 );\n\t\t * ```\n\t\t *\n\t\t * @param array $post_meta An array of custom meta values. Passing false or a\n\t\t * non-empty array will skip fetching the values from the\n\t\t * database and will use the filtered values instead. Default\n\t\t * `array()`.\n\t\t * @param int $post_id The post ID.\n\t\t * @param \\Timber\\Post $post The post object.\n\t\t */\n\t\t$post_meta = apply_filters('timber_post_get_meta_pre', $post_meta, $pid, $this);\n\n\t\t// Load all meta data when it wasn’t filtered before.\n\t\tif ( false !== $post_meta && empty( $post_meta ) ) {\n\t\t\t$post_meta = get_post_meta( $pid );\n\t\t}\n\n\t\tif ( !is_array($post_meta) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\tforeach ( $post_meta as $key => $value ) {\n\t\t\tif ( is_array($value) && count($value) == 1 && isset($value[0]) ) {\n\t\t\t\t$value = $value[0];\n\t\t\t}\n\t\t\t$post_meta[$key] = maybe_unserialize($value);\n\t\t}\n\t\t$post_meta = apply_filters('timber_post_get_meta', $post_meta, $pid, $this);\n\t\treturn $post_meta;\n\t}", "private function get_default_meta_data() {\n $default_meta_data = array(\n 'product_id' => 0,\n 'title' => '',\n 'from' => '',\n 'to' => '',\n 'duration' => 1,\n 'duration_unit' => '',\n 'persons' => 1,\n 'person_types' => array(),\n 'order_id' => 0,\n 'order_item_id' => 0,\n 'user_id' => 0,\n 'services' => array(),\n 'service_quantities' => array(),\n 'can_be_cancelled' => false,\n 'cancelled_duration' => 0,\n 'cancelled_unit' => 'month',\n 'activities' => array(),\n 'location' => '',\n 'all_day' => 'no',\n 'has_persons' => '',\n 'google_calendar_last_update' => ''\n\n );\n\n return $default_meta_data;\n }", "public function _meta(){\n if(!$this->db->table_exists($this->table_name())):\n throw new OrmExceptions(sprintf(\"The table %s does not exist\", $this->table_name()));\n endif;\n\n if(empty($this->_model_meta )){\n $this->_model_meta = $this->db->field_data($this->table_name());\n $this->_fields_loaded = TRUE;\n }\n return $this->_model_meta ;\n }", "public function getMetaAttribute(): object\n {\n return $this->getMetas();\n }", "public function getPostFields()\n {\n return $this->invokeWrappedIfEntityEnclosed(__FUNCTION__, func_get_args());\n }", "function the_meta()\n {\n }", "public function getFieldsMetadata()\n {\n return $this->fieldsMetadata;\n }", "static function get_post_metas($post){\n\t\t$post_id = false;\n\n\t\tif(!is_numeric($post)){\n\t\t\tif(isset($post->id)){\n\t\t\t\t$post_id = $post->id;\n\t\t\t}else{\n\t\t\t\t$post_id = $post->ID;\n\t\t\t}\n\t\t}else{\n\t\t\t$post_id = $post;\n\t\t}\n\n\t\tif(!$post_id) return [];\n\n\t\tstatic $cache;\n\t\tif(isset($cache[$post_id])) return $cache[$post_id];\n\n\t\t/**\n\t\t * Get and unserialize post meta\n\t\t *\n\t\t * @param $post_id\n\t\t *\n\t\t * @return array\n\t\t */\n\t\t$get_metas = function($post_id){\n\t\t\t$metas = array_map(function($value){\n\t\t\t\tif(is_array($value) && isset($value[0])){\n\t\t\t\t\treturn maybe_unserialize($value[0]);\n\t\t\t\t}else{\n\t\t\t\t\treturn $value;\n\t\t\t\t}\n\t\t\t},get_post_meta($post_id));\n\t\t\treturn $metas;\n\t\t};\n\n\t\t$metas = $get_metas($post_id);\n\n\t\t$cache[$post_id] = $metas;\n\n\t\treturn $metas;\n\t}", "protected function getMetas(): array\n {\n return $this->metas;\n }", "public static function getAccessiblePostMeta($postId)\n {\n $meta = get_post_meta($postId);\n $newMeta = array();\n foreach ($meta as $key => $list) {\n if (count($list) == 1) {\n $newMeta[$key] = $list[0];\n } else {\n $newMeta[$key] = $list;\n }\n }\n\n return $newMeta;\n }", "private function getMetaData ()\n\t\t{\n\t\t\t$data = file_get_contents (\"META.inf\");\n\t\t\t$o = json_decode ($data,true);\n\t\t\treturn $o;\t\n\t\t}", "function siteorigin_panels_wp_import_post_meta($post_meta){\n\tforeach($post_meta as $i => $meta) {\n\t\tif($meta['key'] == 'panels_data') {\n\t\t\t$value = $meta['value'];\n\t\t\t$value = preg_replace(\"/[\\r\\n]/\", \"<<<br>>>\", $value);\n\t\t\t$value = preg_replace('!s:(\\d+):\"(.*?)\";!e', \"'s:'.strlen('$2').':\\\"$2\\\";'\", $value);\n\t\t\t$value = unserialize($value);\n\t\t\t$value = array_map('siteorigin_panels_wp_import_post_meta_map', $value);\n\n\t\t\t$post_meta[$i]['value'] = $value;\n\t\t}\n\t}\n\n\treturn $post_meta;\n}", "function get_meta($items) {\n\t\tif($items) {\n\t\t\tif(is_array($items)) {\n\t\t\t\tforeach($items as $item) {\n\t\t\t\t\t$item->meta = get_post_custom($item->ID);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$items->meta = get_post_custom($items->ID);\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "#[Pure]\n public function getPostFields() {}", "public function getMeta($key)\n {\n return $this->meta[$key] = get_post_meta($this->id, $key, true);\n }", "public function meta() {\n\t\treturn [\n\t\t\t'name' => 'Duck page',\n\t\t\t'description' => 'This is a duck page',\n\t\t\t'template' => 'pages/duck-page.php',\n\t\t\t'post_type' => 'duck'\n\t\t];\n\t}", "private function save_paypal_meta_data()\n {\n $postMeta = [\n 'payer_email' => 'Payer PayPal address',\n 'first_name' => 'Payer first name',\n 'last_name' => 'Payer last name',\n 'payment_type' => 'Payment type',\n ];\n\n foreach ($postMeta as $key => $name) {\n $value = wc_clean($this->request->get($key, FILTER_DEFAULT));\n $value and update_post_meta($this->order->get_id(), $name, $value);\n }\n }", "function awm_basic_meta_structure($fields)\n {\n $metas = array();\n\n foreach ($fields as $field) {\n $meta_key = awm_clean_string($field['key']);\n $metas[$meta_key] = $field;\n $metas[$meta_key]['label'] = __($field['label'], 'extend-wp');\n\n $metas[$meta_key]['class'] = !empty($field['class']) ? explode(',', $field['class']) : array();\n $attributes = array();\n if (isset($field['attributes'])) {\n foreach ($field['attributes'] as $attribute) {\n if (!empty($attribute['label']) && !empty($attribute['value'])) {\n $attributes[$attribute['label']] = $attribute['value'];\n }\n }\n }\n $metas[$meta_key]['attributes'] = $attributes;\n switch ($field['case']) {\n case 'select':\n case 'radio':\n $metas[$meta_key]['options'] = array();\n if (!empty($field['options'])) {\n foreach ($field['options'] as $option) {\n $metas[$meta_key]['options'][$option['option']] = array('label' => __($option['label'], 'extend-wp'));\n }\n }\n break;\n }\n }\n\n return $metas;\n }", "function meta($key) {\n return get_post_meta($post->ID, $key, true);\n}", "public function getMeta(): ?array\n {\n return $this->meta;\n }", "public function getNonMetadataFields(): array\n\t{\n\t\t$values = $this->fields;\n\t\t$values['name'] = $this->name;\n\t\t$values['slug'] = $this->slug;\n\t\t$values['_archived'] = $this->archived;\n\t\t$values['_draft'] = $this->draft;\n\n\t\treturn $values;\n\t}", "public function getMeta() {\n return $this->hasMany(Meta::class,\n ['owner_id' => static::meta_id_field()])->andWhere([Meta::tableName() . '.owner' => static::tableName()]);\n }", "protected function save_meta() {}", "public function getMetaData();", "protected function metadataFields()\n {\n return [\n 'first_name',\n 'last_name',\n 'city',\n 'phone_number',\n 'state',\n 'postal_code',\n 'modified_by'\n ];\n }", "public function metas()\n {\n return $this->hasMany(PostMeta::class);\n }", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "public function getMetaData()\n {\n return $this->metadata;\n }", "function save_meta_info( $post_id, $post ) {\n if($post->post_type != 'events')\n return $post_id;\n\n /* Verify the nonce before proceeding. */\n if ( !isset( $_POST['mindevents_event_meta_nonce'] ) || !wp_verify_nonce( $_POST['mindevents_event_meta_nonce'], basename( __FILE__ ) ) )\n return $post_id;\n\n\n\n $field_key = 'event_meta';\n /* Get the posted data and sanitize it for use as an HTML class. */\n $new_meta_values = (isset( $_POST[$field_key]) ? $_POST[$field_key] : '' );\n if($new_meta_values) :\n foreach ($new_meta_values as $key => $value) :\n update_post_meta( $post_id, $key, $value);\n endforeach;\n endif;\n\n return $post_id;\n }", "function acf_get_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "public function form_fields() {\n\t\treturn apply_filters( \"appthemes_{$this->box_id}_metabox_fields\", $this->form() );\n\t}", "public function global_custom_metadata( $post_id = null ) {\n\t\t$post_id = $post_id === null ? get_the_ID() : intval( $post_id );\n\t\t$custom = get_post_custom( $post_id );\n\t\t//Get all the keys that are not protected meta and not links\n\t\t$custom_keys = array_filter( (array) get_post_custom_keys( $post_id ), function ( $meta ) use ( $custom ) {\n\t\t\treturn apply_filters( 'is_protected_meta', filter_var( $custom[ $meta ][0], FILTER_VALIDATE_URL ), $meta, null ) === false;\n\t\t} );\n\n\t\t$real_data = array();\n\t\t$value = array();\n\t\t$value_type = array();\n\t\t$labels = array();\n\n\t\tforeach ( $custom_keys as $val ) {\n\t\t\t$key = $post_id . '::' . $val;\n\t\t\t$real_data[ $key ] = $custom[ $val ][0]; //Value that will be displayed\n\t\t\t$value[ $key ] = $val; //Value appearing as option title\n\t\t\t$value_type[ $key ] = '0'; //Value type (text)\n\n\t\t\t$labels[ $val ] = static::get_label_for_key( $val, $post_id );\n\t\t}\n\n\t\tif ( ! isset( $this->external_fields ) ) {\n\t\t\t$this->external_fields = $this->get_all_external_fields();\n\t\t}\n\n\t\tif ( ! empty( $this->external_fields['text'] ) ) {\n\t\t\tforeach ( $this->external_fields['text'] as $k => $v ) {\n\t\t\t\t$key = $post_id . '::' . $k;\n\t\t\t\t$real_data[ $key ] = $v['value']; //Value that will be displayed\n\t\t\t\t$value[ $key ] = $v['label']; //Value appearing as option title\n\t\t\t\t$value_type[ $key ] = '0'; //Value type (text)\n\n\t\t\t\t$labels[ $k ] = $v['label'];\n\t\t\t}\n\t\t}\n\n\t\treturn array(\n\t\t\t'real_data' => $real_data,\n\t\t\t'value' => $value,\n\t\t\t'value_type' => $value_type,\n\t\t\t'labels' => $labels,\n\t\t);\n\t}", "function GetMetaInfo(){\r\n\r\n\treturn !empty($_POST['app_meta'])? json_decode($_POST['app_meta'],true):array();\r\n}", "private function metadata($postID)\n {\n // Get thumb_id from metadata table\n $metaData_thumb_id = MetaData::where('post_id', $postID)\n ->where('meta_key', '_thumbnail_id')\n ->value('meta_value');\n // Get pyre_video link from matadata table\n $video_url_noneEdit = MetaData::where('post_id', $postID)\n ->where('meta_key', 'pyre_video')\n ->value('meta_value');\n // Get image name from matadata table\n $image_url = MetaData::where('post_id', $metaData_thumb_id)\n ->where('meta_key', \"_wp_attached_file\")\n ->value('meta_value');\n\n // fileter url\n $one = str_after($video_url_noneEdit, 'src=');\n $two = str_before($one, 'frameborder=');\n $three = str_after($two, '\"');\n $video_url = str_before($three, '\"'); // Final video URL\n\n return (object)[\n 'image_url'=> $image_url,\n 'video_url'=> $video_url\n ];\n\n }", "private function _populatePromotorMeta()\n {\n return $this->promotor_meta->set(\n $this->promotorNewsData['promotor_ID'], \n $this->promotorNewsData['name'], \n $this->promotorNewsData['content']\n );\n }", "function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }", "public function fields()\n {\n $fields = parent::fields();\n\n unset($fields['time_sent'], $fields['time_read'], $fields['time_archived'], $fields['uid']);\n\n $fields['timeSent'] = 'time_sent';\n $fields['wasRead'] = 'wasRead';\n $fields['wasArchived'] = 'wasArchived';\n\n return $fields;\n }", "protected function getMetadata()\n {\n // object not working must use array\n $metadata['platform'] = \"Magento 1\";\n $metadata['version'] = Mage::getVersion();\n return $metadata;\n }", "public function metaField()\n {\n return $this->belongsTo(\n MetaField::class,\n self::COLUMN_META_FIELD_ID\n );\n }", "function photo_data($post) {\n $post_meta = get_post_meta($post->ID);\n // Busca a imagem do post.\n $src = wp_get_attachment_image_src($post_meta[\"img\"][0], \"large\")[0];\n // Busca os dados do usuário que fez o post.\n $user = get_userdata($post->post_author);\n // Busca os comentários do post.\n $total_comments = get_comments_number($post->ID);\n\n // Retorna os dados estruturados.\n return [\n \"id\" => $post->ID,\n \"author\" => $user->user_login,\n \"title\" => $post->post_title,\n \"date\" => $post->post_date,\n \"src\" => $src,\n \"peso\" => $post_meta[\"peso\"][0],\n \"idade\" => $post_meta[\"idade\"][0],\n \"acessos\" => $post_meta[\"acessos\"][0],\n \"total_comments\" => $total_comments\n ];\n}", "public function modifyMeta(array $meta)\n {\n $this->meta = $meta;\n $this->addCustomFieldset();\n\n return $this->meta;\n }", "abstract public function getCorrespondingMetaData();", "function wpv_post_meta($post_id, $meta='', $single=false) {\n\t$real_id = wpv_get_the_ID();\n\n\tif ($real_id && $post_id != $real_id)\n\t\t$post_id = $real_id;\n\n\treturn get_post_meta( $post_id, $meta, $single );\n}", "function ilusix_get_my_meta_box_content( $postId ) {\n global $myMetaBoxValueId;\n\n $result = array();\n $metaBoxContent = unserialize( get_post_meta( $postId, $myMetaBoxValueId, true ) );\n $result['value-1'] = isset( $metaBoxContent['value-1'] ) ? $metaBoxContent['value-1'] : '';\n $result['value-2'] = isset( $metaBoxContent['value-2'] ) ? $metaBoxContent['value-2'] : '';\n\n return $result;\n}", "function fumseck_pagemeta() {\n\t\n\t// Initialize\n\t\n\t$output = '';\n\tglobal $post;\n\t$post_id = $post->ID;\n\t\n\t\n\t// Get metadata for the page from WordPress\n\t\n\t$post_title = get_the_title($post_id);\n\t$post_permalink = get_permalink($post_id);\n\t\n\t$post_has_featured_image = has_post_thumbnail( $post_id );\n\t\n\tif( $post_has_featured_image ) {\n\t\t$post_featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); // [URL, w, h, resized?]\n\t};\n\t\n\t$post_summary = wp_strip_all_tags( get_field( '_summary', $post_id, true ));\n\t\n\t\n\tif ( ! $post_summary ) {\t\t// if no summary, try a manual excerpt\n\t\t$post_summary = $post->post_excerpt;\n\t};\t// TODO: do something if there's no manual excerpt either\n\n\t\n\t// Static metadata\n\t\n\t$output .= '<meta name=\"twitter:site\" content=\"@gpaumier\"><meta name=\"twitter:creator\" content=\"@gpaumier\">';\t\n\t$output .= '<meta name=\"twitter:domain\" content=\"guillaumepaumier.com\">';\t\n\t$output .= '<meta property=\"fb:admins\" content=\"710543474\" />';\n\t//$output .= '<meta property=\"fb:admins\" content=\"579323492087704\" />';\n\t$output .= '<meta property=\"article:author\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t$output .= '<meta property=\"article:publisher\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t\n\t$output .= '<meta property=\"og:type\" content=\"article\" />'; // TODO: be more specific\n\t\n\t// Common metadata\n\t\n\t$output .= '<meta property=\"og:site_name\" content=\"' . get_bloginfo( 'name' ) . '\"/>';\n\t\n\t$output .= '<meta name=\"twitter:title\" content=\"' . $post_title . '\">';\n\t$output .= '<meta property=\"og:title\" content=\"' . $post_title . '\"/>';\n\t\n\t\n\t$output .= '<meta property=\"og:url\" content=\"' . $post_permalink . '\" />';\n\t\n\t\n\t$output .= '<meta property=\"og:description\" content=\"' . $post_summary . '\" />';\n\t\n\t// TODO: add locale\n\t\n\tif ( get_post_format( $post_id ) === 'image' ) {\n\t\t\n\t\t$output .= '<meta name=\"twitter:card\" content=\"photo\">';\n\t\t$output .= '<meta name=\"twitter:image\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:width\" content=\"' . $post_featured_image_large[1] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:height\" content=\"' . $post_featured_image_large[2] . '\">';\n\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\n\t} else {\t// Not a photo\n\t\t\n\t\t$output .= '<meta name=\"twitter:description\" content=\"' . $post_summary . '\">';\n\t\t\n\t\tif( $post_has_featured_image ) {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t$output .= '<meta name=\"twitter:image:src\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t\t$output .= '<meta property=\"og:image\" content=\"' . $post_featured_image_large[0] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary\">';\n\t\t}\n\t\t\n\t};\n\t\n\n\techo $output;\n}", "public function getMetaFieldsProperty()\n {\n return collect(config('getcandy-hub.customers.searchable_meta'));\n }", "function apply_json_filter( $_post, $post, $context )\n{\n $_post['meta'] = array_merge($_post['meta'],get_fields($post['ID']));\n return $_post;\n}", "function wp_create_initial_post_meta()\n {\n }", "public function getCustomFields() {\n return Doctrine::getTable('ArticleCustomFieldValue')->getCustomFields($this);\n }", "function get_booking_meta() {\n $meta = array();\n foreach ( $this->get_default_meta_data() as $key => $value ) {\n if ( $key !== 'services' ) {\n $meta[ $key ] = get_post_meta( $this->id, '_' . $key, true );\n } else {\n $meta[ $key ] = wp_get_post_terms( $this->id, YITH_WCBK_Post_Types::$service_tax, array( 'fields' => 'ids' ) );\n }\n }\n\n return $meta;\n }", "function get_meta() {\n\n\t\t// Get meta fields\n\t\t$post_id\t\t\t= $this->post_id;\n\t\t$capacity\t\t\t= get_post_meta( $post_id , 'event_capacity' , true );\n\t\t$this->capacity\t\t= ( '' == $capacity ) ? 9999 : $capacity;\n\t\t$this->req_rsvp\t\t= get_post_meta( $post_id , 'event_rsvp' , true );\n\t\t$this->req_role\t\t= get_post_meta( $post_id , 'event_role' , true );\n\t\t$rsvps\t\t\t\t= get_post_meta( $post_id , 'event_rsvps' , true );\n\n\t\t// Sort responses alphabetically by name\n\t\tif( !empty( $rsvps ) ) :\n\t\t\t$names = array();\n\t\t\t\n\t\t\t// Get user information\n\t\t\tforeach ($rsvps as $user_id => $info) {\n\t\t\t\t$name = bp_core_get_user_displayname( $user_id );\n\t\t\t\t$link = bp_core_get_userlink( $user_id );\n\t\t\t\t$rsvps[$user_id]['id']\t\t= $user_id;\n\t\t\t\t$rsvps[$user_id]['name'] \t= $name;\n\t\t\t\t$rsvps[$user_id]['link'] \t= $link;\n\t\t\t\t$names[$user_id] \t\t\t= strtolower( $name );\n\t\t\t}\n\t\t\t\n\t\t\t// Sort the array alphabetically\n\t\t\tarray_multisort($names, SORT_STRING, $rsvps);\n\t\t\t\n\t\t\t// Restore the user_id keys\n\t\t\t$temp = array();\n\t\t\tfor ( $i = 0; $i < count( $rsvps ); $i++ )\n\t\t\t\t$temp[$rsvps[$i]['id']] = $rsvps[$i];\t\n\t\t\t$rsvps = $temp;\n\t\telse :\n\t\t\t$rsvps = array();\n\t\tendif;\n\n\t\t// Add the array of RSVPS to the object\n\t\t$this->rsvps = $rsvps;\n\n\t\t// Count Attendance\n\t\t$confirmed \t= 0;\n\t\t$maybe \t\t= 0;\n\t\t$declined \t= 0;\n\t\tforeach ( $rsvps as $response ) {\n\t\t\tif ( 'yes' == $response['rsvp'] )\t\t$confirmed++;\n\t\t\telseif ( 'maybe' == $response['rsvp'] ) $maybe++;\n\t\t\telseif ( 'no' == $response['rsvp'] )\t$declined++;\n\t\t}\n\n\t\t// Add response counts to the object\n\t\t$this->confirmed = $confirmed;\n\t\t$this->maybe = $maybe;\n\t\t$this->declined = $declined;\n\n\t\t// Check the user's response\n\t\tif ( isset( $rsvps[get_current_user_id()] ) ) {\n\t\t\tswitch ( $rsvps[get_current_user_id()]['rsvp'] ) {\n\t\t\t\tcase \"yes\" :\n\t\t\t\t\t$rsvp = \"Attending\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"no\" :\n\t\t\t\t\t$rsvp = \"Absent\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"maybe\" :\n\t\t\t\t\t$rsvp = \"Maybe\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse $rsvp = \"RSVP\";\n\t\t$this->rsvp = $rsvp;\n\n\t\t// Get date information\n\t\t$this->time\t= get_the_date( 'g:ia' );\n\t\t$this->day\t= get_the_date( 'l' );\n\t\t$this->date\t= get_the_date( 'M j' );\n\n\t\t// Has it passed?\n\t\t$this->is_past = ( strtotime( get_the_date( \"Y-m-d\\TH:i \\E\\S\\T\" ) ) < time() ) ? true : false;\n\t}" ]
[ "0.7257629", "0.7206353", "0.7098498", "0.7098498", "0.70578384", "0.7052013", "0.7052013", "0.7037694", "0.6981776", "0.6936464", "0.6936464", "0.6936464", "0.6936464", "0.6936464", "0.69262695", "0.69262695", "0.68840396", "0.6820423", "0.6800883", "0.67910904", "0.6788359", "0.6761037", "0.6742416", "0.67300886", "0.66337246", "0.66286296", "0.660405", "0.65771806", "0.6497295", "0.64637166", "0.6449435", "0.6441681", "0.6441013", "0.6420183", "0.64175344", "0.6404231", "0.63911986", "0.6386747", "0.63677806", "0.63161474", "0.63023674", "0.62957686", "0.6290772", "0.62894684", "0.6282365", "0.6273771", "0.6240707", "0.62402976", "0.6213249", "0.6209857", "0.62044", "0.6203918", "0.61936027", "0.6184982", "0.6181718", "0.617611", "0.6152866", "0.61520797", "0.6148945", "0.61442137", "0.61172074", "0.6105789", "0.6091596", "0.6082743", "0.60778946", "0.60724837", "0.6070433", "0.6067248", "0.6064338", "0.6056347", "0.6052852", "0.6039359", "0.60076356", "0.6005032", "0.60028136", "0.6001494", "0.6001494", "0.59970707", "0.5995247", "0.5983606", "0.59797955", "0.59773254", "0.59772664", "0.5965982", "0.59606874", "0.59556264", "0.595073", "0.5936643", "0.5934103", "0.5929389", "0.59256655", "0.59237117", "0.592364", "0.59198684", "0.59121126", "0.5909298", "0.59045017", "0.590086", "0.5895325", "0.5892202", "0.58850443" ]
0.0
-1
Creates a query builder which get the term neighbors in hierarchy for this term (same parent).
public function neighbors() { $parent = $this->parent; $exclude = $this->term_id; $query = static::where('term_id', '!=', $exclude); return $parent ? $query->where('parent', $parent) : $query->whereNull('parent'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNodeTreeQueryBuilder()\n {\n $qb = $this->repository\n ->createQueryBuilder('c')\n ->select('c, p')\n ->leftJoin('c.parent', 'p')\n ->orderBy('c.lft');\n\n return $qb;\n }", "public function get_neighbors()\n\t{\n\t\t// get parent Directory and its children\n\t\t$path = $this->dir->getPath();\n\t\t$parent = new self(dirname($path));\n\t\t$dirs = $parent->get_dirs();\n\n\t\t// find position of current dir\n\t\t$key = array_search(basename($path), $dirs);\n\n\t\t// check if previous/next directories exist\n\t\t$neighbors = array();\n\t\tif (array_key_exists($key - 1, $dirs))\n\t\t\t$neighbors['prev'] = $dirs[$key - 1];\n\t\tif (array_key_exists($key + 1, $dirs))\n\t\t\t$neighbors['next'] = $dirs[$key + 1];\n\n\t\treturn $neighbors;\n\t}", "public function roots() {\n $db = $this->getDbConnection();\n $this->getDbCriteria()->addCondition($db->quoteColumnName($this->getTableAlias()) . '.' . $db->quoteColumnName($this->leftAttribute) . '=1');\n\n return $this;\n }", "public function nest()\n {\n $target = $this->getCurrentPredicate();\n \n if ($operator = $this->getDefaultOperator()) {\n $target->$operator;\n }\n \n $this->nestings[] = $target->nest();\n $this->nestedOperators[] = $this->getDefaultOperator();\n \n return $this;\n }", "public function getNodesQueryBuilder($parentId=null)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node');\n\n // Get the name of the parent field\n $parentColumn = $metadata->closureTree['parent']['fieldName'];\n\n if (!$parentId) {\n $queryBuilder->where('node.'. $parentColumn .' IS NULL');\n } else {\n $queryBuilder->where('node.'. $parentColumn .' = :parentId')->setParameter('parentId', $parentId);\n }\n\n return $queryBuilder;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new TermTaxonomyBuilder($this->newBaseQueryBuilder());\n $builder->setModel($this)->with($this->with);\n\n if (isset($this->taxonomy) &&\n !empty($this->taxonomy) &&\n !is_null($this->taxonomy))\n {\n $builder->where('taxonomy', $this->taxonomy);\n }\n return $builder;\n }", "public function getBuilder()\n {\n $builder = new Query\\Builder($this->getKeys());\n $builder->setVisitors([\n new Visitors\\EqVisitor($builder),\n new Visitors\\NotEqVisitor($builder),\n new Visitors\\GtVisitor($builder),\n new Visitors\\GteVisitor($builder),\n new Visitors\\LtVisitor($builder),\n new Visitors\\LteVisitor($builder),\n new Visitors\\CtVisitor($builder),\n new Visitors\\SwVisitor($builder),\n new Visitors\\EwVisitor($builder),\n new Visitors\\AndVisitor($builder),\n new Visitors\\OrVisitor($builder),\n new Visitors\\NotInVisitor($builder),\n new Visitors\\InVisitor($builder),\n new Visitors\\NullVisitor($builder),\n new Visitors\\NotNullVisitor($builder),\n ]);\n\n return $builder;\n }", "public function newQuery()\n {\n $builder = new Builder($this->newBaseQueryBuilder());\n\n $builder->setModel($this);\n\n return $builder;\n }", "public function getDishesAndVariations()\n {\n $query = $this->createQueryBuilder('d');\n $qb2 = $this->createQueryBuilder('s');\n\n $qb2->select('IDENTITY(s.parent)');\n $qb2->where('IDENTITY(s.parent) is not null');\n $qb2->distinct(true);\n\n $query->select('d');\n $query->where(\n $query->expr()->notIn('d.id', $qb2->getDQL())\n );\n\n return $query;\n }", "public function testTermQueryWithChildTerm() {\n\n\t\t$parent_id = $this->createTermObject( [\n\t\t\t'name' => 'Parent Category',\n\t\t\t'taxonomy' => 'category',\n\t\t] );\n\n\t\t$child_id = $this->createTermObject( [\n\t\t\t'name' => 'Child category',\n\t\t\t'taxonomy' => 'category',\n\t\t\t'parent' => $parent_id,\n\t\t] );\n\n\t\t$global_parent_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $parent_id );\n\t\t$global_child_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $child_id );\n\n\t\t$query = \"\n\t\tquery {\n\t\t\tcategory(id: \\\"{$global_parent_id}\\\") {\n\t\t\t\tid\n\t\t\t\tcategoryId\n\t\t\t\tchildren {\n\t\t\t\t\tnodes {\n\t\t\t\t\t\tid\n\t\t\t\t\t\tcategoryId\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\";\n\n\t\t$actual = do_graphql_request( $query );\n\n\t\t$expected = [\n\t\t\t'data' => [\n\t\t\t\t'category' => [\n\t\t\t\t\t'id' => $global_parent_id,\n\t\t\t\t\t'categoryId' => $parent_id,\n\t\t\t\t\t'children' => [\n\t\t\t\t\t\t'nodes' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'id' => $global_child_id,\n\t\t\t\t\t\t\t\t'categoryId' => $child_id,\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$this->assertEquals( $expected, $actual );\n\n\t}", "public function createQuery() {\n\t\treturn $this->luceneQueryFactory->create($this);\n\t}", "public function forNestedWhere()\n {\n // ->from($this->from) is wrong, and ->from($this->type) is redundant in nested where\n return $this->newQuery()->from(null);\n }", "public function getNeighborhood()\n {\n return $this->neighborhood;\n }", "public function testTermQueryWithParentTerm() {\n\n\t\t$parent_id = $this->createTermObject( [\n\t\t\t'name' => 'Parent Category',\n\t\t\t'taxonomy' => 'category',\n\t\t] );\n\n\t\t$child_id = $this->createTermObject( [\n\t\t\t'name' => 'Child category',\n\t\t\t'taxonomy' => 'category',\n\t\t\t'parent' => $parent_id,\n\t\t] );\n\n\t\t$global_parent_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $parent_id );\n\t\t$global_child_id = \\GraphQLRelay\\Relay::toGlobalId( 'category', $child_id );\n\n\t\t$query = \"\n\t\tquery {\n\t\t\tcategory(id: \\\"{$global_child_id}\\\") {\n\t\t\t\tid\n\t\t\t\tcategoryId\n\t\t\t\tancestors {\n\t\t\t\t\tid\n\t\t\t\t\tcategoryId\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\";\n\n\t\t$actual = do_graphql_request( $query );\n\n\t\t$expected = [\n\t\t\t'data' => [\n\t\t\t\t'category' => [\n\t\t\t\t\t'id' => $global_child_id,\n\t\t\t\t\t'categoryId' => $child_id,\n\t\t\t\t\t'ancestors' => [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'id' => $global_parent_id,\n\t\t\t\t\t\t\t'categoryId' => $parent_id,\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\n\t\t$this->assertEquals( $expected, $actual );\n\n\t}", "function findNeighbor($Vertex_forWho,$Vertex_finder,$word,$differenceCount){\n\t\t//since some words like car had r as the end but cars had the r and s as end\n\t\t//this function kept breaking, because this was my base case, but to save myself\n\t\t// a headache i split them up into word sized tries\n\n\t\t//if the end of the word is met, then if the difference is only 1 push it back\n\t\t//as an edge to both finder and for who.\n\n\t\tif($Vertexfind->end == true){\n\t\t\tif($differenceCount == 1){\n\t\t\t\t$Vertex_forWho->neighbors[] = $Vertex_finder;\n\t\t\t\t$Vertex_finder->neighbors[] = $Vertex_forWho;\n\t\t\t}\n\t\t}//if the word is still 1 character long, check its edges and find the neighbors for it\n\t\telse if(strlen($word) == 1){\n\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\telse\n\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t}\n\t\t}//for any wordzie bigger than 1, add all the neighbors\n\t\telse if(strlen($word) > 1){\n\t\t\tif($differenceCount > 1)\n\t\t\t\treturn;\n\t\t\telse if($differenceCount == 0){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 0);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)), 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($differenceCount == 1){\n\t\t\t\tforeach($Vertex_finder->edgeP as $e){\n\t\t\t\t\tif($e->letter == $word[0])\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount);\n\t\t\t\t\telse\n\t\t\t\t\t\tfindNeighbor($Vertex_forWho,$e->child,substr($word,1,strlen($word)),$differenceCount + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function subQuery()\n {\n $subQuery = clone $this;\n $subQuery->builderCache = new Query\\BuilderCache();\n\n $subQuery->isSubQuery = true;\n\n return $subQuery;\n }", "protected function getRecursiveQuery(\n ExpressionGrammar $grammar,\n string $direction,\n string $from,\n int $maxDepth = null\n ): Builder {\n $name = $this->getExpressionName();\n\n $table = explode(' as ', $from)[1] ?? $from;\n\n $pivotTable = $this->getPivotTableName();\n\n $depth = $grammar->wrap($this->getDepthName());\n\n $joinColumns = [\n 'asc' => [\n $name . '.' . $this->getLocalKeyName(),\n $this->getQualifiedChildKeyName(),\n ],\n 'desc' => [\n $name . '.' . $this->getLocalKeyName(),\n $this->getQualifiedParentKeyName(),\n ],\n ];\n\n $recursiveDepth = $depth . ' ' . ($direction === 'asc' ? '-' : '+') . ' 1';\n\n $recursivePath = $grammar->compileRecursivePath(\n $this->getQualifiedLocalKeyName(),\n $this->getPathName()\n );\n\n $recursivePathBindings = $grammar->getRecursivePathBindings($this->getPathSeparator());\n\n $query = $this->newModelQuery()\n ->select($table . '.*')\n ->selectRaw($recursiveDepth . ' as ' . $depth)\n ->selectRaw($recursivePath, $recursivePathBindings)\n ->from($from);\n\n $this->addRecursiveQueryCustomPaths($query, $grammar);\n\n $this->addRecursiveQueryPivotColumns($query, $pivotTable);\n\n $this->addRecursiveQueryCycleDetection($query, $grammar);\n\n $this->addRecursiveQueryJoinsAndConstraints($query, $pivotTable, $direction, $name, $joinColumns);\n\n if (!is_null($maxDepth)) {\n $query->where($this->getDepthName(), '<', $maxDepth);\n }\n\n return $query;\n }", "protected function modelQueryBuilder()\n {\n $queryTerm = $this->queryTerm();\n\n return Occasion::\n oldest('rank')->\n\n keywordBy($queryTerm['keyword_by'],\n $queryTerm['keyword'])->\n active($queryTerm['active']);\n }", "public function ancestors($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '<' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '>' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '>=' . ($this->{$this->levelAttribute} - $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function neighbors($v);", "public function getSearchableEntitiesQuery(): \\Illuminate\\Database\\Eloquent\\Builder\n {\n return (new static())->orderBy($this->getKeyName());\n }", "public function newQuery(): Builder\n {\n return new static($this->connection);\n }", "public function neighborhood() {\n # Define an inverse one-to-many relationship.\n return $this->belongsTo('\\dsa\\Neighborhood');\n }", "public function getCategoryNeighbors()\n {\n return $this->categoryNeighbors;\n }", "public function newQuery() {\n return new Builder($this->connection);\n }", "public function roots()\n {\n $sql = \"SELECT * FROM $this->_table_name\n WHERE \n $this->left_column = 1\n ORDER BY \". $this->_sorting[0] .\" \". $this->_sorting[1] .\"\n \";\n $result = $this->_db->query($sql);\n return $this->factory_set($result);\n }", "public function build(QueryBuilder $dql): QueryBuilder {\n $dql->select(join(', ', array_merge($dql->getAllAliases(), [$this->getAlias()])));\n\n $matchStrings = ['mappedBy', 'inversedBy'];\n $matchedBy = null;\n foreach ($matchStrings as $match) {\n $matchedBy = $this->getEntityName()::findMappedBy($this->getParent()->getEntityName(), $match);\n if ($matchedBy) {\n break;\n }\n }\n\n $dql->leftJoin($this->getParent()->getAlias().'.'.$matchedBy, $this->getAlias());\n\n foreach ($this->getRelations() as $relation) {\n $relation->build($dql);\n }\n\n $this->buildConditions($dql);\n\n return $dql;\n }", "public function get_path()\n\t{\n\n\t\t$lft_col = $this->left_column;\n\t\t$rgt_col = $this->right_column;\n\t\t\n\t\t//$this->model->where($this->scope_column,$this->get_scope());\n\t\t$this->model->where($lft_col . ' <= '.$this->model->$lft_col . ' AND ' . $rgt_col . ' >=' .$this->model->$rgt_col . ' ORDER BY '.$lft_col);\n\n\t\treturn $this->model->find_all(); \n\n\t}", "public function query() {\n\n // new, more inclusive\n $query = parent::query();\n // Add in book parent child relationships.\n $query->leftJoin('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->leftJoin('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n $query->addField('ml', 'mlid', 'mlid');\n $query->addField('ml', 'plid', 'plid');\n $query->orderBy('mlid');\n\n // dpq($query);\n return $query;\n }", "public function parent() {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '<' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '>' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->rightAttribute),\n ));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $owner->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function newQuery($excludeDeleted = true)\n {\n $builder = new EloquentQueryBuilder($this->newBaseQueryBuilder());\n\n // Once we have the query builders, we will set the model instances so the\n // builder can easily access any information it may need from the model\n // while it is constructing and executing various queries against it.\n $builder->setModel($this)->with($this->with);\n\n if ($excludeDeleted and $this->softDelete) {\n $builder->whereNull($this->getQualifiedDeletedAtColumn());\n }\n\n return $builder;\n }", "public function scopeBreadthFirst(Builder $query): Builder\n {\n return $query->orderBy($this->getDepthName());\n }", "public function descendants($depth=null) {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n\n $criteria->mergeWith(array(\n 'condition' => $alias . '.' . $db->quoteColumnName($this->leftAttribute) . '>' . $this->{$this->leftAttribute} .\n ' AND ' . $alias . '.' . $db->quoteColumnName($this->rightAttribute) . '<' . $this->{$this->rightAttribute},\n 'order' => $alias . '.' . $db->quoteColumnName($this->leftAttribute),\n ));\n\n if ($depth !== null)\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->levelAttribute) . '<=' . ($this->{$this->levelAttribute} + $depth));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function performParentJoins(Builder $query): Builder\n {\n $predecessor = $this->parent;\n\n $this->through_parents->each(function ($model) use ($query, &$predecessor) {\n $first = $model->getQualifiedKeyName();\n $joined = $predecessor->qualifyColumn($this->getForeignKeyName($model));\n\n $query->join($model->getTable(), $first, '=', $joined);\n\n if ($this->hasSoftDeletes($model)) {\n $this->query->whereNull($model->getQualifiedDeletedAtColumn());\n }\n\n $predecessor = $model;\n });\n\n $query->join($this->related->getTable(), $this->related->getQualifiedKeyName(), '=', $predecessor->qualifyColumn($this->getForeignKeyName($this->related)));\n\n return $query;\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}", "public function newQuery()\n {\n return new Builder($this->connection, $this->processor);\n }", "public function withParent()\r\n {\r\n $owner=$this->getOwner();\r\n $db=$owner->getDbConnection();\r\n $criteria = $owner->getDbCriteria();\r\n\r\n $criteria->select .= ', `parent`.ID as `parent_id`';\r\n\r\n $select =\r\n ' SELECT * from ' . $db->quoteColumnName($owner->tableName()) .\r\n ' WHERE ' . $db->quoteColumnName($owner->tableName()) . '.ROOT = ' . $owner->root .\r\n ' ORDER BY ' . $db->quoteColumnName($owner->tableName()) . '.LFT DESC';\r\n\r\n $criteria->join .=\r\n 'LEFT JOIN ('.$select.') `parent` ' .\r\n 'ON (`parent`.LFT < `t`.LFT AND `parent`.RGT > `t`.RGT)';\r\n\r\n $criteria->group = '`t`.ID';\r\n\r\n return $owner;\r\n }", "public function query() {\n $query = parent::query();\n // Add in book parent child relationships.\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->isNotNull('ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n return $query;\n }", "public function tree() {\n return $this->children()->with(['user', 'children.user', 'children.children.user', 'children.children.children.user', 'children.children.children.children.user'])->get();\n }", "public function setNeighborhood($neighborhood)\n {\n $this->neighborhood = $neighborhood;\n\n return $this;\n }", "public function getResultQueryBuilder()\n {\n $qb = clone $this->queryBuilder;\n $this->_addSearch($qb);\n\n return $qb;\n }", "public function roots()\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$owner->getDbCriteria()->addCondition($db->quoteColumnName($owner->getTableAlias()).'.'.$db->quoteColumnName($this->leftAttribute).'=1');\n\n\t\treturn $owner;\n\t}", "public function build()\n {\n $query = $this->qb;\n if ($this->getWhereExpression()) {\n $query->where($this->getWhereExpression());\n }\n foreach ($this->getWhereParameters() as $key => $param) {\n $query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);\n }\n\n return $query;\n }", "public function newQuery()\n {\n return new Builder($this->connection, $this->grammar, $this->processor);\n }", "public function ancestors()\n {\n return $this->belongsToMany(Node::class, 'rbac_paths','last_node_id','first_node_id')\n ->as('path')->using(Path::class);\n }", "public function getQuery() : QueryBuilder\n {\n return $this->query;\n }", "public function toHierarchy()\n {\n return function () {\n $dict = $this->sortBy(function ($node) {\n return $node->getOrder();\n })->each(function ($node) {\n $node->setRelation('children', new static);\n })->getDictionary();\n\n $nestedKeys = [];\n\n foreach ($dict as $key => $node) {\n $parentKey = $node->getParentKey();\n\n if (!is_null($parentKey) && array_key_exists($parentKey, $dict)) {\n $dict[$parentKey]->children[] = $node;\n\n $nestedKeys[] = $node->getKey();\n }\n }\n\n foreach ($nestedKeys as $key) {\n unset($dict[$key]);\n }\n\n return new static($dict);\n };\n }", "public function newQueryWithoutScopes(): Builder\n {\n return $this->newModelQuery();\n }", "public function query()\n {\n return new \\Rubberband\\Elastic\\Laravel\\Query\\Builder($this);\n }", "public function getNodeDescendantsQueryBuilder(NodeInterface $node)\n {\n $qb = $this->getNodeTreeQueryBuilder();\n $qb->where('c.lft > :lft AND c.rgt < :rgt')\n ->setParameter('lft', $node->getLeft())\n ->setParameter('rgt', $node->getRight());\n\n return $qb;\n }", "protected function createAddEmptyNodeQuery()\n {\n $db = $this->dbh;\n\n $q = $db->createInsertQuery();\n $q->insertInto( $db->quoteIdentifier( $this->indexTableName ) )\n ->set( 'parent_id', $q->bindValue( null ) );\n\n return $q;\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 }", "public function newQuery()\n {\n $builder = $this->newAlfrescoBuilder($this->getConnection());\n $builder->setModel($this);\n return $builder;\n }", "public function createQueryBuilder(): QueryBuilder\n {\n return new QueryBuilder($this->db, [\n 'separator' => \"\\n\"\n ]);\n }", "public function newModelQuery()\n {\n if (!$this->hasVersionJoin($builder = parent::newModelQuery(), $this->getVersionTable())) {\n $builder\n ->join(\n $this->getVersionTable(),\n function ($join) {\n $join->on($this->getQualifiedKeyName(), '=', $this->getQualifiedVersionTableForeignKeyName())\n ->on($this->getQualifiedVersionTableKeyName(), '=', $this->getQualifiedVersionKeyName());\n }\n )\n ->select(\n $this->defaultVersionSelect()\n );\n }\n\n return $builder;\n }", "public function createWhere() {\n\t\tlist($where, $joins) = parent::createWhere();\n\t\tif (!($this->parent->parent instanceof QuerySet))\n\t\t\t$where = \" WHERE \" . $where;\n\t\telse\n\t\t\t$where = \" AND \" . $where;\n\t \n\t\treturn array($where, $joins);\n\t}", "public function getQuery(): Builder;", "public function createQueryBuilder ()\r\n {\r\n return new QueryBuilder($this);\r\n }", "public function getChildrenQuery();", "public function findChildren()\n {\n return self::where('code_parrent',$this->id)->get();\n }", "public function buildQuery()\n {\n if (!$this->query) {\n $this->query = $this->getMapper()->buildAssociationQuery($this);\n }\n\n return clone $this->query;\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 }", "protected function setWhere()\n {\n $foreign = $this->getForeignKey ();\n $this->query->where ( $foreign, '=', $this->parent->getKey () );\n return $this;\n }", "protected function getListQuery()\n\t{\n $query = parent::getListQuery();\n $query->from('`#__uvelir_categories_new` AS a');\n // Фильтр по родительской категории\n $parent_id = $this->getState('filter.parent_id', '0');\n if($parent_id)\n {\n list($lft,$rgt) = $this->getTable()->get_shoulders($parent_id);\n $query->where('lft >= '.$lft.' AND rgt <= '.$rgt);\n }\n \n // Filter by search in title\n $search = $this->getState('filter.search');\n if (!empty($search)) \n {\n $search = $this->_db->Quote('%'.$this->_db->escape($search, true).'%');\n $query->where('( a.name LIKE '.$search.' )');\n }\n// var_dump((string)$query);\n return $query;\n }", "public function buildCriteria()\n {\n $criteria = new Criteria(FeatureCvtermPeer::DATABASE_NAME);\n\n if ($this->isColumnModified(FeatureCvtermPeer::FEATURE_CVTERM_ID)) $criteria->add(FeatureCvtermPeer::FEATURE_CVTERM_ID, $this->feature_cvterm_id);\n if ($this->isColumnModified(FeatureCvtermPeer::FEATURE_ID)) $criteria->add(FeatureCvtermPeer::FEATURE_ID, $this->feature_id);\n if ($this->isColumnModified(FeatureCvtermPeer::CVTERM_ID)) $criteria->add(FeatureCvtermPeer::CVTERM_ID, $this->cvterm_id);\n if ($this->isColumnModified(FeatureCvtermPeer::PUB_ID)) $criteria->add(FeatureCvtermPeer::PUB_ID, $this->pub_id);\n if ($this->isColumnModified(FeatureCvtermPeer::IS_NOT)) $criteria->add(FeatureCvtermPeer::IS_NOT, $this->is_not);\n if ($this->isColumnModified(FeatureCvtermPeer::RANK)) $criteria->add(FeatureCvtermPeer::RANK, $this->rank);\n\n return $criteria;\n }", "public function getChildHierarchyQueryBuilder($parentId = null, $withParent = false)\n {\n // Get class metadata\n $metadata = $this->getClassMetadata();\n $treeMetadata = $this->_em->getClassMetadata($metadata->closureTree['treeEntity']);\n\n // Get the column names\n $nodeIdColumn = $metadata->getSingleIdentifierColumnName();\n $ancestorColumn = $treeMetadata->closureTree['ancestor']['fieldName'];\n $descendantColumn = $treeMetadata->closureTree['descendant']['fieldName'];\n\n // Create the query builder\n $queryBuilder = $this->_em->createQueryBuilder();\n\n $queryBuilder\n ->select('node')\n ->from($metadata->name, 'node')\n ->innerJoin($treeMetadata->name, 'tree', 'WITH', 'node.'. $nodeIdColumn .' = tree.'. $descendantColumn)\n ->where('tree.'. $ancestorColumn .' = :ancestor')\n ->setParameter('ancestor', $parentId);\n\n // Check if we should exclude the parent itself\n if (!$withParent) {\n $queryBuilder->andWhere('tree.'. $ancestorColumn .' != tree.'. $descendantColumn);\n }\n\n return $queryBuilder;\n }", "public function newQueryBuilder()\n {\n return new Builder($this->config);\n }", "public function getDocumentBuilder()\n {\n return Document::query()\n ->where(function($query) {\n return $query->whereRaw($this->getExpandedQuery());\n });\n }", "static public function getCategoryTree() {\n $rows = self::find()\n ->where(['!=', 'id', 1]) // exclude root category\n ->andWhere(['=', 'status', self::STATUS_SHOW]) // exclude hidden\n ->orderBy(['tree' => SORT_ASC, 'lft' => SORT_ASC])\n ->all();\n \n // build tree\n $result = [];\n $last_parent_id = null;\n foreach($rows as $row) {\n if($row['depth'] == 1) { // parent\n $last_parent_id = $row['id'];\n $result[$last_parent_id] = [\n 'parent' => $row,\n 'childs' => []\n ];\n\n continue;\n }\n\n // childs\n $result[$last_parent_id]['childs'][$row->id] = $row;\n }\n return $result;\n }", "public function newQuery()\n {\n $datasource = $this->getDatasource();\n\n $query = new Builder($datasource, $datasource->getPostProcessor());\n\n return $query->setModel($this);\n }", "public function grandChildren() {\n return $this->children()->children();\n }", "#[ReturnTypeWillChange]\n public function getChildren()\n {\n return new self($this->iterator->getChildren(), $this->excluded);\n }", "public function buildSortQuery(): Builder\n {\n return static::query()->where('repository_id', $this->repository_id);\n }", "public function getAncestorsWhere($column, $operator = null, $value = null, array $columns = ['*']);", "protected function buildIndexParentFetchQuery(Request $request, $parentKey): Builder\n {\n return $this->buildParentFetchQuery($request, $parentKey);\n }", "public function childs($relpath = null, $query = null) {\n\t\tif (!$model = $this->model()) {\n\t\t\tthrow new ConfigException('No bound model.');\n\t\t}\n\t\tif ($query) {\n\t\t\t$this->_childs[$relpath] = $query;\n\t\t\treturn $this;\n\t\t}\n\t\treturn $this->_childs;\n\t}", "public function build(): ShiftQuery\n {\n return CoreHelper::clone($this->instance);\n }", "public function getParent()\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'<'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'>'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->rightAttribute),\n\t\t));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner->find();\n\t}", "public function getBuiltQb()\n {\n $qb = clone $this->qb;\n\n $this->setSelectFrom($qb);\n $this->setJoins($qb);\n $this->setWhere($qb);\n $this->setOrderBy($qb);\n $this->setLimit($qb);\n\n return $qb;\n }", "public function scopeWhereDepth(Builder $query, mixed $operator, mixed $value = null): Builder\n {\n $arguments = array_slice(func_get_args(), 1);\n\n return $query->where($this->getDepthName(), ...$arguments);\n }", "public function createExpressionBuilder(): ExpressionBuilder\n {\n return new ExpressionBuilder($this);\n }", "public function getTagsQuery() : QueryBuilder\n {\n $query = $this->connection->createQueryBuilder();\n $query->select([\n \"category_tag.category_id\",\n \"category_tag.category_version_id\",\n \"GROUP_CONCAT(tag.name SEPARATOR ',') as tags\"\n ])\n ->from('category_tag')\n ->leftJoin('category_tag', 'tag', 'tag', 'category_tag.tag_id = tag.id')\n ->groupBy([\"category_tag.category_id\", \"category_tag.category_version_id\"]);\n\n return $query;\n }", "private function createQueryBuilder(): QueryBuilder\n {\n $queryBuilder = new QueryBuilder();\n $queryBuilder->table(($this->model)::TABLE);\n $this->applyCriteria($queryBuilder);\n $this->applyQueryBuilderUses($queryBuilder);\n return $queryBuilder;\n }", "public function buildIndex()\n {\n // Build family trees for album/folder hierarchies.\n foreach ($this->albums as $album) {\n $is_orphan = true;\n foreach ($album->getParentIds() as $parentId) {\n if ($this->hasId($parentId)) {\n $is_orphan = false;\n $this->parent_children[$parentId][] = $album;\n $this->child_parents[$album->getId()] = $this->get($parentId);\n }\n if ($is_orphan) {\n $this->orphans[$album->getId()] = $album;\n }\n }\n }\n }", "public function prev() {\n $db = $this->getDbConnection();\n $criteria = $this->getDbCriteria();\n $alias = $db->quoteColumnName($this->getTableAlias());\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rightAttribute) . '=' . ($this->{$this->leftAttribute} - 1));\n\n if ($this->hasManyRoots) {\n $criteria->addCondition($alias . '.' . $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount);\n $criteria->params[CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++] = $this->{$this->rootAttribute};\n }\n\n return $this;\n }", "public function toBase() : QueryBuilder\n {\n return $this->applyScopes()->getQuery();\n }", "public function findChained()\n {\n $this->chain = $this->createQueryBuilder('bl')\n ->select('bl, b, ta')\n ->leftJoin('bl.banknote', 'b')\n ->leftJoin('bl.transaction', 'ta')\n ;\n\n return $this;\n }", "abstract protected function appendJoins(QueryBuilder $queryBuilder);", "public function newQuery()\n {\n return $this->registerGlobalScopes($this->newQueryWithoutScopes());\n }", "public function findAllWithParent() { \n return $this->createQueryBuilder('a')\n ->leftJoin('a.parent', 'p')\n ->getQuery()\n ->getResult();\n }", "public function getChildren()\n\t{\n\t\treturn new static($this->getInnerIterator()->getChildren(), $this->excludeMasks);\n\t}", "function get_term_parents( $id, $taxonomy, $link = false, $separator = '/', $nicename = false, $visited = [] )\n {\n $chain = '';\n $parent = get_term( $id, $taxonomy );\n\n if ( is_wp_error( $parent ) ) {\n return $parent;\n }\n\n if ( $nicename ) {\n $name = $parent->slug;\n } else {\n $name = $parent->cat_name;\n }\n\n if ( $parent->parent && ( $parent->parent != $parent->term_id ) && !in_array( $parent->parent, $visited ) ) {\n $visited[] = $parent->parent;\n $chain .= get_term_parents( $parent->parent, $taxonomy, $link, $separator, $nicename, $visited );\n }\n\n if ( $link ) {\n $chain .= '<a href=\"' . get_term_link( $parent->term_id, $taxonomy ) . '\" title=\"' . esc_attr( sprintf( __( \"View all posts in %s\" ), $parent->name ) ) . '\">'.$name.'</a>' . $separator;\n } else {\n $chain .= $name.$separator;\n }\n\n return $chain;\n }", "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 }", "protected function query() {\n $query = Database::getConnection('default', $this->sourceConnection)\n ->select('og_ancestry', 'oga');\n // only load JUST the type of nodes we need\n $query->join('node', 'n', 'oga.nid = n.nid AND n.type = :type', array(':type' => $this->sourceType));\n $query->condition('group_nid', 0, '>') // handle 0 values\n ->fields('oga', array('nid', 'group_nid'));\n return $query;\n }", "public function ancestors($depth=null)\n\t{\n\t\t$owner=$this->getOwner();\n\t\t$db=$owner->getDbConnection();\n\t\t$criteria=$owner->getDbCriteria();\n\t\t$alias=$db->quoteColumnName($owner->getTableAlias());\n\n\t\t$criteria->mergeWith(array(\n\t\t\t'condition'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute).'<'.$owner->{$this->leftAttribute}.\n\t\t\t\t' AND '.$alias.'.'.$db->quoteColumnName($this->rightAttribute).'>'.$owner->{$this->rightAttribute},\n\t\t\t'order'=>$alias.'.'.$db->quoteColumnName($this->leftAttribute),\n\t\t));\n\n\t\tif($depth!==null)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->levelAttribute).'>='.($owner->{$this->levelAttribute}+$depth));\n\n\t\tif($this->hasManyRoots)\n\t\t\t$criteria->addCondition($alias.'.'.$db->quoteColumnName($this->rootAttribute).'='.$owner->{$this->rootAttribute});\n\n\t\treturn $owner;\n\t}", "public function delegatedAdminRelationships(): DelegatedAdminRelationshipsRequestBuilder {\n return new DelegatedAdminRelationshipsRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function getQueryBuilder()\n {\n if (null === $this->queryBuilder) {\n\n $queryBuilder = $this->generator->list->query_builder;\n\n if ( null !== $this->generator->list->query_builder\n && false !== $this->generator->list->query_builder\n && method_exists($this->getRepository(), $queryBuilder)) {\n $this->queryBuilder = $this->getRepository()->$queryBuilder();\n } else {\n $this->queryBuilder = $this->getRepository()->createQueryBuilder('e');\n }\n\n foreach ($this->sort as $field => $order) {\n $this->queryBuilder->addOrderBy('e.' . $field, $order);\n }\n\n $this->processFilters();\n\n }\n return $this->queryBuilder;\n }", "public function getInnerQuery()\n {\n return $this->query;\n }", "public function getNestedLeftIndex();", "protected function createQueryBuilder()\n {\n $builder = new QueryBuilder();\n return $builder;\n }" ]
[ "0.5459179", "0.5322152", "0.5216854", "0.520977", "0.5110506", "0.510095", "0.50065535", "0.49941385", "0.49413258", "0.49358067", "0.48979303", "0.48816496", "0.4859124", "0.48404846", "0.4839154", "0.48387024", "0.48383516", "0.48220128", "0.4820134", "0.48043463", "0.47972926", "0.4782403", "0.47680807", "0.47376385", "0.47228438", "0.47044417", "0.47014344", "0.4689977", "0.46780798", "0.46708113", "0.4645936", "0.46398777", "0.46242473", "0.46169117", "0.46041775", "0.46021685", "0.45999518", "0.4592026", "0.45828065", "0.45715204", "0.45684105", "0.45671448", "0.4557649", "0.45576078", "0.45521381", "0.4526964", "0.45225897", "0.45201707", "0.45070648", "0.45046997", "0.45040122", "0.44979677", "0.44961426", "0.44818002", "0.44813636", "0.44692275", "0.44688088", "0.44673797", "0.44636202", "0.44633767", "0.44623423", "0.44470045", "0.44411647", "0.44405675", "0.44372043", "0.4410241", "0.44063684", "0.44034868", "0.44034278", "0.4403322", "0.43951368", "0.43917698", "0.4388507", "0.43871275", "0.43840253", "0.4380326", "0.4378582", "0.4377951", "0.43774235", "0.4372685", "0.43725038", "0.4364798", "0.4362488", "0.43618858", "0.43569437", "0.43465808", "0.43459177", "0.43455", "0.43452415", "0.4345017", "0.43416664", "0.43414408", "0.43354607", "0.43269163", "0.4324899", "0.4324492", "0.43154508", "0.43113735", "0.42955312", "0.42917413" ]
0.7360482
0
/ / WP methods / Get the taxonomy labels.
public function getLabelsAttribute() { return (get_taxonomy($this->name))->labels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_get_taxonomy_labels($taxonomies = array())\n{\n}", "public function getTaxonomyTerms();", "public function getTaxonomy()\n {\n return ucwords(\\Present::unslug($this->taxonomy));\n }", "public function taxonomy();", "function kulam_get_custom_taxonomy_labels( $name, $singular ) {\n\n\t$labels = array();\n\n\tif ( $name && $singular ) {\n\n\t\t$labels = array(\n\t\t\t'name'\t\t\t\t\t\t\t=> $name,\n\t\t\t'singular_name'\t\t\t\t\t=> $singular,\n\t\t\t'menu_name'\t\t\t\t\t\t=> $name,\n\t\t\t'search_items'\t\t\t\t\t=> sprintf( __( 'Search %s',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'popular_items'\t\t\t\t\t=> sprintf( __( 'Popular %s',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'all_items'\t\t\t\t\t\t=> sprintf( __( 'All %s',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'parent_item'\t\t\t\t\t=> sprintf( __( 'Parent %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'parent_item_colon'\t\t\t\t=> sprintf( __( 'Parent %s:',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'edit_item'\t\t\t\t\t\t=> sprintf( __( 'Edit %s',\t\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'view_item'\t\t\t\t\t\t=> sprintf( __( 'View %s',\t\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'update_item'\t\t\t\t\t=> sprintf( __( 'Update %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'add_new_item'\t\t\t\t\t=> sprintf( __( 'Add New %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'new_item_name'\t\t\t\t\t=> sprintf( __( 'New %s Name',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'separate_items_with_commas'\t=> sprintf( __( 'Separate %s with commas',\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'add_or_remove_items'\t\t\t=> sprintf( __( 'Add or remove %s',\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'choose_from_most_used'\t\t\t=> sprintf( __( 'Choose from the most used %s',\t\t'kulam-scoop' ), $name ),\n\t\t\t'not_found'\t\t\t\t\t\t=> sprintf( __( 'No %s Found',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'no_terms'\t\t\t\t\t\t=> sprintf( __( 'No %s',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'items_list_navigation'\t\t\t=> sprintf( __( '%s list navigation',\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'items_list'\t\t\t\t\t=> sprintf( __( '%s list',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'back_to_items'\t\t\t\t\t=> sprintf( __( '&larr; Back to %s',\t\t\t\t'kulam-scoop' ), $name ),\n\t\t);\n\n\t}\n\n\t// return\n\treturn $labels;\n\n}", "protected function get_taxonomies() {\n\t\treturn apply_filters( 'appthemes_html_term_description_taxonomies', $this->taxonomies );\n\t}", "public function getLabels();", "public function getLabels();", "public function getLabels();", "public function cpt_labels(){\n\t\t\t\n\t\t\t$a = $this->cpt_args;\n\t\t\t\n\t\t\t//build labels arguments array. \n\t\t\t\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( $a[ 'post_name' ], 'post type general name', NN_TD),\n\t\t\t\t'singular_name' => _x( $a[ 'post_name_single' ], 'post type singular name', NN_TD),\n\t\t\t\t'add_new' => _x('Add New', $a[ 'post_type' ], NN_TD),\n\t\t\t\t'add_new_item' => __('Add New '.$a[ 'post_item' ], NN_TD),\n\t\t\t\t'edit_item' => __('Edit '.$a[ 'post_item' ], NN_TD),\n\t\t\t\t'new_item' => __('New '.$a[ 'post_item' ], NN_TD),\n\t\t\t\t'all_items' => __( $a[ 'post_items' ], NN_TD),\n\t\t\t\t'view_item' => __('View '.$a[ 'post_item' ], NN_TD),\n\t\t\t\t'search_items' => __('Search '.$a[ 'post_items' ], NN_TD),\n\t\t\t\t'not_found' => __('No '.$a[ 'post_items' ].' found', NN_TD),\n\t\t\t\t'not_found_in_trash' => __('No '.$a[ 'post_items' ].' found in Trash', NN_TD), \n\t\t\t\t'parent_item_colon' => '',\n\t\t\t\t'menu_name' => __( $a[ 'post_name' ], NN_TD)\n\t\t\t);\n\t\t\t\n\t\t\treturn $labels;\n\t\t}", "public function get_taxonomies()\n {\n $terms = get_terms(array(\n 'hide_empty' => false\n ));\n\n return $terms;\n }", "private static function labels() {\n\t\treturn apply_filters(\n\t\t\t'drsa_post_type_labels', array(\n\t\t\t\t'name' => __( 'Mainokset', 'dude-really-simple-ads' ),\n\t\t\t\t'singular_name' => __( 'Mainos', 'dude-really-simple-ads' ),\n\t\t\t\t'menu_name' => __( 'Mainokset', 'dude-really-simple-ads' ),\n\t\t\t\t'name_admin_bar' => __( 'Mainos', 'dude-really-simple-ads' ),\n\t\t\t\t'add_new' => __( 'Lisää uusi', 'dude-really-simple-ads' ),\n\t\t\t\t'add_new_item' => __( 'Lisää uusi mainos', 'dude-really-simple-ads' ),\n\t\t\t\t'new_item' => __( 'Uusi mainos', 'dude-really-simple-ads' ),\n\t\t\t\t'edit_item' => __( 'Muokkaa mainosta', 'dude-really-simple-ads' ),\n\t\t\t\t'view_item' => __( 'Tarkastele mainosta', 'dude-really-simple-ads' ),\n\t\t\t\t'all_items' => __( 'Kaikki mainokset', 'dude-really-simple-ads' ),\n\t\t\t\t'search_items' => __( 'Etsi mainoksia', 'dude-really-simple-ads' ),\n\t\t\t\t'parent_item_colon' => __( 'Ylämainos:', 'dude-really-simple-ads' ),\n\t\t\t\t'not_found' => __( 'Mainoksia ei löytynyt.', 'dude-really-simple-ads' ),\n\t\t\t\t'not_found_in_trash' => __( 'Mainoksia ei löytynyt roskista.', 'dude-really-simple-ads' ),\n\t\t\t)\n\t\t);\n\t}", "public function get_term_names(){\n\t\t\n\t\t$term_objs = $this->get_terms();\n\t\t\n\t\t$terms = array();\n\t\t\n\t\tforeach( $term_objs as $term ){\n\t\t\t\n\t\t\t$terms[ $term->term_id ] = $term->name;\n\t\t\t\n\t\t} // end foreach\n\t\t\n\t\treturn $terms;\n\t\t\n\t}", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function getLabels()\n {\n return $this->labels;\n }", "public function get()\n {\n if (null === $this->taxonomylist) {\n $this->taxonomylist = $this->build(Grav::instance()['taxonomy']->taxonomy());\n }\n\n return $this->taxonomylist;\n }", "public function getLabels()\n {\n return isset($this->labels) ? $this->labels : null;\n }", "public function getLabels() {\r\n return $this->labels;\r\n }", "function acf_get_taxonomy_terms($taxonomies = array())\n{\n}", "public function getLabels(): array\n {\n return $this->labels;\n }", "public function labels()\r\n {\r\n \treturn array(\r\n\t\t\t 'id_post'\t\t=> 'Id post',\r\n\t\t\t 'id_user'\t\t=> 'Id user',\r\n\t\t\t 'id_category'\t=> 'Id category',\r\n\t\t\t 'id_location'\t=> 'Id location',\r\n\t\t\t 'type'\t\t\t=> 'Type',\r\n\t\t\t 'title'\t\t\t=> 'Title',\r\n\t\t\t 'seotitle'\t\t=> 'SEO title',\r\n\t\t\t 'description'\t=> 'Description',\r\n\t\t\t 'adress'\t\t=> 'Adress',\r\n\t\t\t 'price'\t\t\t=> 'Price',\r\n\t\t\t 'phone'\t\t\t=> 'Phone',\r\n\t\t\t 'ip_address'\t=> 'Ip address',\r\n\t\t\t 'created'\t\t=> 'Created',\r\n\t\t\t 'published'\t\t=> 'Published',\r\n\t\t\t 'status'\t\t=> 'Status',\r\n\t\t\t 'has_images'\t=> 'Has images',\r\n\t\t\t );\r\n }", "public function labels()\n {\n return array();\n }", "public function taxonomy() {\n $parents = array_reverse( $this->get_all_parents( $this->id ) );\n $taxonomy = '';\n\n foreach ( $parents as $category ) {\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n $taxonomy .= $category->name;\n }\n\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n return $taxonomy . $this->name;\n }", "public function getTaxonomy()\n {\n return $this->taxonomy;\n }", "public static function getLabels()\n {\n return [\n 'singular' => 'Website',\n 'multiple' => 'Websites'\n ];\n }", "public function taxonomyName($taxonomy = null);", "public function get_property_taxonomies_translation($taxonomies){\n $terms_package = array(\n 'kind' => 'Property Term',\n 'name' => 'custom-term',\n 'title' => 'Property Term',\n );\n \n foreach( $taxonomies as $key => $tax ){\n $taxonomies[$key]['label'] = apply_filters( 'wpml_translate_string', $key,$key, $terms_package );\n }\n return $taxonomies;\n }", "public function dashboardTaxonomies()\n {\n $taxonomies = get_taxonomies($args, $output, $operator);\n\n foreach ($taxonomies as $taxonomy) {\n $num_terms = wp_count_terms($taxonomy->name);\n $num = number_format_i18n($num_terms);\n $text = _n($taxonomy->labels->singular_name, $taxonomy->labels->name, intval($num_terms));\n\n if (current_user_can('manage_categories')) {\n $num = \"<a href='edit-tags.php?taxonomy=$taxonomy->name'>$num\";\n $text = \"$text</a>\";\n }\n\n echo '<li class=\"post-count\">' . $num . ' ' . $text . '</li>';\n }\n }", "public function getTaxonomiesList() {\n return $this->_get(1);\n }", "protected function get_taxonomy_name($label) {\n\t\t\tif(!$options = $this->options) {\n\t\t\t\t$options = $this->pro_class->options;\n\t\t\t}\n\n\t\t\tforeach($options['taxonomies'] as $taxonomy => $value) {\n\t\t\t\tif($value['label'] == $label) {\n\t\t\t\t\treturn $taxonomy;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $label; // if no match found, try to use the label\n\t\t}", "function get_custom_taxonomies( $post_identity ) {\r\n\r\n // Get the post by ID\r\n $post = get_post( $post_identity );\r\n\r\n // Get the post type\r\n $post_type = $post->post_type;\r\n\r\n // Get taxonomies related to the post type\r\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\r\n\r\n $out = array();\r\n // Loop through taxonomies and put the terms in an array\r\n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ) {\r\n\r\n $terms = get_the_terms( $post_identity, $taxonomy_slug );\r\n //var_dump($terms); die;\r\n\r\n if ( !empty( $terms ) ) {\r\n \r\n foreach ( $terms as $term ) {\r\n $out[] .= $term->name;\r\n }\r\n }\r\n }\r\n\r\n return $out;\r\n }", "public function labels(){\n\t\treturn array(\n\t\t\t'name' => __($this->options('plural_name')),\n\t\t\t'singular_name' => __($this->options('singular_name')),\n\t\t\t'add_new_item' => __($this->options('add_new_item')),\n\t\t\t'edit_item' => __($this->options('edit_item')),\n\t\t\t'new_item' => __($this->options('new_item')),\n\t\t);\n\t}", "public function getCustomLabels() {\r\n return $this->labels->getItems();\r\n }", "function jr_get_custom_taxonomy($post_id, $tax_name, $tax_class) {\r\n $tax_array = get_terms( $tax_name, array( 'hide_empty' => '0' ) );\r\n if ($tax_array && sizeof($tax_array) > 0) {\r\n foreach ($tax_array as $tax_val) {\r\n if ( is_object_in_term( $post_id, $tax_name, array( $tax_val->term_id ) ) ) {\r\n echo '<span class=\"'.$tax_class . ' '. $tax_val->slug.'\">'.$tax_val->name.'</span>';\r\n break;\r\n }\r\n }\r\n }\r\n}", "public function getLabels()\n {\n return array_values(array_unique($this->labels));\n }", "private function get_taxonomies() : array {\n\t\treturn $this->taxonomies;\n\t}", "public function getLabels()\n {\n $headers = $this->getDefaultHeaders();\n $response = $this->client->request(\n 'GET',\n $this->api . $this->repo . \"/labels\",\n array(\n \"headers\" => $headers\n )\n );\n \n if ($response->getStatusCode() == 200) {\n $body = $response->getBody();\n $body = json_decode($body, true);\n return $body;\n }\n\n return array();\n }", "public static function getLabels(): array;", "function get_taxonomies($args = array(), $output = 'names', $operator = 'and')\n {\n }", "protected function get_terms() {\n\t\t$terms = get_the_terms( $this->post_ID, $this->taxonomy_name );\n\n\t\tif ( ! is_array( $terms ) ) {\n\t\t\t$terms = [];\n\t\t}\n\n\t\treturn $terms;\n\t}", "public function getCountriesNames() {\n $query = \\Drupal::entityQuery('taxonomy_term');\n $query->condition('vid', 'country');\n $result = $query->execute();\n\n $countries = Term::loadMultiple($result);\n $countries_list = []; \n foreach ($countries as $country) {\n $countries_list[$country->id()] = $country->name->value;\n }\n\n return $countries_list;\n }", "static function get_all_terms_names( $taxonomy ) {\n\t\tglobal $post;\n\n\t\t$terms = get_the_terms( $post, $taxonomy );\n\t\tif ( ! empty( $terms ) ) {\n\t\t\t$out = array();\n\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$out[] = $term->name;\n\t\t\t}\n\n\t\t\treturn join( ', ', $out );\n\t\t}\n\t}", "function get_post_taxonomies($post = 0)\n {\n }", "public function getLabels($field_names=array()){\n\t\tif(!is_array($field_names)){\n\t\t\t$field_names = $this->getFields();\n\t\t}\n\t\t\n\t\t$labels = array();\n\t\tforeach($field_names as $field_name){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$labels[$field_name] = $this->Fields[$field_name]->label;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $labels;\n\t}", "public function createLabels()\n {\n // default labels\n $labels = [\n 'name' => $this->plural,\n 'singular_name' => $this->singular,\n 'menu_name' => $this->plural,\n 'all_items' => \"All {$this->plural}\",\n 'edit_item' => \"Edit {$this->singular}\",\n 'view_item' => \"View {$this->singular}\",\n 'update_item' => \"Update {$this->singular}\",\n 'add_new_item' => \"Add New {$this->singular}\",\n 'new_item_name' => \"New {$this->singular} Name\",\n 'parent_item' => \"Parent {$this->plural}\",\n 'parent_item_colon' => \"Parent {$this->plural}:\",\n 'search_items' => \"Search {$this->plural}\",\n 'popular_items' => \"Popular {$this->plural}\",\n 'separate_items_with_commas' => \"Seperate {$this->plural} with commas\",\n 'add_or_remove_items' => \"Add or remove {$this->plural}\",\n 'choose_from_most_used' => \"Choose from most used {$this->plural}\",\n 'not_found' => \"No {$this->plural} found\",\n ];\n\n return array_replace($labels, $this->labels);\n }", "function wpsl_labels() {\n\n $labels = array(\n 'search',\n 'search_btn',\n 'preloader',\n 'radius',\n 'no_results',\n 'results',\n 'more',\n 'directions',\n 'no_directions',\n 'back',\n 'street_view',\n 'zoom_here',\n 'error',\n 'phone',\n 'fax',\n 'email',\n 'url',\n 'hours',\n 'start',\n 'limit',\n 'category',\n 'category_default'\n );\n\n return $labels;\n}", "public function getLabels($repo) {\n echo \"GET /repos/$repo/labels\\n\";\n $r = $this->api()->get(\"/repos/$repo/labels\", [], [], ['throw' => true]);\n\n $labels = $r->getBody();\n $labels = array_column($labels, null, 'name');\n $labels = array_change_key_case($labels);\n return $labels;\n }", "public function getLabelsList(){\n return $this->_get(2);\n }", "function _entity_translation_taxonomy_label($term, $langcode) {\n $entity_type = 'taxonomy_term';\n if (function_exists('title_entity_label')) {\n $label = title_entity_label($term, $entity_type, $langcode);\n }\n else {\n $label = entity_label($entity_type, $term);\n }\n return (string) $label;\n}", "public function listLabels()\n {\n $this->authenticate();\n $labels = $this->client->api('projects')->labels($this->issueIntegrator->getProjectName());\n\n return $this->mapLabels($labels);\n }", "public function get_terms()\n\t{\n\t\treturn $this->terms;\n\t}", "public function getPageLabels() {}", "public function get_terms()\n {\n }", "function _get_custom_object_labels($data_object, $nohier_vs_hier_defaults)\n {\n }", "function acf_get_taxonomies($args = array())\n{\n}", "public function labels()\n {\n return $this->morphToMany(\\VentureDrake\\LaravelCrm\\Models\\Label::class, config('laravel-crm.db_table_prefix').'labelable');\n }", "public function getLabelsList(){\n return $this->_get(6);\n }", "public function taxonomieen()\n\t{\n\t\t// bepaalde waarden worden opgeslagen\n\t\t// verwerkt de taxonomieen tot bv \"categorie\"\n\t\t// @TODO meervoud van taxonomieen dient nog correct ingesteld te worden in posttypes.php en die hier uitgedraaid te worden via\n\t\t// https://developer.wordpress.org/reference/functions/get_taxonomy_labels/\n\n\t\tif (!$this->taxonomieen || $this->is_categorie) return;\n\n\n\t\t$tl_str = $this->art->post_type . '-taxlijst';\n\t\t//niet iedere keer opnieuw doen.\n\t\tif (!array_key_exists($tl_str, $GLOBALS)) {\n\t\t\t$this->maak_taxlijst();\n\t\t}\n\n\n\t\t$terms = wp_get_post_terms($this->art->ID, $GLOBALS[$tl_str]);\n\n\t\t$overslaan = array('Geen categorie', 'Uncategorized');\n\n\t\t$print_ar = array();\n\n\t\tif (count($terms)) :\n\n\t\t\tforeach ($terms as $term) :\n\n\t\t\t\tif (in_array($term->name, $overslaan)) continue;\n\n\t\t\t\tif (array_key_exists($term->taxonomy, $print_ar)) {\n\t\t\t\t\t$print_ar[$term->taxonomy][] = $term->name;\n\t\t\t\t} else {\n\t\t\t\t\t$print_ar[$term->taxonomy] = array($term->name);\n\t\t\t\t}\n\n\t\t\tendforeach;\n\n\t\t\t///\n\n\t\t\tif (count($print_ar)) {\n\n\t\t\t\t$teller = 0;\n\n\t\t\t\tforeach ($print_ar as $tax_naam => $tax_waarden) :\n\n\t\t\t\t\tif ($tax_naam === 'category') $tax_naam = 'categorie';\n\n\t\t\t\t\t//als geen datum, dan eerste tax waarde geen streepje links.\n\n\t\t\t\t\t$str = \"- \";\n\n\t\t\t\t\tif ($this->geen_datum && $teller < 1) {\n\t\t\t\t\t\t$str = \"\";\n\t\t\t\t\t\t$teller++;\n\t\t\t\t\t}\n\n\t\t\t\t\techo \"<span class='tax tekst-zwart'> $str\" . strtolower(implode(', ', $tax_waarden)) . \"</span>\";\n\n\n\t\t\t\tendforeach; //iedere print_ar\n\t\t\t}\n\t\tendif; //als count terms\n\n\n\t}", "private function get_taxonomy() {\n\t\treturn filter_input( INPUT_GET, 'taxonomy', FILTER_DEFAULT, array( 'options' => array( 'default' => '' ) ) );\n\t}", "function custom_taxonomies() {\n }", "public function get_terms() {\n return $this->terms;\n }", "function mds_custom_taxonomy() {\n $args = array(\n\n /**\n * Include a description of the taxonomy.\n */\n 'description' => '', // string (default is NONE)\n\n /**\n * A plural descriptive name for the taxonomy marked for translation.\n * Default: overridden by $labels->name\n */\n 'label' => __( 'Custom Taxonomies' ), // string (default overridden by $labels->name).\n\n /**\n * Labels used when displaying the taxonomy in the admin and sometimes on the front end.\n */\n 'labels' => array(\n 'name'\t\t\t\t => __( 'Custom Taxonomies' ),\n 'singular_name'\t\t\t => __( 'Custom Taxonomy' ),\n 'menu_name'\t\t\t => __( 'Custom Taxonomy'),\n 'all_items'\t\t\t => __( 'All Custom Taxonomies' ),\n 'view_item' => __( 'View Custom Taxonomy' ),\n 'edit_item'\t\t\t => __( 'Edit Custom Taxonomy' ),\n 'update_item'\t\t\t => __( 'Update Custom Taxonomy'),\n 'add_new_item'\t\t\t => __( 'Add New Custom Taxonomy'),\n 'new_item_name'\t\t\t => __( 'New Single Custom Taxonomy'),\n 'parent_item'\t\t\t => __( 'Parent Custom Taxonomy' ),\n 'parent_item_colon'\t\t => __( 'Parent Custom Taxonomy' ),\n 'search_items'\t\t\t => __( 'Search Custom Taxonomy' ),\n 'popular_items'\t\t\t => __( 'Popular Custom Taxonomy' ),\n 'separate_items_with_commas' => __( 'Separate Custom Taxonomy with commas' ),\n 'add_or_remove_items'\t => __( 'Add or remove Custom Taxonomy'),\n 'choose_from_most_used'\t => __( 'Choose from most used Custom Taxonomy'),\n 'not_found' => __( 'No Custom Taxonomy found.' )\n ),\n\n /**\n * If the taxonomy should be publicly queryable. This\n * argument is sort of a catchall for many of the following arguments.\n */\n 'public' => true, // bool (default is TRUE)\n\n /**\n * Whether to generate a default UI for managing this taxonomy.\n */\n 'show_ui' => true, // bool (defaults to 'public').\n\n /**\n * Whether taxonomy items are available for selection in navigation menus.\n */\n 'show_in_nav_menus' => true, // bool (defaults to 'public').\n\n /**\n * Whether to allow the Tag Cloud widget to use this taxonomy.\n */\n 'show_tagcloud' => false,// bool (defaults to 'show_ui').\n\n /**\n * Whether to show the taxonomy in the quick/bulk edit panel.\n */\n 'show_in_quick_edit' => true, // bool (defaults to 'show_ui').\n\n /**\n * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n */\n 'show_admin_column' => false,// bool (default is FALSE)\n\n /**\n * Provide a callback function name for the meta box display.\n * No meta box is shown if set to false\n */\n 'meta_box_cb' => null, //callback function (default is NULL)\n\n /**\n * Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.\n */\n 'hierarchical' => false,// bool (default is FALSE)\n\n /**\n * A function name that will be called when the count of an associated $object_type, such as post, is updated.\n * Works much like a hook.\n */\n\n 'update_count_callback' => '', //string (default is NONE)\n\n /**\n * Sets the query_var key for this taxonomy. If set to TRUE, the post type name will be used.\n * You can also set this to a custom string to control the exact key.\n */\n 'query_var' => 'custom-taxonomy', // bool|string (defaults to TRUE - post type name)\n\n\n /**\n * How the URL structure should be handled with this post type. You can set this to an\n * array of specific arguments or true|false. If set to FALSE, it will prevent rewrite\n * rules from being created.\n */\n 'rewrite' => array(\n\n /* The slug to use for individual posts of this type. */\n 'slug' => 'custom-post-type', // string (defaults to taxonomy's name slug)\n\n /* Allowing permalinks to be prepended with front base*/\n 'with_front' => false, // bool (defaults to TRUE)\n\n /* true or false allow hierarchical urls*/\n 'hierarchical' => false, // bool (defaults to FALSE)\n\n /* Assign an endpoint mask to this permalink. */\n 'ep_mask' => EP_PERMALINK, // const (defaults to EP_NONE)\n ),\n\n /**\n * Provides more precise control over the capabilities than the defaults. By default, WordPress\n * will use the 'capability_type' argument to build these capabilities. More often than not,\n * this results in many extra capabilities that you probably don't need.\n */\n 'capabilities' => array( ),\n\n /**\n * Whether this taxonomy should remember the order in which terms are added to objects.\n */\n 'sort' => false, // bool (default is NONE)\n );\n\n /**\n * Set up the arguments for the post type where taxonomy will be displayed.\n * Can be a custom post type or any of the registered post types: post, page, attachment, revision, nav_menu_item\n */\n $args_post_type = array(\n 'custom-post-type'\n );\n\n register_taxonomy(\n 'custom-taxonomy', //Taxonomy name. Max of 32 characters. Uppercase and spaces not allowed.\n $args_post_type, //Name of the post type for the taxonomy,\n $args\n );\n\n}", "public function getLabels() {\n\t\tif ($this->labels === null) {\n\t\t\t$this->labels = new LabelList();\n\t\t\t$this->labels->getConditionBuilder()->add(\"label.objectTypeID IN (?)\", array(array_keys($this->cache['objectTypes'])));\n\t\t\t$this->labels->sqlLimit = 0;\n\t\t\t$this->labels->readObjects();\n\t\t}\n\t\t\n\t\treturn $this->labels;\n\t}", "public function getFormFieldLabels()\n {\n return craft()->coalescentForms->getFormFieldLabels();\n }", "function _get_term_hierarchy($taxonomy)\n {\n }", "public function getAllCategoryNames();", "function acf_get_post_type_label($post_type)\n{\n}", "function get_object_taxonomies($object_type, $output = 'names')\n {\n }", "public function get_taxonomy_terms(\\Twig\\Environment $env, array $context, $taxonomy_name, array $other_fields = NULL) {\n $query = \\Drupal::entityQuery('taxonomy_term')\n ->condition('vid', $taxonomy_name);\n $tids = $query->execute();\n\n $entity_manager = \\Drupal::entityTypeManager();\n $term_storage = $entity_manager->getStorage('taxonomy_term');\n $taxonomy_terms = $term_storage->loadMultiple($tids);\n\n $taxonomy_array = [];\n\n foreach ($taxonomy_terms as $term) {\n $tid = $term->hasTranslation($this->get_current_lang()) ? $term->getTranslation($this->get_current_lang())->get('tid')[0]->value : $term->getTranslation('en')->get('tid')[0]->value;\n\n $values = [\n 'tid' => $tid,\n 'name' => $term->hasTranslation($this->get_current_lang()) ? $term->getTranslation($this->get_current_lang())->get('name')[0]->value : $term->getTranslation('en')->get('name')[0]->value,\n 'parent' => $term->hasTranslation($this->get_current_lang()) ? $term->getTranslation($this->get_current_lang())->get('parent')->target_id : $term->getTranslation('en')->get('parent')->target_id,\n 'children' => isset($taxonomy_array[$tid]) ? $taxonomy_array[$tid]['children'] : [],\n ];\n\n if ($values['parent'] === \"0\") {\n $taxonomy_array[$tid] = $values;\n }\n else {\n $taxonomy_array[$values['parent']]['children'][$tid] = $values;\n }\n\n // Add extra fields if supplied.\n if (!is_null($other_fields)) {\n foreach ($other_fields as $field) {\n if ($values['parent'] === \"0\") {\n $taxonomy_array[$tid][$field] = $term->get($field)[0]->value;\n }\n else {\n $taxonomy_array[$values['parent']]['children'][$tid][$field] = $term->get($field)[0]->value;\n }\n }\n }\n }\n\n return $taxonomy_array;\n }", "private function prepareTaxonomy(){\n $taxonomy = null;\n if ( $this->taxonomy->terms() ){\n foreach($this->taxonomy->terms() as $term){\n $taxonomy[] = array( \n \t'id'=>$term->getID(), \n \t'label'=>$term->label->label \n\t\t\t\t);\n }\n }\n return $taxonomy;\n }", "public function tagCloudTaxonomies($field)\n {\n $taxonomies = get_taxonomies(array('show_tagcloud' => true), 'object');\n\n foreach ($taxonomies as $key => $value) {\n $field['choices'][$key] = $value->labels->name;\n }\n\n return $field;\n }", "public function terms() {\n\t\treturn $this->terms->terms();\n\t}", "public function getTaxonomies(): array\n {\n return $this->taxonomies;\n }", "function get_taxonomy($taxonomy)\n {\n }", "function get_eioftx_terms($tax) {\n $terms = get_terms($tax);\n $names = array();\n \n // Loop through terms to get the names\n foreach($terms as $term) {\n\t array_push($names, strtolower($term->name));\n }\n \n return $names;\n}", "public function generateTaxonomyTermList() {\n $vocab = \"sports\";\n $term_list = [];\n $terms = $this->entityTypeManager\n ->getStorage('taxonomy_term')\n ->loadTree($vocab);\n foreach ($terms as $term) {\n $term_name = $this->t('@name', ['@name' => $term->name]);\n $term_list[\"$term_name\"] = $term_name;\n }\n return $term_list;\n }", "public function getTermsAttribute()\n {\n return $this->taxonomies->groupBy(function ($taxonomy)\n {\n return $taxonomy->taxonomy;\n\n })->map(function ($group)\n {\n return $group->mapWithKeys(function ($item)\n {\n return array($item->term->slug => $item->term->name);\n });\n\n })->toArray();\n }", "public function getTaxonomyIds()\n {\n return $this->taxonomy_ids;\n }", "public function attributeLabels()\n\t{\n\t\t$labels = array();\n\t\tforeach($this->searchFields as $field=>$data)\n\t\t\t$labels[$field] = isset($data['label']) ? $data['label'] : parent::generateAttributeLabel($field);\n\t\treturn $labels;\n\t}", "public static function get_allowed_taxonomies()\n {\n }", "function foucs_show_taxonomy($name_taxonomy, $order_by, $order, $number_term) {\n $args = array(\n 'taxonomy' => $name_taxonomy,\n 'orderby' => $order_by,\n 'order' => $order,\n 'number' => $number_term,\n 'hide_empty' => false,\n );\n $foucs_query = new WP_Term_Query($args);\n ?>\n <ul class=\"all-taxonomy\">\n <?php \n foreach ( $foucs_query->get_terms() as $term ) { ?>\n <li class=\"taxonomy\">\n <a href=\"<?php echo get_term_link( $term ) // Get The Category Link?>\">\n <span class=\"name\">\n <?php echo esc_html($term->name) // Show Category Name?>\n </span>\n </a>\n <span class=\"count-num\"><?php echo esc_html($term->count) // Show Count Post In Category?></span>\n </li>\n <?php\n }?>\n </ul>\n <?php\n}", "public function getTermTaxonomyTable(): string\n {\n return $this->wpDatabase->term_taxonomy;\n }", "function entity_type_labels($entity_type, $label = NULL) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getToolboxHelper();\n\n return isset($label) ? $helper->label($label) : $helper->labels();\n}", "function currentTypes($id){\n\t$term_id = get_the_terms($id, 'marcato_type');\n\t$terms = \"\";\n\tforeach($term_id as $genre){\n\t//\tprint_r($genre->name);\n\t\t$terms .= strtolower($genre->name) . \" \";\n\t}\n\n\treturn $terms;\n}", "public function register_taxonomies() {\n\n\t\t$options = $this->options;\n\t\t$this->remove_mb = array();\n\n\t\tforeach ( $options as $option ) {\n\n\t\t\tif ( 'taxonomy' == $option['args']['field_type'] ) {\n\n\t\t\t\t$name = ! empty( $option['args']['label'] ) ? sanitize_text_field( $option['args']['label'] ) : ucwords( str_replace( array( '_', '-' ), ' ', $option['name'] ) );\n\t\t\t\t$plural = ! empty( $option['args']['label_plural'] ) ? sanitize_text_field( $option['args']['label_plural'] ) : $name . 's';\n\t\t\t\t$column = true === $option['args']['taxo_std'] ? true : false;\n\t\t\t\t$hierarchical = $option['args']['taxo_hierarchical'];\n\n\t\t\t\t$labels = array(\n\t\t\t\t\t'name' => $plural,\n\t\t\t\t\t'singular_name' => $name,\n\t\t\t\t\t'search_items' => sprintf( __( 'Search %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'all_items' => sprintf( __( 'All %s', TEXTDOMAIN ), $plural ),\n\t\t\t\t\t'parent_item' => sprintf( __( 'Parent %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'parent_item_colon' => sprintf( _x( 'Parent %s:', 'Parent term in a taxonomy where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'edit_item' => sprintf( __( 'Edit %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'update_item' => sprintf( __( 'Update %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'add_new_item' => sprintf( __( 'Add New %s', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'new_item_name' => sprintf( _x( 'New %s Name', 'A new taxonomy term name where %s is dynamically replaced by the taxonomy (eg. \"book\")', TEXTDOMAIN ), $name ),\n\t\t\t\t\t'menu_name' => $plural,\n\t\t\t\t);\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'hierarchical' => $hierarchical,\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_admin_column' => $column,\n\t\t\t\t\t'query_var' => true,\n\t\t\t\t\t'rewrite' => array( 'slug' => $option['name'] ),\n\t\t\t\t\t'capabilities' => array(\n\t\t\t\t\t\t'manage_terms' => 'create_ticket',\n\t\t\t\t\t\t'edit_terms' => 'settings_tickets',\n\t\t\t\t\t\t'delete_terms' => 'settings_tickets',\n\t\t\t\t\t\t'assign_terms' => 'create_ticket'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif ( false !== $option['args']['update_count_callback'] && function_exists( $option['args']['update_count_callback'] ) ) {\n\t\t\t\t\t$args['update_count_callback'] = $option['args']['update_count_callback'];\n\t\t\t\t}\n\n\t\t\t\tregister_taxonomy( $option['name'], array( 'ticket' ), $args );\n\n\t\t\t\tif ( false === $option['args']['taxo_std'] ) {\n\t\t\t\t\tarray_push( $this->remove_mb, $option['name'] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t/* Remove metaboxes that won't be used */\n\t\tif ( ! empty( $this->remove_mb ) ) {\n\t\t\tadd_action( 'admin_menu', array( $this, 'remove_taxonomy_metabox' ) );\n\t\t}\n\n\t}", "public function getStoreLabels();" ]
[ "0.82675576", "0.7565901", "0.6956691", "0.68305755", "0.67615193", "0.6740723", "0.67178845", "0.67178845", "0.67178845", "0.6679489", "0.6631996", "0.6617115", "0.65822595", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6554932", "0.6552367", "0.6512972", "0.64757824", "0.6458355", "0.6414408", "0.6412408", "0.63956314", "0.639032", "0.63839513", "0.6371618", "0.63595366", "0.63310224", "0.62870157", "0.6261332", "0.62580836", "0.6245836", "0.62315804", "0.6227211", "0.62257946", "0.61988306", "0.61942405", "0.6187259", "0.6178729", "0.61768436", "0.61624575", "0.61579204", "0.61375475", "0.6129712", "0.61202586", "0.61201626", "0.6118975", "0.6112958", "0.6106449", "0.6096621", "0.6088171", "0.6058063", "0.60506994", "0.60442924", "0.60335207", "0.60293764", "0.6027509", "0.6020032", "0.60198635", "0.60181737", "0.60097885", "0.600272", "0.59904456", "0.5988923", "0.5977189", "0.59663683", "0.5961097", "0.59518486", "0.5935032", "0.5933225", "0.59171593", "0.59076613", "0.58934027", "0.5892174", "0.5887278", "0.58801836", "0.5879176", "0.5878336", "0.5877067", "0.58767754", "0.58688515", "0.5853491", "0.5849571", "0.584222", "0.58392674", "0.5836264", "0.5835223" ]
0.7698398
1
/ / Query builders / Get current taxonomy using wordpress magic function
public static function current() { $id = get_queried_object_id(); if (!$id) { return null; } return static::find($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_current_taxonomy() {\n\t\treturn $this->current_taxonomy;\n\t}", "private function get_taxonomy() {\n\t\treturn filter_input( INPUT_GET, 'taxonomy', FILTER_DEFAULT, array( 'options' => array( 'default' => '' ) ) );\n\t}", "public function getTaxonomy()\n {\n return $this->taxonomy;\n }", "function get_taxonomy($taxonomy)\n {\n }", "public function get_taxonomy(){\r\n\t\t$this->tax_obj = get_taxonomy( $this->taxonomy );\r\n\t}", "public function taxonomy();", "public function _get_current_taxonomy($instance)\n {\n }", "public function getAutonomy()\n {\n return $this->autonomy;\n }", "function get_primaryTermName($taxonomy,$id) {\n $primary_term = new WPSEO_Primary_Term($taxonomy,$id); \n $term = get_term_by('id',$primary_term->get_primary_term(),$taxonomy);\n return $term->name; \n}", "function acf_get_term($term_id, $taxonomy = '')\n{\n}", "public function get()\n {\n if (null === $this->taxonomylist) {\n $this->taxonomylist = $this->build(Grav::instance()['taxonomy']->taxonomy());\n }\n\n return $this->taxonomylist;\n }", "public function taxonomy() {\n $parents = array_reverse( $this->get_all_parents( $this->id ) );\n $taxonomy = '';\n\n foreach ( $parents as $category ) {\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n $taxonomy .= $category->name;\n }\n\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n return $taxonomy . $this->name;\n }", "function emc_taxonomy_title() {\r\n\r\n\tglobal $wp_query;\r\n\t$term = $wp_query->get_queried_object();\r\n\t$title = $term->name;\r\n\r\n\techo esc_html( $title );\r\n\r\n}", "public function taxonomyName($taxonomy = null);", "public function getTaxonomyType()\n {\n return $this->taxonomy_type;\n }", "public function CurrentTag() {\n\t\t$tagID = $this->request->getVar('tag');\n\n\t\tif (isset($tagID)) {\n\t\t\treturn TaxonomyTerm::get_by_id('TaxonomyTerm', (int)$tagID);\n\t\t}\n\t}", "function charity_is_hope_trx_donations_get_current_taxonomy($tax, $page) {\n\t\tif (!empty($tax)) return $tax;\n\t\tif ( charity_is_hope_strpos($page, 'donations')!==false ) {\n\t\t\t$tax = TRX_DONATIONS::TAXONOMY;\n\t\t}\n\t\treturn $tax;\n\t}", "function get_term_taxonomy_meta ($term_id, $taxonomy, $meta_key, $single = false)\n{\n return TTMetaPlugin::get_term_taxonomy_meta( $term_id, $taxonomy, $meta_key, $single );\n}", "function mds_custom_taxonomy() {\n $args = array(\n\n /**\n * Include a description of the taxonomy.\n */\n 'description' => '', // string (default is NONE)\n\n /**\n * A plural descriptive name for the taxonomy marked for translation.\n * Default: overridden by $labels->name\n */\n 'label' => __( 'Custom Taxonomies' ), // string (default overridden by $labels->name).\n\n /**\n * Labels used when displaying the taxonomy in the admin and sometimes on the front end.\n */\n 'labels' => array(\n 'name'\t\t\t\t => __( 'Custom Taxonomies' ),\n 'singular_name'\t\t\t => __( 'Custom Taxonomy' ),\n 'menu_name'\t\t\t => __( 'Custom Taxonomy'),\n 'all_items'\t\t\t => __( 'All Custom Taxonomies' ),\n 'view_item' => __( 'View Custom Taxonomy' ),\n 'edit_item'\t\t\t => __( 'Edit Custom Taxonomy' ),\n 'update_item'\t\t\t => __( 'Update Custom Taxonomy'),\n 'add_new_item'\t\t\t => __( 'Add New Custom Taxonomy'),\n 'new_item_name'\t\t\t => __( 'New Single Custom Taxonomy'),\n 'parent_item'\t\t\t => __( 'Parent Custom Taxonomy' ),\n 'parent_item_colon'\t\t => __( 'Parent Custom Taxonomy' ),\n 'search_items'\t\t\t => __( 'Search Custom Taxonomy' ),\n 'popular_items'\t\t\t => __( 'Popular Custom Taxonomy' ),\n 'separate_items_with_commas' => __( 'Separate Custom Taxonomy with commas' ),\n 'add_or_remove_items'\t => __( 'Add or remove Custom Taxonomy'),\n 'choose_from_most_used'\t => __( 'Choose from most used Custom Taxonomy'),\n 'not_found' => __( 'No Custom Taxonomy found.' )\n ),\n\n /**\n * If the taxonomy should be publicly queryable. This\n * argument is sort of a catchall for many of the following arguments.\n */\n 'public' => true, // bool (default is TRUE)\n\n /**\n * Whether to generate a default UI for managing this taxonomy.\n */\n 'show_ui' => true, // bool (defaults to 'public').\n\n /**\n * Whether taxonomy items are available for selection in navigation menus.\n */\n 'show_in_nav_menus' => true, // bool (defaults to 'public').\n\n /**\n * Whether to allow the Tag Cloud widget to use this taxonomy.\n */\n 'show_tagcloud' => false,// bool (defaults to 'show_ui').\n\n /**\n * Whether to show the taxonomy in the quick/bulk edit panel.\n */\n 'show_in_quick_edit' => true, // bool (defaults to 'show_ui').\n\n /**\n * Whether to allow automatic creation of taxonomy columns on associated post-types table.\n */\n 'show_admin_column' => false,// bool (default is FALSE)\n\n /**\n * Provide a callback function name for the meta box display.\n * No meta box is shown if set to false\n */\n 'meta_box_cb' => null, //callback function (default is NULL)\n\n /**\n * Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.\n */\n 'hierarchical' => false,// bool (default is FALSE)\n\n /**\n * A function name that will be called when the count of an associated $object_type, such as post, is updated.\n * Works much like a hook.\n */\n\n 'update_count_callback' => '', //string (default is NONE)\n\n /**\n * Sets the query_var key for this taxonomy. If set to TRUE, the post type name will be used.\n * You can also set this to a custom string to control the exact key.\n */\n 'query_var' => 'custom-taxonomy', // bool|string (defaults to TRUE - post type name)\n\n\n /**\n * How the URL structure should be handled with this post type. You can set this to an\n * array of specific arguments or true|false. If set to FALSE, it will prevent rewrite\n * rules from being created.\n */\n 'rewrite' => array(\n\n /* The slug to use for individual posts of this type. */\n 'slug' => 'custom-post-type', // string (defaults to taxonomy's name slug)\n\n /* Allowing permalinks to be prepended with front base*/\n 'with_front' => false, // bool (defaults to TRUE)\n\n /* true or false allow hierarchical urls*/\n 'hierarchical' => false, // bool (defaults to FALSE)\n\n /* Assign an endpoint mask to this permalink. */\n 'ep_mask' => EP_PERMALINK, // const (defaults to EP_NONE)\n ),\n\n /**\n * Provides more precise control over the capabilities than the defaults. By default, WordPress\n * will use the 'capability_type' argument to build these capabilities. More often than not,\n * this results in many extra capabilities that you probably don't need.\n */\n 'capabilities' => array( ),\n\n /**\n * Whether this taxonomy should remember the order in which terms are added to objects.\n */\n 'sort' => false, // bool (default is NONE)\n );\n\n /**\n * Set up the arguments for the post type where taxonomy will be displayed.\n * Can be a custom post type or any of the registered post types: post, page, attachment, revision, nav_menu_item\n */\n $args_post_type = array(\n 'custom-post-type'\n );\n\n register_taxonomy(\n 'custom-taxonomy', //Taxonomy name. Max of 32 characters. Uppercase and spaces not allowed.\n $args_post_type, //Name of the post type for the taxonomy,\n $args\n );\n\n}", "public function getTermTaxonomyTable(): string\n {\n return $this->wpDatabase->term_taxonomy;\n }", "function custom_taxonomy_wie_init() {\n //custom taxonmy\n register_taxonomy(\n 'webdevelopment',\n 'post',\n array(\n 'hierarchical' => true,\n 'label' => 'Web Development Types',\n 'query_var' => true\n )\n );\n}", "function jr_get_custom_taxonomy($post_id, $tax_name, $tax_class) {\r\n $tax_array = get_terms( $tax_name, array( 'hide_empty' => '0' ) );\r\n if ($tax_array && sizeof($tax_array) > 0) {\r\n foreach ($tax_array as $tax_val) {\r\n if ( is_object_in_term( $post_id, $tax_name, array( $tax_val->term_id ) ) ) {\r\n echo '<span class=\"'.$tax_class . ' '. $tax_val->slug.'\">'.$tax_val->name.'</span>';\r\n break;\r\n }\r\n }\r\n }\r\n}", "public function getTaxonomy()\n {\n return ucwords(\\Present::unslug($this->taxonomy));\n }", "function charity_is_hope_team_get_current_taxonomy($tax, $page) {\n\t\tif (!empty($tax)) return $tax;\n\t\tif ( charity_is_hope_strpos($page, 'team')!==false ) {\n\t\t\t$tax = 'team_group';\n\t\t}\n\t\treturn $tax;\n\t}", "function foucs_show_taxonomy($name_taxonomy, $order_by, $order, $number_term) {\n $args = array(\n 'taxonomy' => $name_taxonomy,\n 'orderby' => $order_by,\n 'order' => $order,\n 'number' => $number_term,\n 'hide_empty' => false,\n );\n $foucs_query = new WP_Term_Query($args);\n ?>\n <ul class=\"all-taxonomy\">\n <?php \n foreach ( $foucs_query->get_terms() as $term ) { ?>\n <li class=\"taxonomy\">\n <a href=\"<?php echo get_term_link( $term ) // Get The Category Link?>\">\n <span class=\"name\">\n <?php echo esc_html($term->name) // Show Category Name?>\n </span>\n </a>\n <span class=\"count-num\"><?php echo esc_html($term->count) // Show Count Post In Category?></span>\n </li>\n <?php\n }?>\n </ul>\n <?php\n}", "function get_taxonomies($args = array(), $output = 'names', $operator = 'and')\n {\n }", "public function getTaxonomyTerms();", "public function get_term()\n {\n }", "static function get_post_term( $taxonomy ) {\n\t\tglobal $post;\n\t\t$terms = get_the_terms( $post, $taxonomy );\n\t\tif ( ! empty( $terms ) ) {\n\t\t\t$term = reset( $terms );\n\t\t}\n\t\t$term = isset( $term ) ? $term : '';\n\t\treturn $term;\n\t}", "function rest_get_route_for_taxonomy_items($taxonomy)\n {\n }", "function acf_get_term_post_id($taxonomy, $term_id)\n{\n}", "public function initial_taxonomy() {\n $labels = array(\n 'name' => __( 'Taxonomies', Settings::$text_domain ),\n 'singular_name' => __( 'Taxonomy', Settings::$text_domain ),\n 'menu_name' => __( 'Taxonomies', Settings::$text_domain ),\n 'name_admin_bar' => __( 'Taxonomies', Settings::$text_domain ),\n 'add_new' => __( 'Add New', Settings::$text_domain ),\n 'add_new_item' => __( 'Add New Taxonomy', Settings::$text_domain ),\n 'new_item' => __( 'New Taxonomy', Settings::$text_domain ),\n 'edit_item' => __( 'Edit Taxonomy', Settings::$text_domain ),\n 'view_item' => __( 'View Taxonomy', Settings::$text_domain ),\n 'all_items' => __( 'Taxonomies', Settings::$text_domain ),\n 'search_items' => __( 'Search Taxonomies', Settings::$text_domain ),\n 'parent_item_colon' => __( 'Parent Taxonomies:', Settings::$text_domain ),\n 'not_found' => __( 'No taxonomy found.', Settings::$text_domain ),\n 'not_found_in_trash' => __( 'No taxonomies found in Trash.', Settings::$text_domain )\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'tools.php',\n 'show_in_nav_menus' => false,\n 'query_var' => true,\n 'capability_type' => 'post',\n 'has_archive' => false,\n 'hierarchical' => false,\n 'menu_position' => null,\n 'taxonomies' => array( '' ),\n 'menu_icon' => 'dashicons-category',\n 'supports' => array('title')\n );\n\n register_post_type( Settings::$main_taxonomy_name, $args );\n\n $taxonomy_factory = new Taxonomy_Factory();\n $taxonomy_factory->register_all_taxonomies();\n\n //Configura o número de posts por página\n add_action('pre_get_posts', array($taxonomy_factory, 'set_posts_per_page'));\n }", "function acf_get_taxonomy_terms($taxonomies = array())\n{\n}", "public function taxonomy_highlight() {\n\t\t\tglobal $current_screen, $taxnow;\n\n\t\t\tif ( is_a( $current_screen, 'WP_Screen' ) && ! empty( $taxnow ) && in_array( $taxnow, array( wct_get_tag(), wct_get_category() ) ) ) {\n\t \t\t\t$current_screen->post_type = $this->post_type;\n\t \t\t}\n\t\t}", "private function prepareTaxonomy(){\n $taxonomy = null;\n if ( $this->taxonomy->terms() ){\n foreach($this->taxonomy->terms() as $term){\n $taxonomy[] = array( \n \t'id'=>$term->getID(), \n \t'label'=>$term->label->label \n\t\t\t\t);\n }\n }\n return $taxonomy;\n }", "function acf_get_taxonomies($args = array())\n{\n}", "function acf_get_taxonomy_labels($taxonomies = array())\n{\n}", "function get_custom_type_terms($id, $tax) {\n $weekly_types = get_the_terms($id, $tax);\n if ($weekly_types) {\n return $weekly_types[0]->name;\n }\n return false;\n}", "public function query() {\n $this->ensureMyTable();\n\n $def = $this->definition;\n $def['table'] = 'taxonomy_term_field_data';\n\n if (!array_filter($this->options['vids'])) {\n $taxonomy_index = $this->query->addTable('taxonomy_index', $this->relationship);\n $def['left_table'] = $taxonomy_index;\n $def['left_field'] = 'tid';\n $def['field'] = 'tid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n }\n else {\n // If vocabularies are supplied join a subselect instead\n $def['left_table'] = $this->tableAlias;\n $def['left_field'] = 'nid';\n $def['field'] = 'nid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n $def['adjusted'] = TRUE;\n\n $query = Database::getConnection()->select('taxonomy_term_field_data', 'td');\n $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid');\n $query->condition('td.vid', array_filter($this->options['vids']), 'IN');\n if (empty($this->query->options['disable_sql_rewrite'])) {\n $query->addTag('taxonomy_term_access');\n }\n $query->fields('td');\n $query->fields('tn', ['nid']);\n $def['table formula'] = $query;\n }\n\n $join = \\Drupal::service('plugin.manager.views.join')->createInstance('standard', $def);\n\n // use a short alias for this:\n $alias = $def['table'] . '_' . $this->table;\n\n $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_field_data', $this->relationship);\n }", "private function retrieve_term_title() {\n\t\t$replacement = null;\n\n\t\tif ( ! empty( $this->args->taxonomy ) && ! empty( $this->args->name ) ) {\n\t\t\t$replacement = $this->args->name;\n\t\t}\n\n\t\treturn $replacement;\n\t}", "function _wp_filter_taxonomy_base($base)\n {\n }", "function vendor_defined_taxonomy() {\n // The targeted product attribute taxonomy\n return 'pa_color'; \n}", "function get_tax_sql($tax_query, $primary_table, $primary_id_column)\n {\n }", "function genres_artist_taxonomy() {\n\n $labels = array(\n 'name' => _x( 'Genre Name', 'Taxonomy Genre name', 'text-domain' ),\n 'singular_name' => _x( 'Genres Name', 'Taxonomy Genres name', 'text-domain' ),\n 'search_items' => __( 'Search Genre Name', 'text-domain' ),\n 'popular_items' => __( 'Popular Genre Name', 'text-domain' ),\n 'all_items' => __( 'All Genre Name', 'text-domain' ),\n 'parent_item' => __( 'Parent Genres Name', 'text-domain' ),\n 'parent_item_colon' => __( 'Parent Genres Name', 'text-domain' ),\n 'edit_item' => __( 'Edit Genres Name', 'text-domain' ),\n 'update_item' => __( 'Update Genres Name', 'text-domain' ),\n 'add_new_item' => __( 'Add New Genres Name', 'text-domain' ),\n 'new_item_name' => __( 'New Genres Name Name', 'text-domain' ),\n 'add_or_remove_items' => __( 'Add or remove Genre Name', 'text-domain' ),\n 'choose_from_most_used' => __( 'Choose from most used text-domain', 'text-domain' ),\n 'menu_name' => __( 'Genres Name', 'text-domain' ),\n );\n\n $args = array(\n 'labels' => $labels,\n 'public' => true,\n 'show_in_nav_menus' => true,\n 'show_admin_column' => false,\n 'hierarchical' => true,\n 'show_tagcloud' => true,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => true,\n 'query_var' => true,\n 'capabilities' => array(),\n );\n\n register_taxonomy( 'genres_artist', array( 'artist' ), $args );\n}", "function get_terms($value, $taxonomy = 'category')\n {\n }", "function get_post_taxonomies($post = 0)\n {\n }", "protected function _queryTaxonomyByName($methodArgs, $queryArgs)\r\n {\r\n if (!$this->_checkQueryArgs($queryArgs, ['name'])) {\r\n return false;\r\n }\r\n\r\n return get_taxonomy($queryArgs['name']);\r\n }", "function currentTypes($id){\n\t$term_id = get_the_terms($id, 'marcato_type');\n\t$terms = \"\";\n\tforeach($term_id as $genre){\n\t//\tprint_r($genre->name);\n\t\t$terms .= strtolower($genre->name) . \" \";\n\t}\n\n\treturn $terms;\n}", "protected function get_taxonomy_name($label) {\n\t\t\tif(!$options = $this->options) {\n\t\t\t\t$options = $this->pro_class->options;\n\t\t\t}\n\n\t\t\tforeach($options['taxonomies'] as $taxonomy => $value) {\n\t\t\t\tif($value['label'] == $label) {\n\t\t\t\t\treturn $taxonomy;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $label; // if no match found, try to use the label\n\t\t}", "function realtor_property_status_taxonomy()\n{\n $labels = array(\n 'name' => _x('Property Statuses', 'taxonomy general name', 'realtor'),\n 'singular_name' => _x('Property Status', 'taxonomy singular name', 'realtor'),\n 'search_items' => __('Search Property Statuses', 'realtor'),\n 'popular_items' => __('Popular Property Statuses', 'realtor'),\n 'all_items' => __('All Property Statuses', 'realtor'),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __('Edit Property Status', 'realtor'),\n 'update_item' => __('Update Property Status', 'realtor'),\n 'add_new_item' => __('Add New Property Status', 'realtor'),\n 'new_item_name' => __('New Property Status', 'realtor'),\n 'separate_items_with_commas' => __('Separate Property Statuses with commas', 'realtor'),\n 'add_or_remove_items' => __('Add or remove property statuses', 'realtor'),\n 'choose_from_most_used' => __('Choose from the most used property statuses'),\n 'not_found' => __('No menu property statuses found.'),\n 'menu_name' => __('Property Statuses'),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => __('property-status', 'realtor') ),\n );\n\n register_taxonomy('property_statuses', 'property', $args);\n}", "function widgetopts_global_taxonomies() {\n \t$taxonomies = get_option( 'widgetopts_global_taxonomies' );\n\n \tif( empty( $taxonomies ) ) {\n\n $tax_args = array(\n 'public' => true\n );\n $tax_output = 'objects'; // or objects\n $tax_operator = 'and'; // 'and' or 'or'\n $taxonomies = get_taxonomies( $tax_args, $tax_output, $tax_operator );\n unset( $taxonomies['post_format'] );\n\n // Let's let devs alter that value coming in\n $taxonomies = apply_filters( 'widgetopts_update_global_taxonomies', $taxonomies );\n update_option( 'widgetopts_global_taxonomies', $taxonomies );\n\n \t}\n\n \treturn apply_filters( 'widgetopts_get_global_taxonomies', $taxonomies );\n }", "function get_object_taxonomies($object_type, $output = 'names')\n {\n }", "function acf_isset_termmeta($taxonomy = '')\n{\n}", "function get_term_taxo_by_key( $meta_key = '' ) {\n\tglobal $wpdb;\n\n\t$key = md5( 'key-' . $meta_key );\n\n\t$result = wp_cache_get( $key, 'term_meta' );\n\tif ( false === $result ) {\n\t\t$result = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM $wpdb->termmeta WHERE meta_key = %s\", $meta_key ) );\n\t\twp_cache_set( $key, $result, 'term_meta' );\n\t}\n\n\treturn $result;\n}", "function register_part_of_speech_taxonomy () {\n\n $labels = array(\n 'name' => _x( 'Part of Speech', 'taxonomy general name' ),\n 'singular_name' => _x( 'Part of Speech', 'taxonomy singular name' ),\n 'search_items' => __( 'Parts of Speech' ),\n 'all_items' => __( 'All Parts of Speech' ),\n 'parent_item' => __( 'Parent Part of Speech' ),\n 'parent_item_colon' => __( 'Parent Part of Speech:' ),\n 'edit_item' => __( 'Edit Part of Speech' ),\n 'update_item' => __( 'Update Part of Speech' ),\n 'add_new_item' => __( 'Add New Part of Speech' ),\n 'new_item_name' => __( 'New Part of Speech Name' ),\n 'menu_name' => __( \"Parts of Speech\"),\n );\n\n register_taxonomy(\n 'sil_parts_of_speech',\n 'post',\n array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => true,\n 'public' => true,\n 'show_ui' => true\n )\n ) ;\n}", "protected function get_current_term_slug() {\n return absint( is_tax() ? get_queried_object()->slug : 0 );\n }", "function get_term_by($field, $value, $taxonomy = '', $output = \\OBJECT, $filter = 'raw')\n {\n }", "public function getTaxonomyTerm($id, $taxonomy);", "private function determine_scope() {\n\t\t$taxonomy = $this->get_taxonomy();\n\n\t\tif ( $taxonomy === 'category' ) {\n\t\t\treturn 'category';\n\t\t}\n\n\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\treturn 'tag';\n\t\t}\n\n\t\treturn 'term';\n\t}", "function five_register_taxonomy($taxonomy, $singular, $plural, $object_type = ['post'], $args = [])\n{\n //first do the translations part for GUI\n\n $labels = [\n 'name' => _x($plural, 'five'),\n 'singular_name' => _x($singular, 'five'),\n 'search_items' => __('Search '.$plural),\n 'all_items' => __('All '.$plural),\n 'parent_item' => __('Parent '.$singular),\n 'parent_item_colon' => __('Parent '.$singular.':'),\n 'edit_item' => __('Edit '.$singular),\n 'update_item' => __('Update '.$singular),\n 'add_new_item' => __('Add New '.$singular),\n 'new_item_name' => __('New '.$singular.' Name'),\n 'menu_name' => __($plural),\n ];\n\n // Now register the taxonomy\n $args = array_merge([\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => $taxonomy],\n ], $args);\n\n register_taxonomy($taxonomy, $object_type, $args);\n}", "function acf_get_terms($args)\n{\n}", "function custom_taxonomies() {\n }", "public function contextualData()\n {\n return $this->taxonomy->data();\n }", "function get_term_name($slug, $tax){\n $term = get_term_by('slug', $slug, $tax);\n $term_name = array(\n array(\n 'name' => $term->name,\n 'slug' => $term->slug,\n 'link' => esc_url( get_term_link( $term ) ),\n )\n );\n return $term_name;\n}", "function _get_term_hierarchy($taxonomy)\n {\n }", "function get_queried_object()\n {\n }", "static function get_first_term_name( $taxonomy ) {\n\t\tglobal $post;\n\n\t\t$terms = get_the_terms( $post, $taxonomy );\n\t\tif ( ! empty( $terms ) ) {\n\t\t\treturn $terms[0]->name;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}", "private function retrieve_tag() {\n\t\t$replacement = null;\n\n\t\tif ( isset( $this->args->ID ) ) {\n\t\t\t$tags = $this->get_terms( $this->args->ID, 'post_tag' );\n\t\t\tif ( $tags !== '' ) {\n\t\t\t\t$replacement = $tags;\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "protected function get_taxonomies() {\n\t\treturn apply_filters( 'appthemes_html_term_description_taxonomies', $this->taxonomies );\n\t}", "public function token_context() {\n\t\tif ( is_admin() ) {\n\t\t\treturn 'admin';\n\t\t} else if ( is_home() || is_front_page() ) {\n\t\t\treturn 'home';\n\t\t} else if ( is_tax() || is_tag() || is_category() ) {\n\t\t\treturn get_queried_object()->taxonomy;\n\t\t} else if ( is_author() ) {\n\t\t\treturn 'author';\n\t\t} else if ( is_singular() || is_single() || is_page() ) {\n\t\t\treturn get_post_type();\n\t\t} else if ( is_search() ) {\n\t\t\treturn 'search';\n\t\t} else if ( is_date() ) {\n\t\t\treturn 'date';\n\t\t} else if ( is_archive() ) {\n\t\t\treturn 'archive';\n\t\t} else if ( is_404() ) {\n\t\t\treturn '404';\n\t\t}\n\t}", "function realtor_property_type_taxonomy()\n{\n $labels = array(\n 'name' => _x('Property Types', 'taxonomy general name', 'realtor'),\n 'singular_name' => _x('Property Type', 'taxonomy singular name', 'realtor'),\n 'search_items' => __('Search Property Types', 'realtor'),\n 'popular_items' => __('Popular Property Types', 'realtor'),\n 'all_items' => __('All Property Types', 'realtor'),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __('Edit Property Type', 'realtor'),\n 'update_item' => __('Update Property Type', 'realtor'),\n 'add_new_item' => __('Add New Property Type', 'realtor'),\n 'new_item_name' => __('New Property Type', 'realtor'),\n 'separate_items_with_commas' => __('Separate Property Types with commas', 'realtor'),\n 'add_or_remove_items' => __('Add or remove property types', 'realtor'),\n 'choose_from_most_used' => __('Choose from the most used property types'),\n 'not_found' => __('No menu property types found.'),\n 'menu_name' => __('Property Types'),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => __('property-type', 'realtor') ),\n );\n\n register_taxonomy('property_types', 'property', $args);\n}", "function mostra_taxonomia($tax,$sentido) {\n // creditos: https://code.tutsplus.com/tutorials/taxonomy-archives-list-posts-by-taxonomys-terms--cms-20045\n global $post;\n\n $terms = get_terms( $tax, array(\n 'orderby' => 'name',\n 'order' => $sentido,\n 'hide_empty' => 0\n ) );\n\n foreach( $terms as $term ) {\n \n $args = array(\n 'post_type' => 'revistasufg',\n 'orderby' => 'name',\n 'order' => $sentido,\n $tax => $term->slug\n );\n\n $query = new WP_Query($args);\n \n echo'<h4 class=\"divisoria titulo-taxonomia\">' . $term->name . '</h4>';\n \n while ( $query->have_posts() ) : $query->the_post(); \n if( have_rows('revista_informacoes') ): while( have_rows('revista_informacoes') ): the_row();\n loop_revista(); \n endwhile; endif;\n endwhile; wp_reset_postdata();\n }\n}", "function theme_custom_query($query)\n{\n if (is_admin() && !$query->is_main_query()) {\n return;\n }\n // if ($query->is_tax('custom-tax')) {\n // $query->set('post_type', 'custom');\n // }\n}", "function acf_upgrade_550_taxonomy($taxonomy)\n{\n}", "function vcex_get_first_term( $post = '', $taxonomy = 'category', $terms = '' ) {\n\tif ( function_exists( 'wpex_get_first_term' ) ) {\n\t\treturn wpex_get_first_term( $post, $taxonomy, $terms );\n\t}\n}", "function rew_genreic_taxonomy(){\n\n\t$args= array(\n\t\t'label'=>'Services'\n\t\t);\n\tregister_taxonomy( 'services', array('apartment', 'villa', 'land', 'store'), $args );\n}", "function get_taxonomy_row($params) {\n\t$this->taxonomy_row_query($params);\n\treturn self::$db_taxonomy_row;\n\t}", "function get_taxonomy_row($params) {\n\t$this->taxonomy_row_query($params);\n\treturn self::$db_taxonomy_row;\n\t}", "function my_taxonomies_registry() {\n\t$type_labels = array(\n\t\t'name' => 'Wool Type',\n\t\t'singular_name' => 'Wool Type',\n\t\t'search_items' => 'Search Wool Types',\n\t\t'all_items' => 'All Wool Types' ,\n\t\t'edit_item' => 'Wool Type', \n\t\t'update_item' => 'Update Wool Type',\n\t\t'add_new_item' => 'Add New Wool Type',\n\t\t'new_item_name' => 'New Wool Type',\n\t\t'menu_name' => 'Wool Types',\n\t\t'choose_from_most_used' => 'Choose from most used wool types' \n\t);\n\t$type_args = array(\n\t\t'labels' => $type_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_wool', //by default only admin\n 'edit_terms' => 'edit_wool',\n 'delete_terms' => 'delete_wool',\n 'assign_terms' => 'assign_wool' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui'=> true,\n\t\t'show_tagcloud' => false,\t\t\n\t);\n\t$color_labels = array(\n\t\t'name' => 'Wool Colors',\n\t\t'singular_name' => 'Wool Color',\n\t\t'search_items' => 'Search Wool Colors',\n\t\t'all_items' => 'All Wool Colors' ,\n\t\t'edit_item' => 'Wool Color', \n\t\t'update_item' => 'Update Wool Color',\n\t\t'add_new_item' => 'Add New Wool Color',\n\t\t'new_item_name' => 'New Wool Color',\n\t\t'menu_name' => 'Wool Colors',\n\t\t'choose_from_most_used' => 'Choose from most used wool colors' \n\t);\n\t$color_args = array(\n\t\t'labels' => $color_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_color', //by default only admin\n 'edit_terms' => 'edit_color',\n 'delete_terms' => 'delete_color',\n 'assign_terms' => 'assign_color' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui' => true,\n\t\t'show_tagcloud' => false,\t\t\n\t);\t\n\t$page_labels = array(\n\t\t'name' => 'Display pages',\n\t\t'singular_name' => 'Display pages',\n\t\t'search_items' => 'Search Display pages',\n\t\t'all_items' => 'All Display pages' ,\n\t\t'edit_item' => 'Display pages', \n\t\t'update_item' => 'Update Display page',\n\t\t'add_new_item' => 'Add New Display page',\n\t\t'new_item_name' => 'New Display page',\n\t\t'menu_name' => 'Display pages',\n\t\t'choose_from_most_used' => 'Choose from most used' \n\t);\n\t$page_args = array(\n\t\t'labels' => $page_labels,\n\t\t'show_admin_column' => true,\n\t\t'hierarchical' => false,\n\t\t'capabilities' => array (\n 'manage_terms' => 'manage_color', //by default only admin\n 'edit_terms' => 'edit_color',\n 'delete_terms' => 'delete_color',\n 'assign_terms' => 'assign_color' \n ),\n\t\t'public' => true,\n\t\t'query_var' => true,\n\t\t'show_ui' => true,\n\t\t'show_tagcloud' => false,\n\t\t'rewrite' => array('slug' => 'registrations'),\t\t\n\t);\n\tregister_taxonomy( 'wool_type', 'coz_registry', $type_args );\n\tregister_taxonomy( 'wool_color', 'coz_registry', $color_args );\n\tregister_taxonomy( 'reg_display_page', 'coz_registry', $page_args );\n}", "public function getTerm() {\n return $this->_term;\n }", "public function get_tax() {\n\t\treturn $this->_tax;\n\t}", "function ag_cpt_tax_change() {\n\tif(!isset($_POST['cpt_tax'])) {die('missing data');}\n\t$cpt_tax = $_POST['cpt_tax'];\n\t\n\trequire_once(AG_DIR . '/functions.php');\n\t\n\techo ag_get_taxonomy_terms($cpt_tax);\n\tdie();\n}", "function get_post_type_advanced() {\n\n $post_type = get_post_type();\n\n if( is_post_type_archive() ) {\n $post_type = get_query_var( 'post_type' );\n }\n\n if( is_tax() ) {\n $post_type = get_taxonomy( get_queried_object()->taxonomy )->object_type[0];\n }\n\n return $post_type;\n}", "function create_my_taxonomies()\n{\n register_taxonomy('utilities', 'post', array('hierarchical' => true, 'label' => 'Utilities'));\n}", "function acf_get_taxonomies_for_post_type($post_types = 'post')\n{\n}", "public function t($slug, $args = array())\r\n\t{\r\n\t\treturn $this->taxonomy($slug, $args);\r\n\t}", "function acf_get_pretty_taxonomies($taxonomies = array())\n{\n}", "function __get( $var_name ){\n\t\tif( $var_name == 'categories' ){\n\t\t\treturn $this->terms;\n\t\t}\n\t\treturn null;\n\t}", "function create_ticket_tax() {\n $labels = array(\n 'name' => _x( 'Genres', 'taxonomy general name', 'textdomain' ),\n 'singular_name' => _x( 'Genre', 'taxonomy singular name', 'textdomain' ),\n 'search_items' => __( 'Search Genres', 'textdomain' ),\n 'all_items' => __( 'All Genres', 'textdomain' ),\n 'parent_item' => __( 'Parent Genre', 'textdomain' ),\n 'parent_item_colon' => __( 'Parent Genre:', 'textdomain' ),\n 'edit_item' => __( 'Edit Genre', 'textdomain' ),\n 'update_item' => __( 'Update Genre', 'textdomain' ),\n 'add_new_item' => __( 'Add New Genre', 'textdomain' ),\n 'new_item_name' => __( 'New Genre Name', 'textdomain' ),\n 'menu_name' => __( 'Genre', 'textdomain' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'genre', 'with_front' => false ),\n 'description' => 'Genre for shows and cast. Parent categories are Sports, Theater, Concerts or Other.',\n );\n\n //register_taxonomy( 'genre', array( 'show', 'cast' ), $args );\n register_taxonomy( 'genre', array( 'show' ), $args );\n\n register_taxonomy_for_object_type( 'genre', 'show' );\n //register_taxonomy_for_object_type( 'genre', 'cast' );\n\n}", "function wpv_ct_genre() {\r\n\r\n \t$labels = array(\r\n \t\t'menu_name' => 'Genre',\r\n\r\n \t);\r\n \t$args = array(\r\n \t\t'labels' => $labels,\r\n \t\t'hierarchical' => true,\r\n \t\t'public' => true,\r\n \t\t'show_ui' => true,\r\n \t\t'show_admin_column' => true,\r\n \t\t'show_in_nav_menus' => true,\r\n \t\t'show_tagcloud' => true,\r\n \t);\r\n \tregister_taxonomy( 'genre', array( 'filme' ), $args );\r\n\r\n }", "function entity_translation_taxonomy_term_tab_access() {\n $args = func_get_args();\n $term = array_shift($args);\n if (entity_translation_enabled('taxonomy_term', $term)) {\n return entity_translation_tab_access('taxonomy_term', $term);\n }\n else {\n $function = array_shift($args);\n return $function ? call_user_func_array($function, $args) : FALSE;\n }\n}", "public function getAlias()\n {\n return 'tax';\n }", "function get_term_meta($term_id, $taxonomy, $key = '', $single = false) {\n\n return get_metadata('post', $post_id, $key, $single);\n}", "public function blox_location_singles_get_taxonomies( $name_prefix, $get_prefix, $post_type, $post_name_singular ) {\n\n\t\t$taxonomy_objects = get_object_taxonomies( $post_type, 'object' );\n\n\t\tif ( ! empty( $taxonomy_objects ) ) {\n\t\t\t?>\n\t\t\t<div class=\"<?php if ( empty( $get_prefix['singles'][$post_type]['select_type'] ) || $get_prefix['singles'][$post_type]['select_type'] != 'selected_taxonomies' ) echo ( 'blox-hidden' ); ?> blox-singles-taxonomy-container-wrapper\" >\n\n\t\t\t\t<span class=\"blox-title\"><?php _e( 'Test Strength', 'blox' ); ?></span>\n\n\n\t\t\t\t<select name=\"<?php echo $name_prefix; ?>[singles][<?php echo $post_type; ?>][taxonomies][taxonomy_test]\" class=\"blox-taxonomy-test blox-has-help\">\n\t\t\t\t\t<option value=\"loose\" title=\"<?php _e( 'Loose taxonomy test.', 'blox' ); ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ) ? selected( esc_attr( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ), 'loose' ) : 'selected'; ?>><?php _e( 'Loose', 'blox' ); ?></option>\n\t\t\t\t\t<option value=\"strict\" title=\"<?php _e( 'Strict taxonomy test.', 'blox' ); ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ) ? selected( esc_attr( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ), 'strict' ) : ''; ?>><?php _e( 'Strict', 'blox' ); ?></option>\n\t\t\t\t\t<option value=\"binding\" title=\"<?php _e( 'Binding taxonomy test.', 'blox' ); ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ) ? selected( esc_attr( $get_prefix['singles'][$post_type]['taxonomies']['taxonomy_test'] ), 'binding' ) : ''; ?>><?php _e( 'Binding', 'blox' ); ?></option>\n\t\t\t\t</select>\n\n\t\t\t\t<span class=\"blox-help-text-icon\">\n\t\t\t\t\t<a href=\"#\" class=\"dashicons dashicons-editor-help\" onclick=\"helpIcon.toggleHelp(this);return false;\"></a>\n\t\t\t\t</span>\n\t\t\t\t<div class=\"blox-help-text top\">\n\t\t\t\t\t<?php echo sprintf( __( 'The taxonomy test strength determines how the selection of different taxonomy terms interact with one another. A \"Loose\" test means that the block will show/hide so long as it has %1$sany%2$s of the selected taxonomy terms. A \"Strict\" test will only show/hide the block if it has %1$sall%2$s the selected taxonomy terms. A \"Binding\" test will only show/hide the block if it has %1$sall and only%2$s the selected taxonomy terms. The taxonomy test takes into account terms across all included taxonomies. Ignored taxonomies are not included in the test. Please see the %3$sBlox Documentation%4$s for further explanation.', 'blox' ), '<strong>', '</strong>', '<a href=\"https://www.bloxwp.com/documentation/location/?utm_source=blox&utm_medium=plugin&utm_content=location-links&utm_campaign=Blox_Plugin_Links\" title=\"' . __( 'Blox Documentation', 'blox' ) . '\" target=\"_blank\">', '</a>' ); ?>\n\t\t\t\t</div>\n\n\n\t\t\t\t<?php\n\t\t\t\tforeach ( $taxonomy_objects as $taxonomy_object ) {\n\t\t\t\t\t$taxonomy_type = $taxonomy_object->name;\n\t\t\t\t\t$taxonomy_name = $taxonomy_object->labels->name;\n\t\t\t\t\t$taxonomy_terms = get_terms( $taxonomy_type, array( 'orderby' => 'name', 'order' => 'ASC' ) );\n\n\t\t\t\t\tif ( $taxonomy_type == 'post_format' && ! current_theme_supports( 'post-formats' ) ) {\n\t\t\t\t\t\t// Do nothing since the current theme does not support post formats, otherwise showing this option could be confusing\n\t\t\t\t\t\t// Info on post formats: https://codex.wordpress.org/Post_Formats\n\t\t\t\t\t} else {\n\t\t\t\t\t\t?>\n\n\t\t\t\t\t\t<div class=\"blox-singles-taxonomy-container blox_<?php echo $taxonomy_type; ?>\">\n\t\t\t\t\t\t\t<span class=\"blox-sub-title\"><?php echo $taxonomy_name; ?></span>\n\n\t\t\t\t\t\t\t<select name=\"<?php echo $name_prefix; ?>[singles][<?php echo $post_type; ?>][taxonomies][<?php echo $taxonomy_type; ?>][select_type]\" class=\"blox-taxonomy-select_type\">\n\t\t\t\t\t\t\t\t<option value=\"ignore\" title=\"<?php _e( 'Choose to exclude ' . $taxonomy_name . ' from the taxonomy show/hide test.', 'blox' ); ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] ) ? selected( esc_attr( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] ), 'ignore' ) : ''; ?>><?php _e( 'Ignore ' . $taxonomy_name, 'blox' ); ?></option>\n\t\t\t\t\t\t\t\t<option value=\"selected_taxonomies\" title=\"<?php _e( 'Show or hide only selected ' . $taxonomy_name . '.', 'blox' ); ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] ) ? selected( esc_attr( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] ), 'selected_taxonomies' ) : ''; ?>><?php _e( 'Selected ' . $taxonomy_name, 'blox' ); ?></option>\n\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t<div class=\"<?php if ( empty( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] ) || $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['select_type'] != 'selected_taxonomies' ) echo ( 'blox-hidden' ); ?> blox-singles-taxonomy-container-inner\">\n\n\t\t\t\t\t\t\t\t<?php if ( $taxonomy_terms ) { ?>\n\t\t\t\t\t\t\t\t\t<div class=\"blox-checkbox-container\">\n\t\t\t\t\t\t\t\t\t\t<ul class=\"blox-columns\">\n\t\t\t\t\t\t\t\t\t\t\t<?php foreach ( $taxonomy_terms as $term ) { ?>\n\t\t\t\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"<?php echo $name_prefix; ?>[singles][<?php echo $post_type; ?>][taxonomies][<?php echo $taxonomy_type; ?>][selection][]\" value=\"<?php echo $term->term_id; ?>\" <?php echo ! empty( $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['selection'] ) && in_array( $term->term_id, $get_prefix['singles'][$post_type]['taxonomies'][$taxonomy_type]['selection'] ) ? 'checked=\"checked\"' : ''; ?> />\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?php echo apply_filters( 'the_title', $term->name, $term->term_id ) . ' <span class=\"blox-post-status\">(' . $term->count. ')</span>'; ?>\n\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"blox-checkbox-select-tools\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"blox-checkbox-select-all\" href=\"#\"><?php _e( 'Select All' ); ?></a> <a class=\"blox-checkbox-select-none\" href=\"#\"><?php _e( 'Unselect All' ); ?></a>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t\t<div class=\"blox-alert\">\n\t\t\t\t\t\t\t\t\t\t<?php echo sprintf( __( 'There does not appear to be any %1$s yet.', 'blox' ), $taxonomy_name ); ?>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t} else {\n\t\t\t?>\n\t\t\t<div class=\"<?php if ( empty( $get_prefix['singles'][$post_type]['select_type'] ) || $get_prefix['singles'][$post_type]['select_type'] != 'selected_taxonomies' ) echo ( 'blox-hidden' ); ?> blox-singles-taxonomy-container-wrapper\" >\n\t\t\t\t<div class=\"blox-singles-taxonomy-container\">\n\t\t\t\t\t<div class=\"blox-alert\">\n\t\t\t\t\t\t<?php echo sprintf( __( 'There does not appear to be any taxonomies associated with this post type yet.', 'blox' ) ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "function mw_register_taxonomies() {\n\n $taxonomies = array(\n array(\n 'slug' => 'featured',\n 'single_name' => 'Featured',\n 'plural_name' => 'Featured',\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'hierarchical' => true,\n 'post_type' => array( 'post', 'page' ),\n 'rewrite' => array( 'slug' => 'featured' ),\n ),\n );\n\n foreach( $taxonomies as $taxonomy ) {\n $labels = array(\n 'name' => $taxonomy['plural_name'],\n 'singular_name' => $taxonomy['single_name'],\n 'search_items' => 'Search ' . $taxonomy['plural_name'],\n 'all_items' => 'All ' . $taxonomy['plural_name'],\n 'parent_item' => 'Parent ' . $taxonomy['single_name'],\n 'parent_item_colon' => 'Parent ' . $taxonomy['single_name'] . ':',\n 'edit_item' => 'Edit ' . $taxonomy['single_name'],\n 'update_item' => 'Update ' . $taxonomy['single_name'],\n 'add_new_item' => 'Add New ' . $taxonomy['single_name'],\n 'new_item_name' => 'New ' . $taxonomy['single_name'] . ' Name',\n 'menu_name' => $taxonomy['plural_name']\n );\n\n $rewrite = isset( $taxonomy['rewrite'] ) ? $taxonomy['rewrite'] : array( 'slug' => $taxonomy['slug'] );\n $hierarchical = isset( $taxonomy['hierarchical'] ) ? $taxonomy['hierarchical'] : true;\n $show_admin_column = isset( $taxonomy['show_admin_column'] ) ? $taxonomy['show_admin_column'] : false;\n $show_ui = isset( $taxonomy['show_ui'] ) ? $taxonomy['show_ui'] : true;\n\n register_taxonomy( $taxonomy['slug'], $taxonomy['post_type'], array(\n 'hierarchical' => $hierarchical,\n 'labels' => $labels,\n 'show_ui' => $show_ui,\n 'query_var' => true,\n 'show_admin_column' => $show_admin_column,\n 'rewrite' => $rewrite,\n ));\n }\n\n}", "function primary_category_name() {\n\n\tglobal $post_id;\n\t$term = get_the_terms( $post_id, 'primary-category' );\n\tif ( ! $term ) {\n\t\treturn;\n\t} else {\n\t\techo $term[0]->name;\n\t}\n\n}", "function create_ht_taxonomies() {\n\n $labels = array(\n 'name' => _x( 'Habilidad tecnica', 'taxonomy general name' ),\n 'singular_name' => _x( 'Habilidad tecnica', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Genres' ),\n 'all_items' => __( 'Habilidades tecnicas' ),\n 'parent_item' => __( 'Parent Genre' ),\n 'parent_item_colon' => __( 'Parent Genre:' ),\n 'edit_item' => __( 'Editar habilidad' ), \n 'update_item' => __( 'Actualizar habilidad' ),\n 'add_new_item' => __( 'Nueva habilidad tecnica' ),\n 'new_item_name' => __( 'Nueva habilidad tecnica' ),\n 'menu_name' => __( 'Habilidades tecnicas' ),\n ); \t\n\n register_taxonomy('habilidad-tecnica',array('ofertas'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'habilidad-tecnica' ),\n ));\n\n}", "protected function get_current_term_id() {\n return absint( is_tax() ? get_queried_object()->term_id : 0 );\n }", "function kulam_get_custom_taxonomy_labels( $name, $singular ) {\n\n\t$labels = array();\n\n\tif ( $name && $singular ) {\n\n\t\t$labels = array(\n\t\t\t'name'\t\t\t\t\t\t\t=> $name,\n\t\t\t'singular_name'\t\t\t\t\t=> $singular,\n\t\t\t'menu_name'\t\t\t\t\t\t=> $name,\n\t\t\t'search_items'\t\t\t\t\t=> sprintf( __( 'Search %s',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'popular_items'\t\t\t\t\t=> sprintf( __( 'Popular %s',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'all_items'\t\t\t\t\t\t=> sprintf( __( 'All %s',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'parent_item'\t\t\t\t\t=> sprintf( __( 'Parent %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'parent_item_colon'\t\t\t\t=> sprintf( __( 'Parent %s:',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'edit_item'\t\t\t\t\t\t=> sprintf( __( 'Edit %s',\t\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'view_item'\t\t\t\t\t\t=> sprintf( __( 'View %s',\t\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'update_item'\t\t\t\t\t=> sprintf( __( 'Update %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'add_new_item'\t\t\t\t\t=> sprintf( __( 'Add New %s',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'new_item_name'\t\t\t\t\t=> sprintf( __( 'New %s Name',\t\t\t\t\t\t'kulam-scoop' ), $singular ),\n\t\t\t'separate_items_with_commas'\t=> sprintf( __( 'Separate %s with commas',\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'add_or_remove_items'\t\t\t=> sprintf( __( 'Add or remove %s',\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'choose_from_most_used'\t\t\t=> sprintf( __( 'Choose from the most used %s',\t\t'kulam-scoop' ), $name ),\n\t\t\t'not_found'\t\t\t\t\t\t=> sprintf( __( 'No %s Found',\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'no_terms'\t\t\t\t\t\t=> sprintf( __( 'No %s',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'items_list_navigation'\t\t\t=> sprintf( __( '%s list navigation',\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'items_list'\t\t\t\t\t=> sprintf( __( '%s list',\t\t\t\t\t\t\t'kulam-scoop' ), $name ),\n\t\t\t'back_to_items'\t\t\t\t\t=> sprintf( __( '&larr; Back to %s',\t\t\t\t'kulam-scoop' ), $name ),\n\t\t);\n\n\t}\n\n\t// return\n\treturn $labels;\n\n}", "public function get_queried_object()\n {\n }", "function is_taxonomy($taxonomy)\n {\n }" ]
[ "0.7723687", "0.7329178", "0.70972496", "0.70786154", "0.7057463", "0.705365", "0.69795793", "0.657515", "0.64557934", "0.63542736", "0.63478875", "0.6313966", "0.62756425", "0.62682074", "0.6265116", "0.62247974", "0.6185212", "0.616408", "0.61503977", "0.61465734", "0.61318696", "0.6126444", "0.60627955", "0.6038897", "0.6019896", "0.59809875", "0.5959855", "0.5942544", "0.59405833", "0.5931378", "0.59261346", "0.5896641", "0.5887643", "0.5853813", "0.58476317", "0.5844328", "0.5827671", "0.5776466", "0.5776164", "0.5773548", "0.5766345", "0.5742361", "0.5736035", "0.5731002", "0.57083416", "0.5688918", "0.5664315", "0.56475914", "0.5645469", "0.5644538", "0.56334686", "0.5628198", "0.5606477", "0.56012785", "0.5597176", "0.5591253", "0.55849075", "0.55658954", "0.5562818", "0.5557284", "0.5552224", "0.5543953", "0.55320585", "0.55108714", "0.5510838", "0.5509528", "0.55074894", "0.54887205", "0.5476242", "0.54700214", "0.54640746", "0.5457555", "0.54552305", "0.545475", "0.54527116", "0.54474354", "0.5445174", "0.5445174", "0.54437363", "0.54286087", "0.5418392", "0.54122734", "0.5411564", "0.54090333", "0.5408879", "0.5405591", "0.54032826", "0.5399166", "0.5390551", "0.53776455", "0.5374792", "0.536307", "0.5361721", "0.53590107", "0.53588444", "0.5356618", "0.53544146", "0.53485185", "0.5347487", "0.53433824", "0.53421444" ]
0.0
-1
Display a listing of the resource.
public function index() { $records = AssetAssignment::all(); return $this->sendResponse(AssetAssignResource::collection($records), 'Records retrieved successfully.'); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function 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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\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 _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Store a newly created resource in storage.
public function store(AssignmentRequest $request) { /** AssignmentRequest will automatically return all errors if validation failed */ $input = $request->validated(); $record = AssetAssignment::create($input); event(new AssignmentAlert(Auth()->user())); return $this->sendResponse(new AssetAssignResource($record), 'record created successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $record = AssetAssignment::find($id); if (is_null($record)) { return $this->sendError('Record not found.'); } return $this->sendResponse(new AssetAssignResource($record), 'Record retrieved successfully.'); }
{ "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
Update the specified resource in storage.
public function update(AssignmentRequest $request, $id) { $input = $request->validated(); $record = AssetAssignment::find($id); if (is_null($record)) { return $this->sendError('Record not found.'); } $record->update($input); return $this->sendResponse(new AssetAssignResource($record), 'Record Updated successfully.'); }
{ "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) { $record = AssetAssignment::find($id); if (is_null($record)) { return $this->sendError('Record not found.'); } $record->delete(); return $this->sendResponse(new AssetAssignResource($record), 'Record Deleted successfully.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Run the database seeds.
public function run() { $scientificNames = []; $fileHandle = fopen(database_path("seeders/data/speclist.txt"), "r"); while (($line = fgets($fileHandle)) !== false) { $matches = []; preg_match("/N=(.*)/",$line, $matches); $scientificName = $matches[1] ?? null; if ($scientificName === null) { continue; } $beginningOfParenthesis = strpos($scientificName, "("); if ($beginningOfParenthesis) { $scientificName = substr($scientificName, 0, $beginningOfParenthesis); } $scientificNames[] = strtolower( trim($scientificName) ); } fclose($fileHandle); $scientificNames = array_unique($scientificNames); $existingWordsInDict = Kata::query()->get(["isi"])->pluck("isi")->toArray(); $intersectionList = array_intersect($scientificNames, $existingWordsInDict); foreach ($intersectionList as $key => $intersection) { unset($scientificNames[$key]); } $namesParts = []; foreach ($scientificNames as $scientificName) { $scientificName = trim($scientificName, "\t\n\r\0\x0B."); foreach (explode(' ', $scientificName) as $namePart) { $nonNumericCount = preg_match_all("/[^\p{L}]/ui", $namePart); if ($nonNumericCount === 0) { $namesParts[] = $namePart; } } } Kata::query()->insertOrIgnore( array_map(fn($name) => ["isi" => $name], $namesParts) ); }
{ "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
Boilerplate function for getting an API Mock class
protected function getAPIMock($apiClass='OCA\AppFramework\Core\API', array $constructor=array('appname')){ $methods = get_class_methods($apiClass); return $this->getMock($apiClass, $methods, $constructor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getApiObjectClass();", "function fn_soneritics_kiyoh_get_api(): KiyohApi\n{\n $settings = new SoneriticsKiyohSettings;\n $api = new KiyohApi($settings->getHash());\n\n return $api;\n}", "abstract public function getMockBuilder($className): MockBuilder;", "public function getClassName(){return \"Core.Http.ApiRequest\";}", "private function getMockAuthentication()\n {\n return $this->getMock('Mremi\\UrlShortener\\Provider\\Bitly\\AuthenticationInterface');\n }", "function get_obj()\n {\n $object = new ApiRest;\n return $object;\n }", "public function getApiClass(): string\n {\n return $this->apiClass;\n }", "public function GetResponseClass ();", "public function curlConfig(): GetDataFromApiClass;", "protected function getStub()\n {\n }", "static public function api(): Api\n {\n return new Api;\n }", "protected function getStub()\n {\n //\n }", "private function getTtsApiFactory()\r\n {\r\n $this->setInternalProperty(TtsApiFactory::class, 'config', null);\r\n\r\n $stub = $this->getMockBuilder(TtsApiFactory::class)\r\n ->setMethods(array('getConfigFileName', 'getEnvFileName', 'getRootDirectory'))\r\n ->disableOriginalConstructor()\r\n ->getMock();\r\n\r\n $stub->method('getRootDirectory')->willReturn(TEST_ROOT . DIRECTORY_SEPARATOR . 'configs');\r\n $stub->method('getConfigFileName')->willReturn('test.config.php');\r\n $stub->method('getEnvFileName')->willReturn('test.env');\r\n\r\n $stub->__construct();\r\n\r\n return $stub;\r\n }", "public function getApiBase();", "public function getApiInstance()\n {\n $params = func_num_args();\n if ($params > 2 || $params < 1) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'));\n }\n if ($params == 1) {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0));\n $api->set_platform(self::PLATFORM_OPENPLATFORM);\n } else {\n $api = new \\MercadoPago\\Core\\Lib\\Api(func_get_arg(0), func_get_arg(1));\n $api->set_platform(self::PLATFORM_STD);\n }\n if ($this->_switcher->getWebsiteId() != 0) {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId())) {\n $api->sandbox_mode(true);\n }\n } else {\n if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode')) {\n $api->sandbox_mode(true);\n }\n }\n\n\n $api->set_type(self::TYPE);\n\n //$api->set_so((string)$this->_moduleContext->getVersion()); //TODO tracking\n\n return $api;\n\n }", "private function createVehicleApiServiceInterfaceMock()\n {\n return $this->getMockBuilder(VehicleApiServiceInterface::class)->getMock();\n }", "protected function mock($class) {\n $mock = Mockery::mock($class);\n $this->app->instance($class, $mock);\n return $mock;\n }", "public function getApiService();", "public static function getApi() : APIInterface\n {\n $className = ucfirst(self::$appName) . 'API';\n $fullName = self::API_NAMESPACE . \"\\\\\" . $className;\n\n try {\n $api = new $fullName;\n } catch (\\Exception $e) {\n exit(\"Failed to instantiate Api: $className \\n\");\n }\n\n $api->setClient(self::$client)\n ->setUris(self::$uris)\n ->setSearch(self::$search)\n ;\n\n return $api;\n }", "function getSpotifyApi(string $email): SpotifyApi\n{\n //Class to provide user from db\n $userDb = DatabaseFactory::getUserDb();\n //get user with spotify token by email from own db\n $user = $userDb->getByEmailWithToken($email);\n //instantiate the class Spotify api in order to access of spotify api service\n if ($user === null)\n include __DIR__ . '/src/Views/login.php';\n return new SpotifyApi($user->getSpotifyToken(), $user);\n}", "abstract protected function requestClass(): string;", "static function mock(string $class, array $config = null)\n {\n return new self('mock', $class, $config);\n }", "protected function getApiClass(): string {\n\t\treturn ExternalReference::class;\n\t}", "public function api()\n\t{\n\t\treturn resolve(ApiManager::class);\n\t}", "private function mockClass( $return ): \\PHPUnit\\Framework\\MockObject\\MockObject\n {\n $mock = $this->createMock('\\db\\Connect');\n $mock->expects($this->exactly( 2 ))\n ->method('single')\n ->will($this->returnValue( $return[0] ));\n $mock->expects($this->once())\n ->method('bind_multiple');\n $mock->expects($this->once())\n ->method('query')\n ->will($this->returnValue( $return[1] ));\n\n return $mock;\n }", "protected function getResponseFactory()\n {\n }", "private function getBaseMockResponse()\n {\n return $this->getMockBuilder('Guzzle\\Http\\Message\\Response')\n ->disableOriginalConstructor()\n ->getMock();\n }", "protected function buildClass()\n {\n return $this->files->get($this->getStub());\n }", "private function getTestClassName()\n {\n return 'Sheerwater\\HMACRestfulAuthenticator\\HMACRestfulAuthenticator';\n }", "protected function getStub()\n {\n return;\n }", "public static function api() {\n return Injector::inst()->get(self::APIServiceName);\n }", "public function testContainerClassIsPrioritized(): void\n {\n $endpoint = $this->getMockEndpoint();\n $endpoint->expects($this->atLeastOnce())\n ->method('execute')\n ->will($this->returnValue(\n $this->createMock(ResponseInterface::class)\n ));\n $this->executeMockRequestOnEndpoint($endpoint, []);\n $this->markTestIncomplete('This needs reworking');\n }", "private function createVehicleVariantsFetcherInterfaceMock()\n {\n return $this->getMockBuilder(VehicleVariantsFetcherInterface::class)->getMock();\n }", "protected function mock(string $class): MockObject\n {\n if (!class_exists($class)) {\n throw new InvalidArgumentException(sprintf('Class not found: %s', $class));\n }\n\n $mock = $this->getMockBuilder($class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $this->container->set($class, $mock);\n\n return $mock;\n }", "public static function requestClass(): string;", "public static function getInternalClass();", "private function createClientInterfaceMock()\n {\n return $this->getMockBuilder(ClientInterface::class)->getMock();\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/' . '/' . 'model.stub';\n }", "public function __invoke()\n {\n $client = $this->container->get('cpms\\service\\api');\n\n return $client;\n }", "public function getJsonApi(): ?JsonApiObject\n {\n return new JsonApiObject(\"1.1\");\n }", "private function get_api() {\n\n\t\tif ( is_object( $this->api ) ) {\n\t\t\treturn $this->api;\n\t\t}\n\n\t\t// Load KISS Metrics API wrapper class\n\t\trequire_once( $GLOBALS['wc_kissmetrics']->get_plugin_path() . '/includes/class-wc-kissmetrics-api.php' );\n\n\t\t// Init KM API\n\t\treturn $this->api = new WC_KISSmetrics_API( $this->api_key, $this->api_options );\n\t}", "function get_instance($class)\n {\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/api-consumer-endpoint.stub';\n }", "public static function getReflection($class, $methods_to_stub=array()) {\n $class_name = \"__\".$class.\"_\".rand();\n $methods = array();\n foreach ($methods_to_stub as $method => $args) {\n $methods[] = <<<EOF\n public function $method() {\n return TPTMock::call(\\$this, '$method', func_get_args());\n }\n\nEOF;\n }\n $methods = implode(\"\\n\\n\", $methods);\n $def = <<<EOF\nclass $class_name extends $class {\n public \\$__act_as = '$class';\n public static \\$__stubs = array();\n public static \\$__calls = array();\n\n $methods\n\n}\nEOF;\n\n // Ugly! \n eval($def);\n $class_name::$__stubs = $methods_to_stub;\n $klass = new ReflectionClass($class_name);\n return $klass;\n }", "protected function mockProvider() {\n $api = $this->getMockBuilder(Client::class)\n ->setMethods([\n ])\n ->disableOriginalConstructor()\n ->getMock();\n $cr = $this->getMockBuilder(Provider::class)\n ->setMethods(['getSource'])\n ->setConstructorArgs([$api, 'test'])\n ->getMock();\n return [$cr, $api];\n }", "protected function getStub()\n\t{\n\t\treturn __DIR__.'/stubs/api.stub';\n\t}", "protected function getStub()\n {\n if ($this->option('view')) {\n return __DIR__.'/stubs/controller/controller.view.stub';\n }\n\n return __DIR__.'/stubs/controller/controller.api.stub';\n }", "public function getApi();", "public function getApi();", "public function getApi();", "function getReflectionClass();", "private function getMockGuzzle()\n {\n $mock = new MockHandler(array_merge([\n new Response(200, [], json_encode([]))\n ]));\n\n $stack = HandlerStack::create($mock);\n return new Guzzle(['handler' => $stack]);\n }", "public function getResponseClass();", "function H_API() {\n\treturn H_API\\Endpoints::get_instance();\n}", "private function getBaseMockLink()\n {\n return $this->getMock('Mremi\\UrlShortener\\Model\\LinkInterface');\n }", "public function __construct() {\n if (!$this->api) {\n $this->api = new Wrapper();\n }\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/entity_controller.stub';\n }", "public function createInstance()\n {\n $mock = $this->mock('Dhii\\\\SimpleTest\\\\Locator\\\\ResultSetInterface')\n ->getTests()\n ->new();\n\n return $mock;\n }", "public function getReflectionService() {}", "protected function getApiClass(): string {\n\t\treturn CurrentUser::class;\n\t}", "public function me():ResponseInterface;", "private function createCryptoClassDetectorInterfaceMock()\n {\n return $this->getMockBuilder(CryptoClassDetectorInterface::class)->getMock();\n }", "public function testConstructorCallsInternalMethods()\n {\n $data = [\n 'access_token' => 'ABCDEFG',\n 'token_type' => 'bearer',\n 'account_id' => 'dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc',\n 'uid' => '12345',\n 'bearer' => 'three',\n 'team_id' => 'six',\n ];\n\n $reflectedClass = new ReflectionClass(self::$testedClass);\n $instance = $reflectedClass->newInstanceWithoutConstructor();\n\n $constructor = $reflectedClass->getConstructor();\n $constructor->invoke($instance, $data);\n\n $getToken = $reflectedClass->getMethod('getToken');\n $getTokenType = $reflectedClass->getMethod('getTokenType');\n $getBearer = $reflectedClass->getMethod('getBearer');\n $getUid = $reflectedClass->getMethod('getUid');\n $getAccountId = $reflectedClass->getMethod('getAccountId');\n $getTeamId = $reflectedClass->getMethod('getTeamId');\n\n // testing output of methods\n $this->assertSame($getToken->invoke($instance), 'ABCDEFG');\n $this->assertSame($getTokenType->invoke($instance), 'bearer');\n $this->assertSame($getBearer->invoke($instance), 'three');\n $this->assertSame($getUid->invoke($instance), '12345');\n $this->assertSame($getAccountId->invoke($instance), 'dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc');\n $this->assertSame($getTeamId->invoke($instance), 'six');\n }", "protected function _getApiTypeInstance($code)\n {\n $typeConfig = $this->_getApiTypeConfig($code);\n $instance = Mage::getSingleton($typeConfig->getClass());\n\n if (!$instance) {\n throw new Klarna_Kco_Model_Api_Exception(\n sprintf('API class \"%s\" does not exist!', $typeConfig->getClass())\n );\n }\n\n return $instance;\n }", "public function getMock($originalClassName,\n $methods = array(),\n array $arguments = array(),\n $mockClassName = '',\n $callOriginalConstructor = true,\n $callOriginalClone = true,\n $callAutoload = true\n )\n {\n $originalClassName = Enlight_Class::getClassName($originalClassName);\n return parent::getMock($originalClassName,\n $methods,\n $arguments,\n $mockClassName,\n $callOriginalConstructor,\n $callOriginalClone,\n $callAutoload\n );\n }", "function __autoload($className) {\n require PATH_ZABBIX_API_CLASSES_DIRECTORY.'/'.$className.'.php';\n}", "public function testClassname()\n {\n $input = Request::all();\n\n //path params validation\n\n\n //not path params validation\n if (!isset($input['client'])) {\n throw new \\InvalidArgumentException('Missing the required parameter $client when calling testClassname');\n }\n $client = $input['client'];\n\n\n return response('How about implementing testClassname as a patch method ?');\n }", "protected function getStub()\n {\n return __DIR__ . '/../stubs/model.stub';\n }", "protected function _apiInstance() {\n\t\treturn new Thrive_Dash_Api_WebinarJamStudio( $this->param( 'key' ) );\n\t}", "protected function getTransportMock()\n {\n $guzzle = \\Mockery::mock('\\GuzzleHttp\\ClientInterface');\n $handler = \\Mockery::mock('\\WalmartApiClient\\Exception\\Handler\\ExceptionHandlerInterface');\n $apiUrl = 'http://api.walmartlabs.com/v1/';\n $apiKey = 'walmartapikey';\n return \\Mockery::mock('\\WalmartApiClient\\Http\\TransportService', [$guzzle, $handler, $apiUrl, $apiKey]);\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/Model.stub';\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/action.stub';\n }", "protected function getStub() {\n return __DIR__ . '/stubs/trait.stub';\n }", "private function createApi($client)\n {\n $logger = $this->createMock(LoggerInterface::class);\n $logger->method('info');\n\n return new class($client, $logger) extends JsonApi\n {\n\n };\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/controller.stub';\n }", "protected function getClassInfoFactory() {}", "protected function getStub()\n {\n // TODO: Implement getStub() method.\n return __DIR__.'/Stubs/controller.stub';\n }", "public function getReflectionClass();", "private function _getApiControllerReflector($controller_name)\n {\n $class_name = ucfirst($controller_name).\"ApiController\";\n\n if (!class_exists($class_name)) {\n include $this->_api_path.DS.$controller_name.\".php\";\n }\n\n return new ReflectionClass($class_name);\n }", "public function makeResponse(): ResponseInterface;", "function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}", "private function createAlgorithmRegistrationHandlerInterfaceMock()\n {\n return $this->getMockBuilder(AlgorithmRegistrationHandlerInterface::class)->getMock();\n }", "protected function getDriverMock()\n {\n return $this->getMockBuilder('Vich\\UploaderBundle\\Driver\\AnnotationDriver')\n ->disableOriginalConstructor()\n ->getMock();\n }", "protected function getStub()\n {\n return __DIR__ . '/stubs/trait.stub';\n }", "protected function getStub()\n {\n return $this->collection()\n ? __DIR__.'/stubs/resource-collection.stub'\n : __DIR__.'/stubs/resource.stub';\n }", "protected function getStub()\n {\n return __DIR__.'/stubs/factory.stub';\n }", "public function createInstance()\n {\n $mock = $this->mock('Dhii\\\\SimpleTest\\\\Writer\\\\WriterAwareInterface')\n ->getWriter()\n ->new();\n\n return $mock;\n }", "static function create(string $class): ?object\n {\n //$container->get($class);\n\n try {\n return create($class);\n } catch (DependencyException $e) {\n return null;\n } catch (NotFoundException $e) {\n return null;\n }\n }", "protected function _getApi()\n {\n return Mage::getSingleton('payments/api');\n }", "private function _init_api_library($base_name)\n\t{\n\t\t// Generate the name of the class\n\t\t$class_name = $base_name.API_LIBRARY_SUFFIX;\n\n\t\t// Check if the implementing library exists\n\t\tif ( ! Kohana::find_file('libraries/api',\n\t\t\tKohana::config('config.extension_prefix').$class_name))\n\t\t{\n\t\t\tthrow new Kohana_Exception('libraries.api_library_not_found',\n\t\t\t\tKohana::config('config.extension_prefix').$class_name.'.php', $class_name);\n\t\t}\n\n\t\t// Include the implementing API library file\n\t\trequire_once Kohana::find_file('libraries/api', Kohana::config('config.extension_prefix').$class_name);\n\n\t\t// Temporary instance for type checking\n\t\t$temp_api_object = new $class_name($this);\n\n\t\t// Check if the implementing library is an instance of Api_Object_Core\n\t\t// NOTE: All API libraries *MUST* be subclasses of Api_Object_Core\n\t\tif ( ! $temp_api_object instanceof Api_Object_Core)\n\t\t\tthrow new Kohana_Exception('libraries.invalid_api_library', $class_name, 'Api_Object_Core');\n\n\t\t// Discard the old copy\n\t\tunset($this->temp_api_object);\n\n\t\t// Instaniate a fresh copy of the API library\n\t\t$this->api_object = new $class_name($this);\n\t}", "public function sp_api()\n {\n $awsCredentials = new Credentials(\n env('AWS_ACCESS_KEY_ID'),\n env('AWS_SECRET_ACCESS_KEY')\n );\n\n // All of the below should be safe to bind as singletons to an IoC container.\n $spApiConfig = $this->buildSpApiConfig();\n $awsCredentialProvider = CredentialProvider::fromCredentials($awsCredentials);\n $lwaClient = new LwaClient($spApiConfig);\n $lwaService = new LwaService($lwaClient, static::$arrayCache, $spApiConfig);\n $clientAuthenticator = new ClientAuthenticator($lwaService, $awsCredentialProvider, $spApiConfig);\n $clientFactory = new ClientFactory($clientAuthenticator, $spApiConfig);\n $rdtService = new RdtService($clientFactory);\n // ^^^^^^^^^^^^^^^^ END of singleton-safe dependencies ^^^^^^^^^^^^^^^^\n\n // This should always be new'ed up on every use -- i.e. should never be used as a singleton.\n // This is because this wrapper class has state (e.g. rdtRequest) that is intended to be\n // short-lived for the purpose of a single SP-API call.\n return new SpApi(\n $clientFactory,\n $rdtService,\n $lwaService,\n $spApiConfig\n );\n }", "public function find(string $class): Instantiator;", "protected function getStub()\n {\n return __DIR__. '/stubs/facade.base.stub';\n }", "public function get_rest_api_instance() {\n\t\treturn $this->rest_api;\n\t}", "public function getMethodologyObject(){\n $methodologyObject = $this->getMockBuilder('App\\Model\\Domain\\Entities\\Metodologia')\n ->disableOriginalConstructor()\n ->setMethods(['reglas'])->getMock();\n\n $methodologyObject->method('reglas')->willReturn($this->getRuleList());\n\n return $methodologyObject;\n }", "public static function makeInstance(): MockInterface\n {\n $redis = \\Mockery::mock(\\Redis::class);\n $redisGetMethod = $redis->shouldReceive('get');\n $redisGetMethod->andReturnUsing(\n function ($key) {\n return $key;\n }\n );\n $redisSetMethod = $redis->shouldReceive('set');\n $redisSetMethod->andReturnUsing(\n function ($key, $value, $timeout = 0) {\n return true;\n }\n );\n $redisSaveMethod = $redis->shouldReceive('save');\n $redisSaveMethod->andReturnUsing(\n function () {\n return true;\n }\n );\n\n return $redis;\n }", "public function GetRequestClass ();", "public function resolve(string $className): object;", "public static function get_api ()\n\t{\n\t\tif (self::$api === NULL)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$api = new Mollie_API_Client;\n\t\t\t\tself::$api->setApiKey(MODULE_PAYMENT_MOLLIE_API_KEY);\n\n\t\t\t\tif (defined(\"PROJECT_VERSION\"))\n\t\t\t\t{\n\t\t\t\t\tself::$api->addVersionString(PROJECT_VERSION);\n\t\t\t\t}\n\n\t\t\t\tself::$api->addVersionString(\"MollieosCommerce/\" . self::VERSION);\n\t\t\t}\n\t\t\tcatch (Mollie_API_Exception $e)\n\t\t\t{\n\t\t\t\t// Without a connection to Mollie we cannot proceed with anything.\n\t\t\t\tdie($e->getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn self::$api;\n\t}", "public static function get($class, $methods_to_stub=array(), $args=array()) {\n $klass = self::getReflection($class, $methods_to_stub);\n return $klass->newInstanceArgs($args);\n }" ]
[ "0.69169813", "0.6352451", "0.629434", "0.6292968", "0.6276758", "0.6268383", "0.61782783", "0.6117507", "0.60899544", "0.5970323", "0.59428", "0.5913198", "0.5907986", "0.5898631", "0.5873744", "0.5871157", "0.5850308", "0.58207786", "0.5793158", "0.5776803", "0.57331014", "0.5717681", "0.5703771", "0.57017016", "0.56771034", "0.56757575", "0.5640844", "0.5636615", "0.5628615", "0.5610848", "0.5609506", "0.559677", "0.55887806", "0.5580362", "0.5577427", "0.5575688", "0.55687654", "0.5566733", "0.55499816", "0.55381966", "0.5534402", "0.5532774", "0.5528234", "0.5527878", "0.55216676", "0.55212575", "0.5485537", "0.54850507", "0.54850507", "0.54850507", "0.54825455", "0.5477171", "0.54685324", "0.5465543", "0.5455807", "0.5454072", "0.54464984", "0.5442661", "0.54371667", "0.5432823", "0.54297173", "0.5421587", "0.5409244", "0.53992426", "0.53920877", "0.5391838", "0.5388926", "0.5378645", "0.5377868", "0.53703827", "0.5364768", "0.53575814", "0.5336422", "0.53360647", "0.5334434", "0.53333306", "0.5327834", "0.53182006", "0.5314954", "0.531309", "0.5310577", "0.53039956", "0.5300956", "0.52993053", "0.5285753", "0.5284245", "0.5278886", "0.5274913", "0.5269297", "0.5267597", "0.52645946", "0.5256921", "0.5252623", "0.5251096", "0.52506196", "0.52443075", "0.5244164", "0.5237719", "0.523693", "0.5228148" ]
0.6642857
1
Created by PhpStorm. User: alexj Date: 10042016 Time: 17:34
function redirect($url, $statusCode = 303) { header('Location: ' . $url, true, $statusCode); die(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _i() {\n }", "private function __() {\n }", "private function j() {\n }", "final private function __construct(){\r\r\n\t}", "public function helper()\n\t{\n\t\n\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "public function oops () {\n }", "private function __construct () {}", "public function ex4()\n {\n }", "final private function __construct() {}", "final private function __construct() {}", "final function __construct() { \n\t}", "final private function __construct()\n {\n }", "final private function __construct()\n {\n }", "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() { }", "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(){ }", "protected function test9() {\n\n }", "private function __construct() {;}", "private function __construct( )\n {\n\t}", "private function __construct()\t{}", "private function __construct()\r\n {}", "private function __construct() {\n ;\n }", "private function __construct()\r\n {\r\n }", "private function __construct()\r\n {\r\n }", "private final function __construct() {}", "public function __init(){}", "protected function __init__() { }" ]
[ "0.60557175", "0.6004872", "0.58650917", "0.5864734", "0.58008707", "0.57929885", "0.57929885", "0.57929885", "0.57340854", "0.5732353", "0.5708198", "0.56891024", "0.56891024", "0.56733996", "0.56569767", "0.56569767", "0.56520927", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.5651739", "0.56487197", "0.56487197", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5648157", "0.5637234", "0.5637234", "0.5624748", "0.5623229", "0.56202006", "0.56184", "0.56181806", "0.5615781", "0.56143844", "0.56143844", "0.56076807", "0.56007767", "0.5599393" ]
0.0
-1
posso fare funzioni che eval va a chiamare
public function rec($num) { return 1 / $num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fnEval($x, $strEval){\n\t$resultado = 0;\n\t$strEval = str_replace(\"x\",\"(\".$x.\")\",$strEval);\n\teval(\"\\$resultado = \".$strEval.\";\");\n\tif($resultado ==0) {\n\t\t$resultado = \"0\";\n\t}elseif($resultado == \"\" || $resultado == \"-1.#IND\"){\n\t\t\t$resultado = \"NAN\";\n\t}\n\treturn $resultado;\n}", "function math_eval($s) \r\n{\r\n $ma = eval('return ' . $s . ';');\r\n return $ma;\r\n}", "function eval_function_tpl($func_name)\r\n{\r\n\t$params = func_get_args();\r\n\tarray_shift($params);\r\n\t$args = array();\r\n\tforeach ($params as $v)\r\n\t{\r\n\t\tglobal $$v;\r\n//\t\t$args[] = \"'\".str_replace(\"'\", \"\\\\'\", $$v).\"'\";\r\n\t\t$args[] = \"$\".$v;\r\n\t}\r\n\treturn eval('return '.$func_name.'('.implode(',',$args).');');\r\n}", "public function evaluate();", "public function evaluate();", "function prepare_eval($phrase)\n{\n $retVal = \"\";\n $retVal = str_replace(\"!\", \"\\\"\",$phrase);\n $retVal = str_replace(\"#\", \"'\", $retVal);\n return str_replace(\"~\", \"#\", $retVal);\n}", "function prepare2eval($evalStr)\n// ****************************\n{\n return html_entity_decode($evalStr);\n}", "function eval_verb($verb)\n{\n\n}", "function evaluar($valor)\n {\n $nopermitido = array(\"'\",'\\\\','<','>',\"\\\"\");\n $valor = str_replace($nopermitido, \"\", $valor);\n return $valor;\n }", "public static function evalMath($str) {\n\t$str = preg_replace('/[^0-9\\. \\+\\-\\*\\/\\(\\)]+/', '', $str);\n\treturn eval('return ' . $str . ';');\n}", "function evaluo_funcion($funcion,$signos,$valor){\n\t$funcion_ev = 0;\n\t$cont = 0;\n\tforeach ($funcion as $key => $value) {\n\t\ttry{\n\t\t\tif($value == 'sinx' || $value=='sin(x)'){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + sin(($valor));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - sin(($valor));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($value == 'cosx' || $value=='cos(x)'){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + cos(($valor));\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - cos(($valor));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($value == 'tanx' || $value=='tan(x)'){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + tan(($valor));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - tan(($valor));\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($value == '√x' || $value=='√(x)'){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + sqrt($valor);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - sqrt($valor);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\telseif(is_numeric($value)){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + $value;\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - $value;\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t\telseif(is_numeric(substr($value, 0, -1))){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + $value*($valor);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - $value*($valor);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($value == \"1/x\"){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + (1/$valor);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - (1/$valor);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telseif($value == \"ln(x)\"){\n\t\t\t\tif($signos[$cont] == '+'){\n\t\t\t\t\t$funcion_ev = $funcion_ev + log($valor);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - log($valor);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\telse{\n\t\t\t\t$exponente = explode('^', $value);\n\t\t\t\tif($signos[$cont] == '+'){\t\t\t\t\t\t\t\t\n\t\t\t\t\t$funcion_ev = $funcion_ev + pow( $valor , end($exponente))*$exponente[0];\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$funcion_ev = $funcion_ev - pow( $valor , end($exponente))*$exponente[0];\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e){}\n\t\t$cont++;\n\t}\n\treturn $funcion_ev;\n}", "public function evaluar($valor)\n \t{\n\t\t$nopermitido = array(\"'\",'\\\\','<','>',\"\\\"\");\n\t\t$valor = str_replace($nopermitido, \"\", $valor);\n\t\treturn $valor;\n \t}", "function ee( $function_call ) // remember to include brackets on the end if no parameters\n{\n\tglobal $title_CRLF ;\n\n\t$result ;\n\n\t\n\teval( \"\\$result = $function_call ;\" ) ;\n\n\n\treturn \"$title_CRLF$function_call$title_CRLF$title_CRLF$result$title_CRLF\" ;\n\n}", "function e($expr) \n {\n //call the core evaluation method\n return $this->evaluate($expr);\n }", "function quote4Eval($in) {\n\t\tif (is_numeric($in)) {\n\t\t\treturn $in;\n\t\t} else {\n\t\t\treturn '\"' . str_replace(\"\\\\'\", \"'\", addslashes($in)) . '\"';\n\t\t}\n\t}", "function calc_string($string, $con = NULL){\r\n\t// exemplo: calc_string(\"(1 + 2) * 3\"); (retorna 9)\r\n\tif(is_object($con)){\r\n\t\t$res = $con->query(\"SELECT (\".$string.\")\");\r\n\t\treturn $res->fetchColumn();\r\n\t}else{\r\n\t\t//$string = ereg_replace(\"[^0-9\\+-\\*\\/\\(\\) ]\", \"\", trim($string));\r\n\t\t$string = preg_replace(\"[^0-9\\+-\\*\\/\\(\\) ]\", \"\", trim($string));\r\n\t\t$compute = create_function(\"\", \"return (\".$string.\");\");\r\n\t\treturn $compute();\r\n\t}\r\n}", "function evaluateExpression($expression)\n\t{\n\t\treturn eval('return '.$expression.';');\n\t}", "private function preprocess($expr, $allow_tcl_calls = true)\n {\n $prefix = '';\n $suffix = '';\n\n //determine if the given statement is a TCL-like function call\n $tcl_call = preg_match('#^(\\$?'.MATHSCRIPT_IDENTIFIER.')\\s+(.+)*$#ss', $expr, $matches) && $allow_tcl_calls;\n\n //if the expression is a TCL-style function call, process it\n if($tcl_call)\n {\n //extract the function's name\n $function_name = $matches[1];\n\n //if the function name starts with a dollar sign, it's a TCL-style variable\n if(substr($function_name, 0, 1) == '$')\n {\n //the TCL-style variable name is equivalent to the function's \"name\" without the leading $\n $var_name = substr($function_name, 1);\n\n //if the variable exists, set the function name to its value\n if(array_key_exists($var_name, $this->vars))\n $function_name = $this->vars[$var_name];\n }\n\n //if this represents a valid function, handle it\n if($this->extensions->function_exists($function_name))\n {\n //extract the function name, and set the pre/suffix to parenthesis\n $prefix = $function_name.'(';\n $suffix = ')';\n\n //convert the expression to a standard MathScript function\n $expr = trim($matches[2]);\n }\n //otherwise, it's not a real TCL call\n else\n {\n $tcl_call = false;\n }\n\n }\n\n //initialize our flags: we'll start off outside of a quote/curly string, and _not_ at the start of a block of whitespace\n $quote = false;\n $curly_depth = 0;\n $paren_depth = 0;\n $last_was_space = false;\n\n //start a \"buffer\" for the new expression\n $new_expr = '';\n\n //for each charcter in the input string\n $expr_length = strlen($expr);\n for($i = 0; $i < $expr_length; ++$i)\n {\n //extract a single character from the string\n $char = substr($expr, $i, 1);\n\n //if we have the escape character\n if($char == '\\\\')\n {\n //push it, and the next character, directly onto the string \n $new_expr .= substr($expr, i, 2);\n\n //and skip the next character\n ++$i;\n continue;\n }\n\n //if we've hit a quote, toggle quotes\n if($char == '\"')\n $quote = !$quote;\n\n //if we've hit an open-curly, increase the curly-depth\n if($char == '{')\n ++$curly_depth;\n\n //if we've hit a close-curly, decrease the curly-depth\n if($char == '}')\n --$curly_depth;\n\n //if we've hit an open-paren, increase the paren-depth\n if($char == '(')\n ++$paren_depth;\n\n //if we've hit a close-paren, increase the paren-depth\n if($char == ')')\n --$paren_depth;\n\n //if we are not inside of a \" or { string, preprocess\n if($curly_depth == 0)\n {\n //get the rest of the expression, starting at $i\n $rest_of_expr = substr($expr, $i);\n\n //if we've run into a TCL-style variable, in ${identifier} form, require the entire contents of {} to match\n if(preg_match('#^\\$\\{('.MATHSCRIPT_IDENTIFIER.')\\}#', $rest_of_expr, $matches))\n {\n //if we have a variable with that exact name, \n if(array_key_exists($matches[1], $this->vars))\n {\n //append the _value_ of the new variable\n $new_expr .= $this->vars[$matches[1]];\n\n //and continue past the end of the varaible\n $i += strlen($matches[1]) + 2;\n continue;\n }\n // if the varaible does't exist, throw an error\n else\n {\n $this->trigger('Tried to $-reference an undefined variable \"'.$matches[1].'\".');\n return '';\n }\n }\n\n //if we've run into a TCL-style variable, in $identifier form\n elseif(preg_match('#^\\$('.MATHSCRIPT_IDENTIFIER.')#', $rest_of_expr, $matches))\n {\n //get the longest matching varaible\n $var_name = $this->longest_matching_varaible($matches[1]);\n\n //if the variable is defined, replace it with its value\n if($var_name !== null)\n {\n //add the variable's _value_ to the string\n $new_expr .= $this->vars[$var_name];\n\n //and continue past the end of the variable\n $i += strlen($var_name);\n continue;\n }\n }\n //if we're parsing a tcl-style call, and we've a space\n elseif(self::is_preprocessor_whitespace($char) && $tcl_call && !$quote && $paren_depth == 0) \n {\n //if this is the first space, add a comma before it\n if(!$last_was_space)\n $new_expr .= ',';\n\n //and set that the last character was a space\n $last_was_space = true;\n }\n //otherwise, indicate that we haven't hit whitespace (that we care about)\n else\n {\n $last_was_space = false;\n }\n \n }\n\n //push the character directly to the string\n $new_expr .= $char;\n }\n\n //return the new expression, surrounded by the prefix and suffix\n return $prefix.$new_expr.$suffix;\n }", "function training_math_callback() {\n ctools_include('math-expr');\n $expr = new ctools_math_expr();\n $expr->evaluate('f(x, y)=x+y');\n $result = $expr->evaluate('f(10, 20)');\n\n return t('Result is !result', array(\n '!result' => $result,\n ));\n}", "function executar2($a, $b, $op, Closure $funcao){\n $resultado = $funcao($a, $b);\n echo \"$a $op $b = $resultado <br>\";\n}", "protected function sanitizeExpression($code)\n\t{\n\t\t// Language consturcts.\n\t\t$languageConstructs = array(\n\t\t\t'echo',\n\t\t\t'empty',\n\t\t\t'isset',\n\t\t\t'unset',\n\t\t\t'exit',\n\t\t\t'die',\n\t\t\t'include',\n\t\t\t'include_once',\n\t\t\t'require',\n\t\t\t'require_once',\n\t\t);\n\n\t\t// Loop through the language constructs.\n\t\tforeach( $languageConstructs as $lc )\n\t\t\tif( preg_match('/'.$lc.'\\ *\\(?\\ *[\\\"\\']+/', $code)>0 )\n\t\t\t\treturn null; // Language construct found, not safe for eval.\n\n\t\t// Get a list of all defined functions\n\t\t$definedFunctions = get_defined_functions();\n\t\t$functions = array_merge($definedFunctions['internal'], $definedFunctions['user']);\n\n\t\t// Loop through the functions and check the code for function calls.\n\t\t// Append a '(' to the functions to avoid confusion between e.g. array() and array_merge().\n\t\tforeach( $functions as $f )\n\t\t\t//if( preg_match('/'.$f.'\\ *\\({1}/', $code)>0 )\n\t\t\tif( preg_match('/'.preg_quote($f, '/').'\\ *\\({1}/', $code)>0 )\n\t\t\t\treturn null; // Function call found, not safe for eval.\n\n\t\t// Evaluate the safer code\n\t\t$result = @eval($code);\n\n\t\t// Return the evaluated code or null if the result was false.\n\t\treturn $result!==false ? $result : null;\n\t}", "public function evaluate($source)\n\t{\n\t\treturn $this->execute('return eval(' . $source . ');');\n\t}", "public function expressionFunction();", "static private function RunSanitizer($mode, $source, $arguments) {\r\n\t\r\n\t\t//$mode = ucfirst(strtolower($mode));\r\n\t\t$var = $arguments[0];\t// grab the variable name. This is the name of \r\n\t\t\t\t\t\t\t\t// the target variable not its value\r\n\r\n\t\t// throw an exception when the variable is not defined.\r\n\t\tif (!isset($source[$var])) throw new MissingInputException( self::FormatMissingErrorMessage($var), 0, $var );\r\n\r\n\t\t// replace the variable name, with it's value. Setting it to the 0-element\r\n\t\t// will cause it to be the first parameter when the function is called with\r\n\t\t// call_user_func_array\r\n\t\t$arguments[0] = $source[$var];\r\n\r\n\t\t// call the target function\r\n\t\t$return = call_user_func_array(__CLASS__.'::'.$mode, $arguments);\r\n\r\n\t\t// determine if the validation worked.\r\n\t\t// boolean requires a special case, as it returns null instead of true|false when\r\n\t\t// it fails.\r\n\t\tif (($mode == 'Boolean' && $return == null) ||\r\n\t\t($mode != 'Boolean' && $return === false)) { \r\n\t\t\t\r\n\t\t\t// prepare a report for the exception handler\r\n\t\t\t$exceptionReport = array(\t'varName' \t=> $var,\r\n\t\t\t\t\t\t\t\t\t\t'input'\t\t=> $arguments[0],\r\n\t\t\t\t\t\t\t\t\t\t'type'\t\t=> $mode \t\t\t);\r\n\t\t\tif ($mode == 'Enum') { $exceptionReport['valid'] = $arguments[1]; }\r\n\t\t\t\r\n\t\t\tthrow new InvalidInputException( self::FormatInvalidErrorMessage($var, $mode), 0, $exceptionReport); }\r\n\t\t\t \r\n\t\telse { return $return; }\r\n\t\t\r\n\t}", "private function fn(): callable {\n\t\treturn function (mixed $expression): string { return $expression; };\n\t}", "protected function evalaluate($expression) {\n $evaluated = @eval('return (' . $expression . ');');\n \n return $evaluated !== false ? $evaluated : '';\n }", "function evaluate_postfix($tokens, array $vars = array()) \n {\n\n //if we didn't recieve any tokens \n if ($tokens == false) \n return false;\n\n //create a new stack, which we'll use to evaluate the \"postfix\" expression\n $stack = new mathscript_stack();\n\n //for each token in the postfix string\n foreach ($tokens as $token)\n {\n \n //if the token is an array, it represents a function; evaluate it\n if (is_array($token) && !array_key_exists('string', $token)) \n { \n //get the function name, and the amount of arguments specified\n $function_name = $token[MATHSCRIPT_FUNCTION_NAME];\n $arg_count = $token[MATHSCRIPT_ARGUMENT_COUNT];\n\n //handle constructed functions, which are written in PHP for use by the scripted language\n if ($this->extensions->function_exists($function_name))\n {\n //start a new array, which will hold the function arguments\n $args = array();\n\n //for($i = $arg_count - 1; $i >= 0 ; --$i)\n for($i = 0; $i < $arg_count; ++$i)\n {\n //pop the top element off the stack\n list($reference, $top) = $stack->pop();\n\n //if this function expects pass-by-refernce, the pass it a reference to the object\n if($this->extensions->function_argument_by_reference($function_name, $i))\n {\n //Note the lack of a check for existence. This allows us to _create_ variables by reference.\n \n //if our reference was supplied as a literal, use it as a pointer\n if(is_null($reference))\n $args[$i] =& $top;\n else\n $args[$i] =& $reference;\n }\n //add the new element to the arguments array\n else\n {\n //if we're trying to operate on an undefined variable, raise an error\n if(is_null($top))\n return $this->trigger_undefined_variable($reference);\n\n //otherwise, pass in the variable\n $args[$i] = $top;\n }\n\n }\n\n //Call the constructed function with the given arguments, and retrieve the results.\n $result = $this->extensions->call($function_name, array_reverse($args));\n\n //if the result of the given function was false, something went wrong internally\n //TODO: replace with exception?\n if($result === false)\n return $this->trigger('internal error in function '.$function_name);\n\n //push the result onto the stack\n $stack->push(array(MATHSCRIPT_TYPE_RESULT, $result));\n \n }\n //otherwise if this is a user (runtime) defined function, handle it \n elseif (array_key_exists($function_name, $this->user_functions)) \n {\n //extract the expected amount of function arguments\n $expected_args = count($this->user_functions[$function_name][MATHSCRIPT_ARGUMENTS]);\n\n //start a new associative array, which will map the argument _name_ to the given argument\n $args = array();\n \n //for each argument provided\n for ($i = $expected_args - 1; $i >= 0; $i--) \n {\n //pull a single argument from the top of the stack\n list($reference, $top) = $stack->pop();\n\n if(is_null($top))\n return $this->trigger_undefined_variable($reference);\n\n //get the name for the current argument\n $arg_name = $this->user_functions[$function_name][MATHSCRIPT_ARGUMENTS][$i];\n\n //and add the name/value pair to our array\n $args[$arg_name] = $top;\n }\n\n //take a snapshot of the current system state\n $initial_vars = $this->vars;\n\n //merge in the arguments as local variables\n $this->vars = array_merge($this->vars, $args);\n\n //evaluate the given function via recursion\n $result = $this->evaluate_postfix($this->user_functions[$function_name][MATHSCRIPT_FUNCTION_BODY]);\n\n //and discard any modifications to the variable space\n $this->vars = $initial_vars;\n\n //and push the result onto the stack\n $stack->push(array(MATHSCRIPT_TYPE_RESULT, $result));\n }\n }\n\n //handle binary operators\n elseif(!is_array($token) && array_key_exists($token, self::$operators) && self::$operators[$token]['arity'] == 2)\n {\n //pop two operands off the stack\n list($ref2, $op2) = $stack->pop();\n list($ref1, $op1) = $stack->pop();\n\n //if we didn't get an operand, throw an error\n if(is_null($op1))\n return $this->trigger_undefined_variable($ref1);\n if(is_null($op2))\n return $this->trigger_undefined_variable($ref2);\n\n //get the handler for the given operator\n $handler = self::$operators[$token]['handler'];\n\n //call the given handler to perform the operation\n $result = call_user_func($handler, $this, $op1, $op2);\n\n //and push the result onto the stack\n $stack->push(array(MATHSCRIPT_TYPE_RESULT, $result));\n }\n //handle unary operators\n elseif(!is_array($token) && array_key_exists($token, self::$operators) && self::$operators[$token]['arity'] == 1)\n {\n //pop the operand off the stack\n list($ref, $op) = $stack->pop();\n\n //get the handler for the given operator\n $handler = self::$operators[$token]['handler'];\n\n //if the operator is designed for pass-by-reference\n if(self::$operators[$token]['by_reference'])\n {\n //get a reference to the operand\n $arg =& $ref;\n }\n else\n {\n //if we didn't get an operand, throw an error\n if(is_null($op))\n return $this->trigger_undefined_variable($ref);\n\n //set the argument equal to the operand\n $arg = $op;\n }\n\n //call the given handler to perform the operation\n $result = call_user_func($handler, $this, $arg);\n\n //and push the result onto the stack\n $stack->push(array(MATHSCRIPT_TYPE_RESULT, $result));\n }\n \n //handle variables and literals\n else \n {\n //if the token is an array with a \"string\" key, it's a string- push the core string to the stack, directly\n if(is_array($token) && array_key_exists('string', $token))\n $stack->push(array(MATHSCRIPT_TYPE_LITERAL, $token['string']));\n\n //if we've recieved a numeric token, push it directly onto the stack\n elseif (is_numeric($token)) \n $stack->push(array(MATHSCRIPT_TYPE_LITERAL, $token));\n\n //if we've recieved a local variable, push its value onto the stack\n elseif (array_key_exists($token, $vars)) \n $stack->push(array($token, $vars[$token]));\n\n //if we've recieved a global variable, push its value onto the stack\n elseif (array_key_exists($token, $this->vars)) \n $stack->push(array($token, $this->vars[$token]));\n\n //otherwise, we have a variable of unknown value;\n //we'll push it onto the array as having the value null\n else \n $stack->push(array($token, null));\n //return $this->trigger(\"undefined variable '$token'\");\n }\n }\n\n // when we're out of tokens, the stack should have a single element: the final result\n if ($stack->count != 1) \n return $this->trigger('internal error: '.$stack->count.' values were left on the stack after execution.');\n\n //return the final result\n list($reference, $result) = $stack->pop();\n\n return $result;\n }", "public function testEvaluate()\n {\n $calc = new ReversePolishCalculator();\n $retval = $calc->evaluate(\"3 2 1 + *\");\n $this->assertEquals(9, $retval);\n }", "public function get_Eval(){\n return $this->eval_note;\n }", "public function e($string, $functions = null);", "function Satisfy($fun) {\n $p = __t(Character());\n $res = $p->bind(function($c) use($fun){\n if($fun($c)){\n return Value($c);\n } else {\n return Failed();\n }\n });\n return $res();\n }", "public function evaluate($path);", "public static function getEvalResult($string) {\n\t\teval('\\$value = $string;');\n\t\treturn $value;\n\t}", "function xthreads_sanitize_eval(&$s, &$fields) {\r\n\t// the following won't work properly with array indexes which have non-alphanumeric and underscore chars; also, it won't do ${var} syntax\r\n\t// also, damn PHP's magic quotes for preg_replace - but it does assist with backslash fun!!!\r\n\t$s = preg_replace(\r\n\t\tarray(\r\n\t\t\t'~\\\\{\\\\\\\\\\\\$([a-zA-Z_][a-zA-Z_0-9]*)((-\\\\>[a-zA-Z_][a-zA-Z_0-9]*|\\\\[(\\'|\\\\\\\\\"|)[a-zA-Z_ 0-9]+\\\\4\\\\])*)\\\\}~e',\r\n\t\t\t'~\\{\\\\\\\\\\$forumurl\\\\\\\\\\$\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$forumurl\\?\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$threadurl\\\\\\\\\\$\\}~i',\r\n\t\t\t'~\\{\\\\\\\\\\$threadurl\\?\\}~i'\r\n\t\t), array(\r\n\t\t\t'\\'{$GLOBALS[\\\\\\'$1\\\\\\']\\'.strtr(\\'$2\\', array(\\'\\\\\\\\\\\\\\\\\\\\\\'\\' => \\'\\\\\\'\\', \\'\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\' => \\'\\\\\\'\\')).\\'}\\'', // rewrite double-quote to single quotes, cos it's faster\r\n\t\t\t'{$GLOBALS[\\'forumurl\\']}',\r\n\t\t\t'{$GLOBALS[\\'forumurl_q\\']}',\r\n\t\t\t'{$GLOBALS[\\'threadurl\\']}',\r\n\t\t\t'{$GLOBALS[\\'threadurl_q\\']}',\r\n\t\t), strtr($s, array('\\\\' => '\\\\\\\\', '$' => '\\\\$', '\"' => '\\\\\"'))\r\n\t);\r\n\t\r\n\t// replace conditionals\r\n\t@include_once MYBB_ROOT.'inc/xthreads/xt_phptpl_lib.php';\r\n\tif(function_exists('xthreads_phptpl_parsetpl')) {\r\n\t\txthreads_phptpl_parsetpl($s, $fields);\r\n\t}\r\n\t\r\n\t// replace value tokens at the end\r\n\t$do_value_repl = false;\r\n\t$tr = array();\r\n\tforeach($fields as &$f) {\r\n\t\t$tr['{'.$f.'}'] = '{$vars[\\''.$f.'\\']}';\r\n\t\t\r\n\t\tif($f == 'VALUE') $do_value_repl = true;\r\n\t}\r\n\tif($do_value_repl) $s = preg_replace('~\\{((?:RAW)?VALUE)\\\\\\\\?\\$(\\d+)\\}~', '{$vars[\\'$1$\\'][$2]}', $s);\r\n\t$s = strtr($s, $tr);\r\n}", "function maquetador_evalua( $condicion) {\n global $aEstado;\n if ( $condicion==\"home\" ) {\n return $aEstado[\"esHome\"];\n }\n\n if ( substr( $condicion,0,5)==\"once \" ) {\n return ($_SESSION[\"ONCE\"][substr( $condicion,5)]++ == 0 ) ;\n }\n\n\n if ( preg_match ( \"/controlador:([^ ]*)( accion:([^ ].*))?/\", $condicion, $aTemp )) {\n switch (count($aTemp)) {\n case 2: return $aEstado[\"controlador\"]==$aTemp[1];\n case 4: return $aEstado[\"controlador\"]==$aTemp[1] and $aEstado[\"accion\"]==$aTemp[3];\n default: return false;\n }\n }\n if ( preg_match( \"/(.*)\\(\\)$/\", $condicion, $aTemp)) {\n $condicion=$aTemp[1];\n return $condicion();\n }\n return $aEstado['controlador']== $condicion;\n}", "function exec_xcrud($matches)\r\n{\r\n try\r\n {\r\n eval('ob_start();' . $matches[1] . '$output = ob_get_contents();ob_end_clean();');\r\n }\r\n catch (exception $e)\r\n {\r\n return 'executing error';\r\n }\r\n return $output;\r\n}", "public static function expr()\n {\n $out = call_user_func_array('self::parse', func_get_args());\n $obj = text($out);\n return $obj;\n }", "public function builtInCall(){\n try {\n // Sparql11query.g:496:3: ( STR OPEN_BRACE expression CLOSE_BRACE | LANG OPEN_BRACE expression CLOSE_BRACE | LANGMATCHES OPEN_BRACE expression COMMA expression CLOSE_BRACE | DATATYPE OPEN_BRACE expression CLOSE_BRACE | BOUND OPEN_BRACE variable CLOSE_BRACE | COALESCE argList | IF OPEN_BRACE expression COMMA expression COMMA expression CLOSE_BRACE | SAMETERM OPEN_BRACE expression COMMA expression CLOSE_BRACE | ISIRI OPEN_BRACE expression CLOSE_BRACE | ISURI OPEN_BRACE expression CLOSE_BRACE | ISBLANK OPEN_BRACE expression CLOSE_BRACE | ISLITERAL OPEN_BRACE expression CLOSE_BRACE | regexExpression ) \n $alt55=13;\n $LA55 = $this->input->LA(1);\n if($this->getToken('STR')== $LA55)\n {\n $alt55=1;\n }\n else if($this->getToken('LANG')== $LA55)\n {\n $alt55=2;\n }\n else if($this->getToken('LANGMATCHES')== $LA55)\n {\n $alt55=3;\n }\n else if($this->getToken('DATATYPE')== $LA55)\n {\n $alt55=4;\n }\n else if($this->getToken('BOUND')== $LA55)\n {\n $alt55=5;\n }\n else if($this->getToken('COALESCE')== $LA55)\n {\n $alt55=6;\n }\n else if($this->getToken('IF')== $LA55)\n {\n $alt55=7;\n }\n else if($this->getToken('SAMETERM')== $LA55)\n {\n $alt55=8;\n }\n else if($this->getToken('ISIRI')== $LA55)\n {\n $alt55=9;\n }\n else if($this->getToken('ISURI')== $LA55)\n {\n $alt55=10;\n }\n else if($this->getToken('ISBLANK')== $LA55)\n {\n $alt55=11;\n }\n else if($this->getToken('ISLITERAL')== $LA55)\n {\n $alt55=12;\n }\n else if($this->getToken('REGEX')== $LA55)\n {\n $alt55=13;\n }\n else{\n $nvae =\n new NoViableAltException(\"\", 55, 0, $this->input);\n\n throw $nvae;\n }\n\n switch ($alt55) {\n case 1 :\n // Sparql11query.g:497:3: STR OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('STR'),self::$FOLLOW_STR_in_builtInCall1713); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1715); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1717);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1719); \n\n }\n break;\n case 2 :\n // Sparql11query.g:498:5: LANG OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('LANG'),self::$FOLLOW_LANG_in_builtInCall1725); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1727); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1729);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1731); \n\n }\n break;\n case 3 :\n // Sparql11query.g:499:5: LANGMATCHES OPEN_BRACE expression COMMA expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('LANGMATCHES'),self::$FOLLOW_LANGMATCHES_in_builtInCall1737); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1739); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1741);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_builtInCall1743); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1745);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1747); \n\n }\n break;\n case 4 :\n // Sparql11query.g:500:5: DATATYPE OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('DATATYPE'),self::$FOLLOW_DATATYPE_in_builtInCall1753); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1755); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1757);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1759); \n\n }\n break;\n case 5 :\n // Sparql11query.g:501:5: BOUND OPEN_BRACE variable CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('BOUND'),self::$FOLLOW_BOUND_in_builtInCall1765); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1767); \n $this->pushFollow(self::$FOLLOW_variable_in_builtInCall1769);\n $this->variable();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1771); \n\n }\n break;\n case 6 :\n // Sparql11query.g:502:5: COALESCE argList \n {\n $this->match($this->input,$this->getToken('COALESCE'),self::$FOLLOW_COALESCE_in_builtInCall1777); \n $this->pushFollow(self::$FOLLOW_argList_in_builtInCall1779);\n $this->argList();\n\n $this->state->_fsp--;\n\n\n }\n break;\n case 7 :\n // Sparql11query.g:503:5: IF OPEN_BRACE expression COMMA expression COMMA expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('IF'),self::$FOLLOW_IF_in_builtInCall1785); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1787); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1789);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_builtInCall1791); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1793);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_builtInCall1795); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1797);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1799); \n\n }\n break;\n case 8 :\n // Sparql11query.g:504:5: SAMETERM OPEN_BRACE expression COMMA expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('SAMETERM'),self::$FOLLOW_SAMETERM_in_builtInCall1805); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1807); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1809);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('COMMA'),self::$FOLLOW_COMMA_in_builtInCall1811); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1813);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1815); \n\n }\n break;\n case 9 :\n // Sparql11query.g:505:5: ISIRI OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('ISIRI'),self::$FOLLOW_ISIRI_in_builtInCall1821); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1823); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1825);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1827); \n\n }\n break;\n case 10 :\n // Sparql11query.g:506:5: ISURI OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('ISURI'),self::$FOLLOW_ISURI_in_builtInCall1833); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1835); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1837);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1839); \n\n }\n break;\n case 11 :\n // Sparql11query.g:507:5: ISBLANK OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('ISBLANK'),self::$FOLLOW_ISBLANK_in_builtInCall1845); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1847); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1849);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1851); \n\n }\n break;\n case 12 :\n // Sparql11query.g:508:5: ISLITERAL OPEN_BRACE expression CLOSE_BRACE \n {\n $this->match($this->input,$this->getToken('ISLITERAL'),self::$FOLLOW_ISLITERAL_in_builtInCall1857); \n $this->match($this->input,$this->getToken('OPEN_BRACE'),self::$FOLLOW_OPEN_BRACE_in_builtInCall1859); \n $this->pushFollow(self::$FOLLOW_expression_in_builtInCall1861);\n $this->expression();\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('CLOSE_BRACE'),self::$FOLLOW_CLOSE_BRACE_in_builtInCall1863); \n\n }\n break;\n case 13 :\n // Sparql11query.g:509:5: regexExpression \n {\n $this->pushFollow(self::$FOLLOW_regexExpression_in_builtInCall1869);\n $this->regexExpression();\n\n $this->state->_fsp--;\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n \n return ;\n }", "function betterEval($code) {\n $result = [];\n $tmp = tmpfile ();//file resource\n //we'll need to uri to include the file:\n $tmpMeta = stream_get_meta_data ( $tmp );\n $uri = $tmpMeta ['uri'];\n fwrite ( $tmp, $code );\n \n ob_start();\n $start = microtime(true);\n //anonymously, so our scope will not be polluted (very optimistic here, ofc)\n call_user_func(function() use ($uri) {\n include ($uri);\n }); \n \n $result['time'] = microtime(true) - $start;\n $result['output'] = ob_get_clean(); \n $result['length'] = strlen($result['output']);\n $result['lengthCharacters'] = mb_strlen($result['output']);\n $result['dbg'] = [\n 'fileUri' => $uri\n ];\n fclose ( $tmp );\n return $result;\n}", "function getOperand1() ;", "function getOperand2() ;", "public function func()\n {\n if ($this->lookahead->type == ControlFunctionLexer::NAME) {\n if (array_key_exists($this->lookahead->text, FunctionDispatcher::$functionNames)) {\n $this->function_name = $this->lookahead->text;\n //$this->function_index = FunctionDispatcher::$functionNames[$this->lookahead->text];\n $this->function_index = FunctionDispatcher::functionIndex($this->lookahead->text);\n } else {\n throw new \\Exception(\"Функция <$this->function_name> не существует\");\n }\n $this->root = new ControlFunctionParseTree($this->lookahead->type, $this->function_name);\n //$this->root = $this->currentNode;\n $this->match(ControlFunctionLexer::NAME);\n $this->cargs();\n } else {\n throw new \\Exception(\n \"Ожидалось объявление функции контроля (сравнение, зависимость ...). Получено \" .\n ControlFunctionLexer::$tokenNames[$this->lookahead->type]\n );\n }\n }", "private function handlePhpEvalReplacement($input)\n {\n if (preg_match('/<\\?php (.*)\\?'.'>/', $input, $matches)) // goofy syntax there to prevent syntax coloring problems in rest of file due to close php tag\n {\n return eval( \"return {$matches[1]};\" );\n }\n return $input;\n }", "public function evaluate($som, $context) {}", "public function run(&$tokens) {\n\t\ttry {\n\t\t\t$ops = array();\n\t\t\tforeach ($tokens as $token) {\n\t\t\t\tif ($token->isOperator()) {\n\t\t\t\t\t$ops[] = $this->operation($token, $ops);\n\t\t\t\t} elseif ($token->isComparator()) {\n\t\t\t\t\t$ops[] = $this->comparison($token, $ops);\n\t\t\t\t} else {\n\t\t\t\t\tswitch ($token->type) {\n\t\t\t\t\t\tcase Token::T_NUMBER:\n\t\t\t\t\t\tcase Token::T_DATE:\n\t\t\t\t\t\tcase Token::T_BOOLEAN:\n\t\t\t\t\t\tcase Token::T_TEXT:\n\t\t\t\t\t\tcase Token::T_ANY:\n\t\t\t\t\t\tcase Token::T_IDENT:\n\t\t\t\t\t\tcase Token::T_FIELD:\n\t\t\t\t\t\tcase Token::T_ARRAY:\n\t\t\t\t\t\tcase Token::T_UNDEFINED:\n\t\t\t\t\t\t\t$ops[] = $token;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase Token::T_FUNCTION:\n\t\t\t\t\t\t\t$ops[] = $this->func($token, $ops);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new \\Exception(\"Unrecognized token \" . $token->value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result = end($ops);\n\t\t\treturn $result->isVariable() ? false : ''.$result;\n\t\t} catch (\\Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "static function evalExpression(\n\t $expression,\n\t $params = array())\n\t{\n\t\tif (is_array($params)) {\n\t\t\textract($params);\n\t\t}\n\t\teval('$value = ' . $expression . ';');\n\t\treturn $value;\n\t}", "function testBackendFunctionResult() {\n $php = \"return 'bar'\";\n $this->drush('php-eval', array($php), array('backend' => NULL));\n $parsed = parse_backend_output($this->getOutput());\n // assert that $parsed has 'bar'\n $this->assertEquals(\"'bar'\", var_export($parsed['object'], TRUE));\n }", "public function testFunctions(): void\n {\n $evaluator = new Evaluator();\n $evaluator->functions = [\n 'sum' => ['ref' => 'EvaluatorTest::sum', 'arc' => null],\n 'min' => ['ref' => 'min', 'arc' => null],\n ];\n self::assertEquals(\n 5,\n $evaluator->execute('sum(1, 2, 3) + min(0, -1, 4)')\n );\n }", "function exec_xcrud($matches)\n{\n try\n {\n eval('ob_start();' . $matches[1] . '$output = ob_get_contents();ob_end_clean();');\n }\n catch (exception $e)\n {\n return 'executing error';\n }\n return $output;\n}", "function ricerca(string $key, string $value, string $str)\n {\n $sql = ''; \n $nomeClasse = 'f_'.$key;\n \n if(class_exists($nomeClasse))\n {\n $method = 'ricerca'.$key.'Da'.$value;\n \n if(method_exists($nomeClasse, $method))\n $sql = $nomeClasse::$method(); \n }\n \n if($sql)\n return $this->eseguiRicerca('f_'.$key, $value, $str, $sql);\n else \n return NULL;\n \n }", "function eval_inline_php($myContent,$onlyEval=false)\n// *************************************************\n{\n\t$rVal = \"\";\n\n\t// PHP INCLUDES\n\t$pos1 = strpos($myContent,\"<?php\");\n\n\tif (!($pos1===false))\n\t{\n\t\t$pos2 = strpos($myContent,\"?>\",$pos1);\n\n\t\t$rVal .= substr($myContent,0,$pos1);\n\n\t\t// BLOCK AUSWERTEN\n\t\t$evalTxt = substr($myContent,$pos1+5,($pos2)-($pos1+5));\n\t\teval($evalTxt);\n\n\t\t// RUECKGABE BLOCK DAVOR UND DANACH\n\t\tif (!$onlyEval) return $rVal.substr($myContent,$pos2+2);\n\t}\n\telse\n\t\treturn $myContent;\n\n\treturn \"\";\n}", "function qa_eval_from_file($eval, $filename)\n{\n\t// could also use ini_set('error_append_string') but apparently it doesn't work for errors logged on disk\n\n\tglobal $php_errormsg;\n\n\t$oldtrackerrors = @ini_set('track_errors', 1);\n\t$php_errormsg = null;\n\n\teval('?' . '>' . $eval);\n\n\tif (strlen($php_errormsg)) {\n\t\tswitch (strtolower(@ini_get('display_errors'))) {\n\t\t\tcase 'on':\n\t\t\tcase '1':\n\t\t\tcase 'yes':\n\t\t\tcase 'true':\n\t\t\tcase 'stdout':\n\t\t\tcase 'stderr':\n\t\t\t\techo ' of ' . qa_html($filename) . \"\\n\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t@error_log('PHP studentrf more info: ' . $php_errormsg . \" in eval()'d code from \" . qa_html($filename));\n\t}\n\n\t@ini_set('track_errors', $oldtrackerrors);\n}", "function create_closure($args, $body){\n return eval(\"return function($args){ {$body} };\");\n}", "private function doRun($function)\n {\n $raw = $this->execute($function, $this->functions, array_slice(func_get_args(), 1));\n if (\n ($this->autoescape && ! in_array($function, $this->safe, true))\n && (is_array($raw) || is_string($raw) || (is_object($raw) && ! $raw instanceof Extension))\n ) {\n $raw = $this->escaper->escape($raw);\n if (is_object($raw)) {\n $raw = '';\n }\n }\n\n return is_null($raw) ? '' : $raw;\n }", "function getOperand() ;", "function getOperand() ;", "function getOperand() ;", "public function evaluate()\n {\n $stack = [];\n $stackIndex = -1;\n $postfix = $this->getPostfix();\n if (count($postfix) === 0) {\n return null;\n }\n $params = $this->getParams();\n foreach ($postfix as $value) {\n if (self::isMathOperator($value) === false) {\n $operand = $value;\n if (is_numeric($value) === false) {\n if (array_key_exists($value, $params) === true) {\n $operand = $params[$value];\n } else {\n throw new \\InvalidArgumentException('Invalid given variable parameter detected');\n }\n }\n $stack[++$stackIndex] = $operand;\n } else {\n $operand2 = $stack[$stackIndex--];\n $operand1 = $stack[$stackIndex--];\n $stack[++$stackIndex] = self::calculate($operand1, $operand2, $value);\n }\n }\n $this->Result = $stack[$stackIndex];\n $this->HasBeenEvaluated = true;\n }", "function execute();", "function interpreting($data) {\r\n $patterns = array();\r\n $remplacements = array();\r\n $patterns[0] = '#(\\$motClef|\\$motCl(é|e))#i';\r\n $remplacements[0] = '\\s(algorithme|procedure|fonction|si|sinon|fin_?si|tant_?que|fin_?tant_?que|selon|autrement|'\r\n . 'fin_?selon|pour|fin_?pour|et|ou|mod|div)\\s';\r\n \r\n $patterns[1] = '#\\$variable#i';\r\n $remplacements[1] = '(\\w+) ?';\r\n \r\n $patterns[2] = '#\\$op(é|e)rateur#i';\r\n $remplacements[2] = '(\\+|\\-|\\/|\\*|\\sdiv\\s|\\smod\\s)';\r\n \r\n $patterns[3]= '#\\$tout#i';\r\n $remplacements[3]= '(.*)';\r\n \r\n $patterns[4] = '#\\$entier#i';\r\n $remplacements[4]= '(-?[0-9]+)';\r\n \r\n $patterns[5]= '#\\$reel#';\r\n $remplacements[5]= '[\\-\\+]?[0-9]*(\\.[0-9]+)?';\r\n \r\n $patterns[6] = '#\\$caract(e|è)re#';\r\n $remplacements[6]= \"(\\'\\w\\')\";\r\n \r\n $patterns[7]= '#$cha(i|î)ne#';\r\n $remplacements[7]= '(\\\"(.*)\\\")';\r\n \r\n $patterns[8]= '#\\$bool(é|e)en#';\r\n $remplacements[8]= '(vrai|faux|true|false)';\r\n \r\n $patterns[9]= '#\\$type#';\r\n $remplacements[9]= '\\s(entier|r(é|e)el|caract(e|è)re|cha(i|î)ne|bool(é|e)en)\\s';\r\n \r\n $patterns[10]= '#\\$relation#';\r\n $remplacements[10]= '(==|\\<|\\>|\\<=|\\>=|\\!=)';\r\n \r\n $patterns[11]= '#\\$logique#';\r\n $remplacements[12]= '\\s(et|ou|ouex|non)\\s';\r\n \r\n\r\n\r\n foreach($data as &$currentValue) {\r\n $currentValue['layout'] = preg_replace($patterns, $remplacements, $currentValue['layout']);\r\n $currentValue['layout'] = '#'.$currentValue['layout'].'#iU';\r\n }\r\n return $data;\r\n}", "function process($value);", "function replace_view($arr){\n $re='';\n $string='@$re='.$arr[0].'?'.$arr[0].':$arr[0];';\n eval($string);\n return $re;\n}", "function specialop() {\n\n\n\t}", "function Execute ();", "function evaluation($text_evaluate)\n{\n $brackets = \"\";\n switch ($text_evaluate) {\n case \"\":\n echo '<div class=\"success\">No brackets sequence was provided. Generating \n and analysing a random one.</div>';\n case \"random\":\n $brackets = randomBrackets();\n break;\n default:\n $brackets = $text_evaluate;\n break;\n }\n\n // Preparing for edge cases.\n while (empty($brackets)) {\n $brackets = randomBrackets();\n }\n $brackets_length = strlen($brackets);\n\n // Shows the sequence of brackets on the input field.\n echo \"\n <script>\n document.getElementById('text_evaluate').value = '\" . $brackets . \"';\n </script>\";\n\n $open = array('(', '[', '{');\n $close = array(')', ']', '}');\n\n /**\n * Creates the arrays $brackets_open and $brackets_close. They will be used to\n * check if there are unmatched brackets, called orphans.\n * \n * Creates the array $valid_brackets with all brackets, after excluding any\n * possible foreign characters.\n */\n $valid_brackets = array();\n $brackets_open = array();\n $brackets_close = array();\n for ($i = 0; $i < $brackets_length; $i++) {\n if (in_array($brackets[$i], $open)) {\n $brackets_open[$i] = $brackets[$i];\n } elseif (in_array($brackets[$i], $close)) {\n $brackets_close[$i] = $brackets[$i];\n }\n\n $current_character = substr($brackets, $i, 1);\n if (in_array($current_character, $open) || in_array($current_character, $close)) {\n $valid_brackets[$i] = $current_character;\n }\n }\n\n // Shows the string received, without filtering foreign characters.\n $brackets_style = \"<pre class='string'>string_received (count: $brackets_length) {\\n $brackets\\n}</pre>\";\n echo $brackets_style;\n\n // Shows the string received, with foreign characters filtered out.\n $brackets_style = \"<pre class='brackets'>valid_brackets (count: \" . count($valid_brackets) . \") {\\n\";\n foreach($valid_brackets as $bk => $bv) {\n $brackets_style .= \" $bv -- position: $bk \\n\";\n }\n $brackets_style .= \"}</pre>\";\n echo $brackets_style;\n\n // Shows only opening brackets, in order of appearance.\n $brackets_style = \"<pre class='brackets'>brackets_open_order (count: \" . count($brackets_open) . \") {\\n\";\n foreach($brackets_open as $bk => $bv) {\n $brackets_style .= \" $bv -- position: $bk \\n\";\n }\n $brackets_style .= \"}</pre>\";\n echo $brackets_style;\n\n // Shows only closing brackets, in order of appearance.\n $brackets_style = \"<pre class='brackets'>brackets_close_order (count: \" . count($brackets_close) . \") {\\n\";\n foreach($brackets_close as $bk => $bv) {\n $brackets_style .= \" $bv -- position: $bk \\n\";\n }\n $brackets_style .= \"}</pre>\";\n echo $brackets_style;\n\n /**\n * Analyses the sequence of brackets and verifies which ones match the rules:\n * - Rule 1 (\"Pairs\"): An opened bracket must be closed to be valid, which means \n * they must form pairs;\n * - Rule 2 (\"Scope\"): A pair must have both parts inside another pair or outside \n * any pair, which means that a pair opening inside another pair and closing \n * outside of it is not valid.\n * \n * Unmatched brackets are kept in the $orphans array. Matched brackets are kept \n * only in the $brackets array.\n * \n * The $temp array is used to stare temporarily the brackets being analyzed.\n */\n $orphans = array();\n $temp = array();\n foreach($valid_brackets as $brackets_key => $brackets_value) {\n // Is the current bracket an opening one?\n $brackets_key_found = array_search($brackets_value, $open);\n\n // If it is, keep it in the $temp array.\n if ($brackets_key_found !== false) {\n $temp[$brackets_key] = $brackets_value;\n\n // If it isn't...\n } else {\n // 1. Find out which bracket matches it;\n $brackets_close_key = array_search($brackets_value, $close);\n $brackets_open_value = $open[$brackets_close_key];\n\n // 2. Search for the most recent match.\n $reversed = array_reverse($temp, true);\n $last_occurrence = array_search($brackets_open_value, $reversed);\n\n // If the match was found...\n if ($last_occurrence !== false) {\n // Remove it from the $temp array...\n unset($temp[$last_occurrence]);\n if (count($temp) > 0) {\n foreach ($temp as $k => $v) {\n /**\n * and remove existing brackets between the pair.\n * \n * For example: Consider the sequence \"{[((]\".\n * It has a matching pair: \"[\" and \"]\".\n * Everything else is unmatched.\n * \n * What we do here is to remove only what's inside the pair.\n * When we got to this point, the $temp array had the following\n * contents: \"{((\", because we already removed the \"[\" bracket.\n * Here we will remove what was between \"[\" and \"]\", which was\n * \"((\". As a result, $temp will have the following content: \"{\".\n * \n * We kept this content because it might match some (possible)\n * further bracket.\n */\n if ($k > $last_occurrence) {\n $orphans[$k] = $v;\n unset($temp[$k]);\n }\n }\n }\n\n // If no match was found...\n } else {\n // it means this is an orphan bracket.\n $orphans[$brackets_key] = $brackets_value;\n }\n }\n }\n\n // If the $temp array has any content left, they are all orphans.\n if (count($temp) > 0) {\n foreach ($temp as $k => $v) {\n $orphans[$k] = $v;\n unset($temp[$k]);\n }\n }\n ksort($orphans);\n\n // Shows the orphan brackets.\n if (count($orphans) > 0) {\n $brackets_style = \"<pre class='brackets'>orphan_brackets (count: \" . count($orphans) . \") {\\n\";\n foreach($orphans as $bk => $bv) {\n $brackets_style .= \" $bv -- position: $bk \\n\";\n }\n $brackets_style .= \"}</pre>\";\n echo $brackets_style;\n }\n\n $aux_str = \"\";\n $brackets_style = \"<div style='padding-left: 20px;'><span class='result'><pre>brackets_result_in_line (count: $brackets_length) {\\n \";\n for ($i = 0; $i < $brackets_length; $i++) {\n if (isset($orphans[$i])) {\n $aux_str .= '<span class=\"orphan-brackets\">' . substr($brackets, $i, 1) . '</span>';\n } elseif (isset($orphans[$i])) {\n $aux_str .= '<span class=\"orphan-brackets\">' . substr($brackets, $i, 1) . '</span>';\n } else {\n $aux_str .= '<span class=\"non-orphan-brackets\">' . substr($brackets, $i, 1) . '</span>';\n }\n }\n $brackets_style .= $aux_str;\n $brackets_style .= \"\\n}</pre></span></div>\";\n // Shows, in a line, the sequence of no valid brackets.\n echo $brackets_style;\n\n $aux_str = \"\";\n // $offset if used to control the indentation.\n $offset = 3;\n /**\n * $previous_open_close_move is used to keep track of which kind of bracket\n * was last shown. If its content is \"o\", it means it was an opening one.\n * If its content is \"c\", it means it was a closing one.\n * \n * It is necessary, because we need to know when the $offset variable should\n * have its value subtracted, which means we have a closing bracket with some\n * other brackets inside it. \n * \n * For example:\n * {\n * [((]( \n * }\n * \n * In this case, the \"}\" bracket needs its offset reduced to be shown correctly.\n */ \n $previous_open_close_move = \"o\";\n $brackets_style = \"<div style='padding-left: 20px;'><span class='result'><pre>brackets_result_with_visual_aid (count: $brackets_length) {\\n \";\n for ($i = 0; $i < $brackets_length; $i++) {\n if (isset($orphans[$i])) {\n $aux_str .= '<span class=\"orphan-brackets\">' . substr($brackets, $i, 1) . '</span>';\n } else {\n if (in_array(substr($brackets, $i, 1), $open)) {\n if (!empty($aux_str)) {\n $aux_str .= \"\\n\" . str_repeat(\" \", $offset) . \"<span class='non-orphan-brackets'>\" . substr($brackets, $i, 1) . \"</span>\";\n } else {\n $aux_str .= \"<span class='non-orphan-brackets'>\" . substr($brackets, $i, 1) . \"</span>\";\n }\n $offset += 3;\n $previous_open_close_move = \"o\";\n }\n\n if (in_array(substr($brackets, $i, 1), $close)) {\n $offset -= 3;\n if ($previous_open_close_move == \"c\") {\n $aux_str .= \"\\n\" . str_repeat(\" \", $offset) . \"<span class='non-orphan-brackets'>\" . substr($brackets, $i, 1) . \"</span>\";\n } else {\n $aux_str .= \"<span class='non-orphan-brackets'>\" . substr($brackets, $i, 1) . \"</span>\";\n }\n $previous_open_close_move = \"c\";\n }\n }\n }\n $brackets_style .= $aux_str;\n $brackets_style .= \"\\n}</pre></span></div>\";\n // Shows, with visual aid, the sequence of no valid brackets.\n echo $brackets_style;\n\n if (count($orphans) == 0) {\n echo '\n <div class=\"alert alert-success evaluation\" role=\"alert\">\n The sequence of brackets received is valid.\n </div>';\n } else {\n echo '\n <div class=\"alert alert-danger evaluation\" role=\"alert\">\n The sequence of brackets received is not valid.\n </div>';\n }\n}", "public function eval($command)\n {\n $commandEncoded = base64_encode($command);\n $this->run(\"eval -i {id} -- $commandEncoded\");\n }", "static public function run() {\n try {\n $calledClass = get_called_class();\n $params = $calledClass::algorithm(func_get_args()) ?: array();\n return $calledClass::executeString($params);\n } catch (\\Exception $e) {\n return '';\n }\n }", "function test ( $str1, $str2, $str3, $num1, $num2 )\n {\n $mystring = $str1.\" \".$str2.\" \".$str3;\n echo \"\\t\\t\\t\".$mystring.\"<br />\"; \n return $num1 * $num2; \n }", "function prosedur($b,$c){\r\n\r\n $a = $b + $c;\r\n// tidak adda return pada fungsi ini karena langsung melakukan echo (langsung ditampilkan ke layar)\r\n echo $a;\r\n}", "private function exec() {\n extract($this->data);\n\n ob_start();\n $error = eval(' ?>' . $this->file .'<?php ');\n if($error === false) {\n ob_end_clean();\n throw new \\Exception('Error en la plantilla');\n }\n return ob_get_clean();\n }", "function berechnen($a, $b, $c){\n $result = \"Solange nichts gerechnet wird, steht hier auch nichts.\";\n if($c == 'addieren'){\n $result=(int)$a +(int)$b;\n }else if($c=='multiplizieren'){\n $result=(int)$a*(int)$b;\n }\n return $result;\n}", "abstract public function __call($fnc, $args);", "function compile_retour($code, $avant, $apres, $altern, $tab, $n)\n{\n\tif ($avant == \"''\") $avant = '';\n\tif ($apres == \"''\") $apres = '';\n\tif (!$avant AND !$apres AND ($altern===\"''\")) return $code;\n\n\tif (preg_match(_REGEXP_CONCAT_NON_VIDE, $code)) {\n\t\t$t = $code;\n\t\t$cond = '';\n\t} elseif (preg_match(_REGEXP_COND_VIDE_NONVIDE,$code, $r)) {\n\t\t$t = $r[2];\n\t\t$cond = '!' . $r[1];\n\t} else if (preg_match(_REGEXP_COND_NONVIDE_VIDE,$code, $r)) {\n\t\t$t = $r[2];\n\t\t$cond = $r[1];\n\t} else {\n\t\t$t = '$t' . $n;\n\t\t$cond = \"($t = $code)!==''\";\n\t}\n\n\t$res = (!$avant ? \"\" : \"$avant . \") . \n\t\t$t .\n\t\t(!$apres ? \"\" : \" . $apres\");\n\n\tif ($res !== $t) $res = \"($res)\";\n\treturn !$cond ? $res : \"($cond ?\\n\\t$tab$res :\\n\\t$tab$altern)\";\n}", "public static function resolve($_str) {\n\t\t// Analyze string for correct framework expression syntax\n\t\t$_str=preg_replace_callback(\n\t\t\t// Expression\n\t\t\t'/\\{('.\n\t\t\t\t// Capture group\n\t\t\t\t'(?:'.\n\t\t\t\t\t// Variable token\n\t\t\t\t\t'@\\w+\\b(?:\\[[^\\]]+\\]|\\.\\w+\\b)*|'.\n\t\t\t\t\t// Function/method/parenthesized expression\n\t\t\t\t\t'\\w*\\h*[\\(\\,\\)]|'.\n\t\t\t\t\t// Whitespaces and operators\n\t\t\t\t\t'[\\h\\?\\.\\+\\-\\*\\/%!=<>&\\|:]|'.\n\t\t\t\t\t// String and numeric constants\n\t\t\t\t\t'\\'[^\\']*\\'|\"[^\"]*\"|\\d*\\.?\\d+(?:e\\d+)*|'.\n\t\t\t\t\t// Null and boolean constants\n\t\t\t\t\t'NULL|TRUE|FALSE'.\n\t\t\t\t// End of captured string\n\t\t\t\t')+'.\n\t\t\t// End of expression\n\t\t\t')\\}/i',\n\t\t\t// Evaluate expression; This will cause a syntax error\n\t\t\t// if framework is running on an old version of PHP!\n\t\t\tfunction($_expr) {\n\t\t\t\t// Find and replace variables\n\t\t\t\treturn eval('return (string)'.\n\t\t\t\t\tpreg_replace_callback(\n\t\t\t\t\t\t// Framework variable\n\t\t\t\t\t\t'/@(\\w+\\b(?:\\[[^\\]]+\\]|\\.\\w+\\b)*)/',\n\t\t\t\t\t\tfunction($_var) {\n\t\t\t\t\t\t\t$_val=F3::get($_var[1]);\n\t\t\t\t\t\t\t// Retrieve variable contents\n\t\t\t\t\t\t\treturn !is_object($_val) ||\n\t\t\t\t\t\t\t\tmethod_exists($_val,'__set_state')?\n\t\t\t\t\t\t\t\t\tvar_export($_val,TRUE):(string)$_val;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tpreg_replace_callback(\n\t\t\t\t\t\t\t// Function\n\t\t\t\t\t\t\t'/(\\w+)\\h*\\(([^\\)]*)\\)/',\n\t\t\t\t\t\t\tfunction($_val) {\n\t\t\t\t\t\t\t\treturn ($_val[1].trim($_val[2]))=='array'?\n\t\t\t\t\t\t\t\t\t// Null out empty array\n\t\t\t\t\t\t\t\t\t'\\'\\'':\n\t\t\t\t\t\t\t\t\t// check if prohibited function\n\t\t\t\t\t\t\t\t\t(F3::allowed($_val[1])?\n\t\t\t\t\t\t\t\t\t\t$_val[0]:('\\''.$_val[0].'\\''));\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t$_expr[1]\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// Coerce input\n\t\t\t(string)$_str\n\t\t);\n\t\tif (preg_last_error()!=PREG_NO_ERROR) {\n\t\t\ttrigger_error(self::TEXT_PCRELimit);\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn $_str;\n\t}", "function arithmetic($arr, $str){\n $temp = $arr[0];\n $len = count($arr);\n switch ($str) {\n case \"+\": {\n for($i = 1; $i < $len; $i++){\n $temp = $temp + $arr[$i];\n }\n return $temp;\n }\n case \"-\": {\n for($i = 1; $i < $len; $i++){\n $temp = $temp - $arr[$i];\n }\n return $temp;\n }\n case \"*\": {\n for($i = 1; $i < $len; $i++){\n $temp = $temp * $arr[$i];\n }\n return $temp;\n }\n case \"/\": {\n for($i = 1; $i < $len; $i++){\n $temp = $temp / $arr[$i];\n }\n return $temp;\n }\n default: echo \"Не верное арифмитическое действие\";\n }\n}", "function xthreads_check_condstr($s) {\r\n\trequire_once MYBB_ROOT.'inc/xthreads/xt_phptpl_lib.php';\r\n\txthreads_sanitize_eval($s);\r\n\treturn xthreads_check_evalstr($s);\r\n}", "public function eval($script, $numberOfKeys, ...$arguments)\n {\n return $this->command('eval', [$script, $arguments, $numberOfKeys]);\n }", "public function compile()\n\t{\n\t\t$value = $this->value();\n\n\t\tif ( ! empty($this->parameters))\n\t\t{\n\t\t\t$params = $this->parameters;\n\t\t\t$value = strtr($value, $params);\n\t\t}\n\n\t\treturn $value;\n\t}", "function evaluate($expr, $local_context = false, $function_context = false) \n {\n //clear the record of the last error\n $this->last_error = null;\n\n //clear the current assignment record\n $this->assignment_target = null;\n\n //store the initial execution context\n $initial_vars = $this->vars;\n\n //assume an initial return value of false\n $retval = false;\n\n //and strip off any leading/trailing whitespace\n $expr = trim($expr);\n\n //remove any semicolons from the end of the expression\n if (substr($expr, -1, 1) == ';') \n $expr = substr($expr, 0, strlen($expr)-1); \n\n //perform common preprocessing tasks on the expression\n //(this resolves TCL-style variables, and allows TCL-style function calls)\n $expr = $this->preprocess($expr);\n\n //if the given expression is a variable assignment:\n if (preg_match(MATHSCRIPT_VAR_ASSIGNMENT, $expr, $matches)) \n {\n //set the assignment target\n $this->assignment_target = $matches[1];\n\n //parse the data to be assigned\n $to_assign = $this->evaluate_infix($matches[2]);\n\n //if an error occurred during processing of the RHS (data to be assigned), return false\n if ($to_assign === false) \n return false; \n\n //otherwise, set the relevant variable\n $this->vars[$this->assignment_target] = $to_assign;\n\n //and return the value that resulted from the assignment\n $retval = $to_assign; // and return the resulting value\n }\n\n elseif(preg_match(MATHSCRIPT_VAR_OPERATION_ASSIGNMENT, $expr, $matches))\n {\n //get the initial value of the left-hand-side of the expression\n $lhs = $this->dereference($matches[1]);\n\n //if it does not exist, fail\n if($lhs === null)\n return false;\n\n //compute the RHS of the expression, which will be added to the LHS\n $rhs = $this->evaluate_infix($matches[3]);\n\n //if we couldn't compute the RHS, fail\n if($rhs === false)\n return false;\n\n //call the correct opreator for this block\n $handler = self::$operators[$matches[2]]['handler'];\n $result = call_user_func($handler, $this, $lhs, $rhs);\n\n //and store the result\n $this->vars[$matches[1]] = $result;\n\n //and return the value that resulted from the assignment\n $retval = $result;\n }\n\n //handle function definitions \n elseif (preg_match(MATHSCRIPT_FUNCTION_DEF, $expr, $matches))\n {\n\n //extract the function name\n $function_name = $matches[1];\n\n //ensure we're not able to override a built-in function (user defined functions can be overridden)\n if ($this->extensions->function_exists($function_name))\n return $this->trigger('cannot redefine built-in function \"'.$matches[1]().'\"');\n\n //parse the argument list for the function\n $args = explode(\",\", preg_replace(\"/\\s+/\", \"\", $matches[2])); // get the arguments\n\n //convert the infix expression for the function to postfix\n $stack = $this->infix_to_postfix($matches[3]);\n\n //if we failed to parse the infix expression, return false\n if ($stack === false) \n return false;\n\n //finally, store the function definition\n $this->user_functions[$function_name] = array(MATHSCRIPT_ARGUMENTS => $args, MATHSCRIPT_FUNCTION_BODY=> $stack);\n\n //and return, indicating success\n $retval = true;\n \n } \n //if the line wasn't any of our special cases above, attempt to evaluate it directly\n else\n {\n //if the code was empty (or an straight zero), return 0 (this is typical of comments)\n if(empty($expr))\n return 0;\n\n //evaluate the given function, and get the return value\n $retval = $this->evaluate_infix($expr); \n\n }\n\n //if we're inside of a function context, don't allow changes to the global scope\n if($function_context)\n {\n $this->vars = $initial_vars;\n }\n //if this evaluation is occurring in a local context\n elseif($local_context)\n {\n //delete any variables that were not present in the initial list of variables\n //this establishes a \"local context\"\n foreach($this->vars as $name => $value)\n if(!array_key_exists($name, $initial_vars))\n unset($this->vars[$name]);\n }\n\n //return the previously-set return value\n return $retval;\n\n }", "public static function call($_funcs) {\n\t\tRuntime::call($_funcs);\n\t}", "function string_execution($number) {\n $a = [];\n $s = 1;\n for($i=0; $i<$number; $i++) {\n if($i == 0) {\n $a[$i] = \"x\";\n } else {\n $prep = odd_even($i);\n if($prep == 'true') {\n \n $a[$i] = define_pattern($s);\n \n $s = $s + 1;\n } else {\n $a[$i] = $prep;\n }\n }\n }\n return implode(\"\", $a);\n }", "private function removeEval(&$pattern)\n {\n if (is_array($pattern)) {\n foreach ($pattern as $key => $value) {\n $pattern[$key] = $this->removeEval($value);\n }\n } elseif (is_string($pattern)) {\n $pattern = trim($pattern);\n $mods = strrpos($pattern, substr($pattern, 0, 1));\n $pattern = substr($pattern, 0, $mods).str_replace('e', '', substr($pattern, $mods));\n }\n\n return $pattern;\n }", "private function executePHP($string) {\n\t\t$string = $this->cleanString($string);\n\t\t$string = '$string = ' . $string;\n\t\teval($string);\n\n\t\treturn $string;\n\t}", "function truc() {\n}", "function testGetExploit() {\n\t\t$obj = new Complex;\n\t\t$userInput = '->exploit(call_user_func(function(){ echo \"userDefinedCodeHere\"; }))';\n\t\t(new _)->get($obj, $userInput);\n\t\t$this->expectOutputString('userDefinedCodeHere');\n\t}", "function c_request($varstipus,$origen,$strict=false)\n{\n\tif (!is_array($origen))\t{$origen=merge_request($origen);} \t//en comptes d'un array, passa PG o similar \n\n\t$pattern=array('REAL'=>\"/[^0-9\\.-]/\",'CHAR'=>\"/[^A-Za-z0-9_\\-\\.]/\",'STRING'=>\"/\\\"|'/\");\n\t$varstipus=explode(\",\",$varstipus);\n\tforeach ($varstipus as $vargrup)\n\t{\n\t\t$vargrup=explode(\"=>\",$vargrup);\n\t\t$vars=explode(\"|\",$vargrup[0]);\n\t\t$tipus=trim(strtoupper($vargrup[1]));\n\n\t\tforeach ($vars as $var)\n\t\t{\n\t\t\t$var=trim($var);\n\t\t\tif (isset($origen[$var]))\n\t\t\t{\n\t\t\t\tswitch($tipus)\n\t\t\t\t{\n\t\t\t\t\tcase 'INT':\t//nomès numeros enters\n\t\t\t\t\t\t$origen[$var]=(int)$origen[$var];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'MQ':\n\t\t\t\t\t\t$origen[$var]=MQ($origen[$var]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'REAL': //numeros decimals i negatius\n\t\t\t\t\tcase 'CHAR': //nomes texte i números\n\t\t\t\t\tcase 'STRING': //eliminar cometes\n\t\t\t\t\t\t$origen[$var]=preg_replace($pattern[$tipus], $strict?\"_\":\"\", $origen[$var]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t}\n\t}\n\treturn $origen;\n}", "function test_value($text, $type){\n global $varregex, $labelregex, $intregex, $stringregex, $boolregex, $typeregex;\n if($type == 'var'){\n if(preg_match($varregex, $text)) {\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu var.\\n\", 21));\n }\n elseif ($type == 'label') {\n if(preg_match($labelregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu label.\\n\", 21));\n }\n elseif ($type == 'int') {\n if(preg_match($intregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu int.\\n\", 21));\n }\n elseif ($type == 'string') {\n if(preg_match($stringregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu string.\\n\", 21));\n }\n elseif ($type == 'bool') {\n if(preg_match($boolregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu bool.\\n\", 21));\n }\n elseif ($type == 'type') {\n if(preg_match($typeregex, $text)){\n return $text;\n }\n else exit(calls::call_error(\"Error: Chybný tvar argumentu typu type.\\n\", 21));\n }\n }", "public function command(string $expression, $callable);", "public function process($data = array()) {\n\n\t\t\tif ($this->function == null) {\n\t\t\t\tthrow new \\Exception(\"No valid templating function\", 500);\t\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$function = $this->_function;\n\t\t\t\t// Resolve any residual slashes on plain text\n\t\t\t\treturn stripslashes($function($data));\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new \\Exception($e, 500);\n\t\t\t\t\n\t\t\t}\n\t\t}", "function create_math_function($arg_array, $expression){\r\n //Returns EvalMath object, $math\r\n \r\n $arg_str = arg_array_to_str($arg_array);\r\n $numArg = count($arg_array);\r\n \r\n require_once 'EvalMath/evalmath.class.php'; \r\n \r\n $math = new EvalMath;\r\n\t$math->suppress_errors = false;\r\n $input = \"f($arg_str) = $expression\";\r\n\tif ($math->evaluate($input)) { //eg 'f(x, y, z) = x^2 + y^2 + 2*z^2'\r\n\t} else {\r\n\t\tprint \"\\t<p>Could not create function: \" . $math->last_error . \"</p>\\n\";\r\n\t}\r\n \r\n return $math;\r\n }", "public function Exec( $val )\n\t{\n\t\tself::$name_as_array = $val;\n\t}", "function evalValues()\t{\n\t\t// Check required, set failure if not ok.\n\t\treset($this->requiredArr);\n\t\t$masterTable=$this->conf['blogData']?'tx_metafeedit_comments':$this->theTable;\n\t\t$tempArr=array();\n\t\twhile(list(,$theField)=each($this->requiredArr))\t{\n\t\t\tif (!trim($this->dataArr[$theField]) )\t{\n\t\t\t\tif ($this->conf['TCAN'][$this->theTable]['columns'][$theField]['config']['type']=='group' && $this->conf['TCAN'][$this->theTable]['columns'][$theField]['config']['internal_type']=='file')\t{\n\t\t\t\t\t\n\t\t\t\t\tif (!trim($this->dataArr[$theField.'_file']) )\t{\n\t\t\t\t\t\n\t\t\t\t\t\t$tempArr[]=$theField;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$tempArr[]=$theField;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Evaluate: This evaluates for more advanced things than 'required' does. But it returns the same error code, so you must let the required-message tell, if further evaluation has failed!\n\t\t$recExist=0;\n\t\t$evalValues=$this->conf['blogData']?$this->metafeeditlib->getBlogEvalValues($this->conf):$this->conf[$this->conf['cmdKey'].'.']['evalValues.'];\n\t\tif (is_array($evalValues))\t{\n\t\t\tswitch($this->conf['inputvar.']['cmd'])\t{\n\t\t\t\tcase 'edit':\n\t\t\t\t\tif (isset($this->dataArr['pid']))\t{\t\t\t// This may be tricked if the input has the pid-field set but the edit-field list does NOT allow the pid to be edited. Then the pid may be false.\n\t\t\t\t\t\t$recordTestPid = intval($this->dataArr['pid']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tempRecArr = $GLOBALS['TSFE']->sys_page->getRawRecord($masterTable,$this->dataArr[$this->conf['uidField']]);\n\t\t\t\t\t\t$recordTestPid = intval($tempRecArr['pid'])?intval($tempRecArr['pid']):$this->thePid;\n\t\t\t\t\t}\n\t\t\t\t\t$recExist=1;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$recordTestPid = $this->thePid ? $this->thePid : t3lib_div::intval_positive($this->dataArr['pid']);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treset($evalValues);\n\t\t\twhile(list($theField,$theValue)=each($evalValues))\t{\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',',$theValue,1);\n\t\t\t\twhile(list(,$cmd)=each($listOfCommands))\t{\n\t\t\t\t\t$cmdParts = preg_split('/\\[|\\]/',$cmd);\t// Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd)\t{\n\t\t\t\t\t\tcase 'uniqueGlobal':\n\t\t\t\t\t\t\t\t$whereef= $GLOBALS['TSFE']->sys_page->enableFields($masterTable);\n\t\t\t\t\t\t\t\tif ($DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($masterTable,$theField,$this->dataArr[$theField],$whereef,'','','1'))\t{\n\t\t\t\t\t\t\t\tif (!$recExist || $DBrows[0][$this->conf['uidField']]!=$this->dataArr[$this->conf['uidField']])\t{\t// Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.\n\t\t\t\t\t\t\t\t\t//$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_existed',$this->conf));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'uniqueFields':\n\n\t\t\t\t\t \t\t$i=0;\t\n\t\t\t\t\t\t\tforeach($cmdParts as $cmdP) {\n\t\t\t\t\t\t\t\tif ($i>0 && trim($cmdP)) $Where.= \" and \".$cmdParts[$i].\"='\".$this->dataArr[$cmdParts[$i]].\"'\";\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$whereef= $GLOBALS['TSFE']->sys_page->enableFields($masterTable);\n\t\t\t\t\t\t\tif ($DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($masterTable,$theField,$this->dataArr[$theField], 'AND pid IN ('.$recordTestPid.')'.$Where.$whereef,'','','1'))\t{\n\t\t\t\t\t\t\t\tif (!$recExist || $DBrows[0][$this->conf['uidField']]!=$this->dataArr[$this->conf['uidField']])\t{\t// Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.\n\t\t\t\t\t\t\t\t\t//$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_mvalue_existed',$this->conf));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'uniqueLocal':\n\t\t\t\t\t\tcase 'uniqueInPid':\n\t\t\t\t\t\t\t$whereef= $GLOBALS['TSFE']->sys_page->enableFields($masterTable);\n\t\t\t\t\t\t\tif ($DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($masterTable,$theField,$this->dataArr[$theField], 'AND pid IN ('.$recordTestPid.')'.$whereef,'','','1'))\t{\n\t\t\t\t\t\t\tif (!$recExist || $DBrows[0][$this->conf['uidField']]!=$this->dataArr[$this->conf['uidField']])\t{\t// Only issue an error if the record is not existing (if new...) and if the record with the false value selected was not our self.\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_existed',$this->conf));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'twice':\n\t\t\t\t\t\t\tif (strcmp($this->dataArr[$theField], $this->dataArr[$theField.'_again']))\t{\n\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_twice',$this->conf));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'email':\n\t\t\t\t\t\t\tif (trim($this->dataArr[$theField])) {\n\t\t\t\t\t\t\t\tif (!$this->cObj->checkEmail($this->dataArr[$theField]))\t{\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_valid_email',$this->conf));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'required':\n\t\t\t\t\t\t\tif (!trim($this->dataArr[$theField]))\t{\n\t\t\t\t\t\t\t\tif ($this->conf['TCAN'][$this->theTable]['columns'][$theField]['config']['type']=='group' && $this->conf['TCAN'][$this->theTable]['columns'][$theField]['config']['internal_type']=='file')\t{\n\t\t\t\t\t\t\t\t\tif (!trim($this->dataArr[$theField.'_file']) )\t{\n\t\t\t\t\t\t\t\t\t\t$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_required',$this->conf));\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = $this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_required',$this->conf));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'atLeast':\n\t\t\t\t\t\t\t$chars=intval($cmdParts[1]);\n\t\t\t\t\t\t\tif (strlen($this->dataArr[$theField])<$chars)\t{\n\t\t\t\t\t\t\t\t//$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = sprintf($this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_min_char',$this->conf)), $chars);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'invert':\n\t\t\t\t\t\t\t$this->dataArr[$theField]=$this->dataArr[$theField]?0:1;\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'atMost':\n\t\t\t\t\t\t\t$chars=intval($cmdParts[1]);\n\t\t\t\t\t\t\tif (strlen($this->dataArr[$theField])>$chars)\t{\n\t\t\t\t\t\t\t\t//$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = sprintf($this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_max_char',$this->conf)), $chars);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'inBranch':\n\t\t\t\t\t\t\t$pars = explode(';',$cmdParts[1]);\n\t\t\t\t\t\t\tif (intval($pars[0]))\t{\n\t\t\t\t\t\t\t\t$pid_list = $this->cObj->getTreeList(\n\t\t\t\t\t\t\t\t\tintval($pars[0]),\n\t\t\t\t\t\t\t\t\tintval($pars[1]) ? intval($pars[1]) : 999,\n\t\t\t\t\t\t\t\t\tintval($pars[2])\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tif (!$pid_list || !t3lib_div::inList($pid_list,$this->dataArr[$theField]))\t{\n\t\t\t\t\t\t\t\t\t//$tempArr[]=$theField;\n\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][] = sprintf($this->getFailure($theField, $theCmd, $this->metafeeditlib->getLL('error_value_notInList',$this->conf)), $pid_list);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'unsetEmpty':\n\t\t\t\t\t\t\tif (!$this->dataArr[$theField])\t{\n\t\t\t\t\t\t\t\t$hash = array_flip($tempArr);\n\t\t\t\t\t\t\t\tunset($hash[$theField]);\n\t\t\t\t\t\t\t\t$tempArr = array_keys($hash);\n\t\t\t\t\t\t\t\tunset($this->failureMsg[$theField]);\n\t\t\t\t\t\t\t\tunset($this->dataArr[$theField]);\t// This should prevent the field from entering the database.\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t//should go in parse values ?\n\t\t\t\t\t\tcase 'wwwURL':\n\t\t\t\t\t\t\t\tif ($this->dataArr[$theField]) {\n\t\t\t\t\t\t\t\t\t\t$wwwURLOptions = array (\n\t\t\t\t\t\t\t\t\t\t'AssumeProtocol' => 'http' ,\n\t\t\t\t\t\t\t\t\t\t\t\t'AllowBracks' => TRUE ,\n\t\t\t\t\t\t\t\t\t\t\t\t'AllowedProtocols' => array(0 => 'http', 1 => 'https', ) ,\n\t\t\t\t\t\t\t\t\t\t\t\t'Require' => array('Protocol' => FALSE , 'User' => FALSE , 'Password' => FALSE , 'Server' => TRUE , 'Resource' => FALSE , 'TLD' => TRUE , 'Port' => FALSE , 'QueryString' => FALSE , 'Anchor' => FALSE , ) ,\n\t\t\t\t\t\t\t\t\t\t\t\t'Forbid' => array('Protocol' => FALSE , 'User' => TRUE , 'Password' => TRUE , 'Server' => FALSE , 'Resource' => FALSE , 'TLD' => FALSE , 'Port' => TRUE , 'QueryString' => FALSE , 'Anchor' => FALSE , ) ,\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t$wwwURLResult = tx_metafeedit_srfeuserregister_pi1_urlvalidator::_ValURL($this->dataArr[$theField], $wwwURLOptions);\n\t\t\t\t\t\t\t\t\t\tif ($wwwURLResult['Result'] = 'EW_OK' ) {\n\t\t\t\t\t\t\t\t\t\t\t\t$this->dataArr[$theField] = $wwwURLResult['Value'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$theField.'###'] = is_array($this->failureMsg[$theField]) ? implode('<br />',$this->failureMsg[$theField]) : '';\n\t\t\t\t//$this->markerArray['###CSS_ERROR_FIELD_'.$theField.'###']=$this->markerArray['###EVAL_ERROR_FIELD_'.$theField.'###']?'tx-metafeedit-form-error ':'';\n\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$theField.'###']=is_array($this->failureMsg[$theField])?'tx-metafeedit-form-field-error ':'';\n\t\t\t}\n\t\t}\n\t\t//$this->failure=implode(',',$tempArr);\t //$failure will show which fields were not OK\n\t\tif (count($this->failureMsg) >0) {\n\t\t\t$this->failure=1;\n\t\t\tif (count($tempArr)) {\n\t\t\t\tforeach($tempArr as $ta) {\n\t\t\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$ta.'###']='tx-metafeedit-form-field-error ';\n\t\t\t\t}\n\t\t\t\t$this->failure=implode(',',$tempArr);\n\t\t\t}\n\t\t\t$this->markerArray['###EVAL_ERROR###'] = $this->metafeeditlib->makeErrorMarker($this->conf,$this->metafeeditlib->getLL('error_occured',$this->conf));\n\t\t} else { \n\t\t\t$this->failure=0;\n\t\t\tif (count($tempArr)) {\n\t\t\t\t$this->failure=implode(',',$tempArr);\n\t\t\t\t$this->markerArray['###EVAL_ERROR###'] = $this->metafeeditlib->makeErrorMarker($this->conf,$this->getFailure('_FORM', '_REQUIRED', $this->metafeeditlib->getLL('error_required',$this->conf))); \n\t\t\t}\n\t\t}\n\t\t\n\t\t// Call to user eval function\n\n\t\t\n\t\tif ($this->conf['userFunc_afterEval']) t3lib_div::callUserFunction($this->conf['userFunc_afterEval'],$this->conf,$this);\n\n\t}", "public static function call($_funcs) {\n\t\tif (is_string($_funcs)) {\n\t\t\t// Call each code segment\n\t\t\tforeach (explode('|',$_funcs) as $_func) {\n\t\t\t\tif ($_func[0]==':')\n\t\t\t\t\t// Run external PHP script\n\t\t\t\t\tinclude F3::get('IMPORTS').substr($_func,1).'.php';\n\t\t\t\telse\n\t\t\t\t\t// Call lambda function\n\t\t\t\t\tcall_user_func($_func);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\t// Call lambda function\n\t\t\tcall_user_func($_funcs);\n\n\t}", "function handlerFunction($module, $obj, $URI_function){\n //debugECHO($URI_function);\n $functions = simplexml_load_file(MODULES_PATH . $module . \"/resources/functions.xml\");\n $exist=false;\n\n foreach($functions->function as $function){\n if(($URI_function === (String)$function->uri)){\n $exist=true;\n $event=(String)$function->name;\n //debugECHO($event);\n break;\n }//enf if\n\n }//End foreach\n\n if(!$exist){\n //debugECHO(\"entra al exists false\");\n showErrorPage(4,\"\",'HTTP/1.0 400 Bad Request', 400);\n }else{\n //debugECHO($event);\n call_user_func(array($obj,$event));\n }\n}", "function execUserDefinedFunction($usrdefinedfunctionname){\r\r\n\tglobal $glbl_physicalwebrootlocation, $glbl_customphpscriptpath, $glbl_templatesfolder;\r\r\n\tif ($glbl_customphpscriptpath != ''){\r\r\n\t\tinclude_once($glbl_physicalwebrootlocation . $glbl_customphpscriptpath); // include the custom php script\r\r\n\t\tif(function_exists($usrdefinedfunctionname))\r\r\n\t\t\t$resultval = call_user_func($usrdefinedfunctionname);\r\r\n\t}\r\r\n\tif (isset($resultval))\r\r\n\t\treturn $resultval;\r\r\n\treturn;\r\r\n}", "public function interpretation() {\n $functiontype = $this->inputarray[$this->position];\n \n /* Gets target position indicated by the third element after the function position\n Sets target position in the array to equal the result of the addition \n Advances index position by 4 to continue to next function */\n if ($functiontype == 1) {\n $target = $this->inputarray[$this->position+3];\n $this->inputarray[$target] = $this->one();\n $this->position = $this->position+4;\n return;\n }\n \n /* Gets target position indicated by the third element after the function position\n Sets target position in the array to equal the result of the multiplication \n Advances index position by 4 to continue to next function */\n if ($functiontype == 2) {\n $target = $this->inputarray[$this->position+3];\n $this->inputarray[$target] = $this->two();\n $this->position = $this->position+4;\n return;\n }\n \n /* Sets the final calculated value at position 0 and returns 99 to end the while loop*/\n if ($functiontype == 99) {\n $this->finalvalue = $this->inputarray[0];\n return $this->inputarray[$this->position];\n }\n }", "public function execute($value) {\n foreach($this->callable as $callable) {\n if(is_string($callable) && \n !is_callable($callable) &&\n method_exists($this, $callable)) {\n $callable = [$this,$callable];\n }\n \n $value = $this->call($value,$callable);\n }\n \n return $value;\n }", "protected function eval(&$buffer, $params = null)\n {\n if ($params === null) {\n global $_; \n $params = $_;\n }\n $this->renderBuffer($buffer, $params);\n }", "function aMathematicalfunction($input)\r\n{\r\n\treturn $value\r\n}", "private function _reducer ()\r\n {\r\n // (stored string or regexp) | +?+ ++? |\r\n //whitespace\r\n $reg = $this->_getRegex('whitespace', array(\r\n 'fbov' => $this->_IdRegex('fbov'),\r\n 'fbo' => $this->_IdRegex('fbo')\r\n ), true);\r\n $this->_script = preg_replace_callback($reg, array(&$this, '_spaceRemover'), $this->_script);\r\n \r\n $reg = preg_replace('#\\s+#','','\r\n for\\s*\\{;;\\}\r\n|\r\n (;\\})\r\n|\r\n (;+)(?=;)\r\n');\r\n \r\n if ($this->getConcatString()) {\r\n $reg .= '|'.$this->_IdRegex('s',true).'((?:\\+'.$this->_IdRegex('s').')+)';\r\n }\r\n \r\n $this->_script = preg_replace_callback('#'.$reg.'#', array(&$this, '_reducerOptimal'), $this->_script);\r\n }", "public function evaluate($content, array $contentVariables = array());" ]
[ "0.72005683", "0.6776201", "0.64313143", "0.6387554", "0.6387554", "0.6272502", "0.62422204", "0.59967965", "0.5971406", "0.59689814", "0.5872002", "0.5840776", "0.5821065", "0.5803378", "0.5784089", "0.5671005", "0.55601543", "0.55356044", "0.55129004", "0.55092424", "0.54659194", "0.5452103", "0.5447128", "0.5419978", "0.5398964", "0.53884", "0.5367169", "0.53213614", "0.5321074", "0.5300951", "0.5300409", "0.5267469", "0.5258433", "0.52417594", "0.5240678", "0.52404726", "0.5235067", "0.5234887", "0.5219943", "0.5218515", "0.5217921", "0.5208044", "0.5202725", "0.5186002", "0.51731974", "0.51407725", "0.5100694", "0.5100435", "0.50825524", "0.50789243", "0.50759923", "0.5072502", "0.5069676", "0.5069515", "0.50683695", "0.50683695", "0.50683695", "0.5061152", "0.505684", "0.5051503", "0.5050803", "0.504851", "0.50449234", "0.5032873", "0.50148326", "0.5010659", "0.49899498", "0.49847212", "0.49846706", "0.4983235", "0.49659607", "0.49607548", "0.4958837", "0.4958344", "0.49535117", "0.49526578", "0.49475765", "0.49460796", "0.494557", "0.49422798", "0.49345207", "0.4934205", "0.4933561", "0.493261", "0.4918951", "0.49052456", "0.4894415", "0.4886399", "0.4886378", "0.48757696", "0.48637205", "0.48572606", "0.48501465", "0.48411477", "0.48355186", "0.4832953", "0.48298118", "0.48207673", "0.48170227", "0.48115754", "0.48051453" ]
0.0
-1
CREATE A SESSION AND UPDATE IN MONGO
public function UserToken($randomStr = null, $online = false){ // UPDATE MONGO DB $online = ($online) ? 'online' : 'offline'; $mongo = new MongoDB\Driver\Manager(MONGO_CONNECT); $bulk = new MongoDB\Driver\BulkWrite; $bulk->update( [ 'id' => intval($this->Session->read('Auth.User.id'), 10), ], [ '$set' => [ 'userToken' => $randomStr, 'visibility' => $online, 'status' => $online, ], ] ); $mongo->executeBulkWrite(MONGO_DATABASE.'.users', $bulk); // UPDATE MYSQL DB $online = ($online) ? $randomStr : null; $this->User = ClassRegistry::init('User'); $this->User->id = $this->Session->read('Auth.User.id'); $this->User->saveField('login_token', $online); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function saveSession() {\n $connection = \\Drupal::database();\n $select = $connection->select('conreg_payment_sessions', 'S');\n $select->addField('S', 'paysessionid');\n $select->condition('S.payid', $this->payId);\n $select->condition('S.session_id', $this->sessionId);\n // We only want to save if not already on table.\n if (empty($select->execute()->fetchField())) {\n $connection->insert('conreg_payment_sessions')->fields(['payid' => $this->payId, 'session_id' => $this->sessionId])->execute();\n }\n}", "public function storeSession() {}", "public function updateSession(){\n # code...\n }", "public function __construct(){\n\n $this->sess_id_prefix = 'mongo_sess_development_'; //set according to environment\n\n //connect to mongodb\n if ( !extension_loaded(\"MongoDB\") ) \n trigger_error(\"Cannot create sessions. MongoDB extension error.\", E_USER_ERROR);\n\n\n if(!class_exists(\"MongoDB\\Client\"))\n trigger_error(\"Cannot create sessions. MongoDB lib error.\", E_USER_ERROR);\n \n\n //require_once <your - config - file - with connection config>;\n \n $params = array(\n\n 'host'=>'192.168.2.77', //required\n \n 'port'=>'27017', //required\n\n 'database'=>'php_sessions', //required\n \n 'collection'=>'php_sessions', // required\n \n 'sessionTimeout' => 86400, //TTL //1 day of inactivity\n \n 'connectTimeoutMS' => 3000, //required\n \n 'socketTimeoutMS' => 3000, //required\n \n 'serverSelectionTimeoutMS'=>3000, //required\n\n 'user'=>'php_sess_user', //optional\n \n 'password'=>'php_sess_pass', // optional\n \n 'authSource'=>'admin', // optional\n \n //'replicaSet' => 'my-replication-set', //optional\n \n //'readPreference' => 'primaryPreferred' //optional\n );\n \n $uri = 'mongodb://'.$params['host'].':'.$params['port'].'/'.$params['database']; \n\n if( !empty($params['user']) ){\n \n $uriOptions['username'] = $params['user'];\n $uriOptions['password'] = $params['password'];\n $uriOptions['authSource'] = $params['authSource']; \n }\n\n if( !empty($params['replicaSet']) ){\n\n // $uri = 'mongodb://'.$params['host'].':'.$params['port'].','.$params['host2'].':'.$params['port'].'/'.$params['database'];\n\n $uriOptions['replicaSet'] = $params['replicaSet']; \n $uriOptions['readPreference'] = $params['readPreference'];\n }\n \n $uriOptions['connectTimeoutMS'] = $params['connectTimeoutMS'];\n $uriOptions['socketTimeoutMS'] = $params['socketTimeoutMS'];\n $uriOptions['serverSelectionTimeoutMS'] = $params['serverSelectionTimeoutMS'];\n\n try{\n\n $this->client = new MongoDB\\Client($uri,$uriOptions); \n\n $this->client->selectDatabase($params['database']);\n\n $this->client->{$params['database']}->listCollections();\n\n $this->coll = $this->client->selectCollection($params['database'], $params['collection']);\n\n \n // checks collection exist or not. and creates if not exist\n $indexes = $this->coll->listIndexes();\n\n $indexFound = false;\n\n foreach ($indexes as $indexInfo) {\n\n if( isset($indexInfo['expireAfterSeconds']) && isset($indexInfo['key']['expireAt']) ){\n $indexFound = true;\n \n } \n }\n\n if($indexFound == false){\n $this->coll->createIndex( array('expireAt'=> 1), array( 'expireAfterSeconds' => 0 )); \n } \n \n }catch (Exception $e){\n\n // Cannot create sessions. MongoDB\n //print_r($e);\n trigger_error('Connot connect to mongodb.', E_USER_ERROR);\n \n }\n\n // counting expire time directly by adding seconds, / can also do $date->add(new DateInterval('PT60S'));\n $this->expireAt = new MongoDB\\BSON\\UTCDateTime( ( (new DateTime())->getTimestamp()+$params['sessionTimeout']) *1000);\n\n }", "public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }", "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "function saveSession() {}", "public function insertSession()\n\t{\n\t\t$date = date('Y-m-d');\n\n\t\t$oCounter_Session = Core_Entity::factory('Counter_Session');\n\n\t\t$oCounter_Session->counter_display_id = $this->display != ''\n\t\t\t? $this->update('counter_displays', array(\n\t\t\t\t'site_id' => $this->site->id,\n\t\t\t\t'date' => $date,\n\t\t\t\t'display' => mb_substr($this->display, 0, 11)\n\t\t\t\t))\n\t\t\t: 0;\n\n\t\t$oCounter_Session->counter_useragent_id = $this->update('counter_useragents', array(\n\t\t\t'site_id' => $this->site->id,\n\t\t\t'date' => $date,\n\t\t\t'useragent' => mb_substr(Core_Str::removeEmoji($this->userAgent), 0, 255),\n\t\t\t'crawler' => intval($this->bBot)\n\t\t));\n\n\t\t$oCounter_Session->counter_os_id = !$this->bBot\n\t\t\t? $this->update('counter_oses', array('site_id' => $this->site->id, 'date' => $date, 'os' => self::getOs($this->userAgent)))\n\t\t\t: 0;\n\n\t\t$oCounter_Session->counter_browser_id = !$this->bBot\n\t\t\t? $this->update('counter_browsers', array('site_id' => $this->site->id, 'date' => $date, 'browser' => self::getBrowser($this->userAgent)))\n\t\t\t: 0;\n\n\t\t$oCounter_Session->counter_device_id = !$this->bBot\n\t\t\t? $this->update('counter_devices', array('site_id' => $this->site->id, 'date' => $date, 'device' => self::getDevice($this->userAgent)))\n\t\t\t: 0;\n\n\t\t$oCounter_Session->site_id = $this->site->id;\n\t\t$oCounter_Session->last_active = Core_Date::timestamp2sql(time());\n\t\t$oCounter_Session->save();\n\n\t\t// Флаг добавления новой сессии - истина\n\t\t$this->bNewSession = TRUE;\n\n\t\treturn $oCounter_Session->id;\n\t}", "public function toDB(){\r\n if($this->isRegistred())\r\n return false;\r\n /*\r\n * @todo: these should be defined as object variables above\r\n */\r\n $this->sessionId = $this->user->sessionId;\r\n $this->userId = $this->user->id;\r\n \r\n return $this->dbWrite() ;\r\n }", "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "public function storeSessionData() {}", "public function storeSessionData() {}", "private function renewSession() {}", "public function testUpdateSession()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->put($this->url('sessions/1'), [\n 'name' => '2020-2021'\n ]);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]);\n\n $response->assertJson([\n 'name' => '2020-2021'\n ]);\n }", "public function actualizar_servicios_membresia($where_array,$data){\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n //--\n $res_jornadas = $this->mongo_db->where($where_array)->set($data)->update(\"membresia\"); \n \n var_dump($res_jornadas);die(''); \n //Auditoria...\n $data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar servicio membresia ',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where($where_array)->push('servicios.$.auditoria',$data_auditoria)->update(\"membresia\");\n }", "public function storeObject(){\n return storeSessionDB($this->sessionTime, $this->numberOfParticipants, $this->sessionDate, $this->sessionName);\n /*\n $query = \"\n INSERT INTO session (session_start_time, session_size, session_date, session_name)\n VALUES (?, ?, ?, ?);\n \";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1, $this->sessionTime);\n $stmt->bindValue(2, $this->numberOfParticipants);\n $stmt->bindValue(3, $this->sessionDate);\n $stmt->bindValue(4, $this->sessionName);\n if($stmt->execute()){\n echo \"<script> alert('\". $this->getSessionName() .\"') </script>\";\n return true;\n } else {\n echo \"<script> alert('Database Error') </script>\";\n return false;\n }\n */\n\n }", "public function createContextSession();", "static function updateSession() {\n\t\t$db = new Database ();\n\t\t\n\t\t$start_time = time ();\n\t\t$query = \"UPDATE user_sessions SET last_modified = '\" . $start_time . \"' WHERE session_id='\" . session_id () . \"'\";\n\t\t$db->Execute ( $query );\n\t\treturn;\n\t}", "public function actualizar_servicios_jornadas($where_array,$data){\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n //--\n $res_jornadas = $this->mongo_db->where($where_array)->push('servicios',$data)->update(\"jornadas\"); \n //var_dump($res_jornadas);die(''); \n //Auditoria...\n /*$data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar trabajador membresia ',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where($where_array)->push('servicios.$.auditoria',$data_auditoria)->update(\"jornadas\");*/\n }", "function saveToSession() {\n\t\t// Unset sessions since this info is elsewhere in the database\n\t\tunset($this->_questions);\n\t\ttx_wecassessment_sessiondata::storeSessionData($this, $this->getPID());\n\t}", "public static function reloadSession(){\n $auth = App_Auth::getInstance();\n\n $userModel = new FrontendUser();\n $user = $userModel->findById(self::getSession()->id);\n $user->groups = $user->findManyToManyRowset('Group', 'FrontendUserGroup');\n $user->group = $user->groups[0];\n\n $session = new stdClass();\n foreach($user as $k => $v){\n $session->{$k} = $v;\n }\n $session->group->name = $user->get('group')->name;\n\n $auth->getStorage()->write($session);\n }", "public function __construct() {\n if (isset($_SESSION['id']) && $_SESSION['id'] != '') {\n $mongo_id = new MongoDB\\BSON\\ObjectID($_SESSION['id']);\n\n $query = [\"_id\" => $mongo_id];\n if (db_count($query)) {\n $this->userId = $_SESSION['id'];\n } else {\n $this->userId = NULL;\n }\n } else {\n $this->userId = NULL;\n }\n }", "public function set_session()\r\n {\r\n $usuario = $this->session->userdata('id_usuario');\r\n \r\n $this->db->set('sesion_activa','t');\r\n $this->db->where('id_usuario',$usuario);\r\n $this->db->update('usuarios');\r\n \r\n $this->session->set_userdata('sesion_activa','t');\r\n }", "public function moveSessionToDatabase()\n {\n if ($this->hasSession() && $this->connection == 'database') {\n $session = \\Session::get($this->instanceName);\n \\Session::forget($this->instanceName);\n $session->each(function ($item) {\n $cart = $this->cart->where('cartable_id', $item['cartable_id'])->where('cartable_type', $item['cartable_type'])->first();\n if (!is_null($cart)) {\n $item['id'] = $cart['id'];\n $item['quantity'] += $cart['quantity'];\n $item['price'] = $cart['price'];\n }\n $this->cart->put($item['id'], $item);\n });\n $this->save();\n }\n\n return $this;\n }", "private function persist() {\n $session = new Session();\n $items = $this->getItems();\n $session->set('inspiration_board', json_encode($items));\n }", "public function save()\n {\n // Session should be started\n if ($this->_pStorage->status() === PHP_SESSION_ACTIVE) {\n // Get and save current UID\n $this->_pStorage->setOffset(self::UID, $this->_iCRC, APPLICATION_NAME);\n } else {\n throw new \\Foundation\\Exception\\BadMethodCallException('The session was not successfully started.');\n }\n }", "public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}", "public function actualizar_membresia($data){\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n\n $id_membresia = new MongoDB\\BSON\\ObjectId($data[\"id_membresia\"]);\n //--\n $res_membresia = $this->mongo_db->limit(1)->where(array('_id'=>$id_membresia,\"eliminado\"=>false))->set($data)->update(\"membresia\");\n /*var_dump($data);\n var_dump($res_membresia);\n die(); */\n //Auditoria...\n $data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar membresia',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where(array('_id'=>$id_membresia))->push('auditoria',$data_auditoria)->update(\"membresia\");\n echo json_encode(\"<span>La membresia se ha editado exitosamente!</span>\");\n }", "private function updateSession() {\n\t\t//update the login time.\n\t\tif (isset ( $this->session )) {\n\t\t\t$this->session ['lastlogin'] = time ();\n\t\t}\n\t\t\n\t\t//write $session['uid'], $session['name'], $session['lastlogin'] to file\n\t\tif (isset ( $this->session )) {\n\t\t\tfile_put_contents ( self::SESSION_FILE, serialize ( $this->session ) );\n\t\t} elseif (file_exists ( self::SESSION_FILE )) { //remove session information\n\t\t\tsession_destroy();\n\t\t\tunlink ( self::SESSION_FILE );\n\t\t}\n\t}", "public function store(SessionRequest $request) :JsonResponse\n {\n //\n $data = [];\n $data['name'] = $request->name;\n $data['slug'] = str_slug($request->name,'-');\n $data['start_day'] = $request->start_day;\n $data['end_day'] = $request->end_day;\n return $this->respond($this->_repo->createSession($data));\n\n }", "function insereAdmin($CPF, $senha, $nome)\n{\n\n require_once __DIR__ . '/vendor/autoload.php';\ntry{\n if(!existeAdmin( $CPF)){\n $url = \"mongodb+srv://davi:[email protected]/SistemaPlanoDeSaude?retryWrites=true&w=majority\";\n $connection = (new MongoDB\\Client($url))->SistemaPlanoDeSaude->admin;\n \n $insereAdmin = array(\"login\"=> $CPF ,\"senha\"=>$senha,\"nome\"=>$nome);\n $connection->insertOne($insereAdmin);\n}\n echo (\"Admin inserido com sucesso!\");\n}catch(MongoDB\\Exception $error){\n die($error->getMessage());\n}\n\n}", "function write ($session_id, $session_data) {\n\n # create database object if not create\n self::_connect();\n\n $res = $this->link->direct(\n '\n INSERT INTO\n '.$this->table_name.'\n (session_id, http_user_agent, session_data, session_expire)\n VALUES\n (\"'.$this->link->civ($session_id).'\",\"'.self::_user_agant().'\",\"'.$this->link->civ($session_data).'\",\"'.$this->link->civ(time() + $this->session_lifetime).'\")\n ON DUPLICATE KEY UPDATE\n session_data = \"'.$this->link->civ($session_data).'\",\n session_expire = \"'.$this->link->civ(time() + $this->session_lifetime).'\"\n '\n );\n\n if ($res) {\n return $this->link->_affected_rows() > 1 ? TRUE : '';\n }\n else {\n return FALSE;\n }\n\n }", "public function save()\n {\n /** @var \\Illuminate\\Http\\Request $request */\n $request = App::make('request');\n $request->session()->put($this->collection->cart_name, $this->collection);\n }", "public function run()\n {\n Session::firstOrCreate(['name' => 'Summer 2016']);\n Session::firstOrCreate(['name' => 'Fall 2016']);\n Session::firstOrCreate(['name' => 'Winter 2017']);\n }", "function createPersistentSession($sid, $uid) {\n $mysqli = ConnectToDatabase();\n $sql = \"INSERT INTO active_sessions \n (id, uid, expiration)\n VALUES \n ('$sid', '$uid', DATE_ADD(CURRENT_DATE, INTERVAL 1 WEEK))\";\n $exec = $mysqli->query($sql);\n if( !empty($error = $mysqli->error) )\n {\n echo $error;\n return 0;\n }\n else if( isset($mysqli->insert_id) )\n {\n return 1;\n }\n else\n {\n return -1;\n }\n\n }", "function session_update($hash){\n if (isset($hash)) {\n $session = mysqli_fetch_assoc(DB::select('sessions', ['*'], 'hash=\"'.$hash.'\"'));\n if (isset($session['last_act'])) {\n if ($session['closed']==1||$session['ip']!==$_SERVER['REMOTE_ADDR']){//||date('U',$session['last_act']) < time() - 1000 * 60 * 15) {\n //dbg('destroying session');\n session_close($hash);\n $hash = md5(genHash());\n //dbg('Insert new HASH from session_update()');\n if (DB::insert('auth', array('iduser' => USER_ID, 'hash' => $hash))) {\n session_init($hash);\n setcookie('HASH', $hash, 7000000000);\n }\n }\n DB::update('sessions',['last_act'=>date('Y-m-d H:i:s')],'hash=\"'.$hash.'\"');\n //dbg('session time updated');\n }else{\n //dbg('session not found');\n session_close($hash);\n $hash = md5(genHash());\n //dbg('Insert new HASH from session_update()');\n if (DB::insert('auth', array('iduser' => USER_ID, 'hash' => $hash))) {\n session_init($hash);\n setcookie('HASH', $hash, 7000000000);\n }\n }\n }\n}", "protected function will_change_to_db(){\n $data = Input::all(); \n //! insert into sessionaddon\n $ses_addon = new Session_Addon_Model();\n $tmp = $this->get_obj_addon($data ['id']);\n if($this->get_purpose() == self::DELE){\n if( $tmp->first()){\n $ses_addon = $ses_addon->find( $tmp->first()->id );\n }\n else{\n //@ error\n return;\n }\n $this->add_obj_dele_db($ses_addon);\n $this->set_invers_obj_dele();\n return parent::will_change_to_db(); \n }\n else{\n //@ there are idsession \n if( $tmp->first()){\n $ses_addon = $ses_addon->find( $tmp->first()->id );\n }\n //@ there are no id session , usually this is add\n else{\n //! we need find id\n $data ['id'] = $this->get_id_from_save_id ( $this->get_table_name() ,$this->get_max_id() );\n $ses_addon_a = new Session_Addon_Model(); \n $id = $this->get_id_from_save_id ( $ses_addon->get_table_name() , $ses_addon_a->max('id') );\n $ses_addon->id = $id;\n } \n }\n //@ inti\n $ses_addon->nilai = $data [$this->get_nilai_name()];\n $ses_addon->model = $data [$this->get_model_name()];\n $ses_addon->idsession = $data ['id'] ;\n $this->add_obj_save_db($ses_addon);\n return parent::will_change_to_db();\n }", "public function persist()\n {\n if ($schedule = Auth::user()->schedule) {\n $modules = $schedule->modules;\n $sessions = $schedule->sessions;\n\n $total_session_count = count($sessions);\n $completed_session_count = count(\n $sessions->where(\n 'status', 'completed'\n )\n );\n \n $progress = round(\n (($completed_session_count/$total_session_count) * 100), 2\n );\n\n $no_modules = count($modules);\n $sessions_completed = $sessions->where('status', 'completed')->count();\n $sessions_missed = $sessions->where('status', 'failed')->count();\n $sessions_incomplete = $sessions->where('status', 'incomplete')->count();\n\n\n $schedule->reports()->create(\n [\n 'no_modules' => $no_modules,\n 'sessions_completed' => $sessions_completed,\n 'sessions_missed' => $sessions_missed,\n 'sessions_incomplete' => $sessions_incomplete,\n 'progress' => $progress,\n 'sessions' => request('sessions'),\n 'time_spent' => request('comparedtime'),\n 'study_times' => request('studytimes'),\n 'module_ratings' => request('moduleratings'),\n 'predictions' => request('predictions'),\n 'sessiondetails' => request('sessiondetails')\n ]\n );\n }\n }", "function ConfirmSession ()\n {\n // Get session info\n $this->username = isset( $_SESSION [ \"username\" ] ) ? $_SESSION [ \"username\" ] : null;\n $this->sessionid = isset( $_SESSION [ \"sessionid\" ] ) ? $_SESSION [ \"sessionid\" ] : null;\n $this->remember = isset( $_SESSION [ \"remember\" ] ) ? $_SESSION [ \"remember\" ] : 0;\n\n // Check cookie if no session is available\n if ( !$this->username || !$this->sessionid ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? $_COOKIE [ \"username\" ] : null;\n $this->sessionid = isset( $_COOKIE [ \"sessionid\" ] ) ? $_COOKIE [ \"sessionid\" ] : null;\n $this->remember = isset( $_COOKIE [ \"remember\" ] ) ? $_COOKIE [ \"remember\" ] : 0;\n }\n\n // Get user info\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $currentsessionid = $this->mongo->dataFindOne( array( \"username\" => $this->username, \"active\" => 1 ), array( \"sessionid\" => 1 ) );\n if ( !isset( $currentsessionid[ \"sessionid\" ] ) || $currentsessionid[ \"sessionid\" ] == \"...\" ) {\n return false;\n } else {\n $currentsessionid = $currentsessionid[ \"sessionid\" ];\n }\n\n // If user's session is the same\n if ( $this->sessionid && $currentsessionid && $this->sessionid == $currentsessionid ) {\n $_SESSION [ \"username\" ] = $this->username;\n $_SESSION [ \"sessionid\" ] = $this->sessionid;\n $_SESSION [ \"remember\" ] = $this->remember;\n\n // Update user time\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $this->mongo->dataUpdate( array( \"username\" => $this->username ), array( '$set' => array( \"lastaccess\" => date( 'Y-m-d H:i:s' ) ) ) );\n\n return true;\n } else {\n return false;\n }\n }", "public function newSession();", "private function createSession()\n {\n session_regenerate_id(TRUE);\n $this->session = array();\n $this->session['legit'] = $this->sessionHash();\n $this->session['id'] = $this->userId;\n if (!$this->userId) {\n $this->voidCookie();\n }\n }", "private function _createSession(){\n return $this->_session = new Session();\n }", "function add_session($id, $key)\n{\n try {\n $dir = VAR_FOLDER;\n $filename = DEFAULT_SESSIONSFILE;\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n $sessions = array();\n $account = null;\n // if file exists, try to update the entry\n if (file_exists($filename)) {\n $content = file_get_contents($filename);\n $sessions = parse_sessions($content);\n if (($index = getindex_sessionbykey($id, $key, $sessions)) > -1) {\n $sessions[$index]->time = (new \\DateTime())->getTimestamp();\n }\n }\n // else, create a new session\n if (!$account) {\n $sessions[] = (object) array(\n 'id' => password_hash($id, PASSWORD_DEFAULT),\n 'time' => (new \\DateTime())->getTimestamp()\n );\n }\n $file = fopen($filename, \"w\");\n fwrite($file, json_encode($sessions). \"\\n\");\n fclose($file);\n return true;\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), $e->getCode());\n }\n}", "function auth_set($sess)\n{\n _app('auth', $sess);\n session_set(auth_namespace(), $sess, true);\n}", "function _write($id, $sess_data)\n\t{\n\t\t//$row = DB::row(\"SELECT value FROM \" . DB::$db_prefix . \"_sessions WHERE sesskey = '\".$id.\"'\");\n\t\t$time = time()+parent::$sess_lifetime;\n\n\t\tDB::query(\"\n\t\t\tREPLACE INTO \" . DB::$db_prefix . \"_sessions\n\t\t\tVALUES (\n\t\t\t\t'\".$id.\"',\n\t\t\t\t'\".$time.\"',\n\t\t\t\t'\".addslashes($sess_data).\"',\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"'\n\t\t\t)\n\t\t\");\n\n\t\treturn true;\n\t}", "public function saveToSession()\n {\n $_SESSION[PMF_SESSION_CURRENT_USER] = $this->getUserId();\n }", "public static function save(){\n\t\ttry {\n\t\t\t$esId = @$_SERVER['HTTP_WEBODF_SESSION_ID'];\n\t\t\tif (!$esId){\n\t\t\t\tthrow new \\Exception('Session id can not be empty');\n\t\t\t}\n\t\t\t\n\t\t\t$memberId = @$_SERVER['HTTP_WEBODF_MEMBER_ID'];\n\t\t\t$sessionRevision = @$_SERVER['HTTP_WEBODF_SESSION_REVISION'];\n\t\t\t\n\t\t\t$content = fopen('php://input','r');\n\t\t\tif (!$content){\n\t\t\t\tthrow new \\Exception('New conent missing');\n\t\t\t}\n\t\t\t\n\t\t\t$session = new Db_Session();\n\t\t\t$session->load($esId);\n\t\t\t\n\t\t\tif (!$session->hasData()){\n\t\t\t\tthrow new \\Exception('Session does not exist');\n\t\t\t}\n\t\t\t$sessionData = $session->getData();\n\t\t\t$file = new File($sessionData['file_id']);\n\t\t\tif (!$file->isPublicShare()){\n\t\t\t\tself::preDispatch();\n\t\t\t} else {\n\t\t\t\tself::preDispatchGuest();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tlist($view, $path) = $file->getOwnerViewAndPath();\n\n\t\t\t$isWritable = ($view->file_exists($path) && $view->isUpdatable($path)) || $view->isCreatable($path);\n\t\t\tif (!$isWritable){\n\t\t\t\tthrow new \\Exception($path . ' does not exist or is not writable for user ' . $uid);\n\t\t\t}\n\t\t\t\n\t\t\t$member = new Db_Member();\n\t\t\t$members = $member->getActiveCollection($esId);\n\t\t\t$memberIds = array_map(\n\t\t\t\tfunction($x){\n\t\t\t\t\treturn ($x['member_id']);\n\t\t\t\t},\n\t\t\t\t$members\n\t\t\t);\n\t\t\t\t\n\t\t\t//check if member belongs to the session\n\t\t\tif (!in_array($memberId, $memberIds)){\n\t\t\t\tthrow new \\Exception($memberId . ' does not belong to session ' . $esId);\n\t\t\t}\n\t\t\t\n\t\t\t// Active users except current user\n\t\t\t$memberCount = count($memberIds) - 1;\n\t\t\t\n\t\t\tif ($view->file_exists($path)){\n\t\t\t\t$currentHash = sha1($view->file_get_contents($path));\n\t\t\t\tif ($currentHash !== $sessionData['genesis_hash']){\n\t\t\t\t\t// Original file was modified externally. Save to a new one\n\t\t\t\t\t$path = Helper::getNewFileName($view, $path, '-conflict');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($view->file_put_contents($path, $content)){\n\t\t\t\t// Not a last user\n\t\t\t\tif ($memberCount>0){\n\t\t\t\t\t// Update genesis hash to prevent conflicts\n\t\t\t\t\t$session->updateGenesisHash($esId, sha1($content));\n\t\t\t\t} else {\n\t\t\t\t\t// Last user. Kill session data\n\t\t\t\t\tDb_Session::cleanUp($esId);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$view->touch($path);\n\t\t\t}\n\t\t\t\\OCP\\JSON::success();\n\t\t\texit();\n\t\t} catch (\\Exception $e){\n\t\t\tHelper::warnLog('Saving failed. Reason:' . $e->getMessage());\n\t\t\t\\OCP\\JSON::error(array('message'=>$e->getMessage()));\n\t\t\texit();\n\t\t}\n\t}", "function reg_active_session($id,$token,$Id_localizacion){\n $vigencia = time() + 3600;\n $date = new \\DateTime('now', new \\DateTimeZone('America/Mexico_City'));\n $date -> setTimestamp($vigencia);\n $expira = $date->format(\"Y-m-d H:i:s\");\n $params = array (\n \"token\" => $token,\n \"Id_usuario\" => $id,\n \"expira\" => $expira,\n \"Id_localizacion\" => $Id_localizacion\n );\n return dbInsert(\"sesiones_activas\",\"sisi\",$params);\n \n }", "protected function update_sessions($sessions)\n {\n }", "private function updateGameSession()\n {\n $this->getSession()->set('gameData', $this->getGame()->getGameData());\n }", "function update_session($session_name, $field, $value) {\n $_SESSION[APP_ID . $session_name][$field] = $value;\n return $_SESSION[APP_ID . $session_name];\n}", "public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}", "public function commit()\n {\n // nothing to do if nothing changed or the session has been just created or destroyed\n /**\n * @todo The $this->destroyed check gets flagged by Psalm for unknown reasons\n * @psalm-suppress ParadoxicalCondition\n */\n if ($this->writeMode !== true || $this->tokenExpiry === null || $this->destroyed === true) {\n return;\n }\n\n // collect all data\n if ($this->newSession) {\n // the token has changed\n // we are writing to the old session: it only gets the reference to the new session\n // and a shortened expiry time (30 second grace period)\n $data = [\n 'startTime' => $this->startTime(),\n 'expiryTime' => time() + 30,\n 'newSession' => $this->newSession\n ];\n } else {\n $data = [\n 'startTime' => $this->startTime(),\n 'expiryTime' => $this->expiryTime(),\n 'duration' => $this->duration(),\n 'timeout' => $this->timeout(),\n 'lastActivity' => $this->lastActivity,\n 'renewable' => $this->renewable(),\n 'data' => $this->data()->get()\n ];\n }\n\n // encode the data and attach an HMAC\n $data = serialize($data);\n $data = hash_hmac('sha256', $data, $this->tokenKey) . \"\\n\" . $data;\n\n // store the data\n $this->sessions->store()->set($this->tokenExpiry, $this->tokenId, $data);\n $this->sessions->store()->unlock($this->tokenExpiry, $this->tokenId);\n $this->writeMode = false;\n }", "public static function SetUpUserBySession ();", "public static function updateSession($di) {\n $browserId = BrowserID::identify($di['environment']['HTTP_USER_AGENT']);\n\n $sessionModel = $di['model.session'];\n $session = $sessionModel->getByUserIdAndSessionId($di['user']->id, $di['user']->session_id);\n $session->last_update = time();\n $session->browser = $browserId->Browser;\n $session->device = $browserId->OS;\n $session->ip = $di['user']->ip; // we assume its always up to date when executing\n\n $session->save();\n }", "abstract function addSession($session);", "public function tracker_store(){\n\t\tif(!$this->env_get('tracker:event')) return;\n\n\t\t// get exact request time\n\t\t$request_time =\tround($_SERVER['REQUEST_TIME_FLOAT'], 4);\n\n\t\t// set a value (if not already set from a concurrent process) to block concurrent processes\n\t\t$unique = uniqid(rand(), true);\n\t\t$this->us_set('tracker:session_created', $unique, true);\n\n\n\t\t// check if unique key matched uncached session value\n\t\tif($this->us_is('tracker:session_created', $unique, true)){\n\n\t\t\t// if already session update data is found\n\t\t\t$session_data = $this->env_get('tracker:session_data') ?: [];\n\n\t\t\t// add redisjob to add session\n\t\t\t$res = traffic_session::delayed_create_session([\n\t\t\t\t// base param\n\t\t\t\t'persistID' \t\t\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t\t\t\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t\t'domainID'\t\t\t\t\t=> $this->env_get('nexus:domainID'),\n\t\t\t\t'pageID'\t\t\t\t\t=> $this->env_get('nexus:pageID'),\n\t\t\t\t'publisherID'\t\t\t\t=> $this->env_get('nexus:publisherID'),\n\n\t\t\t\t// special param\n\t\t\t\t'publisher_uncover_key'\t\t=> $this->env_get('nexus:publisher_uncover_key'),\n\t\t\t\t'publisher_uncover_name'\t=> $this->env_get('nexus:publisher_uncover_name'),\n\t\t\t\t'publisher_affiliate_key'\t=> $this->env_get('nexus:publisher_affiliate_key'),\n\t\t\t\t'usID'\t\t\t\t\t\t=> $this->us->usID,\n\t\t\t\t'ipv4'\t\t\t\t\t\t=> (strpos($_SERVER['REMOTE_ADDR'], ':') === false) ? $_SERVER['REMOTE_ADDR'] : null,\n\t\t\t\t'ipv6'\t\t\t\t\t\t=> (strpos($_SERVER['REMOTE_ADDR'], ':') !== false) ? $_SERVER['REMOTE_ADDR'] : null,\n\t\t\t\t'useragent'\t\t\t\t\t=> !empty($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 255) : null,\n\t\t\t\t'referer'\t\t\t\t\t=> $_SERVER['HTTP_REFERER'] ?? null,\n\n\t\t\t\t// options\n\t\t\t\t'ipv4_range_detection'\t\t=> $this->env_get('domain:ipv4range_detection') ? true : false,\n\t\t\t\t'delayed_parsing'\t\t\t=> true,\n\t\t\t\t] + $session_data);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_session: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// else if session update data is ready\n\t\telseif($this->env_get('tracker:session_data')){\n\n\t\t\t// add redisjob to update session\n\t\t\t$res = traffic_session::delayed_update_session([\n\t\t\t\t'persistID' \t=> $this->us_get('persistID'),\n\t\t\t\t] + $this->env_get('tracker:session_data')\n\t\t\t\t);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for update_session: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// if this is a new click\n\t\tif($this->env_is('nexus:new_click_request')){\n\n\t\t\t// get click request data\n\t\t\t$request_data = $this->env_get('nexus:new_click_request');\n\n\t\t\t// save in session\n\t\t\t$this->us_set('tracker:last_click_request', $request_data);\n\n\t\t\t// add redisjob to add click to session\n\t\t\t$res = traffic_session::delayed_create_click([\n\t\t\t\t// base param\n\t\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\n\t\t\t\t// special param\n\t\t\t\t'referer'\t\t=> $_SERVER['HTTP_REFERER'] ?? null,\n\t\t\t\t'request'\t\t=> $request_data,\n\t\t\t\t]);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_click: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// if we have a new blocked click\n if($this->env_is('nexus:blocked_click')){\n\n // get data\n $blocked_click = $this->env_get('nexus:blocked_click');\n\n // add redisjob to add click to session\n\t\t\t$res = traffic_session::delayed_create_blocked_click([\n\t\t\t\t// base param\n\t\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t\t'pageID'\t\t=> $blocked_click->pageID,\n\t\t\t\t'publisherID'\t=> $blocked_click->publisherID,\n\t\t\t\t'status'\t\t=> $blocked_click->status,\n\n\t\t\t\t// special param\n\t\t\t\t'referer'\t\t=> $blocked_click->referer ?: null,\n\t\t\t\t'request'\t\t=> $blocked_click->pubdata ?: null,\n\t\t\t\t]);\n\n\t\t\t// on error\n\t\t\tif($res->status != 204){\n\n\t\t\t\t// log error\n\t\t\t\te::logtrigger('Failed to create RedisJob for create_blocked_click: '.$res->status);\n\n\t\t\t\t// and abort\n\t\t\t\treturn;\n\t\t\t\t}\n }\n\n\n\t\t// create pageview_data\n\t\t$pageview_data = $this->env_get('tracker:callinfo');\n\t\tif(!is_array($pageview_data)) $pageview_data = [];\n\t\t$pageview_data['url'] = $this->env_get('nexus:url');\n\n\t\t// add redisjob to add session_pageview\n\t\t$res = traffic_session::delayed_create_session_pageview([\n\t\t\t// base param\n\t\t\t'persistID'\t\t=> $this->us_get('persistID'),\n\t\t\t'createTime'\t=> $_SERVER['REQUEST_TIME'],\n\t\t\t'data'\t\t\t=> $pageview_data,\n\t\t\t]);\n\n\t\t// on error\n\t\tif($res->status != 204){\n\n\t\t\t// log error\n\t\t\te::logtrigger('Failed to create RedisJob for session_pageview: '.$res->status);\n\n\t\t\t// and abort\n\t\t\treturn;\n\t\t\t}\n\t\t}", "public function storeModif(Request $request)\n {\n $eventId = 0;\n $session_count = count($request->input(\"name_session\"));\n // save OM\n // save session\n for ($i = 0; $i < $session_count; $i++) {\n if (isset($request->input('id_session')[$i]))\n {\n DB::table('events')\n ->where('id',$request->input('id_session')[$i])\n ->update(['country' => $request->input('country')[$i],'title' => $request->input('name_session')[$i],\n 'start_date' => $request->input('start_training_date')[$i],'end_date' => $request->input('end_training_date')[$i],\n 'delivery_days' => $request->input('delivery_days')[$i],'location' => $request->input('location')[$i],'Customer' => $request->input('Customer')[$i],'locator' => $request->input('locator')[$i]]);\n }\n else\n {// save session if OM exist\n $event = new Events();\n $event->user_id = Auth::user()->id;\n $event->country = $request->input('country')[$i];\n $event->locator = $request->input('locator')[$i];\n $event->title = $request->input('name_session')[$i];\n $event->om_id = $request->input('om_id');\n $event->customer = $request->input('customer')[$i];\n $event->start_date = $request->input('start_training_date')[$i];\n $event->end_date = $request->input('end_training_date')[$i];\n $event->location = $request->input('location')[$i];\n $event->delivery_days = $request->input('delivery_days')[$i];\n $event->hotel_contact = $request->input('hotel_name')[$i];\n $event->status = \"DRAFT\";\n $event->save();\n }\n\n\n }\n DB::table('trips')\n ->where('om_id',$request->input('om_id'))\n ->update(['prime_amount' => $request->input('amount'),'start_date' => $request->input('start_trip_date'),\n 'end_date' => $request->input('end_trip_date'),'formule' => $request->input('formule')]);\n\n $notification = array(\n 'message' => 'Session Edit Successfully',\n 'alert-type' => 'success'\n );\n return redirect('/instructor/sessions')->with($notification);\n // return $notification;\n\n //return response()->json(['message'=>'New OM added Successfully.']);\n }", "public static function createRecord($pdo_conn, $username, $userid) {\n\t\t// delete existing sessions\n\t\t$delstmt = $pdo_conn->prepare(\"DELETE FROM sessions WHERE sessions_userid = :session_userid\");\n $delstmt->execute(array(':session_userid' => $userid));\n\n $query = \"INSERT INTO sessions (sessions_userid, sessions_token, sessions_serial) VALUES (:userid, :token, :serial)\";\n\n $token = func::generateToken(164);\n $serial = func::generateToken(164);\n\n func::createCookie($username, $userid, $token, $serial);\n func::createSession($username, $userid, $token, $serial);\n\n // insert session variables in db\n $stmt = $pdo_conn->prepare($query);\n $stmt->execute(array(':userid'=>$userid, ':token' => $token, ':serial' => $serial)); \n\t}", "public function sess_write()\r\r\n\t{\r\r\n\t\tif( ! $this->parent->check_write())\r\r\n\t\t{\r\r\n\t\t\t$_SESSION = array();\r\r\n\t\t\tforeach($this->parent->userdata as $key => $val)\r\r\n\t\t\t{\r\r\n\t\t\t\t$_SESSION[$key] = $val;\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$this->parent->track_write();\r\r\n\t\t}\r\r\n\t}", "public function update($id = '') {\n\t\tif($id == '') {\n\t\t\t$id = $this->id;\n\t\t}\n\t\t$sess = ORM::for_table($this->session_type)->find_one($id);\n\t\t$sess->set('expired', date('Y-m-d H:i:s', time() + (3 * 60 * 60)));\n\t\t$sess->save();\n\t}", "protected function fetchUserSessionFromDB() {}", "public function store()\n {\n if (Request::ajax()) {\n $data = Input::all();\n\n if(Input::has('session_action_id')) {\n // find the bear\n $session = Cnf_session::find(Input::get('session_action_id'));\n\n // change the attribute\n $session->title = Input::get('session_title');\n $session->description = Input::get('session_description');\n $session->start_time = Input::get('session_starts');\n $session->end_time = Input::get('session_ends');\n $session->date = Carbon\\Carbon::createFromFormat('d/m/Y', Input::get('session_date'));\n\n // save to our database\n $session->save();\n\n $session->speakers()->detach();\n $session->speakers()->attach(Input::get('session_speakers'));\n return $session->id;\n } else {\n $session = Session::Create(array(\n 'title' => Input::get('session_title'),\n 'description' => Input::get('session_description'),\n 'start_time' => Input::get('session_starts'),\n 'end_time' => Input::get('session_ends'),\n 'date' => Carbon\\Carbon::createFromFormat('d/m/Y', Input::get('session_date')),\n ));\n\n $session->speakers()->attach(Input::get('session_speakers'));\n\n $last_inserted_id = $session->id;\n return $last_inserted_id;\n }\n\n print_r($data);\n die;\n }\n }", "private function synchronize()\n {\n $_SESSION['user'] = $this->user;\n }", "public function create(&$session)\n\t{\n\t\t//TODO: Implement this service call.\n\t\treturn false;\t\n\t}", "public function sess_update()\r\r\n\t{\r\r\n\t\t// We only update the session every five minutes by default\r\r\n\t\tif (($this->parent->userdata['last_activity'] + $this->parent->sess_time_to_update) >= $this->parent->now)\r\r\n\t\t{\r\r\n\t\t\treturn;\r\r\n\t\t}\r\r\n\r\r\n\t\t// Regenerate session id\r\r\n\t\tsession_regenerate_id();\r\r\n\r\r\n\t\t// Update the session data in the session data array\r\r\n\t\t$this->parent->userdata['session_id'] = session_id();\r\r\n\t\t$this->parent->userdata['last_activity'] = $this->parent->now;\r\r\n\t}", "public function iniciar() {\r\n session_regenerate_id();\r\n }", "public function createBook ($session) {\n\n // let's just assume we have a book and get it\n $aBook = $session->get('book');\n // make a variable for books\n $books = $session->get('books');\n // get book keys \n $bookIds = array_keys($books);\n // create new id\n $maxId = empty($bookIds) ? 1 : max($bookIds) + 1;\n // add id to book\n $aBook['Id'] = $maxId;\n // add book to books\n $books[$maxId] = $aBook;\n // not necessarily sure why I need to do this\n $session->put('books', $books);\n\n }", "public function __construct()\n{\n parent::__construct();\n $this->load->database();\n $this->load->library('session');\n\n $holder = array(\n\n \"lastlog\" => time()\n\n\n\n ) ;\n\n\n $this->db->update(\"users\",$holder,array(\"id\" => $this->session->id));\n\n\n}", "function sess_write($key, $value) {\n\tif (empty($_COOKIE[session_name()]) && empty($value))\n\t{\n\t\treturn TRUE;\n\t}\n\t\n\t$Controller = getInstance()->Controller;\n\t\n\t$Session = new AppModel('Session');\n\t\n\t$result = $Session->findById($key);\n\t\n\t$user_id = 0;\n\t\n\tif (isset($Controller->User->user['id'])) \n\t{\n\t\t$user_id = $Controller->User->user['id'];\n\t}\n\t\n\tif (isset($result['Session']['id'])) \n\t{\n\t\t$Session->save(array('hostname'=>$_SERVER['REMOTE_ADDR'],'session'=>$value),array('id'=>$key));\n\t}\n\telse \n\t{\n\t $Session->create(array('id'=>$key,'hostname'=>$_SERVER['REMOTE_ADDR'],'session'=>$value));\n\t}\n\t\n\treturn TRUE;\n}", "function Create ($pREMEMBER, $pSESSIONNAME = \"gLOGINSESSION\") {\n\n // Delete all records older than 24 hours.\n $deletestatement = \"DELETE FROM \" . $this->TableName . \" WHERE Stamp < DATE_ADD(now(),INTERVAL -1 DAY)\";\n $this->Query ($deletestatement);\n\n // Select any existing auth session information.\n $existingcriteria = array (\"Username\" => $this->Username,\n \"Domain\" => $this->Domain);\n $this->SelectByMultiple ($existingcriteria);\n $this->FetchArray ();\n parent::Create ($pREMEMBER, $pSESSIONNAME);\n }", "public function testExistingIdentityCrossSession() {\n\n $sessionFactory = $this->getSampleProjectSessionFactory(true);\n \n $session1 = $sessionFactory->openSession();\n $session2 = $sessionFactory->openSession();\n $session3 = $sessionFactory->openSession();\n \n $bug = $session1->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $project = $session2->find('sample_Project')->filterBy('projectId', 12345)->one();\n $user = $session3->find('sample_User')->filterBy('userId', '55566')->one();\n\n $this->assertTrue($bug->owner !== $project->manager);\n $this->assertTrue($user !== $bug->owner);\n $this->assertTrue($user !== $project->manager);\n \n $sessionFactory2 = $this->getSampleProjectSessionFactory(false);\n $sessionFactory3 = $this->getSampleProjectSessionFactory(false);\n \n $bug = $sessionFactory2->currentSession()->find('sample_Bug')->filterBy('bugId', 521152)->one();\n $user = $sessionFactory3->currentSession()->find('sample_User')->filterBy('userId', '55566')->one();\n $this->assertTrue($user !== $bug->owner);\n \n }", "public function create_session($define_, $value_, $pack_, $time__, $help_, $comment_)\n {\n // Hodnota ID sa neuvadza je generovana automaticka cez methodu AUTO INCREMENT\n // Method volame len z CONTROL directory\n // feed\n $this->const_time = time();\n $this->sql = \" INSERT INTO \" . TABLE_SESSION_RELATION . \" ($this->id_column, $this->name_column, $this->value_column, $this->value_time_const_column, $this->pack_column, $this->create_time_column, $this->help_column, $this->comment_column) \" .\n \" VALUES (NULL, '$define_', $value_, $this->const_time, '$pack_', $time__, '$help_', '$comment_') \";\n $this->result = $this->db->query($this->sql) or die(mysqli_error($this->db));\n $this->db->close();\n }", "function createSession($id,$username,$password,$customer)\n {\n $client = getClient();\n $user = new stdClass();\n $user->id = $id;\n $user->username = $username;\n $user->password = $password;\n $user->customer = $customer;\n $createSession = new stdClass();\n $createSession->user = $user;\n $createSessionResponse = new stdClass();\n $createSessionResponse = $client->createSession($createSession);\n return $createSessionResponse->return;\n }", "abstract public function persistSessionToken() ;", "function session_init($hash){\n if(isset($hash)){\n $session=mysqli_fetch_assoc(DB::select('sessions',['*'],'hash=\"'.$hash.'\"'));\n if(isset($session['closed'])){\n session_close($hash);\n $hash = md5(genHash());\n //dbg('Insert new HASH from session_init()');\n if (DB::insert('auth', array('iduser' => USER_ID, 'hash' => $hash))) {\n //session_init($hash);\n setcookie('HASH', $hash, 7000000000);\n }\n }\n //dbg('Insert new SESSION from session_init()');\n DB::insert('sessions',['hash'=>$hash,'iduser'=>USER_ID,'date'=>date('Y-m-d H:i:s'),'last_act'=>date('Y-m-d H:i:s'),'ip'=>$_SERVER['REMOTE_ADDR'],'provider'=>getIspByIp($_SERVER['REMOTE_ADDR']),'closed'=>0]);\n }\n}", "public function saveThis()\n {\n \t\tPersistentSession::getInstance()->saveOrUpdate($this);\n }", "public function store()\n\t{\n $inputs = Input::all();\n\n $validator = Validator::make($inputs,\n array(\n 'date' => 'required',\n 'cours' => 'required',\n 'formateur' => 'required'\n )\n );\n\n if ($validator->fails()) {\n return Redirect::to('sessions/create')\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $session = new Sessions;\n $session->date = new DateTime(Input::get('date'));\n $session->cours_id = Input::get('cours');\n $session->formateur_id = Input::get('formateur');\n $session->save();\n\n if (Input::get('classroom')) {\n $students = DB::table('classrooms')\n ->join('students', 'classrooms.id', '=', 'students.classroom_id')\n ->select('students.id')\n ->get();\n\n foreach($students as $key => $input) {\n DB::table('sessions_student')->insert(\n array('sessions_id' => $session->id, 'student_id' => $input->id)\n );\n }\n }\n\n if(Input::get('students')[0]) {\n foreach(Input::get('students') as $key => $input) {\n DB::table('sessions_student')->insert(\n array('sessions_id' => $session->id, 'student_id' => $input)\n );\n }\n }\n\n Session::flash('message', 'Session créée');\n return Redirect::to('sessions');\n }\n\t}", "public function updateSession($session_id,$extension,$end_date) {\n this->$end_date = date('Y-m-d', strtotime($end_date. \" + {$extension} days \"));\n this->$next_session_id = ($session_id + 1) % 3 ; //ginete me mod3 i praksi dioti ta id ton session ine 3 kai otan to session_id einai 3 theloume na pigenei apo tin arxi\n $query = \"UPDATE sessions SET end_date = '$end_date' WHERE session_id = '$session_id'\";\n mysqli_query($db, $query);\n $query = \"UPDATE sessions SET start_date = '$end_date' WHERE session_id = '$next_session_id'\";\n mysqli_query($db, $query);\n die();\n }", "function setSession($user, $createPersistent)\n {\n echo 'setting sesh';\n $_SESSION[\"notes\"] = true;\n $_SESSION[\"uid\"] = $user[\"id\"];\n $_SESSION[\"user\"] = $user[\"user\"];\n $_SESSION[\"color\"] = $user[\"color\"];\n\n if( isset($createPersistent) &&\n $createPersistent == true )\n {\n $SESSION_LENGTH = time() + 60 * 60 * 24 * 7 * 2;\n setcookie('user', $user[\"user\"], $SESSION_LENGTH, '/');\n setcookie('sid', session_id(), $SESSION_LENGTH, '/');\n $x = createPersistentSession(session_id(), $user[\"id\"]);\n echo 'persistent session: ' . $x;\n }\n return 'good';\n }", "protected function save()\n\t{\n\t\t\\XF::app()->session()->set('xenforoUpgradeService', [\n\t\t\t'cookieJar' => $this->getCookies(),\n\t\t\t'email' => $this->email,\n\t\t\t'password' => $this->password,\n\t\t\t'availableProducts' => $this->availableProducts,\n\t\t\t'availableVersions' => $this->availableVersions,\n\t\t\t'selectedLicense' => $this->selectedLicense,\n\t\t\t'selectedProduct' => $this->selectedProduct,\n\t\t\t'selectedVersion' => $this->selectedVersion\n\t\t]);\n\t}", "function createSession($u) {\r\n\t// THEN NEED TO ENSURE SESSION IS DELETED WHEN BROWSER CLOSED OR LOGOUT...??\r\n\t//if (!checkSession()) {\t\t\r\n\t\t$rndStr = randomString();\r\n\t\tsession_start();\r\n\t\r\n\t\t$_SESSION['username'] = $u;\r\n\t\t$_SESSION['s_id'] = $rndStr;\r\n\t\t\r\n\t\t$db_conn = connectToDB();\r\n\r\n\t\t$query = \"UPDATE user SET s_id='$rndStr' WHERE username='$u'\";\r\n\t\t$result = mysql_query($query) or die(mysql_error());\r\n\r\n\t\tdisconnectFromDB($db_conn);\r\n\t//}\r\n}", "public function write($id, $data) \r\n {\r\n echo __METHOD__,'<BR>'; \r\n echo 'session_id =',$id,'<br>';\r\n try {\r\n $sql = 'replace into `session` set `session`.session_id = :id ,`session`.session_data = :data , `session`.session_last_access = :time';\r\n echo 'data befor save = ',$data,'<br>';\r\n $rs =R::exec($sql,array(':id'=>$id,':data'=>$data,':time'=>time()));\r\n var_dump($rs);\r\n return true;\r\n exit();\r\n } catch (Exception $e) {\r\n echo 'Execption = ';\r\n echo $e->getMessage();\r\n } \r\n echo 'aftersave<br>';\r\n //REPLACE\r\n // global $SESS_DBH, $SESS_LIFE;\r\n // $session_last_access = time();\r\n // $value = $val;\r\n // $qry = \"insert into sessions values('$key',$session_last_access,'$value')\";\r\n // $qid = mysql_query($qry, $SESS_DBH);\r\n // if (!$qid) {\r\n // $qry = \"update sessions set session_last_access=$session_last_access, session_data='$value' where session_id='$key' \";\r\n // $qid = mysql_query($qry, $SESS_DBH);\r\n // }\r\n // return $qid;\r\n\r\n // var_dump($data); \r\n $sess_file = $this->_path . $this->_name . \"_$id\";\r\n // echo 'session file = ',$sess_file,'<br>';\r\n $iv = mcrypt_create_iv($this->_ivSize, MCRYPT_DEV_URANDOM);\r\n $encrypted = mcrypt_encrypt(\r\n $this->_algo,\r\n $this->_key,\r\n $data,\r\n MCRYPT_MODE_CBC,\r\n $iv\r\n );\r\n $hmac = hash_hmac('sha256', $iv . $this->_algo . $encrypted, $this->_auth);\r\n $bytes = file_put_contents($sess_file, $hmac . ':' . base64_encode($iv) . ':' . base64_encode($encrypted));\r\n // $bytes = file_put_contents($sess_file,$data);\r\n // echo 'write=',$bytes;\r\n return ($bytes !== false); \r\n }", "public function saveOAuthSession($session);", "public function save() {\r\n\t return isset($this->userid) ? $this->update() : $this->create();\r\n\t}", "public function store(AdminSessionCreateRequest $request)\n {\n //\n $input = $request->except(['end_date', 'start_date']);\n $input['fitness_id'] = session()->get('fitness_id');\n $input['end_date'] = date('Y-m-d', strtotime($request->end_date));\n $input['start_date'] = date('Y-m-d', strtotime($request->start_date));\n Session::create($input);\n return redirect(route('admin.classes.index'));\n }", "public function write($id, $data){\n\n $sess_id = $this->sess_id_prefix.$id;\n\n\n // create if row / document not exist\n if($this->docExist === false)\n {\n \n\n $insertResult = $this->coll->insertOne( array('sess_id' => $sess_id, 'data' => $data, 'expireAt' => $this->expireAt ) );\n\n return ( $insertResult->getInsertedCount() == 1 );\n\n \n }\n else\n {\n\n $updateResult = $this->coll->updateOne( \n array('sess_id' => $sess_id), \n \n array('$set' => array('data' => $data, 'expireAt'=> $this->expireAt) ) \n\n );\n\n return ( $updateResult->getMatchedCount() == 1 );\n \n }\n }", "function storeSessionData($sessionData, $pid) {\n\t\t$GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_wecassessment_pi1:' . $pid, $sessionData);\n\t\t$GLOBALS['TSFE']->fe_user->sesData_change = true;\n\t\t$GLOBALS['TSFE']->fe_user->storeSessionData();\t\t\n\t}", "public function resetDbSessions()\n {\n $ttl = (int)Phpr::$config->get('STORED_SESSION_TTL', 3);\n Db_DbHelper::query(\n 'delete from db_session_data where created_at < DATE_SUB(now(), INTERVAL :seconds SECOND)',\n array('seconds' => $ttl)\n );\n }", "public function createSession($request, $response, $args)\n {\n $userId = $request->getAttribute('userId');\n\n $documentId = $args['id'];\n\n if (!$this->documentManager->grantAccess($userId, $documentId, 'edit')) {\n if (isset($userId)) {\n return $response->withStatus(403);\n } else {\n return $response->withStatus(401);\n }\n }\n\n $username = $userId;\n $user = $this->documentManager->getDocument($userId, $userId);\n if (isset($user['data']) && isset($user['data']['name'])) {\n $username = $user['data']['name'];\n }\n\n $etherpadSession = array('etherpadSession' => $this->etherpadManager->createSession($userId, $username, $documentId));\n\n return $response->write(json_encode($etherpadSession));\n }", "function saveWriterQuiz(){\r\n if (isset($_SESSION['subject']) && isset($_SESSION['quiznum']) && isset($_SESSION['save'])){\r\n $user=$_SESSION['user']; \r\n $quizID=$_SESSION['subject'].$_SESSION['quiznum'] ;\r\n $score=$_SESSION[\"save\"];\r\n $sql=\"UPDATE quiz SET $quizID = $score WHERE uniqueID='\".$user->getUID().\"'\";\r\n write($sql,1);\r\n }\r\n }", "public function sess_create()\r\r\n\t{\r\r\n\t\tif(session_id() == '') {\r\r\n\t\t\tsession_start();\r\r\n\t\t}\r\r\n\r\r\n\t\t$_SESSION['session_id']\t\t= session_id();\r\r\n\t\t$_SESSION['ip_address']\t\t= $this->CI->input->ip_address();\r\r\n\t\t$_SESSION['user_agent']\t\t= substr($this->CI->input->user_agent(), 0, 120);\r\r\n\t\t$_SESSION['last_activity']\t= $this->parent->now;\r\r\n\r\r\n\t\t$this->parent->userdata = $_SESSION;\r\r\n\t}", "public function store(Requests\\SessionRequest $request)\n {\n $exerciseIDs = $request->input('id');\n\n foreach($exerciseIDs as $exerciseID)\n {\n $session = new Session;\n $session->exercise_id = $exerciseID;\n $session->session_date = Carbon::now();\n Auth::user()->sessions()->save($session);\n }\n\n return redirect()->action('LogController@showLog');\n }", "function SaveSession($conn, $sessionStart, $sessionEnd, $distance, $deviceID) {\n $sql = \"INSERT INTO skate_sessions\n (session_start, session_end, session_distance, fk_device_id)\n VALUES (?, ?, ?, ?)\";\n\n $stmt = $conn->prepare($sql);\n $stmt->bind_param(\"ssdi\", $sessionStart, $sessionEnd, $distance, $deviceID);\n\n $isOk = $stmt->execute();\n\n if ($isOk) {\n $response = getLastID($conn);\n\n if ($response['isOk']) {\n $sessionID = $response['lastID'];\n\n $response = [\n 'isOk' => true,\n 'sessionID' => $sessionID\n ];\n }\n } else {\n $response = [\n 'isOk' => false,\n 'displayError' => \"Save Failed (1)\"\n ];\n }\n\n $stmt->close();\n\n return $response;\n }", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function store(Request $request,Preinscription $preinscription,Client $client)\n {\n// dd($request->all());\n $adm = Admin::find(Auth::guard('admin')->id());\n $client->statut=$request->statut;\n $client->nom=$request->nom;\n $client->prenom=$request->prenom;\n $client->Adresse=$request->Adresse;\n $client->fix=$request->fix;\n $client->email=$request->email;\n $client->Mob1=$request->Mob1;\n $client->Mob2=$request->Mob2;\n $client->date_naissance=$request->date_naissance;\n $client->lieu_naissance=$request->lieu_naissance;\n $client->id_admin=Auth::guard('admin')->id();\n $client->save();\n $client->admin()->associate($adm);\n $preinscription->TarifG=$request->TarifG;\n $preinscription->Reduction=$request->Reduction;\n $preinscription->TarifF=$request->TarifF;\n $preinscription->id_admin=Auth::guard('admin')->id();\n $preinscription->id_client=$client->id_client;\n $sess = Session::find($request->id_session);\n// dd($preinscription->id_session=$sess->id_session);\n $preinscription->id_session=$sess->id_session ;\n $preinscription->save();\n $preinscription->admin()->associate($adm);\n $preinscription->client()->associate($client);\n $preinscription->session()->associate($sess);\n\n\n $co = 1;\n $coidc = 0;\n $jour = new Jour();\n $jour->jour=\"Vendredi\";\n $jour->id_preinscription=$preinscription->id_preinscription;\n while ($coidc<count($request->Vendredi)){\n $vend= $request->Vendredi[$coidc];\n if ($co==1){\n $jour->slot1=$vend;\n }\n if ($co==2){\n $jour->slot2=$vend;\n\n }\n if ($co==3){\n $jour->slot3=$vend;\n }\n\n if ($vend==1){\n $coidc++;\n }\n $coidc++;\n $co++;\n }\n\n $jour->save();\n// $preinscription->jours()->save($jour);\n $jour->inscription()->associate($preinscription);\n\n $co1 = 1;\n $coidc1 = 0;\n $jour1 = new Jour();\n $jour1->jour=\"Samedi\";\n $jour1->id_preinscription=$preinscription->id_preinscription;\n while ($coidc1<count($request->Samedi)){\n $vend1= $request->Samedi[$coidc1];\n if ($co1==1){\n $jour1->slot1=$vend1;\n }\n if ($co1==2){\n $jour1->slot2=$vend1;\n\n }\n if ($co1==3){\n $jour1->slot3=$vend1;\n\n }\n if ($vend1==1){\n $coidc1++;\n }\n $coidc1++;\n $co1++;\n }\n $jour1->save();\n// $preinscription->jours()->save($jour1);\n $jour1->inscription()->associate($preinscription);\n\n\n\n $co2 = 1;\n $coidc2 = 0;\n $jour2 = new Jour();\n $jour2->jour=\"Dimanche\";\n $jour2->id_preinscription=$preinscription->id_preinscription;\n while ($coidc2<count($request->Dimanche)){\n $vend2= $request->Dimanche[$coidc2];\n if ($co2==1){\n $jour2->slot1=$vend2;\n }\n if ($co2==2){\n $jour2->slot2=$vend2;\n\n }\n if ($co2==3){\n $jour2->slot3=$vend2;\n\n }\n if ($vend2==1){\n $coidc2++;\n }\n $coidc2++;\n $co2++;\n }\n $jour2->save();\n// $preinscription->jours()->save($jour2);\n $jour2->inscription()->associate($preinscription);\n\n\n $co3 = 1;\n $coidc3 = 0;\n $jour3 = new Jour();\n $jour3->jour=\"Lundi\";\n $jour3->id_preinscription=$preinscription->id_preinscription;\n while ($coidc3<count($request->Lundi)){\n $vend3= $request->Lundi[$coidc3];\n if ($co3==1){\n $jour3->slot1=$vend3;\n }\n if ($co3==2){\n $jour3->slot2=$vend3;\n\n }\n if ($co3==3){\n $jour3->slot3=$vend3;\n\n }\n if ($vend3==1){\n $coidc3++;\n }\n $coidc3++;\n $co3++;\n }\n $jour3->save();\n// $preinscription->jours()->save($jour3);\n $jour3->inscription()->associate($preinscription);\n\n\n\n $co4 = 1;\n $coidc4 = 0;\n $jour4 = new Jour();\n $jour4->jour=\"Mardi\";\n $jour4->id_preinscription=$preinscription->id_preinscription;\n while ($coidc4<count($request->Mardi)){\n $vend4= $request->Mardi[$coidc4];\n if ($co4==1){\n $jour4->slot1=$vend4;\n }\n if ($co4==2){\n $jour4->slot2=$vend4;\n\n }\n if ($co4==3){\n $jour4->slot3=$vend4;\n\n }\n if ($vend4==1){\n $coidc4++;\n }\n $coidc4++;\n $co4++;\n }\n $jour4->save();\n// $preinscription->jours()->save($jour4);\n $jour4->inscription()->associate($preinscription);\n\n\n\n $co5 = 1;\n $coidc5 = 0;\n $jour5 = new Jour();\n $jour5->jour=\"Mercredi\";\n $jour->id_preinscription=$preinscription->id_preinscription;\n while ($coidc5<count($request->Mercredi)){\n $vend5= $request->Mercredi[$coidc5];\n if ($co5==1){\n $jour5->slot1=$vend5;\n }\n if ($co5==2){\n $jour5->slot2=$vend5;\n\n }\n if ($co5==3){\n $jour5->slot3=$vend5;\n\n }\n if ($vend5==1){\n $coidc5++;\n }\n $coidc5++;\n $co5++;\n }\n $jour5->save();\n// $preinscription->jours()->save($jour5);\n $jour5->inscription()->associate($preinscription);\n\n\n $co6 = 1;\n $coidc6 = 0;\n $jour6 = new Jour();\n $jour6->jour=\"Jeudi\";\n $jour->id_preinscription=$preinscription->id_preinscription;\n while ($coidc6<count($request->Jeudi)){\n $vend6= $request->Jeudi[$coidc6];\n if ($co6==1){\n $jour6->slot1=$vend6;\n }\n if ($co6==2){\n $jour6->slot2=$vend6;\n\n }\n if ($co6==3){\n $jour6->slot3=$vend6;\n\n }\n if ($vend6==1){\n $coidc6++;\n }\n $coidc6++;\n $co6++;\n }\n $jour6->save();\n// $preinscription->jours()->save($jour6);\n $jour6->inscription()->associate($preinscription);\n\n\n return redirect('admin/inscription');\n }", "function SaveSession() {\n $q = \"INSERT INTO `\" . TblSysSession . \"` SET\n `user_type`='\" . $this->user_type . \"',\n `user_id`='\" . $this->user_id . \"',\n `login`='\" . $this->login . \"',\n `email`='\" . $this->email . \"',\n `time`='\" . $this->logintime . \"',\n `session_id`='\" . $this->session_id . \"',\n `ip`='\" . $this->ip . \"',\n `ip2`='\" . $this->ip2 . \"',\n `user_hash`='\" . $this->user_hash . \"'\n \";\n $this->db->db_Query($q);\n //echo '<br> $q='.$q.' $this->db->result='.$this->db->result;\n if (!$this->db->result)\n return false;\n return true;\n }", "public function MyUpdate() {\n //var_dump($rs);\n\n DB::beginTransaction();\n\n\n /*\n DB::transaction(function() {\n $article = Articles::create(array(\n ''\n ));\n });\n */\n }" ]
[ "0.6130443", "0.58730024", "0.585787", "0.5848212", "0.57598346", "0.5742757", "0.5694043", "0.5692072", "0.56301326", "0.55071497", "0.5468164", "0.54680353", "0.5453752", "0.54107744", "0.5405953", "0.54050195", "0.5397282", "0.53329194", "0.5293373", "0.5280393", "0.52791065", "0.5261248", "0.5246858", "0.52441335", "0.5221606", "0.5220125", "0.51954216", "0.5195155", "0.5191855", "0.518857", "0.5174388", "0.51727164", "0.5167114", "0.51656383", "0.51632434", "0.51505667", "0.51454663", "0.5143015", "0.5139405", "0.51358896", "0.51340127", "0.5127368", "0.51150656", "0.5114366", "0.5110987", "0.5099245", "0.5082522", "0.50707257", "0.50665766", "0.5060479", "0.50553197", "0.50517684", "0.50513536", "0.50502115", "0.50500834", "0.50467443", "0.5038344", "0.50301254", "0.50194407", "0.5017887", "0.5012389", "0.50108504", "0.49985376", "0.49947625", "0.4990949", "0.49625647", "0.49594167", "0.49586698", "0.4950311", "0.49461782", "0.4945605", "0.49387577", "0.49384663", "0.49376172", "0.49371102", "0.49355274", "0.493095", "0.49180156", "0.49135053", "0.4896859", "0.48892316", "0.4887361", "0.48870128", "0.48869562", "0.4885443", "0.48842588", "0.4883444", "0.48755103", "0.4869703", "0.48667824", "0.4861091", "0.48579472", "0.48561785", "0.48422998", "0.48390925", "0.48390925", "0.48390925", "0.48390925", "0.48375025", "0.48353568", "0.48318216" ]
0.0
-1
Display a listing of the resource.
public function index() { return view('contentmanagement::Facility.index') ->withFacilities($this->facility->getLatest()); }
{ "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('contentmanagement::Facility.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(StoreRequest $request) { $data = $request->except('attachment'); $imageFile = $request->attachment; if ($imageFile) { $extension = strrchr($imageFile->getClientOriginalName(), '.'); $new_file_name = "facility_" . time(); $attachment = $imageFile->move($this->destinationpath, $new_file_name.$extension); $data['attachment'] = isset($attachment) ? $new_file_name . $extension : NULL; } $facility = $this->facility->create($data); if ($facility) { return redirect()->route('admin.content-management.facilities.index') ->withSuccessMessage('Facility is added successfully.'); } return redirect()->back() ->withInput() ->withWarningMessage('Facility can not be added.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229" ]
0.0
-1
Show the specified resource.
public function show() { // return view('contentmanagement::show'); }
{ "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 }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\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 show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function show($id) {}", "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 show(Question $question) // the show part requires an id (default)\n {\n //Show function does Route Model Binding, is the simple way of telling that this\n // function provides the id of the question by default\n return new QuestionResource($question);\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 return auth()->user()->getResource();\n }", "public function show($id)\n { \n \n }", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show($id)\n {\n // ..\n }", "public function show(Resena $resena)\n {\n }", "public function show($id)\n {\n $obj = Obj::where('id',$id)->first();\n \n $this->authorize('view', $obj);\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.show')\n ->with('obj',$obj)->with('app',$this);\n else\n abort(404);\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 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)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n // Code Goes Here\n }", "public function show(Show $show)\n {\n $this->authorize('basicView', $show);\n\n if (Auth::user()->can('view', $show)) {\n return $show->with(['hosts', 'invitees'])->first();\n }\n\n return new ShowResource($show);\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 }", "public function show($id) {\n\n\t}", "public function show($id){\n \n }", "public function show($id) {\n }", "public function show($id)\n {\n\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\n //\n }", "public function show($id) {\r\n //\r\n }", "public function show($id) {\r\n //\r\n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n \n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\r\n {\r\r\n //\r\r\n }", "public function show($id)\r\n {\r\n \r\n }", "public function show($id)\n {\n \n \n }", "public function show($id)\n {\n \n \n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }", "public function show($id)\n {\n\n }" ]
[ "0.86625683", "0.8656298", "0.7061081", "0.7016237", "0.69712675", "0.693585", "0.6916958", "0.68928856", "0.6802355", "0.66791755", "0.6661057", "0.6640048", "0.66189003", "0.66071963", "0.6594754", "0.65945184", "0.65812767", "0.65802205", "0.6552344", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65498114", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.65435684", "0.6540908", "0.6536351", "0.6528191", "0.6520638", "0.65174145", "0.65161794", "0.65081596", "0.6507456", "0.6507456", "0.6507456", "0.6506214", "0.6506214", "0.65002257", "0.65002257", "0.65002257", "0.65002257", "0.64964366", "0.64964366", "0.6491058", "0.6491058", "0.6491058", "0.6491058", "0.6489413", "0.6489413", "0.64893836", "0.6488436", "0.6481886", "0.6480796", "0.6480796", "0.6480326", "0.6477329", "0.6475613", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975", "0.6472975" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { return view('contentmanagement::Facility.edit') ->withFacility($this->facility->find($id)); }
{ "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(UpdateRequest $request, $id) { $data = $request->except('attachment'); $facility = $this->facility->find($id); $imageFile = $request->attachment; if ($imageFile) { if (file_exists($this->destinationpath . $facility->attachment) && $facility->attachment != '') { unlink($this->destinationpath . $facility->attachment); } $extension = strrchr($imageFile->getClientOriginalName(), '.'); $new_file_name = "facility_" . time(); $attachment = $imageFile->move($this->destinationpath, $new_file_name.$extension); $data['attachment'] = isset($attachment) ? $new_file_name . $extension : null; } $facility = $this->facility->update($id, $data); if($facility){ return redirect()->route('admin.content-management.facilities.index') ->withSuccessMessage('Facility is updated successfully'); } return redirect()->back() ->withInput() ->withWarningMessage('Facility can not be updated.'); }
{ "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) { $facility = $this->facility->find($id); $previousAttachment = $facility->attachment; $flag = $this->facility->destroy($id); if ($flag) { if (file_exists($this->destinationpath . $previousAttachment) && $previousAttachment != '') { unlink($this->destinationpath . $previousAttachment); } return response()->json([ 'type' => 'success', 'message' => 'Facility is deleted successfully.' ], 200); } return response()->json([ 'type' => 'error', 'message' => 'Facility can not be deleted.', ], 422); }
{ "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 whether the user can view the model.
public function manage(User $user, User $model) { return $user->is($model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isViewAllowed()\n {\n return $this->isAllowedAction('view');\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 canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\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 }", "private function canView(): bool\n {\n return true;\n }", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "public function canView()\n {\n return true;\n }", "public function view(User $user, User $model): bool\n {\n return $user->isRole('admin') || (\n $user->is($model) &&\n $user->tokenCan('users:view')\n );\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 isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}", "public function authorize()\n {\n $model = $this->resource()::$model;\n\n return $this->authorizeIfPolicyExists('viewAny', $model);\n }", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "private function canDisplay()\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 authorize()\n {\n return $this->user() != null;\n }", "public function canUserManageUsage()\n {\n return $this->getUser()->hasAccess('manage', 'newsUsage');\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "protected function requireViewableModel($model)\n {\n if (!$model->password) {\n return true;\n }\n\n if ($this->user && $model->userId) {\n if ($this->user->userId == $model->userId) {\n return true;\n }\n }\n\n if ($this->request->has('password')) {\n $passwordHasher = \\App::make('PasswordHasher');\n if ($passwordHasher->verify($this->request->input('password'), $model, 'password')) {\n return true;\n }\n }\n\n throw new HttpException(403, \"You don't have permission to view that.\");\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\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 authorize()\n {\n if ( ! $this->getRelease()->belongsToYou()) {\n return false;\n }\n return true;\n }", "public function view($user, $model)\n {\n if( $user->hasPermissionTo('view ' . static::$key) ) {\n return true;\n }\n\n return $user->id == $model->user_id;\n }", "public function canView()\n\t{\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'nexus' , 'transactions', 'transactions_manage' );\n\t}", "public function view(User $user, User $model)\n {\n return $user->is($model) || $user->hasPermissionTo('view users');\n }", "public function authorize()\n {\n return request()->user() != null;\n }", "public function view(User $user, User $model)\n {\n return $user->hasPermissionTo('user.view');\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 if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "public function isViewable()\n\t{\n\t\treturn true;\n\t}", "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 if(session('contact_key'))\n return true;\n\n if (! $this->user()->hasFeature(FEATURE_DOCUMENTS))\n return false;\n\n \n if ($this->invoice && $this->user()->cannot('edit', $this->invoice))\n return false;\n\n\n if ($this->expense && $this->user()->cannot('edit', $this->expense))\n return false;\n\n\n if($this->ticket && $this->user()->cannot('edit', $this->ticket))\n return false;\n\n\n return true;\n //return $this->user()->can('create');\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function canEdit()\n {\n if (!$this->site) {\n return false;\n }\n\n if (!$this->current_user) {\n return false;\n }\n\n if ($this->site->userIsVerified($this->current_user)) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n return (Auth::user()->type === User::VENDEDOR);\n }", "public function getUserCanEditAttribute()\n {\n return AccessControl::check($this, 'edit_post', false);\n }", "function canView($user) {\n if($this->isOwner()) {\n return true;\n } // if\n \n return in_array($this->getId(), $user->visibleCompanyIds());\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 if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n $article = Article::find($this->route('article'));\n return $article && $this->user()->can('update', $article);\n }", "public function isViewable()\n {\n return ($this->isPublished() && $this->isActive());\n }", "public function authorize()\n {\n return $this->user()->can('create', MarEntry::class);\n }", "public function canBeViewed() {}", "public function views(User $user)\n {\n \n //Check at the table level\n if(!$this->perm->can($user,'table',$this->tableSourceId,'read')){\n return false;\n }\n\n //Check at the model level\n if(!$this->modelCheckHelper($user,'read')){\n return false;\n }\n \n return true;\n }", "protected function _isAllowed()\n {\n switch ($this->getRequest()->getActionName()) {\n case 'new':\n case 'save':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserSaveVersion();\n break;\n case 'delete':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserDeleteVersion();\n break;\n case 'massDeleteRevisions':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserDeleteRevision();\n break;\n default:\n return Mage::getSingleton('admin/session')->isAllowed('cms/page');\n break;\n }\n }", "public function canUserManageAreaOfApplication()\n {\n return $this->getUser()->hasAccess('manage', 'newsAreaOfApplication');\n }", "public function authorize() {\n\t\t$this->competitor = $this->route('competitor');\n\t\treturn $this->user()->can('update', $this->competitor);\n\t}", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "public function authorize()\n {\n $user = Auth::user();\n $lecture = Lecture::findOrFail($this->route('lecture'));\n return $user->can('lecture-update') || $user->id == $lecture->user_id;\n }", "public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Template::class);\n }\n\n return $this->user()->can('update', Template::class);\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 view(Admin $admin, User $model)\n {\n return $admin->hasAccess(['users.view']);\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }", "public static function canDisplayUsersMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_USER);\n\t}", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\t$this->workFunction = $this->route('workFunction');\n\t\treturn $this->user()->can('update', $this->workplace) && $this->user()->can('update', $this->workFunction);\n\t}", "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "public function authorize()\n {\n $this->validate($this->rules());\n $user = auth()->user()->first();\n $type = ImageType::findOrFail($this->input('image_type_id'));\n $owner = $type->owner($this->owner_id)->first();\n\n return $user->can('view', $type) && $user->can('update', $owner);\n }", "public function canViewProfile() {\n\t\treturn (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions'));\n\t}", "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 $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 return $this->user()->can('manage-drafts');\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }", "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-inventory', 'manage-inventory'], true);\n }", "public function authorize(): bool\n {\n return Auth::check() &&\n $this->user()->tokenCan('view:store');\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function canView($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}", "public function authorize()\n {\n $id = $this->route('id');\n if ($id) {\n $giftList = GiftList::find($id);\n if (!$giftList || $giftList->user->id != Auth::user()->id) {\n return false;\n }\n }\n return true;\n }", "public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }", "public function authorize()\n {\n return $this->permissionGuard()->allowsCreate($this->newModelInstance());\n }", "public function can_read($model)\n {\n return true;\n }", "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 // User system not implemented\n return true;\n }", "public function authorize()\n {\n return auth()->user()->can('manage-users');\n }", "public function authorize()\n {\n $tag = $this->route()->parameter('tag');\n return Auth::user()->can('view', [Tag::class, $tag]);\n }", "public function authorize()\n {\n\t\treturn $this->user()->can('create', Collection::class);\n }", "public function canView($member = null) \n {\n return true;\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 authorize()\n {\n return $this->user()->can('update', $this->route('user'));\n }", "public function hasAccess(CharacterModel $characterModel){\n return true;\n }", "public function isViewer()\n\t{\n\t\treturn ($this->role == self::ROLE_VIEWER);\n\t}", "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 check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "function rordb_can_user_view_items(){\n return current_user_can('rordb_view_items');\n}", "public function shouldBeDisplayed()\n {\n return Auth::user()->can('browse', app(Property::class));\n }", "private function _validate_user() {\n\t\treturn (current_user_can(\"edit_posts\") && current_user_can(\"edit_pages\") && !empty($this->buttons));\n\t}", "public function view(User $user, User $model)\n {\n return $user->hasPermissionTo('benutzer-bearbeiten');\n }", "public function canView($member = null)\n {\n return (Security::getCurrentUser() !== null);\n }", "public function canView($member = null)\n {\n return (Security::getCurrentUser() !== null);\n }" ]
[ "0.74192244", "0.73926866", "0.73587644", "0.731265", "0.72216856", "0.72160876", "0.70797694", "0.70411503", "0.7034548", "0.6997131", "0.69464743", "0.68929696", "0.68870556", "0.6883539", "0.68338764", "0.68131477", "0.68131477", "0.6810962", "0.6809471", "0.68050355", "0.6778675", "0.6776682", "0.6769641", "0.6751002", "0.67459744", "0.6738256", "0.671839", "0.6715497", "0.6679256", "0.66769505", "0.6670623", "0.6669917", "0.6667145", "0.6667145", "0.66543984", "0.6650639", "0.664146", "0.6638868", "0.6627918", "0.6627863", "0.6613269", "0.6606334", "0.659827", "0.65866125", "0.658308", "0.65741354", "0.6573719", "0.65722454", "0.65690523", "0.6563277", "0.655688", "0.6552189", "0.6551965", "0.6547505", "0.65462095", "0.65334296", "0.65296036", "0.6526925", "0.65232396", "0.6521328", "0.6520021", "0.651323", "0.6511277", "0.6506836", "0.65053463", "0.6502409", "0.6501675", "0.65014297", "0.6500006", "0.6496442", "0.64907825", "0.6488437", "0.64826775", "0.64823425", "0.64817977", "0.6478919", "0.6477755", "0.6470501", "0.6464584", "0.6463797", "0.6461785", "0.6457558", "0.6451995", "0.6445705", "0.64404637", "0.64335376", "0.6431448", "0.6430977", "0.6428819", "0.6428819", "0.6428517", "0.6414907", "0.6411258", "0.6410245", "0.6409887", "0.64035416", "0.6402577", "0.6399193", "0.6394172", "0.6393471", "0.6393471" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "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() { $request = request(); return [ // 'payment_id'=>[ 'required', function ($attribute, $value, $fail) { TypePayments::findOrFail($value); } ], 'worker'=>[ function ($attribute, $value, $fail) use($request) { $user=User::findOrFail($value); if($user->role==="user"){ $fail("este id no tiene permiso de worker"); } } ], 'monto'=>[ 'required', function($attribute,$value,$fail){ if(!is_numeric($value)){ $fail("El monto debe ser numerico"); } } ] ]; }
{ "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 }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $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 }", "protected function get_validation_rules()\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 }", "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 defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\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.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "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 $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\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 $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 $user = request()->user('api');\n return $user->isSenior();\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 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 authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\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 isAuthorized() {\n\t\t\n\t}", "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 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 return $this->auth->check();\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\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 # if it's false, it will rejected\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 $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() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }", "public function authorize()\n {\n // User system not implemented\n return true;\n }", "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 $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.83993316", "0.8375539", "0.8375539", "0.8342643", "0.8251967", "0.82460433", "0.82116765", "0.8145634", "0.81104577", "0.8082012", "0.7990385", "0.79879874", "0.7982323", "0.79598", "0.7950402", "0.7948058", "0.7924861", "0.791403", "0.7900065", "0.78929263", "0.7889438", "0.7889062", "0.7859772", "0.784025", "0.784025", "0.78367263", "0.78233373", "0.7810954", "0.78078544", "0.7791974", "0.7786213", "0.77809906", "0.7780403", "0.7762602", "0.7753415", "0.7719186", "0.7719186", "0.77148265", "0.7711958", "0.77026594", "0.76933587", "0.76917106", "0.7690769", "0.76892334", "0.7672409", "0.7666123", "0.76643336", "0.7655159", "0.7649966", "0.76416695", "0.764124", "0.76408875", "0.763354", "0.76290715", "0.76281524", "0.7627133", "0.76194537", "0.76194537", "0.7612324", "0.76029295", "0.76026785", "0.76020855", "0.76020855", "0.76009095", "0.7597837", "0.7595531", "0.7588395", "0.7584404", "0.75799745", "0.7561946", "0.75524676", "0.75515926", "0.7550506", "0.754214", "0.7541809", "0.75383157", "0.75372314", "0.7526828", "0.7516738", "0.75132555", "0.74992996", "0.7494672", "0.7494361", "0.7491311", "0.7486893", "0.7486658", "0.7478788", "0.7476352", "0.7471286", "0.74702626", "0.7464707", "0.7463825", "0.7463139", "0.7462192", "0.7461708", "0.7447478", "0.74388486", "0.7434587", "0.7432738", "0.7430987", "0.7423138" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { $whs = new SWarehouse(); $location = new SLocation(); return [ 'code' => 'required', 'name' => 'required', 'whs_id' => 'required|exists:siie.'.$whs->getTable().',id_whs', ]; }
{ "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 }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $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 }", "protected function get_validation_rules()\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 }", "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 defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\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.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Local to this controller only; affects all actions, as loaded in init:
public function init() { //$this->_helper->viewRenderer->setNoRender(true); $registry = Zend_Registry::getInstance(); $this->view->report_server = $registry->get('report_server'); $this->view->basePath = $registry->get('basepath'); $this->basePath = $registry->get('basepath'); $this->view->pathUPLD = $registry->get('pathUPLD'); $this->view->procPath = $registry->get('procpath'); $this->klasifikasi = 'cdr'; $this->klasifikasi_serv = Klasifikasi_Service::getInstance(); //$this->cabang_serv = Cabang_Service::getInstance(); $this->sso_serv = Sso_User_Service::getInstance(); $ssoklasifikasi = new Zend_Session_Namespace('ssoklasifikasi'); $this->iduser =$ssoklasifikasi->userid; // $this->view->namauser = $this->sso_serv->getDataUserNama($this->iduser); $this->Logfile = new logfile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeController() {}", "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initializeAction() {}", "protected function initAction()\n {\n }", "public function contentControllerInit()\n\t{\n\t}", "public function initializeAction() {\n\n\t}", "protected function beforeAction () {\n\t}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function initializeAction() {}", "public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}", "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "private function actions()\n {\n }", "public function controller()\n\t{\n\t\n\t}", "protected function beforeAction() {\n\n }", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function preAction()\n {\n }", "public function init()\n {\n // setting current view class name\n $this->_sThisAction = strtolower(get_class($this));\n\n if (!$this->_blIsComponent) {\n // assume that cached components does not affect this method ...\n $this->addGlobalParams();\n }\n }", "public function init() {\n\t\t$this->load_actions();\n\t}", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "protected function initializeAction() {\n\t\t/* Merge flexform and setup settings\n\t\t * \n\t\t */\n\t\t$this->settings['action'] = $this->actionMethodName;\n\t}", "public function setup_actions() {}", "public function preAction() {\n\n }", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->resolution_summary = \"\";\n\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function preAction()\n {\n // Nothing to do\n }", "public function init()\n {\n $this->vars['CRUD']['Object'] = $this;\n $this->kernel = kernel();\n\n // Dynamic initialization\n if (! $this->modelName) {\n $modelRefl = new ReflectionClass($this->modelClass);\n $this->modelName = $modelRefl->getShortName();\n }\n\n\n if (! $this->crudId) {\n $this->crudId = \\Phifty\\Inflector::getInstance()->underscore($this->modelName);;\n }\n if (! $this->templateId) {\n $this->templateId = $this->crudId;\n }\n\n // Derive options from request\n if ($request = $this->getRequest()) {\n if ($useFormControls = $request->param('_form_controls')) {\n $this->actionViewOptions['submit_btn'] = true;\n $this->actionViewOptions['_form_controls'] = true;\n }\n }\n\n $this->reflect = new ReflectionClass($this);\n $this->namespace = $ns = $this->reflect->getNamespaceName();\n\n // XXX: currently we use FooBundle\\FooBundle as the main bundle class.\n $bundleClass = \"$ns\\\\$ns\";\n if (class_exists($bundleClass)) {\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n } else {\n $bundleClass = \"$ns\\\\Application\";\n $this->bundle = $this->vars['Bundle'] = $bundleClass::getInstance($this->kernel);\n }\n\n $this->vars['Handler'] = $this;\n $this->vars['Controller'] = $this;\n\n // anyway, we have the model classname, and the namespace, \n // we should be able to registerRecordAction automatically, so we don't have to write the code.\n if ($this->registerRecordAction) {\n $self = $this;\n $this->kernel->event->register('phifty.before_action',function() use($self) {\n $self->kernel->action->registerAction('RecordActionTemplate', array(\n 'namespace' => $self->namespace,\n 'model' => $self->modelName,\n 'types' => (array) $self->registerRecordAction\n ));\n });\n }\n\n\n $this->initPermissions();\n\n /*\n * TODO: Move this to before render CRUD page, keep init method simple\n\n if ( $this->isI18NEnabled() ) {\n $this->primaryFields[] = 'lang';\n }\n */\n $this->initNavBar();\n }", "function beforeFilter()\n {\n parent::beforeFilter();\n $this->Listing->controller = $this->name;\n $this->Listing->action = $this->action;\n\n # Make configuration available in models\n $this->Listing->Config = &$this->Config;\n }", "protected function initializeAction() {\n\t\t$this->akismetService->setCurrentRequest($this->request->getHttpRequest());\n\t}", "public function beforeRender()\n {\n $controller = $this->_registry->getController();\n\n $this->addToController($controller);\n }", "public static function init() {\n\t\tself::setup_actions();\n\t}", "public function __construct()\n\t{\n\t\t$this->actionable = \"\";\n\t\t$this->action_taken = \"\";\n\t\t$this->action_summary = \"\";\n\t\t$this->media_values = array(\n\t\t\t101 => Kohana::lang('ui_main.all'),\n\t\t\t102 => Kohana::lang('actionable.actionable'),\n\t\t\t103 => Kohana::lang('actionable.urgent'),\n\t\t\t104 => Kohana::lang('actionable.action_taken')\n\t\t);\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "public function initBaseController();", "function initialize(Controller $controller) {\n $this->controller=&$controller;\n \t}", "public function _initialize()\n {\n $this->cate=CONTROLLER_NAME;\n }", "public function AController() {\r\n\t}", "public function __construct()\n\t{\t\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function init() {\n\t\t\t\t\t\t$this->view->controller = $this->_request->getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->action = $this->_request->getParam ( 'action' );\n\t\t\t\t\t\t$this->getLibBaseUrl = new Zend_View_Helper_BaseUrl ();\n\t\t\t\t\t\t$this->GetModelOrganize = new Application_Model_ModOrganizeDb ();\n\t\t\t\t\t\t$this->_helper->ajaxContext->addActionContext('deleteOrganisme1','json')->initContext();\n\t\t\t\t\t\t// call function for dynamic sidebar\n\t\t\t\t\t\t$this->_Categories = new Application_Model_ModCatTerm ();\n\t\t\t\t\t\t$parent_id = $this->_getParam ( 'controller' );\n\t\t\t\t\t\t$this->view->secondSideBar = $this->_Categories->showCateParent ( $parent_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public function initController()\n {\n $this->model = new AliveSettingServiceMeta();\n\n $this->middleware([\n\n ]);\n }", "function __construct()\n {\n parent::Controller();\n }", "function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}", "function & DefaultIndexAction (&$controller)\n {\n\n parent::Action($controller);\n\n }", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function __construct()\n\t{\t\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "private function setController()\n\t\t{\n\t\t\t$this->_controller = $this->_separetor[1];\n\t\t}", "protected function initializeAction()\n\t{\n\t\tparent::init('Form');\n\t}", "public function newAction()\n\t{\n\t}", "public function initialize()\n {\n parent::initialize();\n $nav_selected = [\"slides\"];\n $this->set('nav_selected', $nav_selected);\n\n // Allow full access to this controller\n //$this->Auth->allow();\n }", "protected function getAction() {}", "public function addAction()\n\t{\n\n\t}", "public function __construct($controller, $action) {\n parent::__construct($controller, $action); //parent is Controller.php\n }", "public function init()\n {\n $this->projectController->init();\n }", "public function __construct()\n\t{\n\t\t// Hook into routing\n\t\tEvent::add('system.pre_controller', array($this, 'add'));\n\t}", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n\n }", "public function newAction()\n {\n }", "protected function initAction()\r\n {\r\n $return = false;\r\n\r\n // parse request URI\r\n $parts_url = parse_url(strtolower(trim($_SERVER['REQUEST_URI'], '/')));\r\n // @TODO: fix\r\n $parts_url_array = explode('/', $parts_url['path']);\r\n list($this->controllerName, $this->itemId) = $parts_url_array;\r\n\r\n // parse method\r\n $this->requestMethod = strtolower($_SERVER['REQUEST_METHOD']);\r\n\r\n switch ($this->requestMethod) {\r\n case 'get':\r\n // default actions for GET\r\n if ($this->controllerName == 'login' || $this->controllerName == 'logout') {\r\n $this->actionName = $this->controllerName;\r\n $this->controllerName = 'users';\r\n } elseif (is_null($this->itemId)) {\r\n $this->actionName = 'index';\r\n } else {\r\n $this->actionName = 'view';\r\n }\r\n break;\r\n case 'post':\r\n // default action for POST\r\n $this->actionName = 'add';\r\n break;\r\n case 'put':\r\n // default action for PUT\r\n $this->actionName = 'edit';\r\n break;\r\n case 'delete':\r\n // default action for DELETE\r\n $this->actionName = 'delete';\r\n break;\r\n }\r\n\r\n if (!$this->controllerName) {\r\n $this->controllerName = 'main';\r\n }\r\n if (!$this->actionName) {\r\n $this->actionName = 'index';\r\n }\r\n\r\n // get, check & requre class\r\n $className = sprintf('mob%s', ucfirst($this->controllerName));\r\n $className = 'pages\\\\' . $className;\r\n \r\n if (class_exists($className)) {\r\n //create a instance of the controller\r\n $this->controller = new $className();\r\n\r\n //check if the action exists in the controller. if not, throw an exception.\r\n $actionName = sprintf('action%s', ucfirst($this->actionName));\r\n if (method_exists($this->controller, $actionName) !== false) {\r\n $this->action = $actionName;\r\n // set request params\r\n if ($this->itemId) {\r\n $this->controller->setParams(array('id' => $this->itemId));\r\n }\r\n $this->controller->setRequestParams($this->requestMethod);\r\n\r\n $return = true;\r\n } else {\r\n $this->controller->httpStatusCode = HTTP_STATUS_METHOD_NOT_ALLOWED;\r\n// throw new \\Exception('Action is invalid.');\r\n }\r\n } else {\r\n $this->controller = new clsMobController();\r\n $this->controller->httpStatusCode = HTTP_STATUS_NOT_FOUND;\r\n// throw new \\Exception('Controller class is invalid.');\r\n }\r\n\r\n return $return;\r\n }", "public function addAction() {\r\n\t}", "public function navigationiniAction()\n {\n }", "public function indexAction() {\r\n \r\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 annimalEditAction()\n {\n }", "public function newAction() {\n\t}", "public function init()\n {\n $actionName = Yii::$app->controller->action->id;\n $function = new \\ReflectionClass($this->model->className());\n $modelName = $function->getShortName();\n $this->permissionSave = PermissionHelper::findPermissionModelAction($modelName, $actionName);\n\n parent::init();\n\n $this->initVariablesI18n();\n }", "public function annimalAddAction()\n {\n }", "public function init()\n {\n $controller = $this->router->getController();\n $action = $this->router->getAction();\n $params = $this->router->getParams();\n\n $objController = registerObject($controller);\n\n call_user_func_array([$objController, $action], $params);\n }", "public function __construct() {\n\t\t\t$this->init_globals();\n\t\t\t$this->init_actions();\n\t\t}", "public function __construct()\n {\n $this->model = new MainModel();\n $this->params[\"pagination\"][\"totalItemsPerPage\"] = 5;\n view()->share ('controllerName', $this->controllerName);//đặt controllerName cho all action\n }", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function addAction() {\n\t}", "public function indexAction ()\r\n {\r\n\r\n }", "private function add_actions()\n {\n }", "function controller()\n\t\t{\t\n\t\t\t$this->admin_page_header();\n\t\t\t$this->admin_menu();\n\t\t}", "public function newAction() {\n\n\t}" ]
[ "0.75581604", "0.72871983", "0.72871983", "0.7188777", "0.7187654", "0.7187654", "0.71781296", "0.7008648", "0.6946577", "0.6917168", "0.6881624", "0.6881624", "0.6881624", "0.6881624", "0.6881624", "0.6835926", "0.68160886", "0.6740656", "0.67155033", "0.6671791", "0.66591066", "0.66443044", "0.6623962", "0.6616537", "0.6598137", "0.65317714", "0.6527385", "0.65260583", "0.6497784", "0.6494092", "0.6493112", "0.6477056", "0.64669245", "0.6449213", "0.6440564", "0.6403958", "0.6398224", "0.6378298", "0.63692504", "0.63542324", "0.63371336", "0.6333032", "0.63240683", "0.6312689", "0.6306432", "0.6279571", "0.62792355", "0.6260274", "0.6260274", "0.6245828", "0.6219882", "0.62116146", "0.6207662", "0.61929077", "0.61798394", "0.6178377", "0.6173879", "0.6172616", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6170152", "0.6169827", "0.61662036", "0.61579424", "0.61364776", "0.6134895", "0.6134145", "0.6131879", "0.6128626", "0.61247754", "0.61221224", "0.61202675", "0.611813", "0.61107916", "0.61084425", "0.61084425", "0.61084425", "0.6107351", "0.6106125", "0.6103226", "0.6096497" ]
0.0
-1
Install quote custom data
public function installQuoteData() { $quoteInstaller = $this->quoteSetupFactory->create( [ 'resourceName' => 'quote_setup', 'setup' => $this->setup ] ); $quoteInstaller ->addAttribute( 'quote', CustomFieldsInterface::CHECKOUT_PURPOSE, ['type' => Table::TYPE_TEXT, 'length' => '255', 'nullable' => true] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fastQuote_install() {\n require_once('fastQuote.settings.php');\n fastQuoteInstaller::install();\n\n rebuild_settings();\n}", "function install($data = '')\n {\n parent::install();\n }", "function install($data = '')\n {\n parent::install();\n }", "function install($data='') {\r\n parent::install();\r\n }", "function install($data='') {\r\n parent::install();\r\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n\n\n }", "public function installWordpressData() {\n }", "public function install($data = array()) {\n\t\t$this->pkg = parent::install();\n\n\t// Installing\n\t\t $this->installOrUpgrade($data);\n\t}", "function install() {}", "function dbInstall($data='') {\n/*\nmixcloud_favorites - \n*/\n $data = <<<EOD\n mixcloud_favorites: ID int(10) unsigned NOT NULL auto_increment\n mixcloud_favorites: TITLE varchar(100) NOT NULL DEFAULT ''\n mixcloud_favorites: STREAM varchar(255) NOT NULL DEFAULT ''\n mixcloud_favorites: ITEM_ID varchar(255) NOT NULL DEFAULT '' \nEOD;\n parent::dbInstall($data);\n }", "function dbInstall($data) {\n/*\napp_vkbot - \n*/\n $data = <<<EOD\n app_vkbot: ID int(10) unsigned NOT NULL auto_increment\n app_vkbot: TITLE varchar(100) NOT NULL DEFAULT ''\n app_vkbot: COLOR varchar(255) NOT NULL DEFAULT ''\n app_vkbot: VAL varchar(255) NOT NULL DEFAULT ''\n app_vkbot: CODE varchar(255) NOT NULL DEFAULT ''\nEOD;\n parent::dbInstall($data);\n }", "function install(){}", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "function qoorate_install() {\n\tadd_option('qoorate_api_key', '');\n\tadd_option('qoorate_api_secret', '');\n\tadd_option('qoorate_api_shortname', '');\n}", "function install()\n {\n }", "function install($data='') {\n subscribeToEvent($this->name, 'SAY');\n parent::install();\n }", "public function install(){\r\n\t\t\r\n\t}", "public function install()\n {\n $this->installClasses();\n $this->command();\n $this->markInstalled();\n //or call parent::install(); \n }", "public function install() {\n\n\n }", "public function install();", "public function install();", "public function install() {\r\n \r\n }", "public static function install(){\n\t}", "public function install()\n {\n }", "public function install()\n {\n }", "protected function install(){ return true;}", "public function install() {\n $this->load->model('extension/module/export_yml');\n $this->model_extension_module_export_yml->installPromCategoryTable();\n $this->model_extension_module_export_yml->installPromProductTable();\n }", "public function beforeInstall()\n\t{}", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "function install($data='') {\r\n @umask(0);\r\n if (!Is_Dir(ROOT.\"./cms/products/\")) {\r\n mkdir(ROOT.\"./cms/products/\", 0777);\r\n }\r\n parent::install();\r\n }", "public static function install()\n\t{\n\t\tmanpower_create_page_with_slug(MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_catalog_slug', MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_worker_slug', MANPOWER_DEFAULT_WORKER_SLUG);\t\t\n\t}", "public function install()\n {\n Configuration::updateValue('APISFACT_PRESTASHOP_TOKEN', '');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEF', 'F001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROF', '0');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEB', 'B001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROB', '0');\n\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayAdminOrderLeft') &&\n $this->registerHook('displayAdminOrderMain');\n }", "function install() {\n\t\tsafe_query('DELETE FROM '.safe_pfx('txp_prefs').' WHERE name LIKE \"wlk_phsb_%\"');\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_notifications_instant',val = '1',type = '1',event = 'wlk_phsb',html = 'yesnoradio',position = '10',user_name = ''\");\n\t\tsafe_insert('txp_prefs',\"prefs_id = '1',name = 'wlk_phsb_endpoints',val = '\".implode(\"\\n\", $this->vars['endpoints']).\"',type = '1',event = 'wlk_phsb',html = 'wlk_phsb_textarea',position = '60',user_name = ''\");\n\t}", "public static function run_install()\n {\n global $wpdb;\n\n // Create Base Table in mysql\n //$charset_collate = $wpdb->get_charset_collate();\n //require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n }", "public function postInstallCmd(){\n\n \\Disco\\manage\\Manager::install();\n\n }", "public function installSalesData()\n {\n $salesInstaller = $this->salesSetupFactory->create(\n [\n 'resourceName' => 'sales_setup',\n 'setup' => $this->setup\n ]\n );\n $salesInstaller\n ->addAttribute(\n 'order',\n CustomFieldsInterface::CHECKOUT_PURPOSE,\n ['type' => Table::TYPE_TEXT, 'length' => '255', 'nullable' => true, 'grid' => false]\n );\n }", "public function preInstall()\n {\n }", "function install() {\n /*\n * do some stuff at install db table creation/modification, email template creation etc.\n * \n * \n */\n return parent::install();\n }", "function install()\n {\n \t// Creating tables\n\t\t\tinclude('db/tables.php');\n }", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "public function initialInstall()\n\t\t{\n\t\t\t$installer = $this->getInstaller();\n\t\t\t$installer->newTable($installer->getResourceTable('core/extension'))\n\t\t\t->addColumn('code', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t'primary' => TRUE,\n\t\t\t\t),'Extension identifier')\n\t\t\t->addColumn('version', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t),'The currently installed version of this extension')\n\t\t\t->setComment('List of ZeroG installed extensions and their version number');\n\t\t\t$installer->run();\n\t\t}", "public function install()\r\n {\r\n if (!get_option('ohs_newsletter_installed')) {\r\n global $wpdb;\r\n $charset_collate = $wpdb->get_charset_collate();\r\n $fullTableName = $wpdb->prefix . self::$tableName;\r\n\r\n $sql = \"CREATE TABLE $fullTableName (\r\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n first_name varchar(100) NOT NULL,\r\n last_name varchar(100) NOT NULL,\r\n email varchar(100) NOT NULL,\r\n validation_code varchar(200) NOT NULL,\r\n PRIMARY KEY id (id)\r\n ) $charset_collate;\";\r\n\r\n dbDelta($sql);\r\n add_option('ohs_newsletter_installed', 1);\r\n\r\n add_option('ohs_newsletter_sendgrid_api', \"\");\r\n add_option('ohs_newsletter_sendgrid_list', \"\");\r\n add_option('ohs_newsletter_redirect', \"\");\r\n }\r\n }", "private function _install() {\r\n// `id` int(11) NOT NULL,\r\n// `language_id` int(11) NOT NULL,\r\n// `human_name` mediumtext NOT NULL,\r\n// `machine_name` varchar(255) NOT NULL,\r\n// `is_active` enum('0','1') NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n// CREATE TABLE IF NOT EXISTS `security_attributes_values` (\r\n// `id` int(11) NOT NULL,\r\n// `user_id` int(11) NOT NULL,\r\n// `attribute_id` int(11) NOT NULL,\r\n// `value` mediumtext NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n }", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "abstract public function installSQL();", "protected function afterInstall()\n {\n }", "function install() {\n\t\t$config ['username'] = '';\n\t\t$config ['password'] = '';\n\t\t;\n\t\t$config ['signature'] = '';\n\t\t$config ['currency'] = 'EUR'; // default\n\t\t\n\n\t\t$config ['SANDBOX'] = true;\n\t\t\n\t\t$config ['enabled'] = \"0\";\n\t\t\n\t\t//not normally user configurable\n\t\t$config ['return_url'] = \"\";\n\t\t$config ['cancel_url'] = \"\";\n\t\t\n\t\t$this->CI->Settings_model->save_settings ( 'bnp_parisbas', $config );\n\t}", "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "public function install() {\n\t\t$api_key = String::generate_key();\n\t\t$get_existing_key = get_option( $this->api_key_option_name );\n\t\tif ( false == $get_existing_key ) {\n\t\t\tupdate_option( $this->api_key_option_name, $api_key );\n\t\t}\n\t}", "public function install()\n\t{\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tShop::setContext(Shop::CONTEXT_ALL);\n\t\t}\n\n\t\t//initialize empty settings\n\t\tConfiguration::updateValue('CLERK_PUBLIC_KEY', '');\n\t\tConfiguration::updateValue('CLERK_PRIVATE_KEY', '');\n\n\t\tConfiguration::updateValue('CLERK_SEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_SEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_INCLUDE_CATEGORIES', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_TEMPLATES', '');\n\n\t\treturn parent::install() &&\n $this->registerHook('top') &&\n\t\t\t$this->registerHook('footer') &&\n\t\t\t$this->registerHook('displayOrderConfirmation');\n\t}", "function dbInstall($data='')\n {\n $data = <<<'EOD'\n apiai_actions: ID int(10) unsigned NOT NULL auto_increment\n apiai_actions: TITLE varchar(255) NOT NULL DEFAULT ''\n apiai_actions: LATEST_PARAMS varchar(255) NOT NULL DEFAULT '' \n apiai_actions: LATEST_USAGE datetime\n apiai_actions: CODE text\n\n apiai_entities: ID int(10) unsigned NOT NULL auto_increment\n apiai_entities: NAME varchar(255) NOT NULL DEFAULT ''\n apiai_entities: LAST_EXPORT datetime\n apiai_entities: CODE text\nEOD;\n parent::dbInstall($data);\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$terminals = SQLSelect('select NAME, TITLE from terminals');\n$total = count($terminals);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $entries[] = array('value' => $terminals[$i]['NAME'], 'synonyms' => array($terminals[$i]['TITLE']));\n}\n\n$entity = array(\n 'name' => 'terminal',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'terminal'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'terminal', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$users = SQLSelect('select USERNAME, NAME from users');\n$total = count($users);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $entries[] = array('value' => $users[$i]['USERNAME'], 'synonyms' => array($users[$i]['NAME']));\n}\n\n$entity = array(\n 'name' => 'user',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'user'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'user', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$rooms = getObjectsByClass('Rooms');\n$total = count($rooms);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $name = $rooms[$i]['TITLE'];\n $entry = array('value' => $name);\n $title = gg($rooms[$i]['TITLE'].'.Title');\n if($title)\n $entry['synonyms'] = array($title);\n $entries[] = $entry;\n}\n\n$entity = array(\n 'name' => 'room',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'room'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'room', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n }", "private function send_products_to_quote(ck_quote $quote) {\n\t\tself::query_execute('INSERT INTO customer_quote_products (customer_quote_id, product_id, parent_products_id, option_type, price, quantity) SELECT :customer_quote_id, products_id, parent_products_id, option_type, IFNULL(quoted_price, unit_price), quantity FROM ck_cart_products WHERE cart_id = :cart_id', cardinality::NONE, [':customer_quote_id' => $quote->id(), ':cart_id' => $this->id()]);\n\t\tself::query_execute('DELETE FROM ck_cart_products WHERE cart_id = :cart_id', cardinality::NONE, [':cart_id' => $this->id()]);\n\t}", "public function install() {\n\n\t\trequire_once( $this->get_plugin_path() . '/includes/admin/class-wc-cog-admin.php' );\n\n\t\t// install default settings\n\t\tforeach ( WC_COG_Admin::get_global_settings() as $setting ) {\n\n\t\t\tif ( isset( $setting['default'] ) ) {\n\t\t\t\tupdate_option( $setting['id'], $setting['default'] );\n\t\t\t}\n\t\t}\n\t}", "public function install(){\n\n\t\t$model = Advertikon::getCurrentModel();\n\n\t\ttry {\n\t\t\t$this->_checkCompatibility();\n\t\t}\n\t\tcatch( Exception\\Transport $e ) {\n\t\t\t$this->errorPage( $e->getData() , 424 , 'Failed Dependency' );\n\t\t}\n\n\t\t$this->_install();\n\n\t\t$config = Advertikon::getXmlConfig();\n\t\t$settingsModel = Advertikon::getExtendedModel( 'setting_setting' );\n\t\t$settings = $model->stripPrefix( $settingsModel->getSetting() );\n\t\t$model->merge( $settings , $config->getValues( '/' ) );\n\t\t$settingsModel->editSetting( $settings );\n\n\t\t//mark the extension as installed\n\t\tAdvertikon::getExtendedModel( 'setting_setting' )->setSettingValue( 'installed' , 1 );\n\t}", "protected function install() {\n\n\t\t// include settings so we can install defaults\n\t\t$settings = $this->load_class( '/includes/admin/class-wc-avatax-settings.php', 'WC_AvaTax_Settings' );\n\n\t\t// install default settings for each section\n\t\tforeach ( $settings->get_settings() as $setting ) {\n\n\t\t\tif ( isset( $setting['default'] ) ) {\n\n\t\t\t\tupdate_option( $setting['id'], $setting['default'] );\n\t\t\t}\n\t\t}\n\n\t\t$this->maybe_migrate();\n\t}", "public static function install() \r\n\t{\r\n\t\tself::uninstall();\r\n\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->mp_mailmeta SET meta_key = %s WHERE meta_key = %s;\", self::meta_key, 'batch_spool_send' ) );\r\n\r\n\t\tMP_Log::set_option( self::log_name );\r\n\r\n\t\tdo_action( 'MailPress_schedule_batch_spool_send' );\r\n\t}", "function kkm_install() {\r\n\tglobal $wpdb, $install_sql;\r\n\t\r\n\t//Remove database tables if present\r\n\tkkm_uninstall(true);\r\n\t\r\n\t$wpdb->flush();\r\n\t$wpdb->query('begin'); //Start transaction\r\n\t\r\n\t/*\r\n\t * Run install script command by command\r\n\t */\r\n\t$error_occured = false;\r\n\t$sql_commands = preg_split('/(?<!\\\\\\\\);/', $install_sql);\r\n\tforeach ($sql_commands as $command) {\r\n\t\t$command = trim($command);\r\n\t\tif (!empty($command)) {\r\n\t\t\t$wpdb->flush();\r\n\t\t\t$wpdb->query($command);\r\n\t\t\tif (!empty($wpdb->last_error)) {\r\n\t\t\t\techo($command.\"\\n\\n\");\r\n\t\t\t\techo($wpdb->last_error);\r\n\t\t\t\t$error_occured = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//Add format tags supported by the modules\r\n\tkkm_install_format_tags();\r\n\t\r\n\tif ($error_occured) {\r\n\t\t$wpdb->query('rollback'); //Roll back changes\r\n\t\tdie(__('Cannot create database tables.','kkm'));\r\n\t} else {\r\n\t\t$wpdb->query('commit'); //Commit\r\n\t}\r\n\t\r\n\t/*\r\n\t * Create dir struct for user data\r\n\t */\r\n\t$dirs = array(\r\n\t\t'kkm_dir' =>\t\tWP_CONTENT_DIR.'/kkm',\r\n\t\t'temp_dir' =>\t\tWP_CONTENT_DIR.'/kkm/temp',\r\n\t\t'doc_dir' =>\t\tWP_CONTENT_DIR.'/kkm/docs'\r\n\t);\r\n\t$stat = @stat(WP_CONTENT_DIR);\r\n\t$mode = $stat['mode'];// & 0000666;\r\n\tforeach ($dirs as $dir) {\r\n\t\tif (!is_dir($dir)) {\r\n\t\t\tmkdir($dir);\r\n\t\t}\r\n\t\t@chmod($dir, $mode);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Write .htaccess files\r\n\t */\r\n\t$htaccess_content = \"deny from all\";\r\n\tfile_put_contents($dirs['kkm_dir'].'/.htaccess', $htaccess_content);\r\n}", "public function install()\n {\n return parent::install()\n && $this->registerHook('payment')\n && $this->registerHook('paymentReturn')\n && $this->defaultConfiguration()\n && $this->createDatabaseTables();\n }", "public function afterInstall()\n\t{}", "function crowdx_install(){\r\n if (!is_plugin_active('phpx/phpx.php')){\r\n die('CrowdX requires the <a href=\"http://www.phpx.org/\" target=\"_new\">PHPX Framework</a>. Please install PHPX and then reinstall CrowdX.');\r\n }\r\n \r\n if (!get_option('crowdx_options')){\r\n //$sql = 'CREATE TABLE IF NOT EXISTS `' . $this->wpdb->prefix . '_cx_user` ( `wp_user_id` int(10) NOT NULL, `cx_user_active` tinyint(1) NOT NULL DEFAULT \\'0\\', UNIQUE KEY `wp_user_id` (wp_user_id`), KEY `cx_user_active` (`cx_user_active`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;';\r\n //$this->wpdb->query($sql);\r\n \r\n $options = array();\r\n $options['enable'] = false;\r\n $options['all_users'] = false;\r\n $options['server'] = 'http://yourserver';\r\n \r\n \r\n update_option('crowdx_options', $options);\r\n }\r\n }", "function dbInstall() {\r\n\r\n $data = <<<EOD\r\n scheduled_job: scheduled_job_id int(10) unsigned NOT NULL auto_increment\r\n scheduled_job: name varchar(255) NOT NULL DEFAULT ''\r\n scheduled_job: crontab varchar(200) DEFAULT NULL, \r\n scheduled_job: last_run_date datetime DEFAULT NULL, \r\n scheduled_job: next_run_date datetime DEFAULT NULL, \r\n scheduled_job: status int(11) NOT NULL DEFAULT '0', \r\n scheduled_job: is_active tinyint(1) NOT NULL DEFAULT '0', \r\n scheduled_job: is_periodical tinyint(1) NOT NULL DEFAULT '0',\r\n\r\n scheduled_job_action: scheduled_job_action_id int(10) unsigned NOT NULL AUTO_INCREMENT, \r\n scheduled_job_action: type_id` int(11) NOT NULL, \r\n scheduled_job_action: scheduled_job_id int(11) NOT NULL, \r\n scheduled_job_action: params` varchar(200) NOT NULL\r\n \r\nEOD;\r\n parent::dbInstall($data);\r\n }", "function ss_options_install() {\n\n global $wpdb;\n\n $table_name = $wpdb->prefix . \"company\";\n $charset_collate = $wpdb->get_charset_collate();\n $sql = \"CREATE TABLE $table_name (\n `id` varchar(3) CHARACTER SET utf8 NOT NULL,\n `company_name` varchar(50) CHARACTER SET utf8 NOT NULL,\n\t\t `year_of_incorporation` varchar(50) CHARACTER SET utf8 NOT NULL,\n \t `industry` varchar(150) CHARACTER SET utf8 NOT NULL,\n\t\t\t`country` varchar(150) CHARACTER SET utf8 NOT NULL,\n\t\t\t`subsidiaries` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`website` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`CEO` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`board_members` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t `key_investors` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t \t`asset_price` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`mission_statements` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`awards` varchar(300) CHARACTER SET utf8 NOT NULL,\n\t\t\t`about` varchar(300) CHARACTER SET utf8 NOT NULL,\n\n PRIMARY KEY (`id`)\n ) $charset_collate; \";\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta($sql);\n}", "protected function quote()\n {\n }", "function dbInstall($data) {\r\n/*\r\nwatchfolders - Watchfolders\r\n*/\r\n $data = <<<EOD\r\n watchfolders: ID int(10) unsigned NOT NULL auto_increment\r\n watchfolders: TITLE varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: FOLDER varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: CHECK_MASK varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: CHECK_LATEST datetime\r\n watchfolders: CHECK_NEXT datetime\r\n watchfolders: CHECK_INTERVAL int(255) NOT NULL DEFAULT '0'\r\n watchfolders: SCRIPT_ID int(10) NOT NULL DEFAULT '0'\r\n watchfolders: CHECK_SUB int(3) NOT NULL DEFAULT '0'\r\n watchfolders: SCRIPT_TYPE int(255) NOT NULL DEFAULT '0'\r\n watchfolders: CHECK_RESULTS longtext\r\n\r\nEOD;\r\n parent::dbInstall($data);\r\n }", "function fn_divido_install()\n{\n fn_divido_uninstall();\n\n db_query(\"INSERT INTO ?:payment_processors ?e\", array (\n 'processor' => 'Divido',\n 'processor_script' => 'divido.php',\n 'processor_template' => 'addons/divido/views/orders/components/payments/divido.tpl',\n 'admin_template' => 'divido.tpl',\n 'callback' => 'Y',\n 'type' => 'P'\n ));\n}", "function convertizer_install() {\nadd_option(\"convertizer_data\", 'Default', '', 'yes');\n}", "function hookInstall() {\n// $db = get_db()cou;\n//die(\"got to the installer method...\");\n $this->_saveVocabularies();\n }", "public static function wpa_install() {\n \tglobal $wpdb;\n \t$charset_collate = $wpdb->get_charset_collate();\n \t\t$table = $wpdb->prefix.'manage_list'; \n\t\t$sql = \"CREATE TABLE $table(\n\t\t\t\tlist_id int(10),\n\t\t\t\tFirstName varchar(55),\n\t\t\t\tLastName varchar(55),\n\t\t\t\tuser_gender varchar(10),\n\t\t\t\tuser_no int(10),\n\t\t\t\tuser_city varchar(55),\n\t\t\t user_dob varchar(55),\n\t\t\t\tuser_email varchar(55),\n\t\t\t\tuser_mobile_no varchar(55),\n\t\t\t\tuser_img varchar(55),\n\t\t\t\tuser_lang varchar(55)\n\t \t\t)$charset_collate;\";\n\t\trequire_once(ABSPATH.'wp-admin/includes/upgrade.php');\n\t\t$wpdb->query($sql);\n }", "function insta_f_install(){\n}", "public function install(){\n\n return true;\n\n }", "public function onAfterInstall()\n {\n $ingredients = array(\n array('name' => 'Gin'),\n array('name' => 'Tonic'),\n array('name' => 'Lime'),\n array('name' => 'Soda'),\n array('name' => 'Vodka'),\n );\n\n foreach ($ingredients as $ingredient) {\n craft()->db->createCommand()->insert('cocktailrecipes_ingredients', $ingredient);\n }\n }", "public function install()\n\t{\n\t\tConfiguration::updateValue('ORDERLIST_LIVE_MODE', false);\n\n\t\tinclude(dirname(__FILE__).'/sql/install.php');\n\n\t\treturn parent::install() &&\n\t\t\t$this->registerHook('header') &&\n\t\t\t$this->registerHook('backOfficeHeader') &&\n\t\t\t$this->registerHook('displayCustomerAccount') &&\n\t\t\t$this->registerHook('displayProductAdditionalInfo');\n\t}", "protected function install() \r\n {\r\n new tablamarcas();\r\n return '';\r\n }", "private function install() {\n global $DB, $USER;\n $DB->query(\"CREATE TABLE IF NOT EXISTS `\".$this->DBTable.\"` (\n `section` varchar(255) character set utf8 NOT NULL,\n `property` varchar(255) character set utf8 NOT NULL default '',\n `value` text character set utf8 NOT NULL,\n `type` enum('text','CSV','not_editable','select','set','check','password') character set utf8 NOT NULL default 'text',\n `description` text character set utf8 NOT NULL,\n `set` blob NOT NULL,\n KEY `section` (`section`),\n KEY `property` (`property`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci;\");\n }", "public function install() {\n\n if (!parent::install()\n || !$this->registerHook('payment')\n || !$this->config->install()\n ) {\n return false;\n }\n return true;\n }", "function install()\n {\n $query = parent::getList( 'user_name = \\'[email protected]\\'' );\n \n if( $query->num_rows() == 0 )\n {\n $data = array(\n 'user_name' => '[email protected]',\n 'password' => sha1('rkauqkf.'),\n 'role' => 'admin',\n 'is_active' => '1',\n 'd_o_c'=>date(\"Y/m/d\"),\n );\n \n parent::add($data);\n }\n }", "abstract public function Quote($data);", "public function install()\n {\n include dirname(__FILE__) . '/sql/install.php';\n Configuration::updateValue('WI_SPENT_ENABLED', '0');\n Configuration::updateValue('WI_SPENT_AMOUNT', '');\n Configuration::updateValue('WI_SPENT_COUPON', '');\n Configuration::updateValue('WI_SPENT_DAYS', '30');\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionValidateOrder') &&\n $this->registerHook('postUpdateOrderStatus') &&\n $this->registerHook('actionOrderStatusPostUpdate') &&\n $this->registerHook('displayOrderConfirmation');\n }", "public function install()\n {\n return parent::install()\n && $this->registerHook('actionObjectOrderAddBefore')\n && Configuration::updateValue('ORDERREF_LENGTH', self::ORDERREF_LENGTH_DEFAULT)\n && Configuration::updateValue('ORDERREF_MODE', self::ORDERREF_MODE_RANDOM)\n ;\n }", "public function install() {\n\t\t\t// depends on \"oembed_field\"\n\t\t\tif (!static::checkDependency('oembed_field')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!static::checkDependencyVersion('oembed_field', '1.8.9')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// depends on \"languages\"\n\t\t\tif (!static::checkDependency('languages')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// depends on \"frontend_localisation\"\n\t\t\tif (!static::checkDependency('frontend_localisation')) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tself::requireoEmbed();\n\t\t\t$create = FieldMultilingual_oembed::createFieldTable();\n\t\t\treturn $create;\n\t\t\t\n\t\t}", "function cmdInstall()\n\t{\n\t\t$cmd = $this->cmd;\n\t\tswitch ($this->cmd)\n\t\t{\n\t\t\tcase NULL:\n\t\t\tcase \"preliminaries\":\n\t\t\t\t$this->setup->checkPreliminaries();\n\t\t\t\t$this->displayPreliminaries();\n\t\t\t\tbreak;\n\n\t\t\tcase \"install\":\n\t\t\t\t$this->displayMasterSetup();\n\t\t\t\tbreak;\n\n\t\t\tcase \"determineToolsPathInstall\":\n\t\t\t\t$this->determineToolsPathInstall();\n\t\t\t\tbreak;\n\n\t\t\tcase \"saveBasicSettings\":\n\t\t\t\t$this->$cmd();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->displayError($this->lng->txt(\"unknown_command\"));\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function install()\n {\n Configuration::updateValue('MF_TITLE', 'Our Favourite Brands');\n Configuration::updateValue('MF_DESCRIPTION', 'Browse our favourite brands');\n Configuration::updateValue('MF_MAN_NUMBER', 0);\n Configuration::updateValue('MF_PER_ROW_DESKTOP', 4);\n Configuration::updateValue('MF_PER_ROW_TABLET', 3);\n Configuration::updateValue('MF_PER_ROW_MOBILE', 1);\n Configuration::updateValue('MF_MAN_ORDER', 'name_asc');\n Configuration::updateValue('MF_SHOW_MAN_NAME', 0);\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('displayHome');\n }", "public function install()\n {\n $this->db->query('\n CREATE TABLE IF NOT EXISTS `todo` (\n `id` int(10) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `text` text NOT NULL,\n `checked` BOOLEAN NOT NULL\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n\n CREATE TABLE IF NOT EXISTS `user` (\n `id` int(10) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n `name` varchar(65) NOT NULL,\n `pass` varchar(65) NOT NULL,\n `hash` varchar(65) NOT NULL\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n ');\n echo json_encode(['ok' => 'true']);\n }", "public function install() {\n include(dirname(__FILE__) . '/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionProductUpdate') &&\n $this->registerHook('displayAdminProductsExtra');\n }", "public function install()\r\n\t{\r\n\t\tif (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('adminOrder') || !$this->registerHook('paymentReturn') || !$this->registerHook('orderConfirmation'))\r\n\t\t\treturn false;\r\n\r\n\r\n\t\t$this->registerHook('displayPayment');\r\n\t\t$this->registerHook('header');\r\n $this->registerHook('actionOrderStatusUpdate');\r\n\t\tif (!Configuration::get('BILLMATE_PAYMENT_ACCEPTED'))\r\n\t\t\tConfiguration::updateValue('BILLMATE_PAYMENT_ACCEPTED', $this->addState('Billmate : Payment accepted', '#DDEEFF'));\r\n\t\tif (!Configuration::get('BILLMATE_PAYMENT_PENDING'))\r\n\t\t\tConfiguration::updateValue('BILLMATE_PAYMENT_PENDING', $this->addState('Billmate : payment in pending verification', '#DDEEFF'));\r\n\r\n $include = array();\r\n $hooklists = Hook::getHookModuleExecList('displayBackOfficeHeader');\r\n foreach($hooklists as $hooklist)\r\n {\r\n if(!in_array($hooklist['module'],array('billmatebank','billmateinvoice','billmatepartpayment'))){\r\n $include[] = true;\r\n }\r\n }\r\n if(in_array(true,$include))\r\n $this->registerHook('displayBackOfficeHeader');\r\n\t\t/*auto install currencies*/\r\n\t\t$currencies = array(\r\n\t\t\t'Euro' => array('iso_code' => 'EUR', 'iso_code_num' => 978, 'symbole' => '€', 'format' => 2),\r\n\t\t\t'Danish Krone' => array('iso_code' => 'DKK', 'iso_code_num' => 208, 'symbole' => 'DAN kr.', 'format' => 2),\r\n\t\t\t'krone' => array('iso_code' => 'NOK', 'iso_code_num' => 578, 'symbole' => 'NOK kr', 'format' => 2),\r\n\t\t\t'Krona' => array('iso_code' => 'SEK', 'iso_code_num' => 752, 'symbole' => 'SEK kr', 'format' => 2)\r\n\t\t);\r\n\r\n\r\n\t\tforeach ($currencies as $key => $val)\r\n\t\t{\r\n\t\t\tif (_PS_VERSION_ >= 1.5)\r\n\t\t\t\t$exists = Currency::exists($val['iso_code_num'], $val['iso_code_num']);\r\n\t\t\telse\r\n\t\t\t\t$exists = Currency::exists($val['iso_code_num']);\r\n\t\t\tif (!$exists)\r\n\t\t\t{\r\n\t\t\t\t$currency = new Currency();\r\n\t\t\t\t$currency->name = $key;\r\n\t\t\t\t$currency->iso_code = $val['iso_code'];\r\n\t\t\t\t$currency->iso_code_num = $val['iso_code_num'];\r\n\t\t\t\t$currency->sign = $val['symbole'];\r\n\t\t\t\t$currency->conversion_rate = 1;\r\n\t\t\t\t$currency->format = $val['format'];\r\n\t\t\t\t$currency->decimals = 1;\r\n\t\t\t\t$currency->active = true;\r\n\t\t\t\t$currency->add();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tCurrency::refreshCurrencies();\r\n\t\t\r\n\t\t$version = str_replace('.', '', _PS_VERSION_);\r\n\t\t$version = Tools::substr($version, 0, 2);\r\n\t\t\r\n\t\t\r\n\t\t/* The hook \"displayMobileHeader\" has been introduced in v1.5.x - Called separately to fail silently if the hook does not exist */\r\n\r\n\r\n\t\treturn true;\r\n\t}", "public static function install() {\n\t\terror_log('INSTALLL plugin');\n\t\t$product_list = Product_List::get();\n\t\t$product_list->create_product_list_table();\n\t\t$product_list->create_product_list_detail_table();\n\t\tadd_option( 'product_list_version', Product_List::PRODUCT_LIST_VERSION );\n\n\t\twp_schedule_event( time(), 'hourly', 'my_cron_event' );\n\n\t}", "function install() {\r\n global $db;\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Nochex Module', 'MODULE_PAYMENT_NOCHEX_STATUS', 'True', 'Do you want to accept Nochex payments?', '6', '44', 'zen_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Nochex Email Address', 'MODULE_PAYMENT_NOCHEX_EMAIL_ADDRESS','\".STORE_OWNER_EMAIL_ADDRESS.\"', 'Registered email address for your Nochex account.<br />NOTE: This must match <strong>EXACTLY </strong>the registered email address on your Nochex account.', '6', '44', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Nochex Account Type', 'MODULE_PAYMENT_NOCHEX_ACCOUNT_TYPE', 'Seller', 'Please select the type of Nochex account you are accepting payments with.', '6', '44', 'zen_cfg_select_option(array(\\'Seller\\',\\'Merchant\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_NOCHEX_MERCHANT_ID', '', 'For Nochex Merchant account holders, allows you to accept payments using a different merchant ID. Has no effect on Seller accounts.', '6', '44', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_NOCHEX_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '44', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Pending Notification Status', 'MODULE_PAYMENT_NOCHEX_PROCESSING_STATUS_ID', '\" . DEFAULT_ORDERS_STATUS_ID . \"', 'Set the status of orders made with this payment module that are not yet completed to this value<br />(\\'Pending\\' recommended)', '6', '44', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_NOCHEX_ORDER_STATUS_ID', '2', 'Set the status of orders made with this payment module that have completed payment to this value<br />(\\'Processing\\' recommended)', '6', '44', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_NOCHEX_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '44', now())\");\r\n\r\n // Nochex testing options go here\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Debug Mode', 'MODULE_PAYMENT_NOCHEX_APC_DEBUG', 'Off', 'Enable debug logging? <br />NOTE: This can REALLY clutter your email inbox!<br />Logging goes to the /includes/modules/payment/nochex_apc/logs folder<br />Email goes to the store-owner address.<strong>Leave OFF for normal operation.</strong>', '6', '44', 'zen_cfg_select_option(array(\\'Off\\',\\'Log File\\',\\'Log and Email\\'), ', now())\");\r\n $db->Execute(\"insert into \" . TABLE_CONFIGURATION . \" (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Status Live/Testing', 'MODULE_PAYMENT_NOCHEX_TESTING', 'Live', 'Set Nochex module to Live or Test. In Test mode no money is transferred.', '6', '44', 'zen_cfg_select_option(array(\\'Live\\', \\'Test\\'), ', now())\");\r\n\r\n $this->notify('NOTIFY_PAYMENT_NOCHEX_INSTALLED');\r\n }", "public function install()\n {\n if (extension_loaded('curl') == false)\n {\n $this->_errors[] = $this->l('You have to enable the cURL extension on your server to install this module');\n return false;\n }\n\n Configuration::updateValue('KUSHKIPAGOS_LIVE_MODE', false);\n Configuration::updateValue('KUSHKIPAGOS_TRANSFER', false);\n Configuration::updateValue('KUSHKIPAGOS_DEV', true);\n\n PrestaShopLogger::addLog('Instalación de módulo de pagos Kushki', 2);\n if( parent::install()\n && $this->registerHook('payment')\n && $this->registerHook('paymentOptions')\n && $this->registerHook('paymentReturn')\n && $this->registerHook('displayHeader')\n && $this->registerHook('actionProductCancel')\n && $this->registerHook('actionPaymentConfirmation')\n ){\n return true;\n }else{\n $this->_errors[] = $this->l('No se pudo registrar los hooks payment');\n return false;\n }\n\n // install DataBase\n if (!$this->installSQL()) {\n $this->_errors[] = $this->l('No se pudo ejecutar el sql');\n return false;\n }\n\n return true;\n\n }", "function mmdyk_activate() {\n\n\tglobal $wpdb;\n\n\t// Create the table name\n\t$table_name = $wpdb->prefix . 'mmdyk_quote';\n\n\t// Create the table if it doesn't already exist\n\tif($wpdb->get_var(\"SHOW TABLES LIKE '$table_name'\") != $table_name) {\n\t\t$results = $wpdb->query(\"CREATE TABLE IF NOT EXISTS $table_name(id INT(11) NOT NULL AUTO_INCREMENT, quotes VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, post_id INT(11) NOT NULL, link VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (id)) DEFAULT CHARSET=utf8;\");\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'MM Did You Know? Wordpress plugin by Milan Milosevic.', 'post_id' => 0, 'link' => 'http://www.mmilan.com/'));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'A rat can last longer without water than a camel.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'A female ferret will die if it goes into heat and cannot find a mate.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'A duck`s quack doesn`t echo. No one knows why.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'Donald Duck comics were banned from Finland because he doesn`t wear pants.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'Because metal was scarce, the Oscars given out during World War II were made of wood.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'The number of possible ways of playing the first four moves per side in a game of chess is 318,979,564,000.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'There are no words in the dictionary that rhyme with month, orange, purple, and silver.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'The first CD pressed in the US was Bruce Springsteen`s \"Born in the USA.\"', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'Charlie Chaplin once won third prize in a Charlie Chaplin look-alike contest.', 'post_id' => 0, 'link' => ''));\n\t\t$wpdb->insert( $table_name, array( 'quotes' => 'The Guinness Book of Records holds the record for being the book most often stolen from public libraries.', 'post_id' => 0, 'link' => ''));\n\t} else {\n\t\t$results = $wpdb->query(\"alter table $table_name' default collate utf8_unicode_ci;\");\n\t\t$results = $wpdb->query(\"ALTER TABLE $table_name CHANGE quotes quotes VARCHAR(2048) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;\");\n\t\t$results = $wpdb->query(\"ALTER TABLE $table_name CHANGE link link VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL;\");\n\t}\n\t\n}", "public function install() {\n $this->load->model($this->module_path);\n\n $this->helper_pricealert->createTables();\n\n $this->__registerEvents();\n }", "public function install(){\r\n\r\n\t\t$this->load->library('module_installer');\r\n\r\n\t\t$lang_avail = $this->config->item('lang_avail');\r\n\t\t\r\n\t\t$data['dbprefix'] = $this->db->dbprefix;\r\n\t\t\t\r\n\t\t\r\n\t\t//echo \" FLAG1 \";\r\n\t\t\t\t\r\n\t\tforeach($lang_avail AS $langcode=>$language){ \r\n\t\t\r\n\t\t\t$data['langcode'] = $langcode;\r\n\t\t\r\n\t\t\t$this->module_installer->process_file(dirname(dirname(__FILE__)) . \"/install/mydata.sql\",$data);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// now copy any required css or js fles to the assets folder\r\n\t\t$this->module_installer->copy_assets(\"/custom_modules/\" . $this->router->class);\r\n\r\n\t\t\r\n\t}", "function dbInstall($data) {\n/*\nmyblocks - Myblocks\nmyblocks_categories - Myblocks Categories\n*/\n $data = <<<EOD\n myblocks: ID int(10) unsigned NOT NULL auto_increment\n myblocks: SYSTEM varchar(255) NOT NULL DEFAULT ''\n myblocks: TITLE varchar(255) NOT NULL DEFAULT ''\n myblocks: CATEGORY_ID int(10) NOT NULL DEFAULT '0'\n myblocks: BLOCK_TYPE char(10) NOT NULL DEFAULT ''\n myblocks: BLOCK_COLOR int(10) NOT NULL DEFAULT '0'\n myblocks: SCRIPT_ID int(10) NOT NULL DEFAULT '0'\n myblocks: LINKED_OBJECT varchar(255) NOT NULL DEFAULT ''\n myblocks: LINKED_PROPERTY varchar(255) NOT NULL DEFAULT ''\n myblocks_categories: ID int(10) unsigned NOT NULL auto_increment\n myblocks_categories: TITLE varchar(255) NOT NULL DEFAULT ''\n myblocks_categories: SYSTEM varchar(255) NOT NULL DEFAULT ''\nEOD;\n parent::dbInstall($data);\n }", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=GPC_VERSION2;\n $this->saveConfig();\n\n $result=GPCRequestBuilder::createTables();\n return($result);\n }", "public function install()\n {\n\n return parent::install() &&\n $this->registerHook('actionAdminControllerSetMedia') &&\n $this->registerHook('displayAdminProductsQuantitiesStepBottom') ;\n \n }", "function dbInstall($data) {\n/*\nlagartoservers - lagarto Devices\nlagartoendpoints - lagarto Properties\n*/\n $data = <<<EOD\n\n lagartoservers: ID int(10) unsigned NOT NULL auto_increment\n lagartoservers: TITLE varchar(255) NOT NULL DEFAULT ''\n lagartoservers: MDID varchar(255) NOT NULL DEFAULT ''\n lagartoservers: TYPE varchar(255) NOT NULL DEFAULT ''\n lagartoservers: PORT int(10) NOT NULL DEFAULT '0'\n lagartoservers: ZMQPORT int(10) NOT NULL DEFAULT '0'\n lagartoservers: IP varchar(255) NOT NULL DEFAULT ''\n lagartoservers: PASSWORD varchar(255) NOT NULL DEFAULT ''\n lagartoservers: UPDATE_PERIOD int(10) NOT NULL DEFAULT '0'\n lagartoservers: NEXT_UPDATE datetime\n\n lagartoendpoints: ID int(10) unsigned NOT NULL auto_increment\n lagartoendpoints: SERVER_ID int(10) NOT NULL DEFAULT '0'\n lagartoendpoints: ENDPOINT_ID varchar(50) NOT NULL DEFAULT '0'\n lagartoendpoints: TITLE varchar(50) NOT NULL DEFAULT '0'\n lagartoendpoints: TYPE int(3) NOT NULL DEFAULT '0'\n lagartoendpoints: CURRENT_VALUE_STRING varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: TYPE_STRING varchar(20) NOT NULL DEFAULT ''\n lagartoendpoints: DIRECTION_STRING varchar(20) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_OBJECT varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_PROPERTY varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_METHOD varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: UPDATED datetime\n\nEOD;\n parent::dbInstall($data);\n }" ]
[ "0.69736654", "0.6714206", "0.6714206", "0.66782314", "0.66782314", "0.6571282", "0.6571282", "0.6571282", "0.6571282", "0.6571282", "0.65510887", "0.6327981", "0.6169283", "0.61365294", "0.6135494", "0.61118186", "0.6104212", "0.59939843", "0.5989338", "0.5975755", "0.5932936", "0.59288836", "0.5927338", "0.59154075", "0.5900022", "0.5900022", "0.58989674", "0.58786446", "0.5862951", "0.5862951", "0.58560187", "0.5768739", "0.5749682", "0.5747945", "0.57325375", "0.57260394", "0.5714077", "0.571023", "0.569222", "0.5690993", "0.5668403", "0.56553257", "0.5653492", "0.5613668", "0.5599596", "0.55250293", "0.5521571", "0.5515948", "0.5515806", "0.5511275", "0.54844135", "0.54525894", "0.5446317", "0.5433288", "0.54260886", "0.54259986", "0.5405834", "0.5355463", "0.5347768", "0.53413343", "0.53334606", "0.53237116", "0.53230166", "0.53060997", "0.5305149", "0.52899945", "0.5289747", "0.52895623", "0.5278014", "0.52771807", "0.52743775", "0.5270994", "0.52591765", "0.52559566", "0.5240659", "0.52360725", "0.5231536", "0.52310103", "0.522989", "0.5225428", "0.5224719", "0.52077407", "0.51967657", "0.5189172", "0.5184106", "0.51798946", "0.51763934", "0.5172846", "0.5172587", "0.5167569", "0.51614213", "0.5155826", "0.5153395", "0.51489615", "0.51472056", "0.513896", "0.5133721", "0.5128761", "0.5125185", "0.5114857" ]
0.84290344
0
Install sales custom data
public function installSalesData() { $salesInstaller = $this->salesSetupFactory->create( [ 'resourceName' => 'sales_setup', 'setup' => $this->setup ] ); $salesInstaller ->addAttribute( 'order', CustomFieldsInterface::CHECKOUT_PURPOSE, ['type' => Table::TYPE_TEXT, 'length' => '255', 'nullable' => true, 'grid' => false] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install($data='') {\r\n parent::install();\r\n }", "function install($data='') {\r\n parent::install();\r\n }", "function install($data = '')\n {\n parent::install();\n }", "function install($data = '')\n {\n parent::install();\n }", "function install($data='') {\n parent::install();\n\n\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "function install($data='') {\n parent::install();\n }", "public function install(){\r\n\t\t\r\n\t}", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "function install($data='') {\r\n @umask(0);\r\n if (!Is_Dir(ROOT.\"./cms/products/\")) {\r\n mkdir(ROOT.\"./cms/products/\", 0777);\r\n }\r\n parent::install();\r\n }", "public function postInstallCmd(){\n\n \\Disco\\manage\\Manager::install();\n\n }", "public function install($data = array()) {\n\t\t$this->pkg = parent::install();\n\n\t// Installing\n\t\t $this->installOrUpgrade($data);\n\t}", "public function install() {\n $this->load->model('extension/module/export_yml');\n $this->model_extension_module_export_yml->installPromCategoryTable();\n $this->model_extension_module_export_yml->installPromProductTable();\n }", "public function install() {\n\n\n }", "public function install()\n {\n Configuration::updateValue('APISFACT_PRESTASHOP_TOKEN', '');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEF', 'F001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROF', '0');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEB', 'B001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROB', '0');\n\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayAdminOrderLeft') &&\n $this->registerHook('displayAdminOrderMain');\n }", "public function install() {\r\n \r\n }", "public function installWordpressData() {\n }", "public function install();", "public function install();", "function install(){}", "public static function install(){\n\t}", "function install() {\n /*\n * do some stuff at install db table creation/modification, email template creation etc.\n * \n * \n */\n return parent::install();\n }", "public function install()\n {\n }", "public function install()\n {\n }", "function install() {}", "public function beforeInstall()\n\t{}", "public function install(){\r\n\r\n\t\t$this->load->library('module_installer');\r\n\r\n\t\t$lang_avail = $this->config->item('lang_avail');\r\n\t\t\r\n\t\t$data['dbprefix'] = $this->db->dbprefix;\r\n\t\t\t\r\n\t\t\r\n\t\t//echo \" FLAG1 \";\r\n\t\t\t\t\r\n\t\tforeach($lang_avail AS $langcode=>$language){ \r\n\t\t\r\n\t\t\t$data['langcode'] = $langcode;\r\n\t\t\r\n\t\t\t$this->module_installer->process_file(dirname(dirname(__FILE__)) . \"/install/mydata.sql\",$data);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// now copy any required css or js fles to the assets folder\r\n\t\t$this->module_installer->copy_assets(\"/custom_modules/\" . $this->router->class);\r\n\r\n\t\t\r\n\t}", "public function install() {\n $this->load->model($this->module_path);\n\n $this->helper_pricealert->createTables();\n\n $this->__registerEvents();\n }", "protected function install(){ return true;}", "public function preInstall()\n {\n }", "function install()\n {\n }", "function install()\n {\n \t// Creating tables\n\t\t\tinclude('db/tables.php');\n }", "public static function run_install()\n {\n global $wpdb;\n\n // Create Base Table in mysql\n //$charset_collate = $wpdb->get_charset_collate();\n //require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n }", "protected function afterInstall()\n {\n }", "private function _install() {\r\n// `id` int(11) NOT NULL,\r\n// `language_id` int(11) NOT NULL,\r\n// `human_name` mediumtext NOT NULL,\r\n// `machine_name` varchar(255) NOT NULL,\r\n// `is_active` enum('0','1') NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n// CREATE TABLE IF NOT EXISTS `security_attributes_values` (\r\n// `id` int(11) NOT NULL,\r\n// `user_id` int(11) NOT NULL,\r\n// `attribute_id` int(11) NOT NULL,\r\n// `value` mediumtext NOT NULL,\r\n// PRIMARY KEY(`id`)\r\n// ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\r\n }", "public function install()\n {\n $this->installClasses();\n $this->command();\n $this->markInstalled();\n //or call parent::install(); \n }", "public static function install()\n\t{\n\t\tmanpower_create_page_with_slug(MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_catalog_slug', MANPOWER_DEFAULT_CATALOG_SLUG);\n\t\tupdate_option('mp_worker_slug', MANPOWER_DEFAULT_WORKER_SLUG);\t\t\n\t}", "public function install()\n {\n if (!parent::install()\n || !$this->registerHook('displayBackOfficeHeader')\n || !$this->installModuleTab('onehopsmsservice', array(\n 1 => 'Onehop SMS Services'\n ), 0)\n || !$this->installDB()\n || !$this->registerHook('orderConfirmation')\n || !$this->registerHook('postUpdateOrderStatus')\n || !$this->registerHook('actionUpdateQuantity')\n || !$this->registerHook('actionObjectProductUpdateAfter')) {\n return false;\n }\n return true;\n }", "public function manualInstallAction()\r\n\t{\r\n\t $helper = Mage::helper('manager');\r\n // initialize the channel model\r\n $chn = Mage::getModel('manager/channel');\r\n // load by given channel_id if there is an id\r\n if ($channel_id = $this->getRequest()->getParam('channel_id')) {\r\n \t$chn->load($channel_id);\r\n \t// set channel name\r\n \t$channelName = $chn->getUrl();\r\n \t// get package name from post data\r\n \t$packageName = $this->getRequest()->getParam('package_name');\r\n \t// try to get package information for given package_name\r\n \t$package = $this->_service->packageInfo(\r\n \t\t$packageName,\r\n \t $channelName\r\n \t);\r\n \tif ($package) {\r\n\t \t// initialize the package model\r\n\t $pkg = Mage::getModel('manager/package');\r\n\t // try to load the package from the database by its name\r\n\t $id = $pkg->loadByName($packageName)->getId();\r\n\t if (empty($id)) {\r\n\t // if the package is new, create it\r\n\t $pkg->setChannelIdFk($chn->getId());\r\n\t $pkg->setName($packageName);\r\n\t $pkg->setSummary($package['summary']);\r\n\t $pkg->setVersionInstalled($package['installed']);\r\n\t if (is_array($package['releases'])) {\r\n\t $pkg->setVersionLatest(\r\n\t reset(\r\n\t array_keys($package['releases'])\r\n\t )\r\n\t );\r\n\t }\r\n\t $pkg->setCreatedTime(now());\r\n\t \t\t\t$pkg->setUpdateTime(now());\r\n\t } else {\r\n\t // if the package already exists update it\r\n\t $pkg->setSummary($package['summary']);\r\n\t $pkg->setVersionInstalled($package['installed']);\r\n\t if (is_array($package['releases'])) {\r\n\t $pkg->setVersionLatest(\r\n\t reset(\r\n\t array_keys($package['releases'])\r\n\t )\r\n\t );\r\n\t }\r\n\t \t\t\t$pkg->setUpdateTime(now());\r\n\t }\r\n\t // set the package state\r\n $pkg->setState($helper->getPackageState($pkg));\r\n // save the package\r\n \t $pkg->save();\r\n \t // set package id to request params\r\n \t $this->getRequest()->setParam('id', $pkg->getId());\r\n \t $this->_forward('install');\r\n \t}\r\n } else {\r\n \tMage::getSingleton('adminhtml/session')->addError(\r\n $helper->__(\r\n '201.error.package-no-id'\r\n )\r\n );\r\n }\r\n // redirect to the licence overview\r\n $this->_redirect('*/*/');\r\n\t}", "public function install()\n {\n xtc_db_query(\n \"delete from \" . TABLE_CONFIGURATION\n . \" where configuration_key in ('MODULE_PAYMENT_SHOPGATE_STATUS', 'MODULE_PAYMENT_SHOPGATE_ALLOWED', 'MODULE_PAYMENT_SHOPGATE_ORDER_STATUS_ID')\"\n );\n xtc_db_query(\n \"insert into \" . TABLE_CONFIGURATION\n . \" (configuration_key, configuration_value, configuration_group_id, sort_order, set_function, date_added) values ('MODULE_PAYMENT_SHOPGATE_STATUS', 'True', '6', '1', 'xtc_cfg_select_option(array(\\'True\\', \\'False\\'), ', now())\"\n );\n xtc_db_query(\n \"insert into \" . TABLE_CONFIGURATION\n . \" (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_ALLOWED', '0', '6', '1', now())\"\n );\n xtc_db_query(\n \"insert into \" . TABLE_CONFIGURATION\n . \" (configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_SORT_ORDER', '0', '6', '1', now())\"\n );\n $result = xtc_db_query(\n 'select configuration_key,configuration_value from configuration as c where c.configuration_key = \"'\n . ShopgateInstallHelper::SHOPGATE_DATABASE_CONFIG_KEY . '\"'\n );\n $row = xtc_db_fetch_array($result);\n if (empty($row)) {\n xtc_db_query(\n \"insert into \" . TABLE_CONFIGURATION\n . \" ( configuration_key, configuration_value, configuration_group_id, sort_order, date_added) values ('MODULE_PAYMENT_SHOPGATE_IDENT' , '0', '6', '\"\n . $this->sort_order . \"', now())\"\n );\n }\n\n $this->installTable();\n $this->updateDatabase();\n $this->grantAdminAccess();\n $installHelper = new ShopgateInstallHelper();\n $installHelper->sendData();\n }", "public static function install() \r\n\t{\r\n\t\tself::uninstall();\r\n\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->query( $wpdb->prepare( \"UPDATE $wpdb->mp_mailmeta SET meta_key = %s WHERE meta_key = %s;\", self::meta_key, 'batch_spool_send' ) );\r\n\r\n\t\tMP_Log::set_option( self::log_name );\r\n\r\n\t\tdo_action( 'MailPress_schedule_batch_spool_send' );\r\n\t}", "public function installQuoteData()\n {\n $quoteInstaller = $this->quoteSetupFactory->create(\n [\n 'resourceName' => 'quote_setup',\n 'setup' => $this->setup\n ]\n );\n $quoteInstaller\n ->addAttribute(\n 'quote',\n CustomFieldsInterface::CHECKOUT_PURPOSE,\n ['type' => Table::TYPE_TEXT, 'length' => '255', 'nullable' => true]\n );\n }", "function dbInstall($data) {\n/*\napp_vkbot - \n*/\n $data = <<<EOD\n app_vkbot: ID int(10) unsigned NOT NULL auto_increment\n app_vkbot: TITLE varchar(100) NOT NULL DEFAULT ''\n app_vkbot: COLOR varchar(255) NOT NULL DEFAULT ''\n app_vkbot: VAL varchar(255) NOT NULL DEFAULT ''\n app_vkbot: CODE varchar(255) NOT NULL DEFAULT ''\nEOD;\n parent::dbInstall($data);\n }", "protected function install() {\n\n\t\t// include settings so we can install defaults\n\t\t$settings = $this->load_class( '/includes/admin/class-wc-avatax-settings.php', 'WC_AvaTax_Settings' );\n\n\t\t// install default settings for each section\n\t\tforeach ( $settings->get_settings() as $setting ) {\n\n\t\t\tif ( isset( $setting['default'] ) ) {\n\n\t\t\t\tupdate_option( $setting['id'], $setting['default'] );\n\t\t\t}\n\t\t}\n\n\t\t$this->maybe_migrate();\n\t}", "public function onPostInstall() {\n $moduleName = 'siteevent';\n $db = $this->getDb();\n $select = new Zend_Db_Select($db);\n $select\n ->from('engine4_core_modules')\n ->where('name = ?', 'sitemobile')\n ->where('enabled = ?', 1);\n $is_sitemobile_object = $select->query()->fetchObject();\n if (!empty($is_sitemobile_object)) {\n $db->query(\"INSERT IGNORE INTO `engine4_sitemobile_modules` (`name`, `visibility`) VALUES\n('$moduleName','1')\");\n $select = new Zend_Db_Select($db);\n $select\n ->from('engine4_sitemobile_modules')\n ->where('name = ?', $moduleName)\n ->where('integrated = ?', 0);\n $is_sitemobile_object = $select->query()->fetchObject();\n if ($is_sitemobile_object) {\n $actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\n $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();\n if ($controllerName == 'manage' && $actionName == 'install') {\n $view = new Zend_View();\n $baseUrl = (!empty($_ENV[\"HTTPS\"]) && 'on' == strtolower($_ENV[\"HTTPS\"]) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace('install/', '', $view->url(array(), 'default', true));\n $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n $redirector->gotoUrl($baseUrl . 'admin/sitemobile/module/enable-mobile/enable_mobile/1/name/' . $moduleName . '/integrated/0/redirect/install');\n }\n }\n }\n //END - SITEMOBILE CODE TO CALL MY.SQL ON POST INSTALL\n //WORK FOR THE WORD CHANGES IN THE ADVANCED EVENT PLUGIN .CSV FILE.\n $actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();\n $controllerName = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();\n if ($controllerName == 'manage' && ($actionName == 'install' || $actionName == 'query')) {\n $view = new Zend_View();\n $baseUrl = (!empty($_ENV[\"HTTPS\"]) && 'on' == strtolower($_ENV[\"HTTPS\"]) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . str_replace('install/', '', $view->url(array(), 'default', true));\n $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n if ($actionName == 'install') {\n $redirector->gotoUrl($baseUrl . 'admin/siteevent/settings/language/redirect/install');\n } else {\n $redirector->gotoUrl($baseUrl . 'admin/siteevent/settings/language/redirect/query');\n }\n }\n }", "public function initialInstall()\n\t\t{\n\t\t\t$installer = $this->getInstaller();\n\t\t\t$installer->newTable($installer->getResourceTable('core/extension'))\n\t\t\t->addColumn('code', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t'primary' => TRUE,\n\t\t\t\t),'Extension identifier')\n\t\t\t->addColumn('version', $installer::TYPE_TEXT, 50, array(\n\t\t\t\t'nullable' => FALSE,\n\t\t\t\t'default' => '',\n\t\t\t\t),'The currently installed version of this extension')\n\t\t\t->setComment('List of ZeroG installed extensions and their version number');\n\t\t\t$installer->run();\n\t\t}", "function install()\n {\n $query = parent::getList( 'user_name = \\'[email protected]\\'' );\n \n if( $query->num_rows() == 0 )\n {\n $data = array(\n 'user_name' => '[email protected]',\n 'password' => sha1('rkauqkf.'),\n 'role' => 'admin',\n 'is_active' => '1',\n 'd_o_c'=>date(\"Y/m/d\"),\n );\n \n parent::add($data);\n }\n }", "function insta_f_install(){\n}", "public function install()\n {\n include dirname(__FILE__) . '/sql/install.php';\n Configuration::updateValue('WI_SPENT_ENABLED', '0');\n Configuration::updateValue('WI_SPENT_AMOUNT', '');\n Configuration::updateValue('WI_SPENT_COUPON', '');\n Configuration::updateValue('WI_SPENT_DAYS', '30');\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionValidateOrder') &&\n $this->registerHook('postUpdateOrderStatus') &&\n $this->registerHook('actionOrderStatusPostUpdate') &&\n $this->registerHook('displayOrderConfirmation');\n }", "public function afterInstall()\n\t{}", "public function install()\r\n {\r\n if (!get_option('ohs_newsletter_installed')) {\r\n global $wpdb;\r\n $charset_collate = $wpdb->get_charset_collate();\r\n $fullTableName = $wpdb->prefix . self::$tableName;\r\n\r\n $sql = \"CREATE TABLE $fullTableName (\r\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n first_name varchar(100) NOT NULL,\r\n last_name varchar(100) NOT NULL,\r\n email varchar(100) NOT NULL,\r\n validation_code varchar(200) NOT NULL,\r\n PRIMARY KEY id (id)\r\n ) $charset_collate;\";\r\n\r\n dbDelta($sql);\r\n add_option('ohs_newsletter_installed', 1);\r\n\r\n add_option('ohs_newsletter_sendgrid_api', \"\");\r\n add_option('ohs_newsletter_sendgrid_list', \"\");\r\n add_option('ohs_newsletter_redirect', \"\");\r\n }\r\n }", "public function install()\n\t{\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tShop::setContext(Shop::CONTEXT_ALL);\n\t\t}\n\n\t\t//initialize empty settings\n\t\tConfiguration::updateValue('CLERK_PUBLIC_KEY', '');\n\t\tConfiguration::updateValue('CLERK_PRIVATE_KEY', '');\n\n\t\tConfiguration::updateValue('CLERK_SEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_SEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_INCLUDE_CATEGORIES', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_TEMPLATES', '');\n\n\t\treturn parent::install() &&\n $this->registerHook('top') &&\n\t\t\t$this->registerHook('footer') &&\n\t\t\t$this->registerHook('displayOrderConfirmation');\n\t}", "public function runInstallTasks();", "function install($data='') {\n subscribeToEvent($this->name, 'SAY');\n parent::install();\n }", "function dbInstall($data='') {\n/*\nmixcloud_favorites - \n*/\n $data = <<<EOD\n mixcloud_favorites: ID int(10) unsigned NOT NULL auto_increment\n mixcloud_favorites: TITLE varchar(100) NOT NULL DEFAULT ''\n mixcloud_favorites: STREAM varchar(255) NOT NULL DEFAULT ''\n mixcloud_favorites: ITEM_ID varchar(255) NOT NULL DEFAULT '' \nEOD;\n parent::dbInstall($data);\n }", "function wlms_plugin_install()\n{\n wlms_create_table();\n wlms_settings_data();\n}", "abstract public function installSQL();", "function AdminUsers_install()\n\t{\n\t}", "public function install () {\n\t\t$this->_log_version_number();\n\t}", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-Finnish-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "function dbInstall($data) {\r\n/*\r\nwatchfolders - Watchfolders\r\n*/\r\n $data = <<<EOD\r\n watchfolders: ID int(10) unsigned NOT NULL auto_increment\r\n watchfolders: TITLE varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: FOLDER varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: CHECK_MASK varchar(255) NOT NULL DEFAULT ''\r\n watchfolders: CHECK_LATEST datetime\r\n watchfolders: CHECK_NEXT datetime\r\n watchfolders: CHECK_INTERVAL int(255) NOT NULL DEFAULT '0'\r\n watchfolders: SCRIPT_ID int(10) NOT NULL DEFAULT '0'\r\n watchfolders: CHECK_SUB int(3) NOT NULL DEFAULT '0'\r\n watchfolders: SCRIPT_TYPE int(255) NOT NULL DEFAULT '0'\r\n watchfolders: CHECK_RESULTS longtext\r\n\r\nEOD;\r\n parent::dbInstall($data);\r\n }", "function dbInstall($data='')\n {\n $data = <<<'EOD'\n apiai_actions: ID int(10) unsigned NOT NULL auto_increment\n apiai_actions: TITLE varchar(255) NOT NULL DEFAULT ''\n apiai_actions: LATEST_PARAMS varchar(255) NOT NULL DEFAULT '' \n apiai_actions: LATEST_USAGE datetime\n apiai_actions: CODE text\n\n apiai_entities: ID int(10) unsigned NOT NULL auto_increment\n apiai_entities: NAME varchar(255) NOT NULL DEFAULT ''\n apiai_entities: LAST_EXPORT datetime\n apiai_entities: CODE text\nEOD;\n parent::dbInstall($data);\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$terminals = SQLSelect('select NAME, TITLE from terminals');\n$total = count($terminals);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $entries[] = array('value' => $terminals[$i]['NAME'], 'synonyms' => array($terminals[$i]['TITLE']));\n}\n\n$entity = array(\n 'name' => 'terminal',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'terminal'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'terminal', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$users = SQLSelect('select USERNAME, NAME from users');\n$total = count($users);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $entries[] = array('value' => $users[$i]['USERNAME'], 'synonyms' => array($users[$i]['NAME']));\n}\n\n$entity = array(\n 'name' => 'user',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'user'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'user', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n\n// --------------------------------------------------------------------\n $code = <<<'EOD'\n$rooms = getObjectsByClass('Rooms');\n$total = count($rooms);\n$entries = array();\nfor($i=0; $i<$total; $i++) {\n $name = $rooms[$i]['TITLE'];\n $entry = array('value' => $name);\n $title = gg($rooms[$i]['TITLE'].'.Title');\n if($title)\n $entry['synonyms'] = array($title);\n $entries[] = $entry;\n}\n\n$entity = array(\n 'name' => 'room',\n 'entries' => $entries\n);\n\nreturn $entity;\nEOD;\n \n $rec = SQLSelect(\"select * from apiai_entities where NAME LIKE 'room'\");\n if(!count($rec)) {\n $rec = array('NAME' => 'room', 'CODE' => $code);\n SQLInsert('apiai_entities', $rec);\n }\n }", "function amt_wsc_team_install(){\n}", "abstract public function installVirtuoso();", "public function installAction()\r\n\t{\r\n\t try {\r\n \t // run the install command\r\n \t $packageName = $this->_runCommand(\r\n \t $command = Faett_Core_Interfaces_Service::COMMAND_INSTALL\r\n \t );\r\n // attach a message to the session\r\n \t\tMage::getSingleton('adminhtml/session')->addSuccess(\r\n \t\t Mage::helper('adminhtml')->__(\r\n \t\t '201.success.package-install', $packageName\r\n \t\t )\r\n \t\t);\r\n\t } catch(Faett_Manager_Exceptions_InvalidCommandException $ice) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t $ice->getMessage()\r\n \t\t);\r\n\t } catch(Exception $e) {\r\n Mage::getSingleton('adminhtml/session')->addError(\r\n \t\t Mage::helper('manager')->__(\r\n \t\t '900.pear.exception',\r\n \t\t $e->getMessage()\r\n \t\t )\r\n \t\t);\r\n\t }\r\n // redirect to the licence overview\r\n $this->_redirect('*/*/');\r\n\t}", "public function install() {\n include(dirname(__FILE__) . '/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionProductUpdate') &&\n $this->registerHook('displayAdminProductsExtra');\n }", "public function install()\n {\n // create tables\n try {\n DoctrineHelper::createSchema($this->entityManager, array('PostCalendar_Entity_CalendarEvent',\n 'PostCalendar_Entity_EventCategory',\n 'PostCalendar_Entity_RecurException'));\n } catch (Exception $e) {\n LogUtil::registerError($this->__f('Error! Could not create tables (%s).', $e->getMessage()));\n return false;\n }\n\n // insert default category\n try {\n $this->createCategoryTree();\n } catch (Exception $e) {\n LogUtil::registerError($this->__f('Did not create default categories (%s).', $e->getMessage()));\n }\n\n\n // PostCalendar Default Settings\n $defaultsettings = PostCalendar_Util::getdefaults();\n $result = $this->setVars($defaultsettings);\n if (!$result) {\n return LogUtil::registerError($this->__('Error! Could not set the default settings for PostCalendar.'));\n }\n\n $this->createinstallevent();\n\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n HookUtil::registerProviderBundles($this->version->getHookProviderBundles());\n\n // register handlers\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'get.pending_content', array('PostCalendar_Handlers', 'pendingContent'));\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'installer.module.uninstalled', array('PostCalendar_HookHandlers', 'moduleDelete'));\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'module_dispatch.service_links', array('PostCalendar_HookHandlers', 'servicelinks'));\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'controller.method_not_found', array('PostCalendar_HookHandlers', 'postcalendarhookconfig'));\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'controller.method_not_found', array('PostCalendar_HookHandlers', 'postcalendarhookconfigprocess'));\n EventUtil::registerPersistentModuleHandler('PostCalendar', 'module.content.gettypes', array('PostCalendar_Handlers', 'getTypes'));\n\n return true;\n }", "protected function install()\n {\n $this->modx->runProcessor('workspace/packages/scanLocal');\n $answer = $this->modx->runProcessor('workspace/packages/install',\n ['signature' => join('-', [self::PKG_NAME, self::PKG_VERSION, self::PKG_RELEASE])]\n );\n\n if ($answer) {\n $response = $answer->getResponse();\n echo $response['message'] . PHP_EOL;\n }\n\n $this->modx->getCacheManager()->refresh();\n $this->modx->reloadConfig();\n }", "public function install()\n\t{\n\t\tConfiguration::updateValue('ORDERLIST_LIVE_MODE', false);\n\n\t\tinclude(dirname(__FILE__).'/sql/install.php');\n\n\t\treturn parent::install() &&\n\t\t\t$this->registerHook('header') &&\n\t\t\t$this->registerHook('backOfficeHeader') &&\n\t\t\t$this->registerHook('displayCustomerAccount') &&\n\t\t\t$this->registerHook('displayProductAdditionalInfo');\n\t}", "function customs()\n\t{\n\t\t$custom = $this->ipsclass->load_class( ROOT_PATH.'mod_install/'.$this->xml_array['customs_group']['custom'][0]['script_name']['VALUE'].'.php', $this->xml_array['customs_group']['custom'][0]['script_name']['VALUE'] );\n\t\t$custom->xml_array =& $this->xml_array;\n\t\t\n\t\tif ( $this->ipsclass->input['un'] )\n\t\t{\n\t\t\t$custom->uninstall();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$custom->install();\n\t\t}\n\t}", "public function install(){\n\n return true;\n\n }", "function pm_demo_install() {\t\t\n\t\t//create llog\n\t\t$array = array();\n\t\t//add log to database\n\t\tself::createLog($array);\n }", "public function install()\n {\n $this->initConfig();\n $this->loadConfig();\n $this->config['installed']=GPC_VERSION2;\n $this->saveConfig();\n\n $result=GPCRequestBuilder::createTables();\n return($result);\n }", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "function Install()\n\t{\n\t\t#$user = $model->table('tp_users');\n\t\t$user = M(\"User\",\"tp_\",'AZ_DB_CONFIG');\n $user_list = $user->select();\n\t\techo \"user list:<pre>\";\n\t\tprint_r($user_list);\n\t\techo \"</pre>\";\n\t\tdie;\n\t\t$conn = mysql_connect(C('DB_HOST'), C('DB_USER'), C('DB_PWD')); \n\t\tif (!$conn)\n\t\t\texit('数据库配置不正确');\n\n\t\t$state = mysql_select_db(C('DB_NAME'), $conn);\n\t\tif (!$state)\n\t\t\texit('数据库连接不正确');\n\n\t\tmysql_query('SET NAMES UTF8');\n\t\t$result = mysql_list_tables(C('DB_NAME'));\n\t\t$i = 0;\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($row);\n\t\t\techo \"</pre>\";\n\t\t}\n\n\t\t$domain = strtolower($_SERVER['HTTP_HOST']);\n\t\t$domain = explode('.', $domain);\n\t\t$idsn \t= $domain[0];\n\t\t$sql \t= 'SELECT * FROM tp_shops WHERE idsn = \"' . $idsn . '\" LIMIT 1';\n\t\t$result = mysql_query($sql, $conn);\n\t\t$this->install_info = mysql_fetch_assoc($result);\n\t\t\n\t\t//判断一级域名是否合法\n\t\t$full_domain = $idsn . '.' . C('DOMAIN');\n\t\tif ($full_domain != strtolower($_SERVER['HTTP_HOST']))\n\t\t\texit('一级域名不合法');\n\n\t\t//判断2级域名是否合法\n\t\tif (!$this->install_info)\n\t\t\texit('二级域名不合法');\n\t}", "public function install() {\r\n\tforeach ($this->getModel() AS $model) {\r\n\t $this->getEntity($model->getName())->createTable();\r\n\t}\r\n }", "public function runSetupScripts()\n\t\t{\n\t\t\t$xmlResources = \\Z::getConfig()->getResources();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$installedResources = \\Z::getModel('core/extension')->getCollection()->load();\n\t\t\t}\n\t\t\tcatch (\\Sys\\Exception $e)\n\t\t\t{\n\t\t\t\t$this->initialInstall();\n\t\t\t\t$installedResources = \\Z::getModel('core/extension')->getCollection()->load();\n\t\t\t}\n\t\t\tforeach ($xmlResources as $name => $resource)\n\t\t\t{\n\t\t\t\t// this is the version we should have installed on our system\n\t\t\t\t$latestVersion = $resource['requiredVersion'];\n\t\t\t\t// this is the version we currently have on our system, if the\n\t\t\t\t// extension is installed at all\n\t\t\t\t$installedExtension = $installedResources->isInstalled($name);\n\t\t\t\tif ($installedExtension)\n\t\t\t\t\t$installedVersion = $installedExtension->getVersion();\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$installedVersion = '0.0.0';\n\t\t\t\t\t$installedExtension = \\Z::getModel('core/extension');\n\t\t\t\t}\n\t\t\t\t$end = 'install-'.$latestVersion.'.php';\n\t\t\t\t$start = 'install-'.$installedVersion.'.php';\n\t\t\t\tif ($latestVersion != $installedVersion)\n\t\t\t\t{\n\t\t\t\t\t$installerFilesLocation = \\Z::getConfig()->getModule($resource['module'])->getPath('sql/'.$name.'/');\n\t\t\t\t\t$handle = opendir($installerFilesLocation);\n\t\t\t\t\tif ($handle)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile (FALSE !== ($file = readdir($handle)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (strpos($file, '.php') > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (($file > $start) && ($file <= $end))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->_executedFiles[] = $installerFilesLocation.$file;\n\t\t\t\t\t\t\t\t\t//echo $installerFilesLocation.$file.'<br/>';\n\t\t\t\t\t\t\t\t\tinclude $installerFilesLocation.$file;\n\t\t\t\t\t\t\t\t\t// after the script is executed, set the\n\t\t\t\t\t\t\t\t\t// current version in the extension table\n\t\t\t\t\t\t\t\t\tif ($installedExtension->getCode() != '')\n\t\t\t\t\t\t\t\t\t\t$installedExtension->setVersion($latestVersion);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t$installedExtension->setVersion($latestVersion)\n\t\t\t\t\t\t\t\t\t\t\t->setCode($name);\n\t\t\t\t\t\t\t\t\t$installedExtension->save();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// execute the install script for $file\n\t\t\t\t\t\t\t\t// update the version in the table\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclosedir($handle);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new \\Sys\\Exception('Cannot open the location => %s of the setup install scripts',\n\t\t\t\t\t\t\t$installerFilesLocation);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this;\n\t\t}", "function dbInstall($data) {\n/*\nlagartoservers - lagarto Devices\nlagartoendpoints - lagarto Properties\n*/\n $data = <<<EOD\n\n lagartoservers: ID int(10) unsigned NOT NULL auto_increment\n lagartoservers: TITLE varchar(255) NOT NULL DEFAULT ''\n lagartoservers: MDID varchar(255) NOT NULL DEFAULT ''\n lagartoservers: TYPE varchar(255) NOT NULL DEFAULT ''\n lagartoservers: PORT int(10) NOT NULL DEFAULT '0'\n lagartoservers: ZMQPORT int(10) NOT NULL DEFAULT '0'\n lagartoservers: IP varchar(255) NOT NULL DEFAULT ''\n lagartoservers: PASSWORD varchar(255) NOT NULL DEFAULT ''\n lagartoservers: UPDATE_PERIOD int(10) NOT NULL DEFAULT '0'\n lagartoservers: NEXT_UPDATE datetime\n\n lagartoendpoints: ID int(10) unsigned NOT NULL auto_increment\n lagartoendpoints: SERVER_ID int(10) NOT NULL DEFAULT '0'\n lagartoendpoints: ENDPOINT_ID varchar(50) NOT NULL DEFAULT '0'\n lagartoendpoints: TITLE varchar(50) NOT NULL DEFAULT '0'\n lagartoendpoints: TYPE int(3) NOT NULL DEFAULT '0'\n lagartoendpoints: CURRENT_VALUE_STRING varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: TYPE_STRING varchar(20) NOT NULL DEFAULT ''\n lagartoendpoints: DIRECTION_STRING varchar(20) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_OBJECT varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_PROPERTY varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: LINKED_METHOD varchar(255) NOT NULL DEFAULT ''\n lagartoendpoints: UPDATED datetime\n\nEOD;\n parent::dbInstall($data);\n }", "function kkm_install() {\r\n\tglobal $wpdb, $install_sql;\r\n\t\r\n\t//Remove database tables if present\r\n\tkkm_uninstall(true);\r\n\t\r\n\t$wpdb->flush();\r\n\t$wpdb->query('begin'); //Start transaction\r\n\t\r\n\t/*\r\n\t * Run install script command by command\r\n\t */\r\n\t$error_occured = false;\r\n\t$sql_commands = preg_split('/(?<!\\\\\\\\);/', $install_sql);\r\n\tforeach ($sql_commands as $command) {\r\n\t\t$command = trim($command);\r\n\t\tif (!empty($command)) {\r\n\t\t\t$wpdb->flush();\r\n\t\t\t$wpdb->query($command);\r\n\t\t\tif (!empty($wpdb->last_error)) {\r\n\t\t\t\techo($command.\"\\n\\n\");\r\n\t\t\t\techo($wpdb->last_error);\r\n\t\t\t\t$error_occured = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t//Add format tags supported by the modules\r\n\tkkm_install_format_tags();\r\n\t\r\n\tif ($error_occured) {\r\n\t\t$wpdb->query('rollback'); //Roll back changes\r\n\t\tdie(__('Cannot create database tables.','kkm'));\r\n\t} else {\r\n\t\t$wpdb->query('commit'); //Commit\r\n\t}\r\n\t\r\n\t/*\r\n\t * Create dir struct for user data\r\n\t */\r\n\t$dirs = array(\r\n\t\t'kkm_dir' =>\t\tWP_CONTENT_DIR.'/kkm',\r\n\t\t'temp_dir' =>\t\tWP_CONTENT_DIR.'/kkm/temp',\r\n\t\t'doc_dir' =>\t\tWP_CONTENT_DIR.'/kkm/docs'\r\n\t);\r\n\t$stat = @stat(WP_CONTENT_DIR);\r\n\t$mode = $stat['mode'];// & 0000666;\r\n\tforeach ($dirs as $dir) {\r\n\t\tif (!is_dir($dir)) {\r\n\t\t\tmkdir($dir);\r\n\t\t}\r\n\t\t@chmod($dir, $mode);\r\n\t}\r\n\t\r\n\t/*\r\n\t * Write .htaccess files\r\n\t */\r\n\t$htaccess_content = \"deny from all\";\r\n\tfile_put_contents($dirs['kkm_dir'].'/.htaccess', $htaccess_content);\r\n}", "public function install()\n {\n if (!parent::install())\n {\n return false;\n }\n\n if (!$this->registerHooks(array('displayPayment', 'displayPaymentReturn')))\n {\n return false;\n }\n\n if (!$this->createPaynetPaymentsTable())\n {\n return false;\n }\n\n if (Shop::isFeatureActive())\n {\n Shop::setContext(Shop::CONTEXT_ALL);\n }\n\n if (!$this->saveConfig())\n {\n return false;\n }\n\n return true;\n }", "public function install(){\n\n\t\t$model = Advertikon::getCurrentModel();\n\n\t\ttry {\n\t\t\t$this->_checkCompatibility();\n\t\t}\n\t\tcatch( Exception\\Transport $e ) {\n\t\t\t$this->errorPage( $e->getData() , 424 , 'Failed Dependency' );\n\t\t}\n\n\t\t$this->_install();\n\n\t\t$config = Advertikon::getXmlConfig();\n\t\t$settingsModel = Advertikon::getExtendedModel( 'setting_setting' );\n\t\t$settings = $model->stripPrefix( $settingsModel->getSetting() );\n\t\t$model->merge( $settings , $config->getValues( '/' ) );\n\t\t$settingsModel->editSetting( $settings );\n\n\t\t//mark the extension as installed\n\t\tAdvertikon::getExtendedModel( 'setting_setting' )->setSettingValue( 'installed' , 1 );\n\t}", "public static function install()\n {\n DataWebGl::createTable();\n }", "public function install() {\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'region');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'region');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'region');\n\n\t\t\t// Store current date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'lang-slovak-storage');\n\t\t\tSymphony::Configuration()->write();\n\t\t}", "public function install()\n {\n Configuration::updateValue('MF_TITLE', 'Our Favourite Brands');\n Configuration::updateValue('MF_DESCRIPTION', 'Browse our favourite brands');\n Configuration::updateValue('MF_MAN_NUMBER', 0);\n Configuration::updateValue('MF_PER_ROW_DESKTOP', 4);\n Configuration::updateValue('MF_PER_ROW_TABLET', 3);\n Configuration::updateValue('MF_PER_ROW_MOBILE', 1);\n Configuration::updateValue('MF_MAN_ORDER', 'name_asc');\n Configuration::updateValue('MF_SHOW_MAN_NAME', 0);\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('displayHome');\n }", "public function install()\n {\n if (Shop::isFeatureActive())\n Shop::setContext(Shop::CONTEXT_ALL);\n\n\n if (!parent::install() ||\n !$this->registerHook('productfooter') ||\n !$this->registerHook('header') ||\n !Configuration::updateValue('BLOCKPRODUCTMANUFACTURER_NAME', 'Block Product Manufacturer')\n )\n return false;\n\n return true;\n }", "public function install () {\n $this->_log_version_number();\n }", "public static function install() {\n\t\terror_log('INSTALLL plugin');\n\t\t$product_list = Product_List::get();\n\t\t$product_list->create_product_list_table();\n\t\t$product_list->create_product_list_detail_table();\n\t\tadd_option( 'product_list_version', Product_List::PRODUCT_LIST_VERSION );\n\n\t\twp_schedule_event( time(), 'hourly', 'my_cron_event' );\n\n\t}", "public function install()\n {\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayHome');\n }", "public function onPostInstall(Event $event): void\n {\n $this->onPostUpdate($event);\n }", "public function install()\n {\n $carrierConfig = array(\n 0 => array(\n 'name' => 'Custom Shipping',\n 'active' => true,\n 'deleted' => 0,\n 'id_tax_rule_group' => '2',\n 'shipping_handling' => false,\n 'range_behavior' => 0,\n 'delay' => array(\n 'fr' => 'Custom',\n 'en' => 'Custom',\n Language::getIsoById(Configuration::get('PS_LANG_DEFAULT')) => 'Custom',\n ),\n 'is_module' => true,\n 'shipping_external' => true,\n 'external_module_name' => 'ts_customshipping',\n 'need_range' => true,\n ),\n );\n\n $id_carrier1 = $this->installExternalCarrier($carrierConfig[0]);\n $Carrier = new Carrier((int) $id_carrier1);\n $Carrier->setTaxRulesGroup((int) $this->getTaxRulesGroupMostUsed());\n Configuration::updateValue('TS_CUSTOM_SHIPPING_CARRIER_ID', (int) $id_carrier1);\n\n return parent::install() && $this->registerHook('displayBackOfficeHeader');\n }", "function crowdx_install(){\r\n if (!is_plugin_active('phpx/phpx.php')){\r\n die('CrowdX requires the <a href=\"http://www.phpx.org/\" target=\"_new\">PHPX Framework</a>. Please install PHPX and then reinstall CrowdX.');\r\n }\r\n \r\n if (!get_option('crowdx_options')){\r\n //$sql = 'CREATE TABLE IF NOT EXISTS `' . $this->wpdb->prefix . '_cx_user` ( `wp_user_id` int(10) NOT NULL, `cx_user_active` tinyint(1) NOT NULL DEFAULT \\'0\\', UNIQUE KEY `wp_user_id` (wp_user_id`), KEY `cx_user_active` (`cx_user_active`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;';\r\n //$this->wpdb->query($sql);\r\n \r\n $options = array();\r\n $options['enable'] = false;\r\n $options['all_users'] = false;\r\n $options['server'] = 'http://yourserver';\r\n \r\n \r\n update_option('crowdx_options', $options);\r\n }\r\n }", "function hookInstall() {\n// $db = get_db()cou;\n//die(\"got to the installer method...\");\n $this->_saveVocabularies();\n }", "public function isDataInstalled() {\n $check = Mage::getModel('inventoryplus/install')\n ->getCollection()\n ->setPageSize(1)\n ->setCurPage(1)\n ->getFirstItem();\n if ($check->getStatus() != 1) {\n $isInsertData = Mage::getModel('inventoryplus/checkupdate')\n ->getCollection()\n ->setPageSize(1)\n ->setCurPage(1)\n ->getFirstItem()\n ->getIsInsertData();\n if ($isInsertData != 1) {\n return 0;\n } else {\n $check->setStatus(1);\n try {\n $check->save();\n } catch (Exception $e) {\n throw $e;\n }\n }\n }\n return 1;\n }", "public function install()\n\t{\n\t\treturn true;\n\t}", "function test_install(){\n \t}", "public function install()\n {\n // Set up module config variables\n $this->setVar('ztools_backupsdir', 'userdata/Ztools/backups');\n $this->setVar('ztools_scriptsdir', 'userdata/Ztools/scripts');\n $this->setVar('ztools_scriptssort', '0');\n $this->setVar('ztools_scriptseditor', '1');\n $this->setVar('ztools_showphpinfo', '1');\n $this->setVar('ztools_downloaduseranges', '0');\n $this->setVar('ztools_url_cpanel', '');\n $this->setVar('ztools_url_phpmyadmin', '');\n $this->setVar('ztools_exportmethod', '2');\n $this->setVar('ztools_exportcompress', '0');\n $this->setVar('ztools_expmethodshow', '1');\n $this->setVar('ztools_mysqldumpexe', '');\n\n // Register hooks\n HookUtil::registerSubscriberBundles($this->version->getHookSubscriberBundles());\n\n return true;\n }", "public function install()\n {\n /**\n * Add the information into the database.\n * This is commented out so we don't actually\n * create anything.\n */\n $this->uninstall();\n $sql = Schema::createTable(\n $this->tablename,\n true,\n array(\n 'rID',\n 'rName',\n 'rDesc',\n 'rCreatedBy',\n 'rCreatedTime'\n ),\n array(\n 'INTEGER',\n 'VARCHAR(255)',\n 'LONGTEXT',\n 'VARCHAR(40)',\n 'TIMESTAMP'\n ),\n array(\n false,\n false,\n false,\n false,\n false\n ),\n array(\n false,\n false,\n false,\n false,\n 'CURRENT_TIMESTAMP'\n ),\n array(\n 'rID',\n 'rName'\n ),\n 'MyISAM',\n 'utf8',\n 'rID',\n 'rID'\n );\n\n if (!self::$DB->query($sql)) {\n return false;\n } else {\n $sql = sprintf(\n \"INSERT INTO `%s` VALUES\"\n . \"(1, 'Administrator', 'FOG Administrator', 'fog', NOW()),\"\n . \"(2, 'Technician', 'FOG Technician', 'fog', NOW())\",\n $this->tablename\n );\n self::$DB->query($sql);\n }\n return self::getClass('AccessControlAssociationManager')->install();\n }" ]
[ "0.728193", "0.728193", "0.7153113", "0.7153113", "0.7073944", "0.7017336", "0.7017336", "0.7017336", "0.7017336", "0.7017336", "0.6849865", "0.6809988", "0.67987514", "0.67848814", "0.6744894", "0.6724681", "0.66995364", "0.66390264", "0.66146016", "0.65689033", "0.65605325", "0.65605325", "0.6560347", "0.6552162", "0.6499989", "0.6492102", "0.6492102", "0.6490683", "0.6476538", "0.64756864", "0.6461537", "0.63875145", "0.63836426", "0.63629043", "0.63263786", "0.62692887", "0.6255291", "0.62319416", "0.6210759", "0.6208485", "0.619424", "0.6184128", "0.6176587", "0.6171552", "0.61711603", "0.6163156", "0.6152371", "0.6139356", "0.6132061", "0.6127912", "0.6116774", "0.6116234", "0.611086", "0.6098481", "0.60487944", "0.60486424", "0.60440755", "0.6040573", "0.6039675", "0.60106766", "0.60012734", "0.59952664", "0.5991874", "0.5974633", "0.5971209", "0.59707904", "0.59684545", "0.5967028", "0.5964172", "0.59561604", "0.5938692", "0.59337205", "0.5932732", "0.59236544", "0.5921695", "0.59096164", "0.5905458", "0.5901039", "0.5899258", "0.588661", "0.5876486", "0.585966", "0.5857527", "0.58567244", "0.58282936", "0.5827648", "0.58106023", "0.58017516", "0.57891005", "0.5786798", "0.5779912", "0.5772566", "0.5770654", "0.5768065", "0.57669514", "0.57610476", "0.5754378", "0.5743298", "0.5723391", "0.57179064" ]
0.8170202
0
Show the form for creating a new resource.
public function create() { $this->data['categories'] = $this->categoryService->getAll(); return view('news.form', $this->data); }
{ "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(NewsRequest $request) { $catagories = explode(',', $request->categoryIds[0]); $attr = $request->except('image', '_token', 'inputCroppedPic', 'category', 'categoryIds'); try { if ($request->has('inputCroppedPic') && !is_null($request->inputCroppedPic)) { if (!File::exists($this->imageSavePath)) { File::makeDirectory($this->imageSavePath, 0775, true, true); } $destinationPath = $this->imageSavePath . $this->getDateFormatFileName('jpg'); Image::make($request->input('inputCroppedPic')) ->encode('jpg') ->save(public_path($destinationPath)); $attr['image'] = $destinationPath; } $news = $this->newsService->create($attr); $news->categories()->sync($catagories); return redirect()->route('news.index')->with('success', trans('news-portal.success-add')); } catch (\Exception $e) { return redirect()->back()->with('error', trans('news-portal.error')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function view($id) { $this->data['news'] = $this->newsService->find($id); $this->data['categories'] = $this->categoryService->getAll(); return view('news.show', $this->data); }
{ "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) { $this->data['news'] = $this->newsService->find($id); $this->data['categories'] = $this->categoryService->getAll(); return view('news.form', $this->data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(NewsRequest $request, $id) { $news = $this->newsService->find($id); $cat = explode(',', $request->categoryIds[0]); $catagories = array_diff($cat, array("")); $attr = $request->except('image', '_token', 'inputCroppedPic', 'category', 'categoryIds'); try { if ($request->has('inputCroppedPic') && !is_null($request->inputCroppedPic)) { $destinationPath = $this->imageSavePath . $this->getDateFormatFileName('jpg'); $path = public_path() . $news->logo; \File::delete($path); Image::make($request->input('inputCroppedPic')) ->encode('jpg') ->save(public_path($destinationPath)); $attr['image'] = $destinationPath; } $this->newsService->update($attr, $id); $news->categories()->sync($catagories); return redirect()->route('news.index')->with('success', trans('news-portal.success-update')); } catch (\Exception $e) { return redirect()->back()->with('error', trans('news-portal.error')); } }
{ "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(Request $request) { $this->newsService = $this->newsService->delete($request); if ($this->newsService) { return response()->json('status', 200); } else { return response()->json('status', 500); } }
{ "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
Build the data array for the query
function create( $obj ) { $data = array( 'user_id' => $obj->user_id, 'action_text' => $obj->action_text, 'action_created' => getNow() ); // Insert the data if ( $this->db->insert( 'actions', $data ) ) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=array();\n\t\tforeach($this->filters as $filter){\n\t\t\t$arrayFilters[$this->fields[$filter[0]]]=array(\"type\"=>$this->types[$filter[0]],\"value\"=>$filter[1]);\n\t\t}\n\t\t\n\t\tif(db::getFields($this->table,$arrayFieldQuery,$arrayFilters,$this->orderQuery,$this->limit,true)){\n\t\t\t$this->pages=ceil(((int)db::getCalculatedRows())/((int)$this->maxRowsPerPage));\n\t\t\t$this->maxRows=(int)db::getCalculatedRows();\n\t\t\twhile($row=db::fetch(db::$FETCH_TYPE_ASSOC)){\n\t\t\t\t$this->addRow($row);\n\t\t\t}\n\t\t}\n\t}", "private function getQueryData($query)\n {\n $showBy = empty($query['showby']) ? self::DAY : $query['showby'];\n $type = empty($query['type']) ? self::CREATION : $query['type'];\n\n if ($showBy === self::DAY) {\n $fromTo = $this->getFromToDate(\n self::DAY_FORMAT,\n '-5 days',\n $query\n );\n }\n\n if ($showBy === self::MONTH) {\n $fromTo = $this->getFromToDate(\n self::MONTH_FORMAT,\n '-5 months',\n $query,\n '1-',\n '31-'\n );\n }\n\n if ($showBy === self::YEAR) {\n $fromTo = $this->getFromToDate(\n self::YEAR_FORMAT,\n '-5 years',\n $query,\n '1-1-',\n '31-12-'\n );\n }\n\n $from = new DateTime($fromTo['from']);\n $to = new DateTime($fromTo['to']);\n\n return [\n 'showBy' => $showBy,\n 'type' => $type,\n 'from' => $from,\n 'to' => $to,\n ];\n }", "protected function makeData()\n {\n return Arr::collapse([\n $this->template->getQueryData(),\n [\n 'apiKey' => $this->apiKey,\n 'to' => implode(', ', (array) $this->getRecipientEmails())\n ]\n ]);\n }", "private static function makeArrayFromDataQuery($data)\n { \n $result = [];\n \n while ($row = $data->fetch(PDO::FETCH_ASSOC) ) {\n $result[] = $row;\n }\n \n return $result;\n }", "public function build()\n {\n if(empty($this->query)) return array(\"\", array());\n return array(\n \" {$this->phrase} \" . join(\" AND \", $this->query),\n $this->bind\n );\n }", "private function prepare_data(){\r\n\t\t\t$this->data_table['cols'] = array();\r\n\t\t\t\r\n\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\tswitch($column_info['type']){\r\n\t\t\t\t\tcase 'number':\r\n\t\t\t\t\tcase 'float':\r\n\t\t\t\t\tcase 'currency':\r\n\t\t\t\t\t\t$column_info['type'] = 'number';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$column_info['type'] = 'string';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['cols'][] = array_merge(array('id' => $column_id), $column_info);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rows_count = sizeof(reset($this->data));\r\n\t\t\t\r\n\t\t\tfor($i = 0; $i < $rows_count; $i++){\r\n\t\t\t\t$c = array();\r\n\t\t\t\t\r\n\t\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\t\t$value = $this->data[$column_id][$i];\r\n\t\t\t\t\t$c[] = array('v' => $value);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['rows'][] = array('c' => $c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->data_table = json_encode($this->data_table);\r\n\t\t}", "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "private function createArray()\n {\n $this->makeGroupBy()->makeSearch()->normalize();\n }", "public function buildAndFetchAll( $data, $arrayIndex=null );", "protected function _getQueryData ($queryData=array()) {\r\n\t\t\r\n\t\treturn array_merge(\r\n\t\t\tarray(\r\n\t\t\t\t'conditions' => null,\r\n\t\t\t\t'fields' => null,\r\n\t\t\t\t'joins' => array(),\r\n\t\t\t\t'limit' => 1,\r\n\t\t\t\t'offset' => null,\r\n\t\t\t\t'order' => array(0 => null),\r\n\t\t\t\t'page' => 1,\r\n\t\t\t\t'group' => null,\r\n\t\t\t\t'callbacks' => 1,\r\n\t\t\t\t'contain' => false,\r\n\t\t\t\t'recursive' => -1\r\n\t\t\t),\r\n\t\t\t$queryData\r\n\t\t);\r\n\t\t\r\n\t}", "private function build_data(array $data)\n {\n // do stuff\n\n return $data;\n }", "public function buildData()\n {\n $message = $this->getMessage();\n\n if ($this->data == []) {\n return [\n 'success' => false,\n 'message' => $message\n ];\n }\n\n return [\n 'success' => false,\n 'message' => $message,\n 'data' => (object) $this->data\n ];\n }", "protected function build($data)\n {\n return $this->manager->createData($data)->toArray();\n }", "protected function initializeResultArray() {}", "public function getDataArray(){\n return array($this->item_id,$this->name,$this->count,$this->price);\n }", "public function build_initial_data()\n\t{\n $initial_data = '<?php\n\n';\n $data_string = '';\n\n foreach($this->selected_attribute as $key => $value)\n {\n if($this->input->post(\"input_type_$key\")=='date')\n {\n $default_value = '0000-00-00';\n }\n else\n {\n $default_value = '';\n }\n\n $data_string .= \"'$value'=>'$default_value',\";\n }\n\n //remove the first and last single quote and the last comma in the array\n\n if(!empty($data_string))\n {\n $data_string = rtrim($data_string,',');\n }\n\n $initial_data .= '$'.$this->object_name.'_records = array('.$data_string.');'. \"\\n\";\n\n $initial_data .= '$'.$this->object_name.'_records = (object)$'.$this->object_name.'_records;';\n\n return $initial_data;\n\n\t}", "protected function _buildCondition(){\n \t$aryCondition = array();\n \t\n \tif(!empty($this->postData)){\n \t\t //search\n\t\t\t \t\t\t\n\t\t\tif($this->postData['title']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.title\"=>$this->postData['title']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['page']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.page\"=>$this->postData['page']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['code']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.code\"=>$this->postData['code']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['status']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.status\"=>$this->postData['status']);\n \t\t }\t\t\t\n\n \t}\n \treturn $aryCondition;\n }", "private function _returnBaseData($query, $type): array {\n $answer = [];\n\n switch($type) {\n case 'resources':\n $imgClass = 'material';\n break;\n case 'factories':\n $imgClass = 'product';\n break;\n case 'loot':\n $imgClass = 'loot';\n break;\n case 'units':\n $imgClass = 'unit';\n break;\n case 'headquarter':\n $imgClass = 'hq';\n break;\n case 'buildings':\n $imgClass = 'building';\n break;\n case 'settings':\n $imgClass = 'settings';\n break;\n }\n\n $getData = $this->_conn->query($query);\n\n if($getData->num_rows > 0) {\n $image = $globalIndex = 0;\n\n while($data = $getData->fetch_assoc()) {\n /*\n DB stores arrays as comma-separated strings => convert them to array before appending\n */\n foreach($data as $index => $dataset) {\n if(strpos($dataset, ',') !== false) {\n $data[$index] = $this->_convertArrayStringToArray($dataset);\n }\n }\n\n if($imgClass !== 'hq' && $imgClass !== 'building' && $imgClass !== 'settings') {\n\n /*\n adds prices\n */\n foreach(self::PRICE_INTERVALS as $interval => $seconds) {\n $data['prices'][$interval] = $this->_prices[$type][$globalIndex][$interval];\n }\n\n /*\n globally adds warehouse subobject\n */\n foreach(self::WAREHOUSE_ARRAY as $array) {\n $data['warehouse'][$array] = 0;\n }\n\n /*\n adds special subobjects depending on type\n */\n switch($type) {\n case 'factories':\n $originArray = self::PRODUCT_ARRAY;\n break;\n case 'resources':\n $originArray = self::RESOURCE_ARRAY;\n break;\n default:\n $originArray = [];\n break;\n }\n\n foreach($originArray as $array) {\n $data[$array] = 0;\n }\n }\n\n /*\n links to corresponding image\n */\n if($imgClass !== 'settings') {\n $data['icon'] = 'resources-' . $imgClass . '-' . $image;\n }\n ++$image;\n\n $answer[] = $data;\n ++$globalIndex;\n }\n }\n\n return $answer;\n }", "public function assemble()\n {\n $queryString = array();\n\n $queryString[] = $this->query['type'];\n\n // Select query\n if ($this->query['type'] == \"SELECT\"\n or $this->query['type'] == \"SELECT DISTINCT\") {\n // Build columns to select\n $queryString[] = $this->buildSelectColumns();\n\n // From\n $queryString[] = \"FROM `{$this->query['table']}`\";\n\n // Joins\n if (array_key_exists('joins', $this->query)) {\n $queryString[] = $this->buildJoins();\n }\n\n // Where\n $queryString[] = $this->buildWhere();\n\n // Custom SQL\n if (array_key_exists('sql', $this->query)) {\n $queryString[] = $this->query['sql'];\n }\n\n // Order by\n if (array_key_exists('order_by', $this->query)) {\n $queryString[] = \"ORDER BY \" . implode(\", \", $this->query['order_by']);\n }\n }\n // Insert\n elseif ($this->query['type'] == \"INSERT INTO\") {\n // Table\n $queryString[] = \"`{$this->query['table']}`\";\n\n // Get the columns and values\n $columns = $values = array();\n foreach ($this->query['data'] as $column => $value) {\n $columns[] = $this->columnName($column);\n $values[] = $this->processValue($value);\n }\n\n // Add columns and values to query\n $queryString[] = \"(\" . implode(',', $columns) . \")\";\n $queryString[] = \"VALUES (\" . implode(',', $values) . \")\";\n }\n // Update\n elseif ($this->query['type'] == \"UPDATE\") {\n // Table\n $queryString[] = \"`{$this->query['table']}`\";\n\n // Set values\n $values = array();\n foreach ($this->query['data'] as $column => $value) {\n // Process column name\n $column = $this->columnName($column);\n\n // Add value to bind queue\n $valueBindKey = \"new_\" . str_replace(array('.', '`'), array('_', ''), $column);\n $this->valuesToBind[$valueBindKey] = $value;\n\n // Add to values\n $values[] = $column . \" = :{$valueBindKey}\";\n }\n\n // Add values to query\n $queryString[] = \"SET \" . implode(\", \", $values);\n\n $queryString[] = $this->buildWhere();\n }\n // Delete from\n elseif ($this->query['type'] == \"DELETE\") {\n // Table\n $queryString[] = \"FROM `{$this->query['table']}`\";\n\n // Where\n $queryString[] = $this->buildWhere();\n }\n\n return implode(\" \", str_replace(\"{prefix}\", $this->prefix, $queryString));\n }", "public function getSQL($data){\n\t\treturn array(\n \t\t'job_title' => (!empty($data['job_title']) ? $data['job_title'] : ''),\n \t\t'company_id' => (!empty($data['company_id']) ? $data['company_id'] : ''),\n \t\t'first_name' => (!empty($data['first_name']) ? $data['first_name'] : ''),\n \t\t'last_name' => (!empty($data['last_name']) ? $data['last_name'] : ''),\n \t\t'title' => (!empty($data['title']) ? $data['title'] : ''),\n \t\t'email' => (!empty($data['email']) ? $data['email'] : ''),\n \t\t'email2' => (!empty($data['email2']) ? $data['email2'] : ''),\n \t\t'url' => (!empty($data['url']) ? $data['url'] : ''),\n \t\t'phone_home' => (!empty($data['phone_home']) ? $data['phone_home'] : ''),\n \t\t'phone2' => (!empty($data['phone2']) ? $data['phone2'] : ''),\n \t\t'fax' => (!empty($data['fax']) ? $data['fax'] : ''),\n \t\t'mobile' => (!empty($data['mobile']) ? $data['mobile'] : ''),\n \t\t'address1' => (!empty($data['address1']) ? $data['address1'] : ''),\n \t\t'address2' => (!empty($data['address2']) ? $data['address2'] : ''),\n \t\t'city' => (!empty($data['city']) ? $data['city'] : ''),\n \t\t'state' => (!empty($data['state']) ? $data['state'] : ''),\n \t\t'zip' => (!empty($data['zip']) ? $data['zip'] : ''),\n \t\t'description' => (!empty($data['description']) ? $data['description'] : ''),\n \t\t'jabber' => (!empty($data['jabber']) ? $data['jabber'] : ''),\n \t\t'icq' => (!empty($data['icq']) ? $data['icq'] : ''),\n \t\t'msn' => (!empty($data['msn']) ? $data['msn'] : ''),\n \t\t'yahoo' => (!empty($data['yahoo']) ? $data['yahoo'] : ''),\n \t\t'aol' => (!empty($data['aol']) ? $data['aol'] : ''),\n \t\t'last_modified' => new \\Zend\\Db\\Sql\\Expression('NOW()')\n\t\t);\n\t}", "protected function getData()\n {\n $occupancies = (new RoomOccupancyRepository)->withoutLabel(['tent', 'free'])->byNational($this->year);\n\n $spendings = (new BillRepository)->withoutResourceLabel(['tent', 'free'])->byMonthNational($this->year);\n\n foreach ($occupancies as $occupancy) {\n $this->occ_arr[$occupancy->country][$occupancy->mth] = $occupancy->counter;\n }\n\n foreach ($spendings as $spending) {\n $this->spend_arr[$spending->country][$spending->mth] = $spending->sum;\n }\n }", "private function prep_query($data, $type='insert') {\n\t\t$fields = '';\n\t\t$placeholders = '';\n\t\t$values = array();\n\t\t\n\t\t// Loop through $data and build $fields, $placeholders, and $values\t\t\t\n\t\tforeach ( $data as $field => $value ) {\n\t\t\t$fields .= \"{$field},\";\n\t\t\t$values[] = $value;\n\t\t\t\n\t\t\tif ( $type == 'update') {\n\t\t\t\t$placeholders .= $field . '=?,';\n\t\t\t} else {\n\t\t\t\t$placeholders .= '?,';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Normalize $fields and $placeholders for inserting\n\t\t$fields = substr($fields, 0, -1);\n\t\t$placeholders = substr($placeholders, 0, -1);\n\n\t\t//print_r($fields);\n\t\t//print_r($placeholders);\n\t\t//print_r($values);\n\n\t\techo '<pre>', print_r($fields), '</pre>';\n\t\techo '<pre>', print_r($placeholders), '</pre>';\n\t\techo '<pre>', print_r($values), '</pre>';\n\t\t\n\t\treturn array( $fields, $placeholders, $values );\n\n\n\t}", "public function createDataRow()\n\t{\n\t\t$row = array() ;\n\t\tforeach( $this->values as $field=>$value )\n\t\t{\n\t\t\t$row[$field] = $this->$field ;\n\t\t}\n\t\treturn $row ;\n\t}", "function fetch_query_array(){\n $queryAccessor = new Queries();\n $cumColRptquery = $queryAccessor::getSumColRpt();\n $VSClassesquery = $queryAccessor::getVSClasses();\n $PSUClassesquery = $queryAccessor::getPSUClasses();\n $VSInfoquery = $queryAccessor::getVSInfo();\n $PSUInfoquery = $queryAccessor::getPSUInfo();\n $creditBreakdownquery = $queryAccessor::getCreditBreakdown();\n return array(\n $cumColRptquery,\n $VSClassesquery,\n $PSUClassesquery,\n $VSInfoquery,\n $PSUInfoquery,\n $creditBreakdownquery\n );\n}", "public function prepareData($params){\r\n\t\t$available_data = \\DB::table($this->table);\r\n\t\t$recordsTotal = $available_data->count();\r\n\r\n\t\t// seleted columns\r\n\t\t// $select = array('u.*', 'g.name AS gender', 'r.name AS role_name', 'r.id AS role_id');\r\n\t\t// if(@$params['selected_columns'] != ''){\r\n\t\t// \t$select = explode(',', $params['selected_columns']);\r\n\t\t// }\r\n\r\n\t\t// join here\r\n\t\t// $available_data = $available_data->select($select);\r\n\r\n\t\t// condition here\r\n\t\t$filters = $params['filter'];\r\n\t\tforeach($filters as $column => $items){\r\n\t\t\tforeach($items as $item){\r\n\t\t\t\tif(is_array($item)){\r\n\t\t\t\t\tif(!empty($item['value'])){\r\n\t\t\t\t\t\t$available_data = $available_data->where($column, $item['op'], $item['value']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\tif(!empty($items['value'])){\r\n\t\t\t\t\tif(strtolower($items['op']) == 'like'){\r\n\t\t\t\t\t\t$items['value'] = '%' . $items['value'] . '%';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(strtolower($items['op']) != 'in'){\r\n\t\t\t\t\t\t$available_data = $available_data->where($column, $items['op'], $items['value']);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$available_data = $available_data->whereIn($column, $items['value']);\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\treturn array(\r\n\t\t\t'recordsTotal' => $recordsTotal,\r\n\t\t\t'data' => $available_data,\r\n\t\t);\r\n\t}", "protected function data()\n {\n $row = array('id' => 0, 'name' => '', 'age' => 0, 'gender' => '');\n\n $rougin = $angel = $royce = $roilo = $rouine = $row;\n\n $rougin['id'] = 1;\n $rougin['name'] = 'rougin';\n $rougin['age'] = 18;\n $rougin['gender'] = 'male';\n\n $angel['id'] = 2;\n $angel['name'] = 'angel';\n $angel['age'] = 19;\n $angel['gender'] = 'female';\n\n $royce['id'] = 3;\n $royce['name'] = 'royce';\n $royce['age'] = 15;\n $royce['gender'] = 'male';\n\n $roilo['id'] = 4;\n $roilo['name'] = 'roilo';\n $roilo['age'] = 17;\n $roilo['gender'] = 'male';\n\n $rouine['id'] = 5;\n $rouine['name'] = 'rouine';\n $rouine['age'] = 12;\n $rouine['gender'] = 'male';\n\n return array($rougin, $angel, $royce, $roilo, $rouine);\n }", "public function getData()\n {\n $row = $this->_row;\n $data = array(\n 'id' => intval($row['id']),\n 'mls_number' => $row['mls_number'],\n 'type' => $row['type'],\n 'price' => intval($row['price']),\n 'city' => $row['city'],\n 'subdivision' => $row['subdivision'],\n 'num_bedrooms' => ($row['bedrooms'] == 0 ? null : intval($row['bedrooms'])),\n 'num_bathrooms' => ($row['bathrooms'] == 0 ? null : floatval($row['bathrooms'])),\n 'num_sqft' => ($row['sqft'] == 0 ? null : intval($row['sqft'])),\n 'feed' => $row['idx'],\n 'source' => $row['table'],\n );\n return $data;\n }", "public function getDataArray() {\n $emailLogData = $this->db->fetchAll(\"SELECT * FROM email_log \" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());\n return $emailLogData;\n }", "protected function _buildFeedData() {\n\t\t$items = $this->_getItems();\n\t\t// array_map must be on an array - $items is a collection so need to get the\n\t\t// underlying array to pass to array_map\n\t\treturn array_map(array($this, '_applyMapping'), $items->getItems());\n\t}", "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 }", "public function _getData(): array\n {\n $result = [\n 'traveler' => $this->getTraveler(),\n 'watcher' => $this->getWatcher(),\n 'distance' => $this->getDistance(),\n ];\n\n return parent::normalizeData($result);\n }", "public function getResult()\n {\n $data = [\n 'query' => $this->getQuery(),\n 'table' => $this->table,\n ];\n\n if (isset($this->columns)) {\n $data['columns'] = $this->columns;\n }\n if (isset($this->with)) {\n $data['with'] = $this->with;\n }\n if (isset($this->where)) {\n $data['where'] = $this->where;\n }\n if (isset($this->data)) {\n $data['data'] = $this->data;\n }\n if (isset($this->order)) {\n $data['order'] = $this->order;\n }\n if (isset($this->limit)) {\n $data['limit'] = $this->limit;\n }\n\n return $data;\n }", "public function createQuery($data);", "public function build( $data )\n {\n\t\t/* Inline build from cache files? Not all drviers may have a cache file.. */\n\t\tif ( $this->usingClass != 'db_driver_mysql' AND ( $data['queryKey'] AND $data['queryLocation'] AND $data['queryClass'] ) )\n\t\t{ \n\t\t\tif ( self::loadCacheFile( $data['queryLocation'], $data['queryClass'] ) === TRUE )\n\t\t\t{\n\t\t\t\tself::buildFromCache( $data['queryKey'], $data['queryVars'], $data['queryClass'] );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n \tif ( !empty($data['select']) )\n \t{\n \t\t$this->_buildSelect( $data['select'], $data['from'], isset($data['where']) ? $data['where'] : '', isset( $data['add_join'] ) ? $data['add_join'] : array(), isset( $data['calcRows'] ) ? $data['calcRows'] : '', $data['forceIndex'] );\n \t}\n \t\n \tif ( !empty($data['update']) )\n \t{\n \t\t$this->update( $data['update'], $data['set'], isset($data['where']) ? $data['where'] : '', false, true, isset( $data['add_join'] ) ? $data['add_join'] : array() );\n \t\treturn;\n \t}\n \t\n \tif ( !empty($data['delete']) )\n \t{\n \t\t$this->delete( $data['delete'], $data['where'], $data['order'], $data['limit'], false );\n \t\treturn;\n \t}\n \t\n \tif ( !empty($data['group']) )\n \t{\n \t\t$this->_buildGroupBy( $data['group'] );\n \t}\n \t\n \tif ( !empty($data['having']) )\n \t{\n \t\t$this->_buildHaving( $data['having'] );\n \t} \t\n \t\n \tif ( !empty($data['order']) )\n \t{\n \t\t$this->_buildOrderBy( $data['order'] );\n \t}\n \t\n\t\tif ( isset( $data['calcRows'] ) AND $data['calcRows'] === TRUE )\n\t\t{\n\t\t\t$this->_buildCalcRows();\n\t\t}\n\t\t\n \tif ( isset($data['limit']) && is_array( $data['limit'] ) )\n \t{\n \t\t$this->_buildLimit( $data['limit'][0], $data['limit'][1] );\n \t}\n }", "public function getSQL($data){\n\t\treturn array(\n\t\t\t'date' => $data['date'],\n\t\t\t'year' => $data['year'],\n\t\t\t'month' => $data['month'],\n\t\t\t'day' => $data['day'],\n\t\t\t'company_id' => $data['company_id'],\n\t\t\t'user_id' => $data['user_id'],\n\t\t\t'project_id' => $data['project_id'],\n\t\t\t'task_id' => $data['task_id'],\n\t\t\t'hours' => $data['hours'],\n\t\t\t'billable' => $data['billable'],\n\t\t\t'description' => $data['description'],\n\t\t\t'last_modified' => new \\Zend\\Db\\Sql\\Expression('NOW()')\n\t\t);\n\t}", "public function build(array $dataset);", "public function buildAndFetch( $data );", "public function doQuery() {\n // Selects all of ads' title and writer's name\n $queryString = \"SELECT title, name FROM advertisements INNER JOIN users ON users.id = advertisements.userid ORDER BY advertisements.id DESC\";\n\n $getAds = $this->sql->query($queryString);\n\n // Store the result array in the $data variable, which can be available by getData() later\n while($rows = $getAds->fetch_array(MYSQLI_ASSOC)) {\n array_push($this->data, $rows);\n }\n }", "public function build(): array;", "public function build(): array;", "private function createRequestsArray(){\n \n\t$doctorNames = $this->getDoctorNames();\n\t\n $requests = $this->getDatabaseRequests();\n\t\n\t$reqArray = array();\n\t\n\tforeach($requests as $req) {\n\t\tforeach($doctorNames as $doc) {\n\t\t\tif($doc[0] == $req[0]) {\n\t\t\t\t$dateFromRequest = strtotime($req[2]);\n\t\t\t\t$dateReq = date('Y-m-d',$dateFromRequest);\n\t\t\t\tif($req[1] == '0'){\n\t\t\t\t\t$color = \"#FF0000\";\n\t\t\t\t} else {\n\t\t\t\t\t$color = \"#00FF00\";\n\t\t\t\t}\n\t\t\t\t$request = array('title'=>\"$doc[1]\",'start'=>\"$dateReq\",'backgroundColor'=>\"$color\");\n\t\t\t\t$reqArray[] = $request;\n\t\t\t\tunset($request);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//$reqArray = array(array('title'=>'TEST','start'=>\"2013-04-04\",'backgroundColor'=>\"#FF0000\"),\n\t//array('title'=>'TEST2','start'=>\"2013-04-06\",'backgroundColor'=>\"#00FF00\"));\n\t\n\treturn $reqArray;\n}", "function build_query($data)\n {\n }", "function _build_row_by_post()\n{\n\t$row = array(\n\t\t'syno_id' => $this->_post_class->get_post_get_int( 'syno_id' ),\n\t\t'syno_time_create' => $this->_post_class->get_post_int( 'syno_time_create' ),\n\t\t'syno_time_update' => $this->_post_class->get_post_int( 'syno_time_update' ),\n\t\t'syno_weight' => $this->_post_class->get_post_int( 'syno_weight' ),\n\t\t'syno_key' => $this->_post_class->get_post_text( 'syno_key' ),\n\t\t'syno_value' => $this->_post_class->get_post_text( 'syno_value' ),\n\t);\n\treturn $row;\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 }", "public function generateArray()\r\n\t{\t\r\n\t\t$data = array('logID'=>$this->logID,'text'=>$this->Text,'timestamp'=>$this->timestamp, 'textid'=>$this->textID);\r\n\t\tif($this->user!=null)\r\n\t\t\t$data['user'] = $this->user->generateArray();\r\n\t\tif($this->building!=null)\r\n\t\t\t$data['building'] = $this->building->generateArray('normal');\r\n\t\tif($this->card!=null)\r\n\t\t\t$data['card']=$this->card->generateArray();\r\n\t\tif($this->location!=null)\r\n\t\t\t$data['location']=$this->location->generateArray();\r\n\t\tif($this->icon!=null)\r\n\t\t\t$data['icon']=$this->icon;\r\n\t\tif($this->game!=null)\r\n\t\t\t$data['game']=$this->game;\r\n\t\treturn $data;\r\n\t\r\n\t}", "private function _getData():array {\n\n # Set result\n $result = [];\n\n # Return result\n return $result;\n\n }", "public function getData()\n {\n $data = array();\n $limit = intval($this->getProperty('limit'));\n $start = intval($this->getProperty('start'));\n\n $c = $this->modx->newQuery($this->classKey);\n $c = $this->prepareQueryBeforeCount($c);\n $data['total'] = $this->modx->getCount($this->classKey, $c);\n $c = $this->prepareQueryAfterCount($c);\n $c->select($this->modx->getSelectColumns($this->classKey, $this->classKey));\n\n $sortClassKey = $this->getSortClassKey();\n $sortKey = $this->modx->getSelectColumns($sortClassKey, $this->getProperty('sortAlias', $sortClassKey), '',\n array($this->getProperty('sort')));\n if (empty($sortKey)) {\n $sortKey = $this->getProperty('sort');\n }\n $c->sortby($sortKey, $this->getProperty('dir'));\n if ($limit > 0) {\n $c->limit($limit, $start);\n }\n\n $data['results'] = array();\n if ($c->prepare() && $c->stmt->execute()) {\n while ($row = $c->stmt->fetch(PDO::FETCH_ASSOC)) {\n $data['results'][] = $this->prepareArray($row);\n }\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR, print_r($c->stmt->errorInfo(), true));\n }\n\n return $data;\n }", "public function exchanegArray($_data)\n {\n $this->branch_no = (int) gv('branch_no', $_data);\n $this->branch_name = (string) gv('branch_name', $_data);\n $this->abbr_name = (string) gv('abbr_name', $_data);\n $this->timezone = (string) gv('timezone', $_data);\n $this->phone = (string) gv('phone', $_data);\n $this->address = (string) gv('address', $_data);\n $this->update_time = (string) gv('update_time', $_data);\n }", "protected function buildFromSQL( $sql )\r\n\t{\r\n\t\t$tor = array();\r\n\t\treturn $tor;\r\n\t}", "public function build( $data );", "public function build_data() {\n $this->total_collection = (int)count($this->feeds);\n $redis_total_set = (int)$this->redis->hget($this->key_name, 'total:set'); \n \n $key = $this->redis->hgetall($this->key_name);\n $hosted_feeds = $this->group_and_build(); \n\n if(!$key || $redis_total_set !== $this->total_collection) {\n //echo \"Processing: Insert Data into Redis\";\n //insert data into redis\n $this->redis->hset($this->key_name, 'total:set', $this->total_collection);\n $page = 0;\n foreach($hosted_feeds as $feed_group => $feed_list) {\n $page_number = ++$page;\n $spring_data = Array($feed_group => $feed_list);\n $this->redis->hset($this->key_name, \"set:$page_number\", json_encode($spring_data));\n $spring_data = Null;\n }\n } \n \n }", "private function prep_query ($data, $type = 'insert')\n {\n $fields = '';\n $placeholders = '';\n $values = array();\n\n // Loop through $data and build $fields, $placeholders, and $values\n foreach ($data as $field => $value) {\n $fields .= \"{$field},\";\n $values[] = $value;\n\n if ( $type == 'update' )\n {\n $placeholders .= \"`\" . $field . \"`\" . '=?,';\n }\n else\n {\n $placeholders .= '?,';\n }\n }\n\n // Normalize $fields and $placeholders for inserting\n $fields = substr ($fields, 0, -1);\n $placeholders = substr ($placeholders, 0, -1);\n\n return array($fields, $placeholders, $values);\n }", "abstract function prepare_data(&$data_arr);", "protected function getData(){\n $result= array();\n $dSource = $this->getDataSource();\n if($dSource !== null){\n foreach($dSource->getFields() as $field){\n $result[$field->getName()] = $field->getValue();\n }\n }\n return($result);\n }", "protected function getData() {\n \n if ($this->findType === 'query') {\n $modelClassName = get_class($this->model);\n $query = $this->requestParams[$modelClassName]['query'];\n $data = $this->Email->executQuery($query);\n } \n $this->appData = utf8_encode(serialize($data));\n }", "public function data()\n\t{\n\t\t$query = $this->query;\n\t\t$query['limit'] = $this->per_page;\n\t\t$query['offset'] = ($this->get_cur_page() - 1) * $this->per_page;\n\t\treturn $this->model->all($query);\n\t}", "protected function buildAudienceData() : array\n {\n // Data container\n $audience = [];\n\n // Add target channnels\n if (!empty($this->getChannels())) {\n $audience['tag'] = $this->getChannels();\n }\n\n // Add target aliases\n if (!empty($this->getAliases())) {\n foreach ($this->getAliases() as $alias) {\n $audience['alias'][] = $alias;\n }\n }\n\n // Add named user targets\n if (!empty($this->getNamedUsers())) {\n foreach ($this->getNamedUsers() as $namedUser) {\n $audience['named_user'][] = $namedUser;\n }\n }\n\n return $audience;\n }", "public function getMultipleData()\n\t{\n\t\t$calculatedData = $this->getCalculatedData();\n\t\tif (!$calculatedData)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\t$result = [];\n\t\tforeach ($calculatedData as $row)\n\t\t{\n\t\t\t$currentDate = $row['DATE'];\n\t\t\t$previousDate = $row['PREVIOUS_DATE'];\n\n\t\t\t$currentUrlParams = [];\n\t\t\t$previousUrlParams = [];\n\n\t\t\tif (!is_null($row['DATE']))\n\t\t\t{\n\t\t\t\t$currentDate = $this->getDateForUrl($currentDate);\n\t\t\t\t$currentUrlParams = $this->getUrlParams($currentDate['start'], $currentDate['finish']);\n\t\t\t}\n\n\t\t\tif (!is_null($row['PREVIOUS_DATE']))\n\t\t\t{\n\t\t\t\t$previousDate = $this->getDateForUrl($previousDate);\n\t\t\t\t$previousUrlParams = $this->getUrlParams($previousDate['start'], $previousDate['finish']);\n\t\t\t}\n\n\t\t\t$result[] = [\n\t\t\t\t'value' => [\n\t\t\t\t\t'CURRENT_DATE' => $currentDate['date'],\n\t\t\t\t\t'PREVIOUS_DATE' => $previousDate['date'],\n\t\t\t\t\t'CURRENT_DATE_FORMATTED' => $this->formatDateForGrid($currentDate['date']),\n\t\t\t\t\t'PREVIOUS_DATE_FORMATTED' => $this->formatDateForGrid($previousDate['date']),\n\t\t\t\t\t'CURRENT_VALUE' => $row['CALL_COUNT'],\n\t\t\t\t\t'PREVIOUS_VALUE' => $row['PREVIOUS_CALL_COUNT'],\n\t\t\t\t\t'DYNAMICS' => $this->formatPeriodCompare($row['CALL_COUNT_COMPARE']),\n\t\t\t\t],\n\t\t\t\t'url' => [\n\t\t\t\t\t'CURRENT_DATE' => $this->createUrl(self::TELEPHONY_DETAIL_URI, $currentUrlParams),\n\t\t\t\t\t'PREVIOUS_DATE' => $this->createUrl(self::TELEPHONY_DETAIL_URI, $previousUrlParams),\n\t\t\t\t\t'CURRENT_VALUE' => $this->createUrl(self::TELEPHONY_DETAIL_URI, $currentUrlParams),\n\t\t\t\t\t'PREVIOUS_VALUE' => $this->createUrl(self::TELEPHONY_DETAIL_URI, $previousUrlParams),\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function buildAndFetchAll( $data, $arrayIndex=null )\n {\n \t$return = array();\n \t\n \t$this->build( $data );\n\n \t$res = $this->execute();\n \t\n \tif ( ! empty( $data['select'] ) )\n \t{\n \t\twhile( $row = $this->fetch( $res ) )\n \t\t{\n\t \t\tif ( $arrayIndex !== null )\n\t \t\t{\n\t \t\t\tif ( ! count( $return ) && ! array_key_exists( $arrayIndex, $row ) )\n\t \t\t\t{\n\t\t \t\t\ttrigger_error( 'Index ' . $arrayIndex . ' not found in results' );\n\t \t\t\t}\n\t \t\t\t\n\t\t \t\t$return[ $row[ $arrayIndex ] ] = $row;\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t\t \t\t$return[] = $row;\n\t \t\t}\n \t\t}\n \t}\n \t\n \treturn $return;\n }", "public function getMultipleData();", "public function _getData(): array\n {\n $result = [\n ];\n\n return parent::normalizeData($result);\n }", "public function gatherSQLQueryData()\n {\n $queryTotals = array();\n\n $queryTotals['count'] = 0;\n $queryTotals['time'] = 0;\n\n $queries = array();\n\n if(isset($this->connection)) {\n $queryLog = $this->connection->getQueryLog();\n\n $queryTotals['count'] += count($queryLog);\n\n foreach($queryLog as $query) {\n if(isset($query['bindings']) && ! empty($query['bindings'])) {\n $query['sql'] = PdoDebugger::show($query['query'], $query['bindings']);\n } else {\n $query['sql'] = $query['query'];\n }\n\n $query = $this->attemptToExplainQuery($query);\n\n $queryTotals['time'] += $query['time'];\n\n $query['time'] = $this->getReadableTime($query['time']);\n\n //\n $queries[] = $query;\n }\n }\n\n $queryTotals['time'] = $this->getReadableTime($queryTotals['time']);\n\n $this->output['queries'] = $queries;\n $this->output['queryTotals'] = $queryTotals;\n }", "protected function buildPushData() : array\n {\n // Data container\n $data = [];\n\n // Set audience\n $data['audience'] = !empty($this->buildAudienceData()) ? $this->buildAudienceData() : 'all';\n\n // Set iOS data\n if (!empty($this->buildIOSData())) {\n $data['notification']['ios'] = $this->buildIOSData();\n }\n\n // Set Android data\n if (!empty($this->buildAndroidData())) {\n $data['notification']['android'] = $this->buildAndroidData();\n }\n\n // Set Windows data\n if (!empty($this->buildWnsData())) {\n $data['notification']['wns'] = $this->buildWnsData();\n }\n\n // Set device types\n $data['device_types'] = $this->getPlatforms();\n\n return $data;\n }", "public function query_arr() {\n\t\t\treturn \\uri\\generate::query_array($this->object);\n\t\t}", "private function build_query_by_properties()\n {\n $l_sql = '';\n\n foreach ($this->m_view_properties as $l_category_type_id => $l_categories) {\n foreach ($l_categories as $l_category_id => $l_properties) {\n if (isset($l_properties['table'])) {\n $l_table = $l_properties['table'];\n $l_obj_field = $l_properties['obj_id'];\n\n $l_sql .= 'LEFT JOIN ' . $l_table . ' ON ' . $l_obj_field . ' = main.isys_obj__id ';\n\n if (isset($l_properties['join'])) {\n $l_sql .= $l_properties['join']['join_type'] . ' JOIN ' . $l_properties['join']['table'] . ' AS ' . $l_properties['join']['alias'] . ' ON ';\n $l_sql .= $l_properties['join']['join_field'] . ' = ' . $l_properties['join']['alias'] . '.' . $l_properties['join']['field'] . ' ';\n }\n\n foreach ($l_properties['properties'] as $l_property_key => $l_property_info) {\n $this->m_headers[$l_property_key] = $l_property_info;\n }\n\n if (isset($l_properties['helper'])) {\n foreach ($l_properties['helper'] as $l_field => $l_helper) {\n $this->m_helpers[$l_field] = $l_helper;\n }\n }\n } else {\n // Dynamic property.\n foreach ($l_properties['properties'] as $l_property_key => $l_property_info) {\n $this->m_dynamic_headers[$l_property_key] = $l_property_info;\n }\n\n if (isset($l_properties['helper'])) {\n foreach ($l_properties['helper'] as $l_field => $l_helper) {\n $this->m_helpers[$l_field] = $l_helper;\n }\n }\n }\n }\n }\n\n $l_selection = '*';\n\n if (count($this->m_headers) > 0) {\n $l_selection = '';\n foreach ($this->m_headers as $l_field_alias => $l_field) {\n $l_selection .= $l_field . ' AS ' . $l_field_alias . ',';\n }\n\n $l_selection = rtrim($l_selection, ',');\n }\n\n $this->m_headers = array_merge_recursive($this->m_headers, $this->m_dynamic_headers);\n\n $l_sql_main = 'SELECT ' . $l_selection . ', main.isys_obj__id AS __objid__ FROM isys_obj AS main ' .\n 'INNER JOIN isys_obj_type ON main.isys_obj__isys_obj_type__id = isys_obj_type__id ' . $l_sql;\n\n $this->m_sql = $l_sql_main;\n }", "private function buildRequest(): array\n {\n return [\n \"documentoResponsavelPagamento\" => $this->payerTaxId,\n \"numeroNotaFiscal\" => $this->invoiceNumber,\n \"numeroSerieNotaFiscal\" => $this->invoiceSeries,\n \"conhecimentoTransporteEletronico\" => $this->eBillOfLadingNumber,\n \"numeroSerieConhecimentoTransporteEletronico\" => $this->ebillsOfLadingeries,\n \"documentoDestinatario\" => $this->receiverTaxId,\n \"codigoFilialOrigem\" => $this->originBranch,\n \"dataInicial\" => $this->initialDate,\n \"dataFinal\" => $this->finalDate\n ];\n }", "public function getQueryAsArray();", "public function searchData () {\n\t\treturn array (\n\t\t\t// Test 0 - Find column_string that contains 'Nothing'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_string' => 'Nothing',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isEmpty (),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 1 - Find column_boolean that quals 1 and column_string contains 'Le'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_boolean' => '1',\n\t\t\t\t\t'column_string' => 'Le',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 1,\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Test 2 - Find column_regex that contains '2'\n\t\t\tarray (\n\t\t\t\t'argument_attributes' => array (\n\t\t\t\t\t'column_regex' => '2',\n\t\t\t\t),\n\t\t\t\t'argument_expects' => array (\n\t\t\t\t\t'search_results' => $this->isType ('array'),\n\t\t\t\t\t'search_results_count' => 2,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "public function getData($params = array())\n {\n\t\t$query = \"\n SELECT to_char(ha_statement.PERIOD_BUDGET,'RRRR') PERIOD_BUDGET, \n\t\t\t\t ha_statement.BA_CODE,\n\t\t\t\t ORG.COMPANY_NAME,\n\t\t\t\t ha_statement.AFD_CODE, \n\t\t\t\t ha_statement.BLOCK_CODE,\n\t\t\t\t ha_statement.BLOCK_DESC, \n\t\t\t\t ha_statement.LAND_TYPE,\n\t\t\t\t ha_statement.TOPOGRAPHY,\n\t\t\t\t to_char(ha_statement.TAHUN_TANAM,'MM.RRRR') TAHUN_TANAM, \n\t\t\t\t to_char(ha_statement.TAHUN_TANAM,'MM') TAHUN_TANAM_M, \n\t\t\t\t to_char(ha_statement.TAHUN_TANAM,'RRRR') TAHUN_TANAM_Y, \n\t\t\t\t ha_statement.MATURITY_STAGE_SMS1, \n\t\t\t\t ha_statement.MATURITY_STAGE_SMS2, \n\t\t\t\t ha_statement.HA_PLANTED, \n\t\t\t\t ha_statement.POKOK_TANAM, \n\t\t\t\t ha_statement.SPH,\n\t\t\t\t SUM(rkt.DIS_COST_JAN) JAN, \n\t\t\t\t SUM(rkt.DIS_COST_FEB) FEB, \n\t\t\t\t SUM(rkt.DIS_COST_MAR) MAR, \n\t\t\t\t SUM(rkt.DIS_COST_APR) APR, \n\t\t\t\t SUM(rkt.DIS_COST_MAY) MAY, \n\t\t\t\t SUM(rkt.DIS_COST_JUN) JUN, \n\t\t\t\t SUM(rkt.DIS_COST_JUL) JUL, \n\t\t\t\t SUM(rkt.DIS_COST_AUG) AUG, \n\t\t\t\t SUM(rkt.DIS_COST_SEP) SEP, \n\t\t\t\t SUM(rkt.DIS_COST_OCT) OCT, \n\t\t\t\t SUM(rkt.DIS_COST_NOV) NOV, \n\t\t\t\t SUM(rkt.DIS_COST_DEC) DEC, \n\t\t\t\t SUM(rkt.DIS_COST_YEAR) SETAHUN,\n\t\t\t\t MAX(rkt.COST_TRANSPORT_KG) COST_TRANSPORT_KG, \n\t\t\t\t MAX(rkt.COST_TOOLS_KG) COST_TOOLS_KG, \n\t\t\t\t MAX(rkt.COST_LABOUR_POKOK) COST_LABOUR_POKOK,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_JAN) PUPUK_JAN,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_FEB) PUPUK_FEB,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_MAR) PUPUK_MAR,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_APR) PUPUK_APR,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_MAY) PUPUK_MAY,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_JUN) PUPUK_JUN,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_JUL) PUPUK_JUL,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_AUG) PUPUK_AUG,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_SEP) PUPUK_SEP,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_OCT) PUPUK_OCT,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_NOV) PUPUK_NOV,\n\t\t\t\t MAX(NAMA_PUPUK.MATERIAL_NAME_DEC) PUPUK_DEC,\n MAX(NAMA_PUPUK.MATERIAL_JAN) MATERIAL_CODE_JAN,\n MAX(NAMA_PUPUK.MATERIAL_FEB) MATERIAL_CODE_FEB,\n MAX(NAMA_PUPUK.MATERIAL_MAR) MATERIAL_CODE_MAR,\n MAX(NAMA_PUPUK.MATERIAL_APR) MATERIAL_CODE_APR,\n MAX(NAMA_PUPUK.MATERIAL_MAY) MATERIAL_CODE_MAY,\n MAX(NAMA_PUPUK.MATERIAL_JUN) MATERIAL_CODE_JUN,\n MAX(NAMA_PUPUK.MATERIAL_JUL) MATERIAL_CODE_JUL,\n MAX(NAMA_PUPUK.MATERIAL_AUG) MATERIAL_CODE_AUG,\n MAX(NAMA_PUPUK.MATERIAL_SEP) MATERIAL_CODE_SEP,\n MAX(NAMA_PUPUK.MATERIAL_OCT) MATERIAL_CODE_OCT,\n MAX(NAMA_PUPUK.MATERIAL_NOV) MATERIAL_CODE_NOV,\n MAX(NAMA_PUPUK.MATERIAL_DEC) MATERIAL_CODE_DEC\n\t\t\tFROM TR_RKT_PUPUK_COST_ELEMENT rkt\n\t\t\tLEFT JOIN TM_HECTARE_STATEMENT ha_statement\n\t\t\t\tON rkt.PERIOD_BUDGET = ha_statement.PERIOD_BUDGET\n\t\t\t\tAND rkt.BA_CODE = ha_statement.BA_CODE\n\t\t\t\tAND rkt.AFD_CODE = ha_statement.AFD_CODE\n\t\t\t\tAND rkt.BLOCK_CODE = ha_statement.BLOCK_CODE\n\t\t\t\tAND rkt.TIPE_TRANSAKSI = 'NORMAL'\n\t\t\tLEFT JOIN (SELECT PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE,\n LISTAGG (MATERIAL_NAME_JAN, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_JAN,\n LISTAGG (MATERIAL_NAME_FEB, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_FEB,\n LISTAGG (MATERIAL_NAME_MAR, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_MAR,\n LISTAGG (MATERIAL_NAME_APR, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_APR,\n LISTAGG (MATERIAL_NAME_MAY, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_MAY,\n LISTAGG (MATERIAL_NAME_JUN, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_JUN,\n LISTAGG (MATERIAL_NAME_JUL, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_JUL,\n LISTAGG (MATERIAL_NAME_AUG, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_AUG,\n LISTAGG (MATERIAL_NAME_SEP, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_SEP,\n LISTAGG (MATERIAL_NAME_OCT, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_OCT,\n LISTAGG (MATERIAL_NAME_NOV, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_NOV,\n LISTAGG (MATERIAL_NAME_DEC, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NAME_DEC,\n LISTAGG (MATERIAL_JAN, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_JAN,\n LISTAGG (MATERIAL_FEB, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_FEB,\n LISTAGG (MATERIAL_MAR, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_MAR,\n LISTAGG (MATERIAL_APR, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_APR,\n LISTAGG (MATERIAL_MAY, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_MAY,\n LISTAGG (MATERIAL_JUN, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_JUN,\n LISTAGG (MATERIAL_JUL, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_JUL,\n LISTAGG (MATERIAL_AUG, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_AUG,\n LISTAGG (MATERIAL_SEP, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_SEP,\n LISTAGG (MATERIAL_OCT, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_OCT,\n LISTAGG (MATERIAL_NOV, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_NOV,\n LISTAGG (MATERIAL_DEC, ' + ') WITHIN GROUP (ORDER BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) AS MATERIAL_DEC\n FROM (SELECT DISTINCT PPK.PERIOD_BUDGET, PPK.BA_CODE, PPK.AFD_CODE, PPK.BLOCK_CODE, \n TM_JAN.MATERIAL_NAME AS MATERIAL_NAME_JAN,\n TM_FEB.MATERIAL_NAME AS MATERIAL_NAME_FEB,\n TM_MAR.MATERIAL_NAME AS MATERIAL_NAME_MAR,\n TM_APR.MATERIAL_NAME AS MATERIAL_NAME_APR,\n TM_MAY.MATERIAL_NAME AS MATERIAL_NAME_MAY,\n TM_JUN.MATERIAL_NAME AS MATERIAL_NAME_JUN,\n TM_JUL.MATERIAL_NAME AS MATERIAL_NAME_JUL,\n TM_AUG.MATERIAL_NAME AS MATERIAL_NAME_AUG,\n TM_SEP.MATERIAL_NAME AS MATERIAL_NAME_SEP,\n TM_OCT.MATERIAL_NAME AS MATERIAL_NAME_OCT,\n TM_NOV.MATERIAL_NAME AS MATERIAL_NAME_NOV,\n TM_DEC.MATERIAL_NAME AS MATERIAL_NAME_DEC,\n PPK.MATERIAL_CODE_JAN AS MATERIAL_JAN,\n PPK.MATERIAL_CODE_FEB AS MATERIAL_FEB,\n PPK.MATERIAL_CODE_MAR AS MATERIAL_MAR,\n PPK.MATERIAL_CODE_APR AS MATERIAL_APR,\n PPK.MATERIAL_CODE_MAY AS MATERIAL_MAY,\n PPK.MATERIAL_CODE_JUN AS MATERIAL_JUN,\n PPK.MATERIAL_CODE_JUL AS MATERIAL_JUL,\n PPK.MATERIAL_CODE_AUG AS MATERIAL_AUG,\n PPK.MATERIAL_CODE_SEP AS MATERIAL_SEP,\n PPK.MATERIAL_CODE_OCT AS MATERIAL_OCT,\n PPK.MATERIAL_CODE_NOV AS MATERIAL_NOV,\n PPK.MATERIAL_CODE_DEC AS MATERIAL_DEC\n FROM TR_RKT_PUPUK_DISTRIBUSI PPK\n LEFT JOIN TM_MATERIAL TM_JAN\n ON TM_JAN.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_JAN.BA_CODE = PPK.BA_CODE\n AND TM_JAN.MATERIAL_CODE = PPK.MATERIAL_CODE_JAN\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_FEB\n ON TM_FEB.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_FEB.BA_CODE = PPK.BA_CODE\n AND TM_FEB.MATERIAL_CODE = PPK.MATERIAL_CODE_FEB\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_MAR\n ON TM_MAR.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_MAR.BA_CODE = PPK.BA_CODE\n AND TM_MAR.MATERIAL_CODE = PPK.MATERIAL_CODE_MAR\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_APR\n ON TM_APR.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_APR.BA_CODE = PPK.BA_CODE\n AND TM_APR.MATERIAL_CODE = PPK.MATERIAL_CODE_APR\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_MAY\n ON TM_MAY.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_MAY.BA_CODE = PPK.BA_CODE\n AND TM_MAY.MATERIAL_CODE = PPK.MATERIAL_CODE_MAY\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_JUN\n ON TM_JUN.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_JUN.BA_CODE = PPK.BA_CODE\n AND TM_JUN.MATERIAL_CODE = PPK.MATERIAL_CODE_JUN\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_JUL\n ON TM_JUL.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_JUL.BA_CODE = PPK.BA_CODE\n AND TM_JUL.MATERIAL_CODE = PPK.MATERIAL_CODE_JUL\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_AUG\n ON TM_AUG.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_AUG.BA_CODE = PPK.BA_CODE\n AND TM_AUG.MATERIAL_CODE = PPK.MATERIAL_CODE_AUG\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_SEP\n ON TM_SEP.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_SEP.BA_CODE = PPK.BA_CODE\n AND TM_SEP.MATERIAL_CODE = PPK.MATERIAL_CODE_SEP\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_OCT\n ON TM_OCT.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_OCT.BA_CODE = PPK.BA_CODE\n AND TM_OCT.MATERIAL_CODE = PPK.MATERIAL_CODE_OCT\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_NOV\n ON TM_NOV.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_NOV.BA_CODE = PPK.BA_CODE\n AND TM_NOV.MATERIAL_CODE = PPK.MATERIAL_CODE_NOV\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL'\n LEFT JOIN TM_MATERIAL TM_DEC\n ON TM_DEC.PERIOD_BUDGET = PPK.PERIOD_BUDGET\n AND TM_DEC.BA_CODE = PPK.BA_CODE\n AND TM_DEC.MATERIAL_CODE = PPK.MATERIAL_CODE_DEC\n AND PPK.TIPE_TRANSAKSI = 'KG_NORMAL')\n GROUP BY PERIOD_BUDGET, BA_CODE, AFD_CODE, BLOCK_CODE) NAMA_PUPUK\n ON RKT.BA_CODE = NAMA_PUPUK.BA_CODE \n AND NAMA_PUPUK.PERIOD_BUDGET = RKT.PERIOD_BUDGET \n AND NAMA_PUPUK.AFD_CODE = RKT.AFD_CODE \n AND NAMA_PUPUK.BLOCK_CODE = RKT.BLOCK_CODE \n\t\t\tLEFT JOIN TM_ORGANIZATION ORG\n\t\t\t\tON ha_statement.BA_CODE = ORG.BA_CODE\n\t\t\tWHERE ha_statement.DELETE_USER IS NULL\n \";\n\t\t\n\t\tif($this->_siteCode <> 'ALL'){\n\t\t\tif ($this->_referenceRole == 'REGION_CODE')\n\t\t\t\t$query .= \"AND UPPER('\".$this->_siteCode.\"') LIKE '%'||UPPER(ORG.REGION_CODE)||'%'\";\n\t\t\telseif ($this->_referenceRole == 'BA_CODE')\n\t\t\t\t$query .= \"AND UPPER('\".$this->_siteCode.\"') LIKE '%'||UPPER(ha_statement.BA_CODE)||'%'\";\n\t\t}\n\t\tif($params['budgetperiod'] != ''){\n\t\t\t$query .= \"\n AND to_char(ha_statement.PERIOD_BUDGET,'RRRR') = '\".$params['budgetperiod'].\"'\n \";\n\t\t}elseif($params['PERIOD_BUDGET'] != ''){\n\t\t\t$query .= \"\n AND to_char(ha_statement.PERIOD_BUDGET,'RRRR') = '\".$params['PERIOD_BUDGET'].\"'\n \";\n\t\t}else{\n\t\t\t$query .= \"\n AND to_char(ha_statement.PERIOD_BUDGET,'DD-MM-RRRR') = '\".$this->_period.\"'\n \";\n\t\t}\n\t\t\n\t\t//filter region\n\t\tif ($params['src_region_code'] != '') {\n\t\t\t$query .= \"\n AND UPPER(ORG.REGION_CODE) LIKE UPPER('%\".$params['src_region_code'].\"%')\n \";\n }\n\t\t\n\t\t//filter BA\n\t\tif ($params['key_find'] != '') {\n\t\t\t$query .= \"\n AND UPPER(ha_statement.BA_CODE) LIKE UPPER('%\".$params['key_find'].\"%')\n \";\n }\n\n\t\t//jika diupdate dari norma VRA, filter berdasarkan BA\n\t\tif ($params['BA_CODE'] != '') {\n\t\t\t$query .= \"\n AND UPPER(HA.BA_CODE) LIKE UPPER('%\".$params['BA_CODE'].\"%') \n \";\n }\n\t\t\n\t\t//filter maturity_stage\n\t\tif (($params['src_matstage_code']) && ($params['src_matstage_code'] != 'ALL')) {\n\t\t\t$query .= \"\n AND (\n\t\t\t\t\tUPPER(ha_statement.MATURITY_STAGE_SMS1) LIKE UPPER('%\".$params['src_matstage_code'].\"%')\n\t\t\t\t\tOR UPPER(ha_statement.MATURITY_STAGE_SMS2) LIKE UPPER('%\".$params['src_matstage_code'].\"%')\n\t\t\t\t)\n \";\n }\n\t\t\n\t\t//filter afdeling\n\t\tif ($params['src_afd'] != '') {\n\t\t\t$query .= \"\n AND UPPER(ha_statement.AFD_CODE) LIKE UPPER('%\".$params['src_afd'].\"%')\n \";\n }\n\t\t\n\t\t//filter jenis pupuk\n\t\tif ($params['src_jenis_pupuk'] != '') {\n\t\t\t$query .= \"\n AND (\n\t\t\t\t\tUPPER(NAMA_PUPUK.MATERIAL_JAN) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_FEB) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_MAR) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_APR) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_MAY) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_JUN) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_JUL) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_AUG) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_SEP) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_OCT) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_NOV) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t\tOR UPPER(NAMA_PUPUK.MATERIAL_DEC) LIKE UPPER('%\".$params['src_jenis_pupuk'].\"%')\n\t\t\t\t)\n \";\n }\n\t\t\n\t\t$query .= \"\n\t\t\tGROUP BY to_char(ha_statement.PERIOD_BUDGET,'RRRR'), ha_statement.BA_CODE, ORG.COMPANY_NAME, ha_statement.AFD_CODE, ha_statement.BLOCK_CODE,\n\t\t\t\t\tha_statement.BLOCK_DESC,ha_statement.LAND_TYPE, ha_statement.TOPOGRAPHY, to_char(ha_statement.TAHUN_TANAM,'MM.RRRR'), \n\t\t\t\t to_char(ha_statement.TAHUN_TANAM,'MM'), \n\t\t\t\t to_char(ha_statement.TAHUN_TANAM,'RRRR'), ha_statement.MATURITY_STAGE_SMS1, ha_statement.MATURITY_STAGE_SMS2, ha_statement.HA_PLANTED, ha_statement.POKOK_TANAM, ha_statement.SPH\n\t\t\tORDER BY ha_statement.BA_CODE, ha_statement.AFD_CODE, ha_statement.BLOCK_CODE\n\t\t\";\n\t\t\n\t\treturn $query;\n\t}", "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}", "private function apiGetBuild($data)\n {\n $output = array();\n for($i=0; $i<count($data); $i++){\n $output = array(\n\n );\n }\n\n return $output;\n }", "public function provideData()\n {\n if ($this->computedData !== false) {\n return $this->computedData;\n }\n\n $data = array();\n\n foreach ($this->dataProvider->provideData() as $post) {\n $date = \\DateTime::createFromFormat('U', 0);\n if ($post->date() !== \"\") {\n $date = \\DateTime::createFromFormat('U', $post->date());\n }\n\n $year = $date->format('Y');\n $month = $date->format('m');\n $keyDate = \\DateTime::createFromFormat('Y-m',$year.'-'.$month);\n\n if (!isset($data[$year])) {\n $data[$year] = array(\n 'posts' => array(),\n 'months' => array(),\n 'date' => $keyDate\n );\n }\n\n if (!isset($data[$year]['months'])) {\n $data[$year]['months'] = array('posts' => array(), 'date' => $keyDate);\n }\n\n $data[$year]['posts'][] = $post;\n $data[$year]['months'][$month]['posts'][] = $post;\n }\n\n $this->computedData = $data;\n\n return $data;\n }", "public function _getData(): array\n {\n $result = [\n 'name' => $this->getName(),\n ];\n\n return parent::normalizeData($result);\n }", "private function createParamArray()\n {\n $data = [];\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n if ($property->initialized() && !$property->isReadOnly())\n {\n $data[$property->name()] = $property->preparedForDb();\n }\n }\n return $data;\n }", "public function getQueries(): array\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "public function build()\n {\n $this->responseData = [\n 'data' => $this->getData(),\n 'meta' => $this->getMeta(),\n 'links' => $this->getLinks(),\n ];\n }", "public function getData()\n {\n $data = array();\n $limit = intval($this->getProperty('limit'));\n $start = intval($this->getProperty('start'));\n\n $c = $this->modx->newQuery($this->classKey);\n $c = $this->prepareQueryBeforeCount($c);\n $data['total'] = $this->modx->getCount($this->classKey, $c);\n $c = $this->prepareQueryAfterCount($c);\n $c->select($this->modx->getSelectColumns($this->classKey, $this->classKey));\n\n $sortClassKey = $this->getSortClassKey();\n $sortKey = $this->modx->getSelectColumns($sortClassKey, $this->getProperty('sortAlias', $sortClassKey), '',\n array($this->getProperty('sort')));\n if (empty($sortKey)) {\n $sortKey = $this->getProperty('sort');\n }\n $c->sortby($sortKey, $this->getProperty('dir'));\n if ($limit > 0) {\n $c->limit($limit, $start);\n }\n\n if ($c->prepare() AND $c->stmt->execute()) {\n $data['results'] = $c->stmt->fetchAll(PDO::FETCH_ASSOC);\n }\n\n return $data;\n }", "private function get_datatable_query()\n {\n if (permission('supplier-bulk-delete')){\n $this->column_order = [null,'id','name', 'address','mobile', 'email', 'city', 'country','status', null, null];\n }else{\n $this->column_order = ['id','name', 'address','mobile', 'email', 'city', 'country','status', null, null];\n }\n \n $query = self::toBase();\n\n //search query\n if (!empty($this->_name)) {\n $query->where('name', 'like', '%' . $this->_name . '%');\n }\n if (!empty($this->_mobile)) {\n $query->where('mobile', 'like', '%' . $this->_mobile . '%');\n }\n if (!empty($this->_email)) {\n $query->where('email', 'like', '%' . $this->_email . '%');\n }\n if (!empty($this->_status)) {\n $query->where('status', $this->_status);\n }\n\n //order by data fetching code\n if (isset($this->orderValue) && isset($this->dirValue)) { //orderValue is the index number of table header and dirValue is asc or desc\n $query->orderBy($this->column_order[$this->orderValue], $this->dirValue); //fetch data order by matching column\n } else if (isset($this->order)) {\n $query->orderBy(key($this->order), $this->order[key($this->order)]);\n }\n return $query;\n }", "public function getData()\n {\n $data = $this->only(['fecha','anio','mes','tpo_deteccion_id','area_id','tpo_bitacora_id','tpo_inconformidad_id','inconformidad','solucion','grupo_id','norma_id','norma','responsable_id','fec_planeada','fec_solucion','costo','estatus_id','entity_id','usu_alta_id','usu_mod_id','dias_aviso']);\n\n\n\n return $data;\n }", "public function getDataToLogDatabase($data)\r\n {\r\n $queries=array();\r\n $queries[]=$this->getDataToLogDatabaseL1($data->average,$data->date);\r\n $queries[]=$this->getDataToLogDatabaseL2($data->data,'#INSERTID#');\r\n return $queries;\r\n }", "public function getDataEval()\n {\n $query = $this->db->query(\"SELECT tb_evaluasi.*, tb_subkriteria.`value` \n FROM tb_evaluasi \n INNER JOIN tb_subkriteria ON tb_evaluasi.kd_subkriteria = tb_subkriteria.kd_subkriteria\n ORDER BY\n tb_evaluasi.id_evaluasi ASC,\n tb_evaluasi.id_kriteria ASC\n \");\n\n $X=array();\n $alternatif='';\n $m=0;\n foreach($query->result_array() as $row){\n if($row['kd_alternatif']!=$alternatif){\n $X[$row['kd_alternatif']]=array();\n $alternatif=$row['kd_alternatif'];\n ++$m;\n }\n $X[$row['kd_alternatif']][$row['id_kriteria']]=$row['value'];\n }\n return array($X,$m);\n }", "private static function _cookData($data) {\n\t\t$tmp = array();\n $fields = array(\n 'htype', 'title', 'hd_start_time', 'hd_end_time', 'status', 'hd_object',\n 'condition_type', 'condition_value', 'rule_type', 'game_version', 'game_object',\n 'denomination','deadline','rule_content','rule_content_percent','create_time','subject_id',\n 'hd_object_addition_info', 'game_object_addition_info'\n );\n foreach ($fields as $field) {\n if(isset($data[$field])) {\n $tmp[$field] = $data[$field];\n }\n }\n\t\treturn $tmp;\n\t}", "protected function parameters()\n {\n $column = array('data' => 0, 'name' => '', 'searchable' => true);\n\n $column['orderable'] = true;\n\n $column['search'] = array('value' => '', 'regex' => false);\n\n $data = array('draw' => 1, 'columns' => array());\n\n $data['order'] = array('column' => 0, 'dir' => 'asc');\n\n $data['start'] = 0;\n\n $data['length'] = 10;\n\n $data['search'] = $column['search'];\n\n $first = $second = $third = $column;\n\n $first['data'] = 1;\n\n $second['data'] = 2;\n\n $third['data'] = 3;\n\n $data['columns'] = array($column, $first, $second, $third);\n\n return $data;\n }", "protected function _buildQuery()\r\n {\r\n \t\r\n $db = JFactory::getDBO();\r\n $query = $db->getQuery(TRUE);\r\n\r\n $query->select('proptype.ddcbookit_proptype_id, proptype.proptype_title, proptype.proptype_description');\r\n $query->from('#__ddcbookit_proptypes as proptype');\r\n return $query;\r\n \r\n }", "public function prepareData(): array\n {\n return [];\n }", "protected function getData()\n {\n //prepare labels\n $labels = array('labels' => array(\n 'SESSION ID', 'TIMESTAMP', 'SEARCH TERMS', 'GEOFILTER USED', 'NUMBER OF RESULTS',\n '1ST SCORE', '2ND SCORE',\n '1ST UDI', '1ST TITLE', '1ST LINK',\n '2ND UDI', '2ND TITLE', '2ND LINK',\n 'GEOFILTER WKT'\n )\n );\n\n //prepare body's data\n $dataArray = array();\n $entityManager = $this->getDoctrine()->getManager();\n //Query\n $queryString = 'SELECT log.creationTimeStamp, log.payLoad from ' .\n LogActionItem::class . ' log where log.actionName = :actionName order by log.creationTimeStamp DESC';\n $query = $entityManager->createQuery($queryString);\n $query->setParameters(['actionName' => 'Search']);\n $results = $query->getResult();\n $griidcArray = $this->getGriidcStaff();\n\n //process result query into an array with organized data\n foreach ($results as $result) {\n //skip the row if the search is done by a Griidc Staff\n if (\n isset($result['payLoad']['clientInfo']['userId']) &&\n in_array($result['payLoad']['clientInfo']['userId'], $griidcArray)\n ) {\n continue;\n }\n\n $searchResults = array\n (\n '1stScore' => '',\n '2ndScore' => '',\n '1stUDI' => '',\n '1stTitle' => '',\n '1stLink' => '',\n '2ndUDI' => '',\n '2ndTitle' => '',\n '2ndLink' => ''\n );\n\n $numResults = $result['payLoad']['numResults'];\n if ($numResults > 0) {\n $searchResults['1stScore'] = $result['payLoad']['results'][0]['score'];\n $searchResults['1stUDI'] = $result['payLoad']['results'][0]['udi'];\n $searchResults['1stTitle'] = $result['payLoad']['results'][0]['title'];\n $searchResults['1stLink'] = $this->container->get('router')\n ->generate(\n 'pelagos_app_ui_dataland_default',\n array('udi' => $searchResults['1stUDI']),\n UrlGenerator::ABSOLUTE_URL\n );\n }\n if ($numResults > 2) {\n $searchResults['2ndScore'] = $result['payLoad']['results'][1]['score'];\n $searchResults['2ndUDI'] = $result['payLoad']['results'][1]['udi'];\n $searchResults['2ndTitle'] = $result['payLoad']['results'][1]['title'];\n $searchResults['2ndLink'] = $this->container->get('router')\n ->generate(\n 'pelagos_app_ui_dataland_default',\n array('udi' => $searchResults['2ndUDI']),\n UrlGenerator::ABSOLUTE_URL\n );\n }\n\n $dataArray[] = array_merge(\n array\n (\n 'sessionID' => $result['payLoad']['clientInfo']['sessionId'],\n 'timeStamp' => $result['creationTimeStamp']->format(parent::INREPORT_TIMESTAMPFORMAT),\n 'searchTerms' => $result['payLoad']['filters']['textFilter'],\n 'geofilterUsed' => $result['payLoad']['filters']['geoFilter'] !== null ? 1 : 0,\n 'numResults' => $numResults\n ),\n $searchResults,\n array\n (\n 'geofilterWkt' => $result['payLoad']['filters']['geoFilter'] !== null ? $result['payLoad']['filters']['geoFilter'] : ''\n )\n );\n }\n return array_merge($labels, $dataArray);\n }", "public function queryData(){\r\n\t\treturn $this->_placeholders;\r\n\t}", "public function getPacientePrestadoraArray(){\n $query = new Query;\n $query->select(['Paciente_prestadora.id, CONCAT(Paciente.nro_documento,\" (\",Paciente.nombre,\") \", Prestadoras.descripcion ) descripcion']) \n ->from( 'Prestadoras')\n ->join(\t'join', \n 'Paciente_prestadora',\n 'Prestadoras.id=Paciente_prestadora.prestadoras_id'\n ) \n ->join(\t'join', \n 'Paciente',\n 'Paciente.id=Paciente_prestadora.paciente_id'\n ) \n ->where([\"Paciente_prestadora.id\"=>$this->Paciente_prestadora_id]);\n \n $command = $query->createCommand();\n $data = $command->queryAll();\t\n $arrayData=array();\n if( !empty($data) and is_array($data) ){ //and array_key_exists('detallepedidopieza',$data) and array_key_exists('detalle_pedido_id',$data)){\n foreach ($data as $key => $arrayPacientePrestadora) {\n $arrayData[$arrayPacientePrestadora['id']]=$arrayPacientePrestadora['descripcion']; \n }\n }\n //todas los pacientes prestadoras\n $query = new Query;\n $query->select(['Paciente_prestadora.id, CONCAT(Paciente.nro_documento,\" (\",Paciente.nombre,\") \", Prestadoras.descripcion ) descripcion']) \n ->from( 'Prestadoras')\n ->join(\t'join', \n 'Paciente_prestadora',\n 'Prestadoras.id=Paciente_prestadora.prestadoras_id'\n ) \n ->join(\t'join', \n 'Paciente',\n 'Paciente.id=Paciente_prestadora.paciente_id'\n );\n \n $command = $query->createCommand();\n $data = $command->queryAll();\t\n if( !empty($data) and is_array($data) ){ //and array_key_exists('detallepedidopieza',$data) and array_key_exists('detalle_pedido_id',$data)){\n foreach ($data as $key => $arrayPacientePrestadora) {\n $arrayData[$arrayPacientePrestadora['id']]=$arrayPacientePrestadora['descripcion']; \n }\n } \n\n return $arrayData;\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 loadQa_Data() {\n $_return = array();\n \n $limit = sprintf('%s,%s', ($this->page - 1) * self::pageLite, self::pageLite);\n \n $sql = sprintf(\"SELECT ql.uid,ql.readi,ql.title,ql.datetime,ql.ansi AS commi,cl.username AS usn FROM `qa_question_list` ql LEFT JOIN client cl ON cl.uid = ql.uid ORDER BY `datetime` DESC,`vote` DESC LIMIT %s;\", $limit);\n \n $re = $this->mysql->query($sql);\n while ($_resultSet = mysql_fetch_array($re)) {\n $_resultSet['ush'] = G::getHeadimg($_resultSet['uid'], 45);\n $_return[] = $_resultSet;\n }\n \n return $_return;\n }", "private function table_data()\n {\n $data = array();\n $args = array( \n 'post_type' => 'sutabu_ppdb',\n 'post_status' => 'publish',\n 'orderby' => 'title', \n 'order' => 'ASC', \n );\n\n $the_query = new WP_Query( $args );\n\n if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post();\n $data[] = array(\n 'id' => $dt->ID,\n 'perusahaan' => the_title(),\n 'total_ken' => the_content(),\n 'total_pen' => 'ok',\n 'tanggal' => 'ok'\n ); \n endwhile; endif;\n wp_reset_postdata();\n\n return $data;\n }", "public function get_data(): array;", "public function get_data(): array;", "public function DataGenerateArray() {\n $data = $this->GenerateArray();\n return $data['data']; \n }", "public function getData()\n\t{\n\t\t$data = array(\n\t\t\t'nt_id'\t\t\t\t=> $this->getId(),\n\t\t\t'usr_id'\t\t\t=> $this->getUserId(),\n\t\t\t'nt_title'\t\t\t=> $this->getTitle(),\n\t\t\t'nt_description'\t=> $this->getDescription(),\n//\t\t\t'nt_image'\t\t\t=> $this->getImage(),\n\t\t\t'nt_location_street'=> $this->getLocationStreet(),\n\t\t\t'nt_location_zip'\t=> $this->getLocationZip(),\n\t\t\t'nt_location_city'\t=> $this->getLocationCity(),\n\t\t\t'user_name'\t\t\t=> $this->getuserName(),\n\t\t\t'nt_user_phone'\t\t=> $this->getUserPhone(),\n\t\t\t'nt_user_email'\t\t=> $this->getUserEmail(),\n\t\t\t'nt_price'\t\t\t=> $this->getPrice(),\n\t\t\t'nt_price_type'\t\t=> $this->getPriceType(),\n\t\t\t'nt_create_date'\t=> $this->getCreateDate(),\n\t\t\t'nt_mod_date'\t\t=> $this->getModDate(),\n\t\t\t'nt_deleted'\t\t=> $this->getDeleted(),\n\t\t\t'nt_hidden'\t\t\t=> $this->getHidden(),\n\t\t\t'nt_category_id'\t=> $this->getCategoryId(),\n//\t\t\t'nt_validity'\t\t=> $this->getValidity(),\n\t\t\t'nt_until_date'\t\t=> $this->getUntilDate()\n\t\t\t\n\t\t);\n\t\t\n\t\treturn $data;\n\t}", "public function doData() {\n\t\t\t$dataSet = array();\n\t\t\t$dataSet['attribute:type'] = $this->dataType;\n\t\t\t$dataSet['attribute:action'] = $this->actionType;\n\n\t\t\tif($this->total) {\n\t\t\t\t$dataSet['attribute:total'] = $this->total;\n\n\t\t\t\tif(!is_null($this->offset)) {\n\t\t\t\t\t$dataSet['attribute:offset'] = $this->offset;\n\t\t\t\t}\n\n\t\t\t\tif(!is_null($this->limit)) {\n\t\t\t\t\t$dataSet['attribute:limit'] = $this->limit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dataSet = array_merge($dataSet, $this->data);\n\n\t\t\tcmsController::getInstance()->setAdminDataSet($dataSet);\n\t\t}", "private function fetchingData(array $input){\n\n $result = $this->runQuery($input);\n \n if (isset($input['result'])){\n if ($input['result'] == \"array\"){\n while($row = mysql_fetch_assoc($result)){\n $data[] = $row;\n }\n }\n elseif ($input['result'] == \"object\") {\n while($row = mysql_fetch_object($result))\n {\n $data[] = $row;\n }\n }\n }\n else {\n while($row = mysql_fetch_assoc($result)){\n $data[] = $row;\n }\n }\n \n mysql_free_result($result);\n return $data;\n }", "abstract protected function _generateDataCollection();", "public function to_array()\r\n {\r\n $d = array();\r\n\r\n if (!empty($this->http_status_code)) {\r\n $d['@http_status_code'] = $this->http_status_code;\r\n }\r\n if (!empty($this->visible_sources)) {\r\n $d['@visible_sources'] = $this->visible_sources;\r\n }\r\n if (!empty($this->available_sources)) {\r\n $d['@available_sources'] = $this->available_sources;\r\n }\r\n if (!empty($this->search_id)) {\r\n $d['@search_id'] = $this->search_id;\r\n }\r\n if (!empty($this->persons_count)) {\r\n $d['@persons_count'] = $this->persons_count;\r\n }\r\n\r\n if (!empty($this->warnings)) {\r\n $d['warnings'] = $this->warnings;\r\n }\r\n if (!empty($this->query)) {\r\n $d['query'] = $this->query->to_array();\r\n }\r\n if (!empty($this->person)) {\r\n $d['person'] = $this->person->to_array();\r\n }\r\n if (!empty($this->possible_persons)) {\r\n $d['possible_persons'] = array();\r\n foreach ($this->possible_persons as $possible_person) {\r\n $d['possible_persons'][] = $possible_person->to_array();\r\n }\r\n }\r\n if (!empty($this->sources)) {\r\n $d['sources'] = array();\r\n foreach ($this->sources as $source) {\r\n $d['sources'][] = $source->to_array();\r\n }\r\n }\r\n\r\n if (!empty($this->available_data)) {\r\n $d['available_data'] = $this->available_data->to_array();\r\n }\r\n\r\n if (!empty($this->match_requirements)) {\r\n $d['match_requirements'] = $this->match_requirements;\r\n }\r\n\r\n return $d;\r\n }", "protected function generateDataFromDataTable()\n\t{\n\t\t$filter = new Piwik_DataTable_Filter_ColumnCallbackReplace(\n\t\t\t\t\t\t\t\t\t$this->dataTable,\n\t\t\t\t\t\t\t\t\t'label',\n\t\t\t\t\t\t\t\t\t'urldecode'\n\t\t\t\t\t\t\t\t);\n\t\t$data = array();\n\t\tforeach($this->dataTable->getRows() as $row)\n\t\t{\n\t\t\t$label = $row->getColumn('label');\n\t\t\t$value = $row->getColumn('nb_unique_visitors');\n\t\t\t// case no unique visitors\n\t\t\tif($value === false)\n\t\t\t{\n\t\t\t\t$value = $row->getColumn('nb_visits');\n\t\t\t}\n\t\t\t$data[] = array(\n\t\t\t\t'label' => $label,\n\t\t\t\t'value' => $value,\n\t\t\t\t'url' \t=> $row->getDetail('url'),\n\t\t\t);\n\t\t}\n\t\treturn $data;\n\t}", "private function _generateQuery() {\n\t\t// vyhodnoceni odeslanych filtracnich dat\n\t\t$filterObj = $this->getRequest()->getParam(\"_filter\", null);\n\t\t$uuid = $this->getRequest()->getParam(\"id\", null);\n\t\t$uuids = $this->getRequest()->getParam(\"_uuids\", null);\n\t\t\n\t\t// vyhodnoceni stavu\n\t\tif ($uuid) {\n\t\t\t// uuid byl odeslan primo v requestu\n\t\t\t$this->_queryObject = array($uuid);\n\t\t\t\n\t\t\treturn;\n\t\t} elseif ($uuids) {\n\t\t\t// byl odeslan seznam uuid\n\t\t\t$this->_queryObject = (array) $uuids;\n\t\t\t\n\t\t\treturn;\n\t\t} elseif (!$filterObj) {\n\t\t\t// zadna z moznosti nebyla vyuzita\n\t\t\t$this->_queryObject = array();\n\t\t}\n\t\t\n\t\t/**\n\t\t * pokud program dosel az sem, byl odeslan plnohodnotny filtracni objekt\n\t\t */ \n\t\t\n\t\t// reset referenci\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vytvoreni filtracniho objektu a ziskani seznamu tabulek\n\t\t$queryObj = BB_Db_Query_Factory::factory($filterObj);\n\t\t$tableNames = BB_Db_Query_Reference::getTables();\n\t\t\n\t\t// vygenerovani seznamu pouzitych sloupcu z index\n\t\t$usedColumns = $this->getRequest()->getParam(\"_uuidColumns\", array());\n\t\t$usedColumns = (array) $usedColumns;\n\t\t\n\t\tif (!$usedColumns) {\n\t\t\t// seznam pouzitych sloupci je prazdny - toto neni pripustne\n\t\t\tthrow new Zend_Exception(\"UUID_COLUMNS_NOT_SET\", 400);\n\t\t}\n\t\t\n\t\t$usedReferences = array();\n\t\t\n\t\tforeach ($usedColumns as $column) {\n\t\t\t$reference = new BB_Db_Query_Reference($column);\n\t\t\t\n\t\t\t// kontrola jestli je tabulka v seznamu\n\t\t\tif (!in_array($reference->getTable(), $tableNames)) {\n\t\t\t\t// tabulka neni v seznamu, vyhodi se chyba\n\t\t\t\tthrow new Zend_Exception(\"UNKNOWN_INDEX_UUID_COLUMN\", 400);\n\t\t\t}\n\t\t\t\n\t\t\t$usedReferences[] = new BB_Db_Query_Reference($column);\n\t\t}\n\t\t\n\t\t// anulace statickych vlastnosti reference\n\t\tBB_Db_Query_Reference::clearTables();\n\t\t\n\t\t// vygenerovani infomraci pro filtraci dat\n\t\t$filterData = new stdClass;\n\t\t\n\t\t$filterData->columns = $usedReferences;\n\t\t$filterData->query = $queryObj;\n\t\t$filterData->tables = $tableNames;\n\t\t\n\t\t// nastaveni objektu\n\t\t$this->_queryObject = $filterData;\n\t\t\n\t\treturn $this;\n\t}" ]
[ "0.6671757", "0.6570964", "0.6548318", "0.65340304", "0.6513135", "0.6486798", "0.635759", "0.63257736", "0.63133955", "0.6231576", "0.62311006", "0.6219613", "0.62085176", "0.6172008", "0.61456954", "0.61347234", "0.61310714", "0.61298394", "0.6128094", "0.6112965", "0.6076411", "0.60651845", "0.6065004", "0.60637385", "0.60463214", "0.6040719", "0.60376775", "0.60220337", "0.60012674", "0.60005176", "0.59896857", "0.59841", "0.5982002", "0.59641844", "0.59611064", "0.5958569", "0.5957303", "0.59464943", "0.59325486", "0.59325486", "0.59309685", "0.59243804", "0.59146273", "0.59118193", "0.5885645", "0.5885153", "0.5877068", "0.5875054", "0.5847845", "0.58458215", "0.58329403", "0.5829102", "0.5828338", "0.5816714", "0.5815832", "0.58151585", "0.58118916", "0.5810836", "0.58099693", "0.5808681", "0.58051443", "0.5804576", "0.5802913", "0.5799763", "0.5799408", "0.5797756", "0.57902384", "0.5772296", "0.5764433", "0.5760341", "0.5759522", "0.5753662", "0.5750594", "0.57448834", "0.57380015", "0.57319236", "0.57216966", "0.5721167", "0.5714784", "0.57017434", "0.56976146", "0.56973743", "0.5693589", "0.5686818", "0.56842154", "0.5677539", "0.567696", "0.5675853", "0.56740665", "0.5668222", "0.5666612", "0.56547403", "0.56547403", "0.5653187", "0.5651114", "0.5648415", "0.5646449", "0.56418735", "0.56401277", "0.5637017", "0.5626726" ]
0.0
-1
Get the enum as an collection formatted for a select.
public static function toSelectCollection(): Collection { return collect(self::toArray())->mapWithKeys(function ($value, $text) { return [ $value => [ 'text' => self::getDescription($value), 'value' => $value, ], ]; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomEnumFormatterCollection(): EnumFormatterCollection;", "public function getForSelect()\n {\n $options = [];\n\n foreach ($this->find() as $record) {\n $key = (string)$record->getId();\n $val = (string)$this->getRecordLabel($record);\n $options[$key] = $val;\n }\n\n return $options;\n }", "public function getEnums(): Collection\n {\n return $this->enums;\n }", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "function enum_list() {\r\n /* by default, if available, expects enum_keyval to be filled with array('field1','field2')\r\n new: if enum_keyval second member is comma delimited, assume to show them as multiple columns\r\n */\r\n if ($this->enum_keyval) {\r\n $enumlist = array();\r\n foreach ($this->get_rows('', $this->enum_keyval[0].','.$this->enum_keyval[1],'row') as $row) {\r\n $enumlist[$row[0]] = join(' | ',array_slice($row,1));\r\n }\r\n return $enumlist;\r\n }\r\n }", "function getSelect()\n {\n $select = array();\n foreach ($this->_cols as $col=>$val) {\n if ($val['type'] != 'Pluf_Form_Field_Manytomany') {\n $select[] = '`'.$this->_con->pfx.$this->_table.'`.`'.$col.'` AS `'.$col.'`'; \n }\n }\n return implode(', ', $select);\n }", "public function getEnumValues()\n {\n return $this->postRequest('GetEnumValues');\n }", "public function getEnumTypes()\n {\n return $this->postRequest('GetEnumTypes');\n }", "public function getTypes(){\r\n \r\n $options[\"\"] = \"--Select--\";\r\n //Query all users(Lecturers) not assigned to other departments\r\n $types = $this->em->getRepository(\"\\Application\\Entity\\Assessmenttype\")->findBy(array(\"systemGenerated\"=>0));\r\n \r\n foreach($types as $type ){\r\n $options[$type->getPkAtid()] = $type->getTypeName();\r\n }\r\n \r\n return $options;\r\n }", "public static function typeNameSelectOptions()\n {\n return [\n ['value' => self::TYPE_SPECIFIC_DATETIME, 'text' => trans('messages.Immediately_or_on_a_specific_date')],\n ['value' => self::TYPE_WEEKLY_RECURRING, 'text' => trans('messages.weekly_recurring')],\n ['value' => self::TYPE_MONTHLY_RECURRING, 'text' => trans('messages.monthly_recurring')],\n ['value' => self::TYPE_LIST_SUBSCRIPTION, 'text' => trans('messages.Event_based_list_subscription')],\n ['value' => self::TYPE_LIST_UNSUBSCRIPTION, 'text' => trans('messages.Event_based_list_unsubscription')],\n ['value' => self::TYPE_SUBSCRIBER_EVENT, 'text' => trans('messages.Event_based_custom_list_subscriber_event')],\n ['value' => self::TYPE_CUSTOM_CRITERIA, 'text' => trans('messages.Custom_criteria')],\n ['value' => self::TYPE_API_CALL, 'text' => trans('messages.API_call')],\n ];\n }", "public function getSelect();", "public function getSelect();", "public function getForSelect()\n {\n return $this->all()->lists('full_name', 'id')->all();\n }", "private function formatSelects()\n\t{\n\t\t$value = '';\n\t\tforeach ($this->selects as $name => $alias)\n\t\t{\n\t\t\tif ($value != '')\n\t\t\t\t$value .= ', ';\n\t\t\t$value .= $name . ($alias !== $name ? ' AS ' . $alias : '');\n\t\t}\n\t\treturn $value;\n\t}", "public function fields()\n {\n $statuses = \\App\\Status::all()->pluck('name','id');\n return [\n Select::make('Status','id')->options($statuses)\n ];\n }", "public static function getSelectEnum(string $field)\n {\n $values = static::getEnum($field);\n\n if (Arr::isAssoc($values)) {\n return $values;\n }\n\n return array_combine($values, $values);\n }", "public function toArray()\n {\n return [Select::SQL_DESC => __('Descending'), Select::SQL_ASC => __('Ascending')];\n }", "public function attributeEnumOptions($name)\r\n\t{\r\n preg_match('/\\((.*)\\)/',$this->tableSchema->columns[$name]->dbType,$matches);\r\n foreach(explode(',', $matches[1]) as $value)\r\n {\r\n $value=str_replace(\"'\",null,$value);\r\n $values[$value]=Yii::t('enumItem',$value);\r\n }\r\n\r\n return $values;\r\n\t}", "public function toArray()\n {\n $options = [];\n foreach ($this->inputTypes as $code => $inputType) {\n $options[$code] = $inputType->getLabel();\n }\n\n return $options;\n }", "public function getEnum(): array\n {\n return $this->enum;\n }", "public static function toSelectArray(): array\n {\n $array = self::toArray();\n $selectArray = [];\n\n foreach ($array as $key => $value) {\n $selectArray[$value] = static::getDescription($value);\n }\n\n return $selectArray;\n }", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "public static function renderSelect();", "function CreateOptionsFromEnumQuery($query, $sel = false, $attrfunc = null) {\n\t$result = dbquery($query);\n\t$options = \"\";\n\tif ($result && $row = mysql_fetch_array($result, MYSQL_NUM)) {\n\t\t$type = $row[1];\n\t\tpreg_match_all(\"/'([A-Za-z0-9 ._-]+)'/\", $type, $matches);\n\t\tif (sizeof($matches[1]) > 1) {\n\t\t\t$enumToEnum = array();\t// value -> name array of enums\n\t\t\tforeach ($matches[1] as $value) {\n\t\t\t $enumToEnum[] = array($value, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$row = current($enumToEnum);\n\t\t\twhile ($row) {\n\t\t\t\tif (!is_null($attrfunc)) {\n\t\t\t\t\t$attr = $attrfunc($row);\n\t\t\t\t} else {\n\t\t\t\t\t$attr = \"\";\n\t\t\t\t}\n\t\t\t\tif ($sel !== false && $sel == $row[0]) {\n\t\t\t\t\t// this is the default row\n\t\t\t\t\t$options .= '<option value=\"' . $row[0] . '\" ' . $attr . ' selected=\"selected\">' . $row[1] . '</option>';\n\t\t\t\t} else {\n\t\t\t\t\t// just another row\n\t\t\t\t\t$options .= '<option value=\"' . $row[0] . '\" ' . $attr . ' >' . $row[1] . '</option>';\n\t\t\t\t}\n\t\t\t\t$row = next($enumToEnum);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $options;\n}", "public function getValuesForForm()\n {\n $collection = $this->getCollection();\n $options = [];\n if ($collection->getSize() > 0) {\n foreach ($collection as $role) {\n $options[] = ['value' => $role->getId(), 'label' => $role->getData('display_name')];\n }\n }\n return $options;\n }", "public function getTypes()\n {\n $oDb = Factory::service('Database');\n $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE \"type\"')->row();\n $sTypes = $oResult->Type;\n $sTypes = preg_replace('/enum\\((.*)\\)/', '$1', $sTypes);\n $sTypes = str_replace(\"'\", '', $sTypes);\n $aTypes = explode(',', $sTypes);\n\n $aOut = [];\n\n foreach ($aTypes as $sType) {\n $aOut[$sType] = ucwords(strtolower($sType));\n }\n\n return $aOut;\n }", "protected function getTypes() : Collection\n {\n if (is_array($this->types)) {\n return new Collection($this->types);\n }\n\n return new Collection([]);\n }", "public function toArray()\n {\n return $this->map(function ($label) {\n return str_replace(\n [\n '{one}',\n '{many}'\n ],\n [\n $this->singularForm,\n $this->pluralForm\n ],\n $label\n );\n })->all();\n }", "public function getChoices();", "public function getEnumeration(): string\n {\n return $this->enumeration;\n }", "function custom_field_formats_for_select() {\n $model = ClassRegistry::init('CustomField');\n $formats = $model->FIELD_FORMATS;\n uasort($formats, array($this, '__sort_custom_field_formats_for_select'));\n $select = array();\n foreach ($formats as $k=>$format) {\n $select[$k] = __($format['name']);\n }\n return $select;\n }", "public function getChoices()\n {\n return $this->getOption('choices') ? \n $this->getOption('choices') : $this->collectionToArray(\n Doctrine::getTable($this->getOption('hasManyClass'))\n ->createQuery('s')\n ->leftJoin('s.'.$this->getOption('refClass').' ref')\n ->orderBy('ref.'.$this->getOption('position_field'))\n ->execute()\n );\n }", "public function getRoomTypesList()\n {\n return RoomType::all()->pluck('name', 'id');\n }", "public static function opciones_campo_select()\n {\n\n $opciones = Grado::where('estado', 'Activo')\n //->where('id_colegio', $colegio->id)\n ->get();\n\n $vec[''] = '';\n foreach ($opciones as $opcion) {\n $vec[$opcion->id] = $opcion->descripcion;\n }\n\n return $vec;\n }", "public function select_list()\n\t{\n\t\t$list = array();\t\t\n\t\t$orm = ORM::factory('country');\t\t\n\t\t$list = $orm->select_list('id','name');\n\t\t\n\t\treturn $list;\n\t}", "public function asCollection();", "public function withCustomEnumFormatterCollection(EnumFormatterCollection $customEnumFormatterCollection): static;", "public function _get_picker_dropdown_choices() {\n\t\t$this->load_data();\n\t\t$result = array();\n\t\tforeach ( $this->data as $unique_key => $item ) {\n\t\t\t$result[ $unique_key ] = $item['label'];\n\t\t}\n\n\t\treturn $result;\n\t}", "public function __toString(){\n return $this->type;\n // to show the id of the Category in the select\n // return $this->id;\n }", "public function getFuelTypeOptions()\n\t{\n\t\t$fuelType = FuelType::model()->findAll();\n\t\treturn CHtml::listData($fuelType, 'fuelTypeId', 'fuelTypeName');\n\t}", "public static function getSelectData($useAccount = false, $val = null)\n {\n $items = array();\n $value = 'name';\n\n if($val)\n {\n $value = $val;\n }\n\n if($useAccount)\n {\n $account = access()->account();\n $collection = parent::where('account_id', '=', $account->id)->get()->pluck($value, 'id');\n }\n else\n {\n $collection = parent::pluck($value, 'id');\n }\n\n // For each item, the ID needs to become hashed\n foreach ($collection as $id => $name)\n {\n $item = parent::find($id);\n\n if(isset(static::$selectHTMLFormat) && static::$selectHTMLFormat !== '')\n {\n $items[$id] = static::generateSelectName($item, static::$selectHTMLFormat);\n }\n else\n {\n $items[$id] = $name;\n }\n }\n\n\n return $items;\n }", "public function select_list_code()\n\t{\n\t\treturn ORM::factory('country')->select_list('iso_code','name');\n\t}", "public static function asSelectArray(BackedEnum $enums = null): array\n {\n $selectArray = [];\n\n foreach ($enums ? func_get_args() : self::cases() as $enumCase) {\n $selectArray[$enumCase->value] = $enumCase->label();\n }\n\n return $selectArray;\n }", "public function toArray()\n {\n $array = [];\n foreach ($this->toOptionArray() as $item) {\n $array[$item['value']] = $item['label'];\n }\n return $array;\n }", "public function toArray()\n {\n $array = [];\n foreach ($this->toOptionArray() as $item) {\n $array[$item['value']] = $item['label'];\n }\n return $array;\n }", "public static function dropdownCategory()\n {\n return self::pluck('name', 'id');\n }", "public function getVacancyRoleSelect()\n {\n $roles = new \\Object\\VacancyRole\\Listing();\n $roles->setOrderKey(\"name\");\n $list = $roles->load();\n\n $roles = [];\n\n foreach ($list as $vacancyRole) {\n $roles[$vacancyRole->getId()] = $vacancyRole->getName();\n }\n\n return $roles;\n }", "private static function renderSelect($value)\n {\n return $value;\n }", "public function values(string $collectionClass = null): Collection;", "public function getEnumValues()\n {\n return array(\n 'all' => self::all,\n 'part' => self::part,\n 'nothing' => self::nothing,\n );\n }", "public static function cast($collection)\n {\n return [\n Caster::PREFIX_VIRTUAL.'all' => $collection->all(),\n ];\n }", "function get_enum($db, $table, $column) {\n\t// get ENUM values as string to populate a dropdown select (not the what column has what enum assigned but the possible enums themself)\n\n\t//\t$sql = \"SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS\n\t//WHERE TABLE_SCHEMA = 'maTest' AND TABLE_NAME = 'ma_Posts' AND COLUMN_NAME = 'PostRating'\";\n\t$sql = \"SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS\n\tWHERE TABLE_SCHEMA = '{$db}' AND TABLE_NAME = '{$table}' AND COLUMN_NAME = '{$column}'\";\n\n\t$db = pdo(); # pdo() creates and returns a PDO object\n\t#run the query\n\n\t#$result stores data object in memory\n\ttry {$result = $db->query($sql);} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\n\t#run query\n\t$results = $db->query($sql);\n\n\t#process query\n\t$results = $results->fetchAll(PDO::FETCH_ASSOC);\n\n\t#convert array to string\n\t$results = $results[0]['COLUMN_TYPE'];\n\n\t#prep string data\n\t$results = substr($results, 5, -1);\n\n\t#make $result inot an array of data again\n\t$enum = str_getcsv($results, ',', \"'\");\n\n\treturn $enum;\n}", "public static function options_for_select_from_collection($collection, $value_field, $label_field, $selected = null)\n {\n $options = array();\n foreach ((array) $collection as $item) {\n if (is_object($item)) {\n $options[$item->$value_field] = $item->$label_field;\n } else {\n $options[$item[$value_field]] = $item[$label_field];\n }\n }\n\n return self::options_for_select($options, $selected);\n }", "public function toArray()\n {\n return [\n self::CHILD_OPTION_ID => __('Child'),\n self::PARENT_OPTION_ID => __('Parent'),\n self::CHILD_THEN_PARENT_OPTION_ID => __('Child Then Parent'),\n ];\n }", "public function getVATypesDD() {\n if (!$options = $this->_cache->load('vatypedd')) {\n\t$select = $this->select()\n\t\t->from($this->_name, array('type', 'type'))\n\t\t->order('type');\n\t$options = $this->getAdapter()->fetchPairs($select);\n\t$this->_cache->save($options, 'vatypedd');\n\t}\n\treturn $options;\n }", "public function getEnumValues()\n {\n return $this->readOneof(14);\n }", "public function collection()\n {\n return collect($this->toArray());\n }", "public function __toString()\n {\n switch ($this->type) {\n case self::COLLECTION_LIST:\n $valueType = (string) $this->valueType;\n return \"list<$valueType>\";\n case self::COLLECTION_SET:\n $valueType = (string) $this->valueType;\n return \"set<$valueType>\";\n case self::COLLECTION_MAP:\n $keyType = (string) $this->keyType;\n $valueType = (string) $this->valueType;\n return \"map<$keyType,$valueType>\";\n default:\n return $this->getTypeName();\n }\n }", "public function getTypes()\n {\n return $this->getData(self::TYPES);\n }", "public function fetchGroupTypes(): array;", "function get_faculty_selections($con) {\n\t$facs = get_faculties($con);\n\t$sel = '<option value=\"\"></option>';\n\tforeach ($facs as $id => $name) {\n\t\t$sel .= '<option value=\"'.$id.'\">'.$name.'</option>';\n\t}\n\treturn $sel;\n}", "public function getFieldsForFilter()\n {\n $options = [];\n foreach ($this->getFieldsForExport() as $field) {\n $options[] = [\n 'label' => $field,\n 'value' => $field\n ];\n }\n return [$this->getEntityTypeCode() => $options];\n }", "public function getFieldsForFilter()\n {\n $options = [];\n foreach ($this->getFieldsForExport() as $field) {\n $options[] = [\n 'label' => $field,\n 'value' => $field\n ];\n }\n return [$this->getEntityTypeCode() => $options];\n }", "public function getEnumValuesIdentifiers()\n {\n return $this->getItemIdentifiers('GetEnumValuesIdentifiers');\n }", "public static function selectOptions()\n {\n $options = (new static())->withQuery(function ($model){\n return $model->where('channel', self::$channel);\n })->buildSelectOptions();\n\n return collect($options)->prepend('请选择分类', 0)->all();\n }", "public static function getDomainChoiceList(){\n $droptions = DomainChoiceRecord::find()->asArray()->all();\n return Arrayhelper::map($droptions, 'value', 'order');\n }", "function enumValues( $table, $field ){\n $enum = array();\n $type = $this->select( \"SHOW COLUMNS FROM {$table} WHERE Field = '{$field}'\")->row();\n preg_match('/^enum\\((.*)\\)$/', $type['Type'], $matches);\n foreach( explode(',', $matches[1]) as $value )\n {\n $enum[] = trim( $value, \"'\" );\n }\n return $enum;\n }", "public function getEnumValues()\n {\n return array(\n 'value' => self::value,\n 'money' => self::money,\n 'item' => self::item,\n 'mine' => self::mine,\n 'self_hero' => self::self_hero,\n 'excav_battle_id' => self::excav_battle_id,\n 'hero_name' => self::hero_name,\n );\n }", "function getAllCounselorType()\n\t\t{\n\t\t\t$query = $this->db->get('counselor_type');\n\t\t\treturn $query->result();\n\t\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}", "function listTypes($con)\n\t{\n\t\t$sql_type = \"SELECT typeID, typeName FROM savingtypes\";\n\t\t$result_type = $con->query($sql_type) or die(mysqli_error($con));\n\t\n\t\t$list_type = \"\";\n\t\twhile($rowy = mysqli_fetch_array($result_type))\n\t\t{\n\t\t\t$typeID = htmlspecialchars($rowy['typeID']);\n\t\t\t$typeName = htmlspecialchars($rowy['typeName']);\n\t\n\t\t\t$list_type .= \"<option value='$typeID'>$typeName</option>\";\n\t\t}\n\n\t\treturn $list_type;\n\t}", "function CampoEnum($tabla,$campo,$Comentario,$valor=\"\"){\n\t\t$sql = \"DESCRIBE $tabla $campo\";\n\t\t$result = mysql_query($sql);\n\t\techo \"\\t<tr><td>$Comentario</td>\\n\";\n\t\twhile ($ligne = mysql_fetch_array($result)) {\n\t\t\textract($ligne, EXTR_PREFIX_ALL, \"IN\");\n\t\t\tif (substr($IN_Type,0,4)=='enum'){\n\t\t\t\t$liste = substr($IN_Type,5,strlen($IN_Type));\n\t\t\t\t$liste = substr($liste,0,(strlen($liste)-2));\n\t\t\t\t$enums = explode(',',$liste);\n\t\t\t\tif (sizeof($enums)>0){\n\t\t\t\t\t\n\t\t\t\t\techo \"\\t<td><select name='$campo' >\\n\";\n\t\t\t\t\tfor ($i=0; $i<sizeof($enums);$i++){\n\t\t\t\t\t\t$elem = trim(strtr($enums[$i],\"'\",\" \"));\n\t\t\t\t\t\tif(trim($elem)==trim($valor))$seleccionar=\"selected\";\n\t\t\t\t\t \telse $seleccionar=\"\";\n\t\t\t\t\t\techo \"\\t\\t<option $seleccionar value='\".$elem.\"'>\".$elem.\"</option>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\techo \"\\t</select>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"\\t</td></tr>\\n\";\n\t}", "public function format(Collection $selects)\n {\n $selects->each(function (ReportSelect $select) {\n $this->castAttributeType($select);\n });\n\n return $this->attributes;\n }", "public function getStatesAsOptionList()\n {\n $result = [];\n\n $result[self::STATE_AVAILABLE] = __('Available');\n $result[self::STATE_USED] = __('Used');\n $result[self::STATE_REDEEMED] = __('Redeemed');\n $result[self::STATE_EXPIRED] = __('Expired');\n\n return $result;\n }", "function convertEnumToArray($enum)\n{\n\t$enum = str_replace(\"(\", \"\", $enum);\n\t$enum = str_replace(\")\", \"\", $enum);\n\t$enum = str_replace(\"'\", \"\", $enum);\n\t$arr = explode(\",\", $enum);\n\treturn $arr;\n}", "public function toOptionArray()\n {\n $options = array();\n\n foreach ($this->getTransactionTypes() as $code => $name) {\n $options[] = array(\n 'value' => $code,\n 'label' => $name\n );\n }\n\n return $options;\n }", "function get_enum_values( $table, $field )\n{\n global $wpdb;\n $type = $wpdb->get_row(\"SHOW COLUMNS FROM {$table} WHERE Field = '{$field}'\" )->Type;\n preg_match(\"/^enum\\(\\'(.*)\\'\\)$/\", $type, $matches);\n $enum = explode(\"','\", $matches[1]);\n return $enum;\n}", "public function toArray()\n {\n $_tmpOptions = $this->toOptionArray();\n $_options = [];\n foreach ($_tmpOptions as $option) {\n $_options[$option['value']] = $option['label'];\n }\n return $_options;\n }", "function db_enum($_table,$_field,$_type=\"select\",$_pick=null,$_isnull=null,$_style=NULL) {\n\t$_render = \"\";\n\t$_result = mysql_query(\"describe $_table $_field\");\n $_row = mysql_fetch_array($_result); \n $_value = $_row[\"Type\"];\n\tmysql_free_result($_result);\n preg_match_all(\"/'([^']+)'/\", $_value, $_matches, PREG_SET_ORDER); \n\t$_count = count($_matches);\n\t\t\n\tif ($_type == \"array\") {\t\n\t\tforeach($_matches as $_v) {\t\n\t\t\t$_render[$_v[1]] = $_v[1];\t\t\t\n\t\t\t}\n\t\t} \n\telseif ($_type == \"checkbox\") {\n\t\tforeach($_matches as $_v) {\t\n\t\t\t$_render .= '<input type=\"checkbox\" name=\"'.$_field.'[]\" value=\"'.$_v[1].'\" id=\"'.$_field.'_'.$_v[1].'\"';\n\t\t\tif ($_v[1] == $_pick) { $_render .= ' checked'; }\t\t\n\t\t\t$_render .= ' /><label for=\"'.$_field.'_'.$_v[1].'\" class=\"checkbox\">'.$_v[1].'</label>\n\t\t\t'; \n\t\t\t\n\t\t\t}\n\t\t} \n\telseif ($_type == \"radio\") {\n\t\tforeach($_matches as $_v) {\t\n\t\t\t$_render .= '<input type=\"radio\" name=\"'.$_field.'\" value=\"'.$_v[1].'\" id=\"'.$_field.'_'.$_v[1].'\"';\n\t\t\tif ($_v[1] == $_pick) { $_render .= ' checked'; }\n\t\t\t$_render .= ' /><label for=\"'.$_field.'_'.$_v[1].'\" class=\"radio\">'.$_v[1].' </label>\n\t\t\t';\t\t\t\n\t\t\t}\n\t\t} \n\telseif ($_type == \"select\") {\n\t\t// insert a blank option (or allow blank option is no option is previously select)\n\t\tif ($_isnull && !isset($_pick)) {\n\t\t\t$_render .= '<option value=\"\"></option>\n\t\t\t';\n\t\t\t}\n\t\tforeach($_matches as $_v) {\t\n\t\t\t$_render .= '<option value=\"'.$_v[1].'\"';\n\t\t\tif ($_v[1] == $_pick) { $_render .= ' selected'; }\n\t\t\t$_render .= '>'.$_v[1].'</option>\n\t\t\t'; \n\t\t\t}\n\t\t$_render = '<select name=\"'.$_field.'\" '.$_style.'>'.$_render.'</select>\n\t\t';\n\t\t}\n\t\n\treturn $_render;\n\tunset($_table,$_where,$_query,$_result,$_row,$_v,$_value,$_matches,$_render,$_count,$_isnull);\n\t}", "static function getStateOptions()\n\t{\n\t\t// Build the filter options.\n\t\t$options = array();\n\t\t$options[] = Html::select('option', '1', Lang::txt('COM_MESSAGES_OPTION_READ'));\n\t\t$options[] = Html::select('option', '0', Lang::txt('COM_MESSAGES_OPTION_UNREAD'));\n\t\t$options[] = Html::select('option', '-2', Lang::txt('JTRASHED'));\n\n\t\treturn $options;\n\t}", "public function getEnumValues()\n {\n return array(\n 'single_br_tavern' => self::single_br_tavern,\n 'combo_br_tavern' => self::combo_br_tavern,\n 'single_gd_tavern' => self::single_gd_tavern,\n 'combo_gd_tavern' => self::combo_gd_tavern,\n 'magic_soul_tavern' => self::magic_soul_tavern,\n 'rmb_recharge' => self::rmb_recharge,\n 'diamond_consume' => self::diamond_consume,\n );\n }", "public function toOptionArray()\n {\n $customerGroup = $this->collectionFactory->create()->loadData()->toOptionArray();\n return $customerGroup;\n }", "public function getValues(): Collection\n {\n return $this->values;\n }", "public function collection()\n {\n return collect($this->all());\n }", "public function getTypeOptions()\n {\n $calendars = Config::get('vojtasvoboda.proeventspreview::calendars');\n $return = [];\n\n foreach($calendars as $key => $calendar) {\n $return[$key] = $calendar['name'];\n }\n\n return $return;\n }", "protected function getSelectFields()\n {\n return $this->getSettingsValue('select');\n }", "function asdb_collect($value = null)\n\t{\n\t\treturn new Collection($value);\n\t}", "public function toOptionArray()\n {\n $scopes = $this->scopeResolverPool->get($this->scope)->getScopes();\n $array = [];\n foreach ($scopes as $scope) {\n $array[] = ['value' => $scope->getId(), 'label' => $scope->getName()];\n }\n return $array;\n }", "public function getEnumValues()\n {\n return array(\n 'green' => self::green,\n 'blue' => self::blue,\n 'purple' => self::purple,\n 'magicsoul' => self::magicsoul,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'LegalEntity' => self::LegalEntity,\n 'IndividualEntity' => self::IndividualEntity,\n 'ForeignEntity' => self::ForeignEntity,\n 'PhysicalEntity' => self::PhysicalEntity,\n );\n }", "public function getEnumValues()\n {\n return array(\n 'rmb' => self::rmb,\n 'money' => self::money,\n 'item' => self::item,\n 'hero' => self::hero,\n 'rand_soul' => self::rand_soul,\n );\n }", "function get_name_select_list()\n\t{\n\t\treturn $this->get_name_select_edit();\n\t}", "public function getRubroList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM rubro\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idRubro'] . '\" data-inicial=\"' . $rdata['nombreRubro'][0] . '\">' . mb_strtoupper(\n $rdata['nombreRubro']\n ) . '</option>';\n }\n\n return $option;\n }", "public function getStatusList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM status\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idStatus'] . '\">' . mb_strtoupper(\n $rdata['nombreStatus']\n ) . '</option>';\n }\n\n return $option;\n }", "abstract protected function getSupportedEnumType() : string;", "public function getFieldtypesFromTable()\n {\n $used_fieldtypes = ee()->db->select('name')->order_by('name')->get('fieldtypes');\n\n return array_column($used_fieldtypes->result_array(), 'name');\n }", "public function getCustomArrayFormatterCollection(): ArrayFormatterCollection;", "static function getCollection(){\n $class = new ReflectionClass(get_called_class());\n return collect($class->getConstants());\n }", "private function renderSelect(): string\n {\n $str = '<select'.($this->id ? ' id=\"'.$this->getId().'\"' : '').($this->name ? ' name=\"'.$this->name.'\"' : '');\n if ($this->multiple) {\n $str .= ' multiple=\"multiple\"';\n }\n if ($this->size > 1) {\n $str .= ' size=\"'.$this->size.'\"';\n }\n if ($this->disabled) {\n $str .= ' disabled=\"disabled\"';\n }\n if ($this->tabIndex) {\n $str .= ' tabindex=\"'.$this->tabIndex.'\"';\n }\n $str .= $this->renderCssClass();\n if ($this->required) {\n $str .= ' required=\"required\"';\n }\n $str .= '>';\n\n return $str;\n }", "public function getEnumeratorsToGenerate(): array;" ]
[ "0.6633402", "0.6339101", "0.6264784", "0.61202663", "0.60775465", "0.58590674", "0.58587205", "0.58376265", "0.579897", "0.57632387", "0.5704434", "0.5704434", "0.5702993", "0.5681474", "0.56445247", "0.5626697", "0.5613102", "0.56119615", "0.5572823", "0.5530161", "0.55178815", "0.5510439", "0.5500801", "0.54865426", "0.5410777", "0.54027003", "0.53222525", "0.531494", "0.531082", "0.5307861", "0.53059584", "0.53012496", "0.53006214", "0.52995414", "0.52952904", "0.5293339", "0.5245549", "0.52434504", "0.52372706", "0.5234445", "0.52072716", "0.5204371", "0.5199498", "0.51914763", "0.51914763", "0.5177783", "0.51755977", "0.51460975", "0.51372874", "0.5126048", "0.5123987", "0.5122043", "0.51205736", "0.5114646", "0.5113496", "0.5103735", "0.51015013", "0.50949687", "0.5083986", "0.5074395", "0.50730693", "0.5071984", "0.5071984", "0.5068209", "0.5066195", "0.50633484", "0.5056197", "0.5054407", "0.5050322", "0.50488585", "0.5042224", "0.50375646", "0.5019819", "0.5019727", "0.50145286", "0.5013917", "0.500729", "0.50058854", "0.50044626", "0.49999663", "0.49958432", "0.4989734", "0.49876335", "0.49852934", "0.49852514", "0.49835303", "0.49806008", "0.49792635", "0.4976035", "0.49757868", "0.4974627", "0.4965263", "0.4959211", "0.4958655", "0.49585554", "0.49561554", "0.49470037", "0.49423444", "0.49421108", "0.4938356" ]
0.6558187
1
Get the description for an enum value.
public static function getDescription($value): string { return static::getLocalizedDescription($value) ?? static::getKey($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusDescription($value)\n {\n $status = $this->getEveryStatus();\n\n if (isset($status[$value])) {\n return $status[$value];\n }\n\n return $status['D'];\n }", "public static function getDescription($value): string\n {\n switch ($value) {\n case self::PENDING:\n return '未完了';\n break;\n case self::RECEIVED:\n return '完了';\n break;\n \n default:break;\n }\n\n return parent::getDescription($value);\n }", "public function getEnumvalue()\n {\n return $this->enumvalue;\n }", "public static function getDescription($value): string\n {\n if ($value === self::ACQUISITION) {\n return '取得ポイント';\n } elseif ($value === self::CONSUMPTION) {\n return '消費ポイント';\n }\n\n return parent::getDescription($value);\n }", "public function getDescription() {\n\t\t$field = $this->getDescriptionField();\n\t\treturn $field ? $field->getValue() : '';\n\t}", "public function getDescription() {\n return self::getDescriptionType($this->_type);\n }", "public function description($value = null)\n \t{\n \t\tif ($value != null) $this->_description = $value;\n \t\telse return $this->_description;\n \t}", "public static function getDescription($value): string\n {\n $key = self::getKey($value);\n \n if (ctype_upper($key)) {\n $key = strtolower($key);\n }\n \n return ucfirst(str_replace('_', ' ', snake_case($key)));\n }", "public function getDescription() \n {\n return $this->_fields['Description']['FieldValue'];\n }", "public function message(): string|array\n {\n return trans()->has('validation.enum_value')\n ? __('validation.enum_value')\n : __('laravelEnum::messages.enum_value');\n }", "public function getDescription()\n {\n return $this->__get(self::FIELD_DESCRIPTION); \n }", "public function __toString() {\n\t\ttry {\n\t\t\treturn array_flip($this->getConstants())[$this->value];\n\t\t\t// when the value is not in the constants\n\t\t} catch(Exception $e) {\n\t\t\treturn \"Invalid value \".$this->value;\n\t\t}\n\t}", "public function getEnumeration(): string\n {\n return $this->enumeration;\n }", "public function getDesc()\n {\n return $this->get(self::_DESC);\n }", "public function getValueDescription() {\n\t\t\n\t\t$test_service = t3lib_div::makeInstanceService('caretaker_test_service',$this->test_service_type);\n\t\t\n\t\tif ($test_service){\n\t\t\treturn $test_service->getValueDescription();\n\t\t} else {\n\t\t\treturn 'unknown service '.$this->test_service_type;\n\t\t}\n\t}", "public static function getDescription()\n {\n return self::$description;\n }", "final public static function Label( $enumType, $enumValue )\n {\n $result = 'IllegalValue';\n\n if ( class_exists( $enumType, false ) )\n {\n $reflector = new ReflectionClass( $enumType );\n\n foreach( $reflector->getConstants() as $key => $val )\n {\n if ( $val == $enumValue )\n {\n $result = $key;\n break;\n }\n }\n }\n return $result;\n }", "public function getDescriptionAttribute($value)\n {\n return $value;\n }", "public function getStatusDescription() {\n return $this->statusDescription;\n }", "public function getDesciption();", "public function getDescription() {\n\t\treturn self::$_description;\n\t}", "public function getTypeDesc () {\n return self::$typeMap[$this->type];\n }", "public static function description()\n {\n return static::$_description;\n }", "public function getDescription() {\n return($this->{Foomy_Model_Role_Peer::F_DESCRIPTION});\n }", "public function getDescription()\n {\n return self::QUALITY_MAP[$this->qualityID]['description'];\n }", "public static function getDescription(): string\n {\n return static::$description;\n }", "public function getDescription()\n {\n return $this->_Description;\n }", "public function getTypeDesc(){\n $type = $this->type;\n $arr = self::getTypeDescArr();\n return $arr[$type] ?? \"\";\n }", "public function GetTypeDesc(): string {\n\t\tswitch($this->debugType) {\n\t\t\tcase self::NONE: \treturn \"NONE\";\n\t\t\tcase self::LOG: \treturn \"LOG\";\n\t\t\tcase self::DEBUG:\treturn \"DEBUG\";\n\t\t\tcase self::DEV:\t\treturn \"DEV\";\n\t\t\tdefault: \t\t\t\t\treturn \"unknown\";\n\t\t}\n\t}", "public function getStatusDescription()\n {\n return isset($this->statusDescription) ? $this->statusDescription : null;\n }", "public function getDescription() {\n return $this->desc;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription()\n {\n return $this->Description;\n }", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription() {\r\n\t\treturn $this->description;\r\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->_description;\n\t}", "public static function getDescription();", "public function getDescription() {\n\t\treturn $this->_description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function getDescription() {\n\t\treturn $this->description;\n\t}", "public function get_description()\n {\n return strtoupper($this->description);\n }", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function getDescription()\n\t{\n\t\treturn $this->description;\n\t}", "public function get_description()\n {\n return $this->get_default_property(self::PROPERTY_DESCRIPTION);\n }", "public function getDescription()\n {\n $statistics = $this->getStatistics();\n\n return sprintf(\n '%s [%s (%d%%) used, %s available]',\n $this->getLabel(),\n binary_format($statistics['used']),\n $statistics['percentage'],\n binary_format($statistics['available'])\n );\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription() {\n return $this->_get( 'description' );\n }", "function getDescription() \n {\n return $this->getValueByFieldName( 'statevar_desc' );\n }", "function get_description()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_DESCRIPTION);\r\n }", "public function getDescription()\r\n {\r\n return $this->_description;\r\n }", "public function getDescription()\r\n {\r\n return $this->_description;\r\n }", "function getDescription() {\n\t\treturn $this->_Description;\n\t}", "function getDescription() {\n\t\treturn $this->_Description;\n\t}", "public function getDescription()\r\n {\r\n return $this->m_description;\r\n }", "public function getDescription()\n {\n return $this->_description;\n }", "public function getDesc()\n {\n return $this->Desc;\n }", "function get_description()\n {\n return $this->get_default_property(self :: PROPERTY_DESCRIPTION);\n }", "static public function getDescription(): string\n {\n return static::$description;\n }", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\r\n {\r\n return $this->description;\r\n }", "public function getDescription()\n {\n return $this->_description;\n }", "public function getDescription() {\r\n return $this->description;\r\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }", "public function getDescription()\n {\n return $this->description;\n }" ]
[ "0.729808", "0.6696256", "0.6622626", "0.66111773", "0.6537815", "0.6507612", "0.6460673", "0.643342", "0.63763815", "0.636937", "0.6343878", "0.62796587", "0.6253956", "0.6248732", "0.6213775", "0.61919093", "0.6179035", "0.6177627", "0.6158251", "0.6118068", "0.6096676", "0.60598695", "0.60299927", "0.6024142", "0.60175073", "0.60116845", "0.59922236", "0.598155", "0.5980482", "0.59708595", "0.59599555", "0.59516764", "0.59516764", "0.59516764", "0.5923374", "0.5923374", "0.5923374", "0.5917039", "0.59161216", "0.59158504", "0.59145224", "0.59145224", "0.59145224", "0.59145224", "0.59145224", "0.59145224", "0.5913748", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.59124154", "0.5909566", "0.5907153", "0.59025556", "0.5900338", "0.5897898", "0.5889558", "0.5886862", "0.5886862", "0.5883811", "0.5883811", "0.5882844", "0.5882534", "0.5881669", "0.5869592", "0.58670014", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.58656275", "0.5862587", "0.5862587", "0.58611065", "0.5856064", "0.5851379", "0.5851379", "0.5851379", "0.5851379" ]
0.70144653
1
Get the localized description if localization is enabled for the enum and if they key exists in the lang file.
protected static function getLocalizedDescription($value): ?string { $localizedStringKeys = [ static::getLocalizationKey().Str::snake(static::getKey($value)), static::getLocalizationKey().$value, ]; foreach ($localizedStringKeys as $key) { if (Lang::has($key)) { return __($key); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLocalizedDescription();", "public function getDesc_en()\n {\n return $this->desc_en;\n }", "function getDescription() {\n return lang('Some description');\n }", "protected function get_description()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix );\n\t\t}\n\t\treturn NULL;\n\t}", "function getDescription($locale) {\n\t\treturn isset($this->localeData[$locale]['description']) ? $this->localeData[$locale]['description'] : '';\n\t}", "public function getLang();", "function abl_droploader_get_localisation() {\n\t\t$l10n = array(\n\t\t\t'open' => '',\n\t\t\t'open_title' => '',\n\t\t\t'close' => '',\n\t\t\t'close_title' => '',\n\t\t\t'error_method' => '',\n\t\t\t'info_text' => '',\n\t\t\t'err_invalid_filetype' => '',\n\t\t\t'err_browser_not_supported' => '',\n\t\t\t'err_too_many_files' => '',\n\t\t\t'err_file_too_large' => '',\n\t\t\t'all_files_uploaded' => '',\n\t\t\t'no_files_uploaded' => '',\n\t\t\t'some_files_uploaded' => '',\n\t\t);\n\t\tforeach ($l10n as $k => $v) {\n\t\t\t$l10n[$k] = gTxt('abl_droploader_' . $k);\n\t\t}\n\t\treturn $l10n;\n\t}", "public function getDescriptionAttribute()\n {\n return $this->translateOrNew($this->locale())->description;\n }", "public function getDescriptionAttribute()\n {\n return $this->translateOrNew($this->locale())->description;\n }", "public function label(): ?string\n {\n $localizedKey = 'enums.'.self::class.'.'.$this->name;\n\n if (Lang::has($localizedKey)) {\n return trans($localizedKey);\n }\n\n return null;\n }", "function getDescriptionText() {\n global $Language;\n if ($this->isDescriptionMustBeLocalized()) {\n return $Language->getText('plugin_tracker_common_fieldset', $this->description);\n } else {\n return $this->description;\n }\n }", "public function getLocalizedName();", "public function getDescripcion($locale)\n {\n if($locale==\"es\"){\n return $this->descripcionEs;\n }else{\n return $this->descripcionEn;\n }\n }", "public function getDescription()\n {\n if (is_null($this->description)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DESCRIPTION);\n if (is_null($data)) {\n return null;\n }\n\n $this->description = LocalizedStringModel::of($data);\n }\n\n return $this->description;\n }", "public function getDescription()\n {\n if (is_null($this->description)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_DESCRIPTION);\n if (is_null($data)) {\n return null;\n }\n\n $this->description = LocalizedStringModel::of($data);\n }\n\n return $this->description;\n }", "public function getLanguage() {}", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function getLanguage();", "public function metaDescription()\n\t{\n\t\tif ( static::$titleLangPrefix and static::$descriptionLangSuffix )\n\t\t{\n\t\t\treturn \\IPS\\Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->id . static::$descriptionLangSuffix, FALSE, array( 'striptags' => TRUE ) );\n\t\t}\n\t\treturn NULL;\n\t}", "public function getDescription()\n {\n return $this->getCurrentTranslation()->getDescription();\n }", "public function getLanguagesTitleForVacancy() {\n return $this->descriptions->map(function($entity){\n return $entity->getLanguage()->getTitle(); \n });\n }", "public function description() {\n return $this->t('I am garlic sandwich.');\n }", "public function getMultilingual();", "public function inGerman()\n {\n return $this->getTranslationIn('de');\n }", "public function getLocalizedInfo($lang = false) {\r\n if ($lang) {\r\n if ($this->hasLocalizedInfo($lang)) {\r\n return $this->localized[$lang];\r\n }\r\n } elseif ($this->hasLocalizedInfo()) {\r\n return $this->localized;\r\n }\r\n\r\n return null;\r\n }", "public function getDescription()\n {\n return $this->description instanceof LocalizedStringBuilder ? $this->description->build() : $this->description;\n }", "static public function getDescription(): string\n {\n return static::$description;\n }", "public function getDescription($lang = \"en\")\n {\n switch ($lang) {\n case \"en\":\n return \"Gen config and ScansInfoCsv dataStore\";\n case \"ru\":\n return \"Генерирует файл конфига для ScansInfoCsv хранилишь.\";\n default:\n return \"Hasn't description for selected language.\";\n }\n }", "public function getFromLanguage(): string;", "abstract public function get_app_language();", "static function get()\n\t{\n\t\treturn self::$lang;\n\t}", "function __(string $translate, string $locale = null, array $values = []) : string\n {\n return I18n::find($translate, $locale, $values);\n }", "public function getDesciption();", "public function getMetaDescription()\n {\n if (\\Lang::hasForLocale($this->getRoutesPath() . \\Slug::getRouteSlug(), $this->getCurrent())) {\n return trans($this->getRoutesPath() . \\Slug::getRouteSlug() . '.metaDescription');\n } else {\n return trans($this->getRoutesPath() . \\Slug::getRouteName() . '.metaDescription');\n }\n }", "public static function getDescription(): string\n {\n return static::$description;\n }", "public function getDescription(): string\n {\n /** @var Translation|PaymentTranslation $translation */\n $translation = $this->translate(null, true);\n\n return $translation->getDescription();\n }", "public static function getDescription();", "function GetAdminDescription()\n {\n return $this->Lang('moddescription');\n }", "public function getDescription() {\n return $this->config['general']['description'];\n }", "public function message(): string|array\n {\n return trans()->has('validation.enum_value')\n ? __('validation.enum_value')\n : __('laravelEnum::messages.enum_value');\n }", "public function getDescription($language = null)\n {\n if ($language === null) {\n $language = Yii::$app->language;\n }\n\n $descriptions = $this->descriptions;\n if ($descriptions === []) {\n return '';\n }\n\n if (isset($descriptions[$language])) {\n return $descriptions[$language]->content;\n }\n\n return reset($descriptions)->content;\n }", "public static function get() {\n\t\treturn self::$lang;\n\t}", "public function inEnglish()\n {\n return $this->getTranslationIn('en');\n }", "function get_group_description($group) {\n\tglobal $home_locale, $current_locale;\n\tif ($home_locale == $current_locale\n\t\t\t|| !isset($group['vccommondescription'])\n\t\t\t|| !$group['vccommondescription']) {\n\t\treturn $group['vclocaldescription'];\n\t} else {\n\t\treturn $group['vccommondescription'];\n\t}\n}", "public function lang(): string;", "public static function get_leadin_i18n() {\n\t\treturn array(\n\t\t\t'chatflows' => __( 'Live Chat', 'leadin' ),\n\t\t\t'email' => __( 'Email', 'leadin' ),\n\t\t\t'pricing' => __( 'Advanced Features', 'leadin' ),\n\t\t\t'signIn' => __( 'Sign In', 'leadin' ),\n\t\t\t'selectExistingForm' => __( 'Select an existing form', 'leadin' ),\n\t\t\t'selectForm' => __( 'Select a form', 'leadin' ),\n\t\t\t'formBlockTitle' => __( 'HubSpot Form', 'leadin' ),\n\t\t\t'formBlockDescription' => __( 'Select and embed a HubSpot form', 'leadin' ),\n\t\t);\n\t}", "public function getI18n()\n {\n return $this->get('i18n');\n }", "public function getLanguages() {}", "public function description(LanguagesDb $language = null)\n {\n if ($this->isNonexistent) return false;\n\n if (!$language) $language = Language::getInstance()->getCurrentLanguage();\n\n if (!FeedbackNamesTranslatesDb::getTranslate($this->id, $language->id)) return $this->program_name;\n\n return FeedbackNamesTranslatesDb::getTranslate($this->id, $language->id)->description;\n }", "private static function loadLanguage($lang){\n\t\t$descriptions = array();\n\n\t\t$locale = 'locale/'.$lang.'.php';\n\t\trequire($locale);\n\n\t\treturn (object)$descriptions;\n\t}", "protected function getLanguages() {}", "abstract public function getLocaleName();", "public static function getDescription($value): string\n {\n return\n static::getLocalizedDescription($value) ??\n static::getKey($value);\n }", "protected function loadLocalization() {}", "protected function getLocalizedRandomLabels()\n {\n $labels = [];\n\n foreach ($this->locales as $locale) {\n $labels[$locale->getCode()] = $this->faker->sentence(2);\n }\n\n return $labels;\n }", "public static function getLocalizedLabel( $enumKey, $value ) {\n\t\textract(Message::aliases());\n\t\t$settings = Settings::all();\n\t\t$enumString = $settings->$enumKey;\n\t\t$localizedEnumString = $t($enumKey);\n\n\t\tif ( !Enum::hasValue( $enumString, $value ) ) {\n\t\t\treturn Enum::getLabelForUnknownValue( $value );\n\t\t}\n\n\t\treturn Enum::getLabel( $localizedEnumString, $value );\n\t}", "public function getLanguages();", "public static function getDescription()\n {\n return self::$description;\n }", "public function messages()\n {\n return [\n 'text.max' => 'Максимальная длина фразы для поиска 255 символов',\n 'first_country_id.exists' => 'Не верно указана страна',\n 'second_country_id.exists' => 'Не верно указана страна',\n 'first_race.in_array' => 'Не верно указана раса',\n 'second_race.in_array' => 'Не верно указана раса',\n 'map_id.exists' => 'Не верно указана карта',\n 'sort_by.in_array' => 'Не верно указан параметр сортиовки',\n 'sort_type.in_array' => 'Не верно указан тип сортиовки',\n 'user_replay.in_array' => 'Не верно указан вид replay',\n 'type_id.exists' => 'Не верно указан тип replay',\n ];\n }", "function _getLocaleInfo() {\n $array = $this->_readLocaleInfo();\n if($array == false ||\n !isset($array[\"id\"])) {\n return 'en'; //Earlier versions of Openbiblio only supported English\n }\n else {\n $this->localekey = $array[\"code\"];\n $this->_isdefaultlocale = ($array[\"default_flg\"] == \"Y\");\n $this->_isdefaultlocale = ($array[\"default_flg\"] == \"Y\");\n\t\t$this->_localeDescr = $array[\"description\"];\n return $array[\"id\"]; \n }\n }", "function getLocalizedCompetingInterests() {\r\n\t\treturn $this->getLocalizedData('competingInterests');\r\n\t}", "public function getBackOfficeLanguage();", "public function getLangcode() {\n }", "public function description(): string\n\t{\n\t\treturn match ($this) {\n\t\t\tself::Created => 'Displayed in admin only',\n\t\t\tself::Tentative => 'Displayed on the site as month, tentative signup',\n\t\t\tself::Confirmed => 'Displayed on the site with full date, regular signup',\n\t\t\tself::Canceled => 'Displayed only in admin',\n\t\t};\n\t}", "public function getLang(): string {\n return $this->lang;\n }", "public function getSystemLanguages() {}", "function GetLocalizedTexts()\n\t{\n\t\t$result = $this->sendRequest(\"GetLocalizedTexts\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getSystemLanguages() {}", "function l(){\n\tglobal $_LOCALE;\n\t\n\t$entry = $_LOCALE;\n\t$args = func_get_args();\n\t\n\tfor($i = 0; $i < count($args); $i++){\n\t\t$key = $args[$i];\n\t\tif ( array_key_exists($key, $entry) ) {\n\t\t\t$entry = $entry[$key];\n\t\t\tif ( ! is_array($entry) )\n\t\t\t\tbreak;\n\t\t} else {\n\t\t\t$entry = 'Missing entry in language file: ' . join(' → ', array_slice($args, 0, $i + 1));\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t$format_args = array_slice($args, $i + 1);\n\treturn (is_string($entry) and count($format_args) > 0) ? vsprintf($entry, $format_args) : $entry;\n}", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "public function getName()\n {\n return \"enum_translation_extension\";\n }", "public function getDescription()\n {\n return $this->__get(self::FIELD_DESCRIPTION); \n }", "function getLocalizedOptions() {\n\t\treturn array();\n\t}", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();" ]
[ "0.7494485", "0.6766009", "0.6745608", "0.6312405", "0.63109946", "0.61861503", "0.6131851", "0.6122489", "0.6122489", "0.6113962", "0.60734725", "0.6023037", "0.59964323", "0.5979908", "0.5979908", "0.594134", "0.5939062", "0.5939062", "0.5939062", "0.5939062", "0.5939062", "0.5939062", "0.5934499", "0.59319574", "0.5924365", "0.5895247", "0.58739287", "0.5873129", "0.5872854", "0.586936", "0.5823244", "0.5816415", "0.58051443", "0.5787327", "0.57772887", "0.5754958", "0.57381284", "0.5729508", "0.5727977", "0.572493", "0.5715527", "0.5703247", "0.5674746", "0.56727684", "0.56715274", "0.5655658", "0.5648919", "0.56457454", "0.5613031", "0.5611623", "0.56079686", "0.56023705", "0.55624354", "0.5544831", "0.5541698", "0.55411166", "0.55362594", "0.5533094", "0.55299044", "0.5529048", "0.5528457", "0.5524747", "0.5517476", "0.5510527", "0.55058944", "0.5493929", "0.5484967", "0.5476827", "0.5469213", "0.5459051", "0.54577357", "0.5457289", "0.5452644", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54458976", "0.54267186", "0.5426095", "0.5422715", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614", "0.54086614" ]
0.63227004
3
Get the default localization key.
public static function getLocalizationKey(): string { return 'base.'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "protected static function getDefaultKey()\n {\n $aliases = self::getAliases();\n return reset($aliases);\n }", "protected function getLocaleKey()\n {\n return ($this->localeKey ?: 'language_id');\n }", "public static function default(): string\n {\n $default = Cache::get('locale_default');\n\n if ($default === null) {\n $default = static::select('locale')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->locale : config('contentful.default_locale');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('locale_default', $default);\n }\n\n return $default;\n }", "public function getLocaleKey() {\n \treturn Locale::getKey();\n }", "public function getDefaultLanguage(): string\n {\n $this->fetchLanguages();\n\n $language = collect($this->languages)->where('default', true)->first();\n self::$language = $language;\n\n return $language->name;\n }", "public function key()\n {\n if ( ! $this->isTranslated()) {\n return $this->key;\n }\n\n $parts = explode('.', $this->key);\n\n array_splice($parts, $this->localeIndex, 0, $this->getLocalePlaceholder());\n\n return trim(implode('.', $parts), '.');\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public function getDefault(): string\n {\n return $this->default;\n }", "public static function getDefault()\r\n {\r\n return self::get('default');\r\n }", "public static function defaultCountry(): string\n {\n $default = Cache::get('country_default');\n\n if ($default === null) {\n $default = static::select('country')->where('is_default', '=', true)->first();\n $default = ! empty($default) ? $default->country : config('contentful.default_country');\n\n // Cache is cleaned in Console\\Commands\\SyncLocales (run at least daily)\n Cache::forever('country_default', $default);\n }\n\n return $default;\n }", "public function getDefault()\n {\n $this->_currentLocale = \\Locale::getDefault();\n return $this->_currentLocale;\n }", "function trans_or_default(string $key, $default, array $replace = [], $locale = null): string\n {\n $message = trans($key, $replace, $locale);\n\n return $message === $key ? $default : $message;\n }", "public function translationKey(): ?string\n {\n return $this->getAttribute('label_translated');\n }", "protected function getI18nKey()\n {\n return str_replace('/', '.', self::services()->get('inflector')->underscore(get_class($this->model)));\n }", "public function defaultCode()\n {\n \tif (!$lang = $this->model->where('is_default', '=', 1)->first()) {\n \t\treturn false;\n \t}\n\n \treturn $lang->code;\n }", "public static function getDefaultLang() {\n return self::find()->where(['is_default' => self::LANGUAGE_IS_DEFAULT, 'status' => self::LANGUAGE_STATUS_ACTIVE])->one();\n }", "protected function signKeyName() {\n\t\t\treturn $this->signKeyName ?: 'default';\n\t\t}", "public static function getDefault()\n {\n return self::$default;\n }", "function UseDefaultLocale() {\n $array = $this->_readDefaultLocaleInfo();\n if($array == false ||\n !isset($array[\"id\"])) {\n return 'en'; //Earlier versions of Openbiblio only supported English\n }\n else {\n $this->_locale = $array[\"id\"];\n $this->localekey = $array[\"code\"];\n //$this->_charset = $array[\"charset\"];\n $this->_isdefaultlocale = ($array[\"default_flg\"] == \"Y\");\n\t\t$this->_localeDescr = $array[\"description\"];\n return $array[\"id\"]; \n }\n }", "public function getSiteDefaultLanguage();", "public function getOembedKey($key, $default = null)\n {\n return isset($this->oembed[$key]) ? $this->oembed[$key] : $default;\n }", "protected static function get_l10n_defaults()\n {\n }", "public function routePrefix(): string\n {\n $locale = $this->routedLocale() ? $this->routedLocale() : $this->defaultLocale();\n\n return $locale->{$this->defaultKey};\n }", "public function getDefaultVal(): string\n {\n return $this->defaultText;\n }", "public function getDefaultLocale();", "static function getDefaultLocale()\r\n {\r\n return self::$defaultLocale;\r\n }", "public static function find_default()\n\t{\n\t\t// All supported languages\n\t\t$langs = (array) Kohana::$config->load('lang');\n\n\t\t// Look for language cookie first\n\t\tif ($lang = Cookie::get(Lang::$cookie))\n\t\t{\n\t\t\t// Valid language found in cookie\n\t\t\tif (isset($langs[$lang]))\n\t\t\t\treturn $lang;\n\n\t\t\t// Delete cookie with invalid language\n\t\t\tCookie::delete(Lang::$cookie);\n\t\t}\n\n\t\t// Parse HTTP Accept-Language headers\n\t\tforeach (Request::accept_lang() as $lang => $quality)\n\t\t{\n\t\t\t// Return the first language found (the language with the highest quality)\n\t\t\tif (isset($langs[$lang]))\n\t\t\t\treturn $lang;\n\t\t}\n\n\t\t// Return the hard-coded default language as final fallback\n\t\treturn Lang::$default;\n\t}", "public static function getAppOrDefaultLocale(): string\n {\n return app()->getLocale() ?? static::default();\n }", "public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }", "public function getDefaultName(): string\n {\n return self::$DEFAULT_NAME;\n }", "public function getKey(): string {\n return $this->getType() . $this->getId() . $this->getLang() . $this->getRevisionId() ?? '';\n }", "public function getDefaultLanguage() : ?string;", "public function getDefaultLocale()\n {\n return $this->config->get('app.fallback_locale');\n }", "static public function getDefaultKeyName(Config $conf = null) {\n $locationId = \"global\";\n if (is_null($conf)) {\n $projectId = self::getProjectId();\n $keyRingId = self::getKeyRingId();\n $cryptoKeyId = self::getCryptoKeyId();\n } else {\n $projectId = $conf->get(self::CONF_PROJECT_ID_NAME);\n $keyRingId = $conf->get(self::CONF_KEYRING_ID_NAME);\n $cryptoKeyId = $conf->get(self::CONF_KEY_ID_NAME);\n }\n return self::getKeyName($projectId, $locationId, $keyRingId, $cryptoKeyId);\n }", "public function getDefault(): ?string;", "function multilang_locale_name($key) {\n $list = multilang_locales_list();\n if (isset($list[ $key ])){\n return $list[ $key ];\n } else {\n return $key;\n }\n}", "public function getDefaultLocale()\n {\n $fallbackLocale = config('locale.locale');\n return array_get($this->settings, 'defaultLocale', $fallbackLocale);\n }", "public function getDefaultCampaignLanguagesId() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(7, $this->_result)) return (string) $this->_result[7];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getDefaultCampaignLanguagesId', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getDefaultCampaignLanguagesId', __LINE__, __FILE__);\n\t}", "function get_lang_key($key) {\n $CI = &get_instance();\n return $CI->lang->line($key);\n}", "public function getDefault()\n {\n return $this->get($this->default);\n }", "private function getDefault($entity)\n {\n foreach ($entity->getI18ns() as $existingI18n) {\n if ($existingI18n->getLocale() === $this->defaultLocale) {\n return $existingI18n;\n }\n }\n }", "function default_lang()\n {\n $browser_lang = !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtok(strip_tags($_SERVER['HTTP_ACCEPT_LANGUAGE']), ',') : '';\n $browser_lang = substr($browser_lang, 0,2);\n if(array_key_exists($browser_lang, $this->languages))\n return $browser_lang;\n else{\n reset($this->languages);\n return key($this->languages);\n }\n }", "function __t(?string $key = null, ?string $default = null, array $replace = [], ?string $locale = null)\n {\n if (Lang::has($key, $locale)) {\n return __($key, $replace, $locale);\n }\n if ($default) {\n if (Str::contains($default, [' ', '.', ':'])) {\n return __($default, $replace, $locale);\n }\n // is probably single word\n return $default;\n }\n return $key;\n }", "public function getTranslation( $identifier, ?string $defaultTranslation = null ) : string;", "public function getDefaultLanguageCode()\n {\n return $this->default_language_code;\n }", "function getDefaultLocale();", "public function getLocalKey(): string\n {\n return $this->localKey;\n }", "function default_locale()\n{\n return Config::getDefaultLocale();\n}", "public function getDefaultLocale() {\n $locales = $this->getLocales();\n if (!$locales) {\n throw new I18nException('Could not get the default locale: no locales defined');\n }\n\n return array_shift($locales);\n }", "private function getFallbackLocale()\r\n {\r\n return config('app.fallback_locale');\r\n }", "function getFallbackLocale()\n {\n return config('app.fallback_locale');\n }", "function getFallbackLocale() {\n return config('app.fallback_locale');\n }", "static function getDefaultLang() {\n if (self::$default_lang === NULL) {\n if (self::$list == NULL) {\n self::getList();\n }\n foreach (self::$list as $data) {\n if ($data->default == static::STATUS_KEY_ON) {\n self::$default_lang = $data;\n break;\n }\n }\n }\n return self::$default_lang;\n }", "public function getDefaultLanguage(){\n\t\treturn $this->_lang_default;\n\t}", "public function key() {\n $var = key($this->translations);\n return $var;\n }", "public static function getDefaultLanguageUser(Request $request = null): string\n {\n $country = static::defaultCountry();\n $locales = static::getAcceptedLanguages($request);\n $locale = ! empty($locales) ? $locales[0] : config('app.fallback_locale');\n\n $localeModel = (new static)\n ->where('country', $country)\n ->where('locale', $locale)\n ->take(1)\n ->get()\n ->first();\n\n return empty($localeModel) ? static::default() : $localeModel->locale;\n }", "public function getCurrentOrDefaultLocale();", "protected function getLocalePlaceholder()\n {\n return TranslationLocaleHelper::VALIDATION_LOCALE_PLACEHOLDER;\n }", "public function get_user_default_lang(){\n return User::where('id',Auth::user()->id)->first()->default_lang;\n }", "protected function _getDefaultLanguage()\n {\n \t$config = $this->getOptions();\n $languageList = array_keys($config['languages']);\n\n\n \t$defaultLanguage= '';\n \tif (array_key_exists('language', $_COOKIE)) {\n \t\t$defaultLanguage = $_COOKIE['language'];\n \t} else {\n \t$zl = new Zend_Locale();\n \t$defaultLanguage = $zl->getLanguage();\n \t}\n\n $defaultLanguage = in_array($defaultLanguage, $languageList)? $defaultLanguage: 'en';\n\n return $defaultLanguage;\n }", "public function getDefaultValue() {\n\t\treturn $this->data[$this->defaultLanguagePageID];\n\t}", "function lang($key){\n\tglobal $lang;\n\treturn isset($lang[$key])?$lang[$key]:$key;\n}", "function GetDefaultLang() : string\n{\n return 'ar';\n}", "public function getKey(): string\n {\n if ($this->key) {\n return $this->key;\n }\n\n // If the user has set a custom key.\n if ($this->config->has('key')) {\n $key = Key::validate($this->config->get('key'), 'field');\n\n $this->key = $key;\n\n return $key;\n }\n\n // For fields which doesn't require name attribute use label instead.\n if (\n !$this->config->has('name') &&\n in_array($this->getType(), ['accordion', 'message', 'tab'])\n ) {\n $key = $this->config->get('label');\n } else {\n $key = $this->config->get('name');\n }\n\n $key = sprintf('%s_%s', $this->parentKey, Key::sanitize($key));\n\n $this->key = $key;\n\n return $key;\n }", "public function getFallbackLocale(): string\n {\n return $this['config']->get('app.fallbackLocale');\n }", "public function get_default(){\n\t\treturn $this->default;\n\t}", "private function initDefaultLanguage()\r\n\t{\r\n\t\t$default_language = $this->xml->xpath(\"configuration/config[@name='languages']/language[position()=1]/@code\");\r\n\t\t\r\n\t\tif ( count($default_language) > 0)\r\n\t\t{\r\n\t\t\t$this->default_language = (string) $default_language[0][\"code\"];\r\n\t\t}\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->default_language = null;\r\n\t\t}\r\n\r\n\t\treturn $this->default_language;\r\n\t}", "public function get_option_default($key)\n {\n switch ($key) {\n case self::FIELD_MESSAGE:\n return 'Hello, World!';\n\n default:\n return '';\n }\n }", "function settingsAsString($key, $default = null): ?string\n {\n return app('Padosoft\\Laravel\\Settings\\SettingsManager')->getAsString($key, $default);\n }", "public function default(): Locale\n {\n return $this->defaultLocale;\n }", "public function getDefault()\n {\n return $this->default;\n }", "public function defaultLanguage()\r\n\t{\r\n\t\treturn $this->default_language;\r\n\t}", "public static function getDefaultLanguage()\n {\n return DLanguage::getDefaultLanguageCode();\n }", "public function getDefaultLocale()\n {\n return self::$defaultLocale;\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 get_formatted_default(): string\n\t{\n\t\t$default = $this->default;\n\n\t\tif (!$default)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\tswitch ($default)\n\t\t{\n\t\t\tcase 'CURRENT_TIMESTAMP':\n\n\t\t\t\treturn \"DEFAULT $default\";\n\n\t\t\tdefault:\n\n\t\t\t\treturn \"DEFAULT '$default'\";\n\t\t}\n\t}", "protected function defaultCacheKey() : string\n {\n throw new LogicException('The class ' . static::class . ' has no default cache key.');\n }", "public static function getLocale(): string\n {\n $locale = locale_get_default();\n\n return strtolower(substr($locale, 0, 2));\n }", "private function getKey() {\n\t\tif ( !$this->key )\n\t\t\t$this->key = \"mvn-maillists-\" . sanitize_key( $this->getName() );\n\n\t\treturn $this->key;\n\t}", "private function getDefaultCountryId()\n {\n $defaultCountryId = $this->directoryHelper->getDefaultCountry();\n if ($this->config->getDefaultCountryId()) {\n $defaultCountryId = $this->config->getDefaultCountryId();\n } else if ($this->config->isGeoIpDetectionEnabled() && $this->geoIpAdapter->isAvailable()) {\n $countryIdByIp = $this->getCountryIdByIp();\n if ($countryIdByIp) {\n $defaultCountryId = $countryIdByIp;\n }\n }\n return $defaultCountryId;\n }", "public function getDefaultMessage()\n {\n return $this->defaultMessage;\n }", "public function getRouteKey()\n {\n return $this->getTranslation('url', app()->getLocale());\n }", "public static function get ( $key, $default = null ) {\n return self::getAdapter()->get( $key );\n }", "public function getLibriNotificationKey() {\n $codeList = $this->_getFirstElement('lieferantintern/ms/ms01');\n\n // only return key if it's from the default code list\n return ($codeList == \"01\") ? $this->_getFirstElement('lieferantintern/ms/ms02') : null;\n }", "public function getDefaultLanguage()\n {\n if ($this->defaultLanguage)\n return $this->defaultLanguage;\n else\n return 'en';\n }", "public static function getDefaultSettingsKeys();", "public function getLocalKeyName()\n {\n return $this->localKey;\n }", "public function getMainLocale(): string\n {\n return $this->mainLocale;\n }", "function lang($key)\n{\n\tglobal $lang;\n\t\n\t// Make sure the key is uppercase\n\t$key = strtoupper($key);\n\t\n\t// Does that key exist?\n\tif(!$lang[$key])\n\t{\n\t\t// So we know it needs to be translated.\n\t\treturn '{' . $key . '}';\n\t}\n\telse\n\t{\n\t\treturn $lang[$key];\n\t}\n}", "public function getDefaultLocale()\n {\n if (null === $this->defaultLocale) {\n $this->defaultLocale = \\Locale::getDefault();\n }\n return $this->defaultLocale;\n }", "public static function getDefaultLocale()\n {\n return static::$defaultFormatSettings['locale'];\n }", "public function getKey(): ?string\n {\n return $this->key;\n }", "public function getDefaultLanguage() {\n\t $pathFile = storage_path(\"/json/languages.json\");\n\n\t if(!File::exists($pathFile)) {\n\t return null;\n\t }\n\n\t $languages = File::get($pathFile);\n\t $file = (array)json_decode(File::get($pathFile));\n\t return ['en' => $file['en']]; // return default languages is English\n\t}", "function tsuiseki_tracking_get_key() {\n $key = TSUISEKI_TRACKER_KEY;\n if (empty($key)) {\n $key = (string)trim(get_option('tsuiseki_tracking_key'));\n }\n return $key;\n}", "public function getDefaultId() : ?string;", "function getDefaultAddressFormatCode(string $languageId = LANGUAGE_ID): string\n{\n\tswitch ($languageId)\n\t{\n\t\tcase 'kz':\n\t\t\t$result = 'RU_2';\n\t\t\tbreak;\n\n\t\tcase 'de':\n\t\t\t$result = 'EU';\n\t\t\tbreak;\n\n\t\tcase 'en':\n\t\t\t$result = 'US';\n\t\t\tbreak;\n\n\t\t//case 'ru':\n\t\t//case 'by':\n\t\t//case 'ua':\n\t\tdefault:\n\t\t\t$result = 'RU';\n\t}\n\n\treturn $result;\n}", "public function getTranslationKey()\n {\n $filter = new Zend_Filter_StringToUpper();\n $key = $filter->filter($this->_rule);\n if (!empty($key)) {\n return 'RULE_FAILED_'.$key;\n }\n return '';\n }", "private function getLanguageId()\n {\n $languageId = \"\";\n if (isset($_SESSION['Shopware'][\"Auth\"]->localeID) && $_SESSION['Shopware'][\"Auth\"]->localeID != \"\") {\n $languageId = $_SESSION['Shopware'][\"Auth\"]->localeID;\n }\n return $languageId;\n }", "public function getLocale(): string\n {\n return $this['config']->get('app.locale');\n }" ]
[ "0.76941293", "0.7581752", "0.754389", "0.75033206", "0.7021993", "0.6843685", "0.6799357", "0.67925346", "0.67925346", "0.67886865", "0.6669828", "0.6665372", "0.6647502", "0.6644404", "0.6528121", "0.6492235", "0.6453658", "0.64053786", "0.64050126", "0.63886935", "0.63863045", "0.637196", "0.636656", "0.6355897", "0.6313716", "0.62795156", "0.6276538", "0.6273684", "0.62711555", "0.6263351", "0.6263351", "0.62473804", "0.6203567", "0.62034786", "0.62034136", "0.6187868", "0.6181424", "0.6175286", "0.61734396", "0.6167164", "0.61668324", "0.61659336", "0.6154401", "0.61523145", "0.61430866", "0.6134237", "0.6132918", "0.6128987", "0.6121143", "0.61201805", "0.6118926", "0.6118738", "0.6114412", "0.61116475", "0.610359", "0.6092863", "0.609268", "0.60883015", "0.6081856", "0.6074218", "0.607042", "0.60572785", "0.6049839", "0.6041218", "0.6035377", "0.6031861", "0.60294235", "0.6014455", "0.60073555", "0.5999913", "0.5998627", "0.59938955", "0.5987612", "0.5985823", "0.59802103", "0.5976876", "0.5975834", "0.5972059", "0.5960898", "0.593883", "0.5924224", "0.589778", "0.5895001", "0.5893572", "0.588105", "0.5860674", "0.5854796", "0.58507144", "0.58497286", "0.5843244", "0.5839201", "0.5836184", "0.5832824", "0.5819785", "0.58162856", "0.58142644", "0.5812742", "0.58103675", "0.5807128", "0.580675" ]
0.73683715
4
Check that the enum contains all values of the array.
public static function containsValues(array $values) { foreach ($values as $value) { if (! static::hasValue($value)) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function enumsHaveValues() : bool\n {\n foreach ($this->enums as $enum) {\n if ($enum->value !== null) {\n return true;\n }\n }\n\n return false;\n }", "public function getIsAllValuesValid(array $data)\n {\n foreach($data as $value)\n {\n if(!$this->getIsValidValue($value))\n {\n return false;\n }\n }\n return true;\n }", "public static function hasAllValues(array $array, array $values): bool\n {\n return count(array_intersect($values, Arr::dot($array))) == count($values);\n }", "public function it_has_correct_set_of_allowed_values(): void\n {\n $allowed = [\n ChannelNotificationSeverity::INFO,\n ChannelNotificationSeverity::WARNING,\n ChannelNotificationSeverity::ERROR,\n ];\n self::assertEquals($allowed, ChannelNotificationSeverity::getAllowableEnumValues());\n }", "public function validate(array $array)\n {\n $this->setParams(['values' => array_values($array)]);\n return in_array($this->getValue(), $array, true);\n }", "public static function all(array $self) : bool\n {\n foreach ($self as $val) {\n if ($val === null) {\n return false;\n }\n }\n return true;\n }", "public function hasValues(){\n return $this->_has(1);\n }", "private function all($a) {\n return count(array_filter($a)) == count($a);\n }", "public function hasAllOf() {\n return isset($this->field['allOf']);\n }", "public function hasValues()\n {\n return (bool) count($this->getValues());\n }", "public function hasValues() {\n return $this->_has(2);\n }", "public function hasValues() {\n return $this->_has(3);\n }", "public function hasMultipleValues(): bool\n {\n return $this->countNodeArrayValue() > 1;\n }", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function isButtonValidAllValuesSetExpectTrue() {}", "function atk_value_in_array($array)\n{\n\tif (is_array($array) && !empty($array))\n\t{\n\t\tforeach ($array as $key => $value)\n\t\t{\n\t\t\tif (is_array($value))\n\t\t\t{\n\t\t\t\tif (atk_value_in_array($value)) return true;\n\t\t\t}\n\t\t\telse if($value) return true;\n\t\t}\n\t}\n\treturn false;\n}", "public function getIsAllKeysValid(array $data)\n {\n $keys = array_keys($data);\n foreach($keys as $key)\n {\n if(!$this->getIsValidKey($key))\n {\n return false;\n }\n }\n return true;\n }", "private static function checkValues($input) {\n if (empty($input)) {\n return FALSE;\n }\n\n $result = TRUE;\n foreach ($input as $value) {\n $result = $result && $value != false;\n }\n\n return $result;\n }", "public function validate(array $values): bool;", "public function hasValues(): bool\n {\n if ($this->type == self::TYPE_COLLECTION) {\n foreach ($this->collections as $collection) {\n if ($collection->getValues()) return true;\n if ($collection->isRange()) return true;\n }\n }\n\n return (bool) $this->values || $this->isRange();\n }", "public static function allArrayElementsEmpty ($array)\r\n\t{\r\n\t\t# Ensure the variable is an array if not already\r\n\t\t$array = self::ensureArray ($array);\r\n\t\t\r\n\t\t# Return false if a non-empty value is found\r\n\t\tforeach ($array as $key => $value) {\r\n\t\t\t#!# Consider changing to casting as string then doing a strlen\r\n\t\t\tif ($value !== '') {\t// Native empty() regards 0 and '0' as empty which is stupid\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t# Return true if no values have been found\r\n\t\treturn true;\r\n\t}", "public static function checkValues($input) {\n if (empty($input)) {\n return FALSE;\n }\n\n $result = TRUE;\n foreach ($input as $value) {\n $result = $result && $value != false;\n }\n\n return $result;\n }", "public function checkArray(): array\n {\n return (new CheckerArray($this->getValue()))->check();\n }", "function value_is_in_set($value, $array) {\n return in_array($value, $array);\n }", "public static function inArray($value, array $values, $message = '');", "private function allUnchecked($arr) {\n\n foreach($arr as $data) {\n if(is_array($data) && array_key_exists('checked', $data) && $data['checked']) return FALSE;\n }\n \n return TRUE;\n }", "protected function isValidArray($array)\n {\n return (!is_null($array) && is_array($array) && count($array) > 0);\n }", "public static function _isoneof($value, $field, array $array) {\n\t\treturn in_array($value, $array);\n\t}", "private function _isArray($value) {\n return is_array($value) && array_keys($value) === range(0, sizeof($value) - 1);\n }", "public function hasEnumFields()\n {\n foreach ($this->fields as $col) {\n if ($col->isEnumType()) {\n return true;\n }\n }\n\n return false;\n }", "public static function isValidValue($value) {\n $values = array_values(\n self::getConstants()\n );\n\n return in_array($value, $values, $strict = true);\n }", "public function is(...$values): bool;", "public function isEmpty(array $array);", "public function testAssertIsArrayNotEmpty()\n {\n $this->assertIsArrayNotEmpty(['value']);\n\n foreach ([\n [],\n [[]],\n [false],\n [null],\n [''],\n ] as $array) {\n $this->assertException(AssertionFailedError::class, function () use ($array) {\n $this->assertIsArrayNotEmpty($array);\n });\n }\n }", "public static function isValidValue($value)\n {\n $values = array_values(self::getConstants());\n return in_array($value, $values, $strict = true);\n }", "public function testInArray() {\n\t\t$array = array(\"a\", \"b\", \"c\");\n\t\t$this->assertTrue(permissionInPermissions($array, \"a\"));\n\t\t$this->assertTrue(permissionInPermissions($array, \"b\"));\n\t\t$this->assertTrue(permissionInPermissions($array, \"c\"));\n\t}", "public static function hasAnyValues(array $array, array $values): bool\n {\n return !empty(self::getAnyValues($array, $values));\n }", "static function InArray(string $val, array $arr): void\n\t{\n\t\tif(!in_array($val, $arr))\n\t\t{\n\t\t\tthrow new Exception(\"ERR_ARRAY\", 1);\n\t\t}\n\t}", "public function valid()\n {\n return key($this->values) !== null;\n }", "public static function getAllowableEnumValues() : array\n {\n return [\n self::CORE,\n self::SNL,\n self::EFN,\n ];\n }", "public function hasAllowedValues() : bool\n {\n return !empty($this->allowedValues);\n }", "public function contains(...$values): bool;", "function hasArray($arr) {\r\n\tforeach ($arr as $value) {\r\n\t\tif(is_array($value))\r\n\t\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "public function validate()\r\n {\r\n foreach ($this->_data as $data) {\r\n if (!in_array($data, $this->_validateAgainst)) $this->addError('Value is not a valid selection.');\r\n }\r\n \r\n return !sizeof($this->_errors);\r\n }", "public function testEmptyArray() {\n\t\t$array = array(\"a\", \"b\", \"c\");\n\t\t$notInArray = \"\";\n\n\t\t$this->assertFalse(permissionInPermissions($array, $notInArray));\n\t\t$this->assertFalse(permissionInPermissions($array, null));\n\t}", "function checkforempty($valuearray) {\n\n\t$check = Array();\n\tforeach($valuearray as $value) {\n\t\t$check[] = $_REQUEST[$value];\n\t}\n\n\tif(countempty($check) > 0) return false;\n\treturn true;\n\n}", "public function isArray()\n {\n return \\is_array($this->value);\n }", "private function _hasAllArguments()\n {\n $errors = [];\n foreach ($this->action->args as $key => $val) {\n if (!isset($this->args[$key])) {\n $errors[] = $key;\n }\n }\n\n return $errors;\n }", "public function in(array $values);", "public static function any(array $self) : bool\n {\n foreach ($self as $val) {\n if ($val !== null) {\n return true;\n }\n }\n return false;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::GROUND,\nself::STANDARD,\nself::PREMIUM, ];\n }", "function isOk($arr) {\n return count(array_filter($arr)) == 0;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_EMPTY,\n self::UNKNOWN,\n self::LITER,\n self::KILOGRAM,\n self::SQUARE_METER,\n self::CUBIC_METER,\n ];\n }", "public function check($key) {\n if (!is_array($key)) {\n $key = array($key);\n }\n\n foreach ($key as $field) {\n\t\t\tif (!MOC_Array::check($this->data, $field)) {\n\t\t\t\treturn false;\n\t\t\t}\n }\n return true;\n }", "public function testRejectsAnEnumWithIncorrectlyTypedValues()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [['FOO' => 10]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeEnum values must be an associative array with value names as keys.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public static function isValid(array $input)\n {\n static::validate($input);\n }", "function in_array_all($needles, $haystack) {\n\t\n return empty(array_diff($needles, $haystack));\n\n}", "public static function getValidStatuses(): array\n {\n return array_keys(self::getStatuses());\n }", "private function set_family_health($arr){\r\n\t\t$qno = $this->getFirstQuestionNo('family_health');\r\n\t\t$err=null;\r\n\t\tfor($x=1;$x<=6;$x++){\r\n \t\ttry{\r\n \t\t\t$v=$this->vc->exists('q10_'.$x,$arr,\"enum\",array(\"values\"=>array(1,2,3)),false,false);\r\n \t\t\t$this->data['family_health']['q10_'.$x]=($v==\"\")?0:$v;\r\n \t\t}catch(ValidationException $e){\r\n \t\t\t$eob=$e->createErrorObject();\r\n \t\t\t$eob->message = \"Be sure to select an answer for all of the listed conditions\";\r\n \t\t\t$eob->name = \"Question \" . $qno;\r\n \t\t}\r\n \t}\r\n \tif (isset($eob)) {\r\n \t\t$err[] = $eob;\r\n \t}\r\n \treturn ($err)?$err:false;\r\n }", "public function hasValues($key)\n {\n $all = is_array($key) ? $key : array($key);\n foreach($all as $key) {\n if(!isset($this->values[$key]) || $this->values[$key] === '') {\n return false;\n }\n }\n return true;\n }", "public function supportsValues();", "public static function getAllowableEnumValues()\n {\n return [\n self::_OR,\n self::_AND,\n self::NOTIN,\n self::UNKNOWN,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::UNKNOWN,\n self::SINGLE,\n self::UNMARRIED,\n self::MARRIED_WITH_CONDITIONS,\n self::MARRIED_IN_COMMUNITY_OF_PROPERTY,\n self::LIVING_TOGETHER_IN_CIVIL_PARTNERSHIP,\n self::LIVING_TOGETHER_WITHOUT_CIVIL_PARTNERSHIP,\n self::PARTNER_REGISTRATION_IN_COMMUNITY_OF_PROPERTY,\n self::PARTNER_REGISTRATION_WITH_TERM_LIFE_INSURANCE,\n self::PARTNER_REGISTRATION_PARTNERSHIP_WITH_CONDITIONS,\n self::WIDOWER,\n self::WIDOW,\n self::DIVORCED,\n self::MARRIED,\n self::MARRIED_IN_LIMITED_COMMUNITY_OF_PROPERTY,\n ];\n }", "protected function validateArray($values)\n {\n if (!is_array($values)) {\n return false;\n }\n\n foreach ($values as $v) {\n if ($this->isFixedValues && !$this->validateFixedValues($v)) {\n return false;\n }\n\n if (!$this->validateValue($v)) {\n return false;\n }\n }\n\n return true;\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'exists' => self::exists,\n 'dirty_word' => self::dirty_word,\n );\n }", "public function forValueWithValues()\n {\n assert(\n TestEnumWithValues::forValue(10),\n isSameAs(TestEnumWithValues::$FOO)\n );\n }", "public function in(iterable $values): bool\n {\n foreach ($values as $value) {\n if ($this->is($value)) {\n return true;\n }\n }\n\n return false;\n }", "function checkValues($form){\n $values = array(\"id_kapela\", \"nazev\", \"styl\", \"zeme\", \"mesto\", \"text\", \"kapela_id_kapela\", \"koncert_id_koncert\", \"id_koncert\", \"datum\", \"cas\", \"misto\", \"vstup\", \"uzivatel_id_uzivatel\", \"id_uzivatel\", \"jmeno\", \"heslo\", \"email\", \"admin\", \"pwd\", \"hesloCheck\");\n $keys = array_keys($form);\n \n for($i = 0; $i < sizeof($keys); $i++){\n if(!in_array(($keys[$i]), $values)){\n return false;\n }\n }\n \n return true;\n}", "public function useEnumValues(): bool\n {\n return $this->useEnumValues;\n }", "public function all($array = array());", "public static function getAllowableEnumValues()\n {\n return [\n self::EQUAL,\n self::NOT_EQUAL,\n self::GREATER_THAN_EQUALS,\n self::LESS_THAN_EQUALS,\n self::UNKNOWN,\n ];\n }", "protected function validateArray($value){\n\t\treturn is_array($value);\n\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::DAILY,\n self::WEEKLY,\n self::MULTI_WEEKLY,\n self::ONE_WEEK,\n self::MULTI_FORTNIGHT,\n self::MONTHLY,\n self::MULTI_MONTHLY,\n self::RANDOM,\n ];\n }", "public static function getAllowableEnumValues()\n {\n $allowable = [\n self::BUSINESS,\n self::INDIVIDUAL,\n ];\n $allowableAllCase = array_merge(array_map('strtolower', $allowable), $allowable);\n return $allowableAllCase;\n }", "public static function isValidValue($value) {\n return is_array($value);\n }", "public static function isValidValue($value)\n {\n return in_array($value, self::getValues());\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'already_used' => self::already_used,\n 'not_exists' => self::not_exists,\n 'once_only' => self::once_only,\n );\n }", "function isEmpty($array)\n{\n foreach ($array as $key => $value) {\n if ($key == 'DNARNA_TYPE')\n continue; //special case - type is always set\n if (!empty($value)) {\n return FALSE;\n } //empty($value)\n } //$array as $key => $value\n return TRUE;\n}", "public static function validateHas_Health_Insurance_DataForArrayConstraintsFromSetHas_Health_Insurance_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $dependent_DataTypeHas_Health_Insurance_DataItem) {\n // validation for constraint: itemType\n if (!$dependent_DataTypeHas_Health_Insurance_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Has_Health_Insurance_DataType) {\n $invalidValues[] = is_object($dependent_DataTypeHas_Health_Insurance_DataItem) ? get_class($dependent_DataTypeHas_Health_Insurance_DataItem) : sprintf('%s(%s)', gettype($dependent_DataTypeHas_Health_Insurance_DataItem), var_export($dependent_DataTypeHas_Health_Insurance_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Has_Health_Insurance_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Has_Health_Insurance_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_NEW,\nself::USED,\nself::COLLECTIBLE,\nself::REFURBISHED,\nself::CLUB, ];\n }", "function validateArrayValue($val) {\n\t\tif(!is_array($val)) return false;\n\t\t\n\t\t// Validate against Zend_Date,\n\t\t// but check for empty array keys (they're included in standard form submissions)\n\t\treturn (\n\t\t\tarray_key_exists('year', $val) \n\t\t\t&& (!$val['year'] || Zend_Date::isDate($val['year'], 'yyyy', $this->locale))\n\t\t\t&& array_key_exists('month', $val)\n\t\t\t&& (!$val['month'] || Zend_Date::isDate($val['month'], 'MM', $this->locale))\n\t\t\t&& array_key_exists('day', $val)\n\t\t\t&& (!$val['day'] || Zend_Date::isDate($val['day'], 'dd', $this->locale))\n\t\t);\n\t}", "public function containsAll(self $enum1, self $enum2, self ...$enums): bool\n {\n array_unshift($enums, $enum1, $enum2);\n\n $counter = 0;\n foreach ($enums as $enum) {\n if ($this->contains($enum)) {\n ++$counter;\n }\n }\n\n return func_num_args() === $counter;\n }", "protected function hasEnumProperty(string $field)\n {\n $property = $this->getEnumProperty($field);\n\n return isset($this->$property) && is_array($this->$property);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::ENTERPRISE,\n ];\n }", "public function hasValues(): bool\n {\n return (bool) $this->prepare()->hasValues;\n }", "public function getEnumValues()\n {\n return array(\n 'all' => self::all,\n 'part' => self::part,\n 'nothing' => self::nothing,\n );\n }", "public static function valueIsValid($_value)\r\n\t{\r\n\t\treturn in_array($_value,array(PayPalEnumPaymentActionCodeType::VALUE_NONE,PayPalEnumPaymentActionCodeType::VALUE_AUTHORIZATION,PayPalEnumPaymentActionCodeType::VALUE_SALE,PayPalEnumPaymentActionCodeType::VALUE_ORDER));\r\n\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::EDUCATION,\n self::HEALTH,\n self::FINANCE,\n self::PROFESSIONAL,\n self::LICENSES,\n self::CERTIFICATES,\n self::LEGAL,\n self::OTHERS\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::LINEAR,\n self::DATA_MATRIX,\n self::QR,\n self::MICRO_QR,\n self::PDF417,\n self::AZTEC,\n ];\n }", "public function validate(array $data);", "public function validate(array $data);", "public static function getAllowableEnumValues()\n {\n return [\n self::UNKNOWN,\n self::PENDING,\n self::PROCESSING,\n self::SUCCESS,\n self::FAIL,\n self::PARTIAL_FAIL,\n self::SYSTEM_ERROR,\n self::DELETED,\n ];\n }", "public function testValues() {\n\t\t$array = array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$expected = array(1, 2, 3);\n\t\t$result = _::values($array);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test with an object\n\t\t$object = (object)$array;\n\t\t$result = _::values($object);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::ACTION_INVALID,\n self::ACTION_MISSING,\n self::BOOT_ORDER_INVALID,\n self::CORE_MEMORY_UNSUPPORTED,\n self::FIREWALL_INVALID,\n self::CORE_NUMBER_INVALID,\n self::HOSTNAME_INVALID,\n self::HOSTNAME_MISSING,\n self::MEMORY_AMOUNT_INVALID,\n self::NIC_MODEL_INVALID,\n self::PASSWORD_DELIVERY_INVALID,\n self::SERVER_TITLE_INVALID,\n self::SERVER_TITLE_MISSING,\n self::SIZE_INVALID,\n self::SIZE_MISSING,\n self::STORAGE_DEVICE_INVALID,\n self::STORAGE_DEVICE_MISSING,\n self::STORAGE_DEVICES_INVALID,\n self::STORAGE_DEVICES_MISSING,\n self::STORAGE_INVALID,\n self::STORAGE_MISSING,\n self::STORAGE_TITLE_INVALID,\n self::STORAGE_TITLE_MISSING,\n self::TIMEZONE_INVALID,\n self::TYPE_INVALID,\n self::TIER_INVALID,\n self::VIDEO_MODEL_INVALID,\n self::VNC_INVALID,\n self::VNC_PASSWORD_INVALID,\n self::ZONE_INVALID,\n self::ZONE_MISSING,\n self::USER_DATA_INVALID,\n self::INSUFFICIENT_CREDITS,\n self::STORAGE_FORBIDDEN,\n self::PLAN_CORE_NUMBER_ILLEGAL,\n self::PLAN_MEMORY_AMOUNT_ILLEGAL,\n self::TRIAL_PLAN,\n self::STORAGE_NOT_FOUND,\n self::ZONE_NOT_FOUND,\n self::CDROM_DEVICE_IN_USE,\n self::DEVICE_ADDRESS_IN_USE,\n self::IP_ADDRESS_RESOURCES_UNAVAILABLE,\n self::MULTIPLE_TEMPLATES,\n self::PUBLIC_STORAGE_ATTACH,\n self::SERVER_RESOURCES_UNAVAILABLE,\n self::STORAGE_ATTACHED_AS_CDROM,\n self::STORAGE_ATTACHED_AS_DISK,\n self::STORAGE_DEVICE_LIMIT_REACHED,\n self::STORAGE_IN_USE,\n self::STORAGE_RESOURCES_UNAVAILABLE,\n self::STORAGE_STATE_ILLEGAL,\n self::STORAGE_TYPE_ILLEGAL,\n self::ZONE_MISMATCH,\n self::INVALID_USERNAME,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::FOREST_EDGE,\n self::WATERSIDE,\n self::PARK,\n self::ON_BUSY_STREET,\n self::ON_QUIET_STREET,\n self::CENTRAL_CITY_CENTER,\n self::RESIDENTIAL_AREA,\n self::UNOBSTRUCTED_VIEW,\n self::SHELTERED_LOCATION,\n self::OPEN_AREA,\n self::OUTSIDE_VILLAGE,\n self::ON_WATERWAY,\n self::FORESTED_AREA,\n self::NEAR_RAILWAY_STATION,\n self::SUBURB,\n self::BUSINESS_PARK,\n self::OTHER,\n self::LRTE,\n self::HARBOR_AREA,\n self::INDUSTRIAL_AREA,\n self::OFFICE_PARK,\n self::PRTE,\n self::SHOPPING_CENTER,\n self::COUNTRYSIDE,\n self::NEAR_HIGHWAY,\n self::NEAR_PUBLIC_TRANSPORT,\n self::NEAR_SCHOOL,\n self::SEASIDE,\n self::SECLUDED_LOCATION,\n self::STANDALONE,\n self::SUB_DIVISION,\n self::FURNITURE_BOULEVARD,\n self::INDOOR_SHOPPING,\n self::SEA_VIEW,\n ];\n }", "public function hasValue(array &$array)\n\t{\n\t\treturn AgaviArrayPathDefinition::hasValue($this->parts, $array);\n\t}", "function isArrayVal()\n {\n return $this->_arrayVal;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PREPROCESSING,\n self::STAGING_QUEUED,\n self::STAGING,\n self::STAGING_COMPLETED,\n self::STAGING_FAILED,\n self::TRANSFORMING_QUEUED,\n self::TRANSFORMING,\n self::TRANSFORMING_FAILED,\n self::TRANSFORMING_COMPLETED,\n ];\n }", "public static function inValidStatusProvider()\n\t{\n\t\treturn array(\n\t\t\tarray(''),\n\t\t\tarray(null),\n\t\t\tarray(false),\n\t\t\tarray(true),\n\t\t\tarray('somethingwrong'),\n\t\t\tarray(array('open')),\n\t\t);\n\t}", "public final function verifySetData(){\n\n foreach($this->data as $k => $v){\n $this->verifyData($k);\n }//foreach\n\n if(count($this->errors)){\n return false;\n }//if\n\n return true;\n\n }" ]
[ "0.7101821", "0.6537375", "0.63164186", "0.63028234", "0.6227483", "0.60258675", "0.60254323", "0.59724826", "0.5969649", "0.5965525", "0.5953226", "0.59456277", "0.5936363", "0.59133005", "0.5913037", "0.5853697", "0.58303493", "0.5815495", "0.58020663", "0.58016866", "0.5794207", "0.5749648", "0.57193506", "0.57182926", "0.5710527", "0.57029325", "0.5672339", "0.5665113", "0.5656965", "0.565626", "0.5647924", "0.56445396", "0.5628265", "0.56254107", "0.5621622", "0.5621429", "0.5618534", "0.5597333", "0.5595362", "0.55922675", "0.55845946", "0.55832505", "0.5576308", "0.5570438", "0.5562671", "0.55384755", "0.55340195", "0.5530393", "0.5515808", "0.5507569", "0.54952157", "0.5494635", "0.5479213", "0.5472779", "0.54617", "0.545871", "0.5454502", "0.5452499", "0.54500365", "0.5441425", "0.54412377", "0.54360425", "0.542447", "0.5409734", "0.54028046", "0.5398041", "0.5393058", "0.5387396", "0.53849965", "0.5381862", "0.53811616", "0.5379256", "0.5371835", "0.5369806", "0.5369278", "0.5351", "0.5349841", "0.534803", "0.5342199", "0.53403825", "0.53353864", "0.5334836", "0.533092", "0.5325459", "0.5324038", "0.5320733", "0.5320572", "0.53197896", "0.53182936", "0.5316671", "0.5316671", "0.5314331", "0.5312129", "0.53053665", "0.5300963", "0.5299524", "0.52987534", "0.52940786", "0.5288299", "0.5277511" ]
0.53006625
95
Check that the enum contains all values of the array and throws an exception, if not.
public static function containsValuesOrFail(array $values, string $message = '') { if (! static::containsValues($values)) { throw new InvalidEnumValueException($message); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRejectsAnEnumWithIncorrectlyTypedValues()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [['FOO' => 10]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage('SomeEnum values must be an associative array with value names as keys.');\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "private function enumsHaveValues() : bool\n {\n foreach ($this->enums as $enum) {\n if ($enum->value !== null) {\n return true;\n }\n }\n\n return false;\n }", "public function it_has_correct_set_of_allowed_values(): void\n {\n $allowed = [\n ChannelNotificationSeverity::INFO,\n ChannelNotificationSeverity::WARNING,\n ChannelNotificationSeverity::ERROR,\n ];\n self::assertEquals($allowed, ChannelNotificationSeverity::getAllowableEnumValues());\n }", "static function InArray(string $val, array $arr): void\n\t{\n\t\tif(!in_array($val, $arr))\n\t\t{\n\t\t\tthrow new Exception(\"ERR_ARRAY\", 1);\n\t\t}\n\t}", "public function testRejectsAnEnumTypeWithMissingValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => null],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO must refer to an object with a \"value\" key representing ' .\n 'an internal value but got: null.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::ACTION_INVALID,\n self::ACTION_MISSING,\n self::BOOT_ORDER_INVALID,\n self::CORE_MEMORY_UNSUPPORTED,\n self::FIREWALL_INVALID,\n self::CORE_NUMBER_INVALID,\n self::HOSTNAME_INVALID,\n self::HOSTNAME_MISSING,\n self::MEMORY_AMOUNT_INVALID,\n self::NIC_MODEL_INVALID,\n self::PASSWORD_DELIVERY_INVALID,\n self::SERVER_TITLE_INVALID,\n self::SERVER_TITLE_MISSING,\n self::SIZE_INVALID,\n self::SIZE_MISSING,\n self::STORAGE_DEVICE_INVALID,\n self::STORAGE_DEVICE_MISSING,\n self::STORAGE_DEVICES_INVALID,\n self::STORAGE_DEVICES_MISSING,\n self::STORAGE_INVALID,\n self::STORAGE_MISSING,\n self::STORAGE_TITLE_INVALID,\n self::STORAGE_TITLE_MISSING,\n self::TIMEZONE_INVALID,\n self::TYPE_INVALID,\n self::TIER_INVALID,\n self::VIDEO_MODEL_INVALID,\n self::VNC_INVALID,\n self::VNC_PASSWORD_INVALID,\n self::ZONE_INVALID,\n self::ZONE_MISSING,\n self::USER_DATA_INVALID,\n self::INSUFFICIENT_CREDITS,\n self::STORAGE_FORBIDDEN,\n self::PLAN_CORE_NUMBER_ILLEGAL,\n self::PLAN_MEMORY_AMOUNT_ILLEGAL,\n self::TRIAL_PLAN,\n self::STORAGE_NOT_FOUND,\n self::ZONE_NOT_FOUND,\n self::CDROM_DEVICE_IN_USE,\n self::DEVICE_ADDRESS_IN_USE,\n self::IP_ADDRESS_RESOURCES_UNAVAILABLE,\n self::MULTIPLE_TEMPLATES,\n self::PUBLIC_STORAGE_ATTACH,\n self::SERVER_RESOURCES_UNAVAILABLE,\n self::STORAGE_ATTACHED_AS_CDROM,\n self::STORAGE_ATTACHED_AS_DISK,\n self::STORAGE_DEVICE_LIMIT_REACHED,\n self::STORAGE_IN_USE,\n self::STORAGE_RESOURCES_UNAVAILABLE,\n self::STORAGE_STATE_ILLEGAL,\n self::STORAGE_TYPE_ILLEGAL,\n self::ZONE_MISMATCH,\n self::INVALID_USERNAME,\n ];\n }", "public function testRejectsAnEnumTypeWithIncorrectlyTypedValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => 10],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO must refer to an object with a \"value\" key representing ' .\n 'an internal value but got: 10.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public function validate(array $array)\n {\n $this->setParams(['values' => array_values($array)]);\n return in_array($this->getValue(), $array, true);\n }", "private function set_family_health($arr){\r\n\t\t$qno = $this->getFirstQuestionNo('family_health');\r\n\t\t$err=null;\r\n\t\tfor($x=1;$x<=6;$x++){\r\n \t\ttry{\r\n \t\t\t$v=$this->vc->exists('q10_'.$x,$arr,\"enum\",array(\"values\"=>array(1,2,3)),false,false);\r\n \t\t\t$this->data['family_health']['q10_'.$x]=($v==\"\")?0:$v;\r\n \t\t}catch(ValidationException $e){\r\n \t\t\t$eob=$e->createErrorObject();\r\n \t\t\t$eob->message = \"Be sure to select an answer for all of the listed conditions\";\r\n \t\t\t$eob->name = \"Question \" . $qno;\r\n \t\t}\r\n \t}\r\n \tif (isset($eob)) {\r\n \t\t$err[] = $eob;\r\n \t}\r\n \treturn ($err)?$err:false;\r\n }", "public function testAssertIsArrayNotEmpty()\n {\n $this->assertIsArrayNotEmpty(['value']);\n\n foreach ([\n [],\n [[]],\n [false],\n [null],\n [''],\n ] as $array) {\n $this->assertException(AssertionFailedError::class, function () use ($array) {\n $this->assertIsArrayNotEmpty($array);\n });\n }\n }", "public function testDoesNotAllowIsDeprecatedWithoutDeprecationReasonOnEnum()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => ['isDeprecated' => true]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO should provide \"deprecationReason\" instead of \"isDeprecated\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public static function inArray($value, array $values, $message = '');", "public function testGetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public function testNotInArray() {\n\t\t$array = array(\"a\", \"b\", \"c\");\n\t\t$this->assertFalse(permissionInPermissions($array, \"d\"));\n\t}", "public function testSetValueInvalid()\n {\n $this->expectException(\\InvalidArgumentException::class);\n\n $this->uut->setValue(new ArrayValue());\n }", "public function getIsAllValuesValid(array $data)\n {\n foreach($data as $value)\n {\n if(!$this->getIsValidValue($value))\n {\n return false;\n }\n }\n return true;\n }", "public function testValueMissingArrKeys() {\n $errors = $this->getValidator()->validate([]);\n\n $this->assertNotEmpty($errors);\n $this->assertCount(2, $errors);\n $this->assertEquals('VALIDATION.ARRAY_MISSING_KEY', $errors[0]['__CODE'] );\n $this->assertEquals('VALIDATION.ARRAY_MISSING_KEY', $errors[1]['__CODE'] );\n }", "public function testEmptyArray() {\n\t\t$array = array(\"a\", \"b\", \"c\");\n\t\t$notInArray = \"\";\n\n\t\t$this->assertFalse(permissionInPermissions($array, $notInArray));\n\t\t$this->assertFalse(permissionInPermissions($array, null));\n\t}", "public function testEnumField()\n {\n $field = $this->table->getField('yeahnay'); // An enum column\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Enumerated',\n $field);\n $enumValues = $field->getValues();\n $this->assertCount(2, $enumValues);\n $this->assertEquals('Yes', $enumValues[0]);\n $this->assertEquals('No', $enumValues[1]);\n }", "public function validate(array $values): bool;", "public function validate() {\n global $DB;\n $params = array_keys($this->params);\n $method = ($this->method == BADGE_CRITERIA_AGGREGATION_ALL);\n $singleparam = (count($params) == 1);\n\n foreach ($params as $param) {\n // Perform check if there only one parameter with any type of aggregation,\n // Or there are more than one parameter with aggregation ALL.\n\n if (($singleparam || $method) && !$DB->record_exists('badge', array('id' => $param))) {\n return array(false, get_string('error:invalidparambadge', 'badges'));\n }\n }\n\n return array(true, '');\n }", "protected function enumCheck(array $specificationValue, mixed $jsonKey, mixed $jsonValue): void{\n if(!in_array($jsonValue, $specificationValue)){\n $this->errorMessage = \"Data provided in field `{$jsonKey}` is not within the allowed parameters.\";\n }\n }", "public static function getAllowableEnumValues() : array\n {\n return [\n self::CORE,\n self::SNL,\n self::EFN,\n ];\n }", "public function forValueWithValues()\n {\n assert(\n TestEnumWithValues::forValue(10),\n isSameAs(TestEnumWithValues::$FOO)\n );\n }", "private function _isArray($items)\n {\n $items = (array) $items;\n if (!is_array($items) or count($items) == 0)\n {\n throw new \\Exception('The method takes an array.');\n return FALSE;\n }\n }", "public function testIfWrongValueThrows() : void\n {\n\n $this->expectException(FieldValueInproperException::class);\n\n // Create Field.\n $field = new EnumField('test_name');\n $field->setModel(( new Model() )->setName('test'));\n $field->setValues('one', 'two', 'three');\n\n // Test.\n $this->assertFalse($field->isValueValid('four'));\n }", "public function testRejectsAnEmptyArrayFieldResolver()\n {\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'BadResolver.badField field resolver must be a function if provided, but got: Array.'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->schemaWithObjectWithFieldResolver([]);\n\n $this->addToAssertionCount(1);\n }", "public static function validateHas_Health_Insurance_DataForArrayConstraintsFromSetHas_Health_Insurance_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $dependent_DataTypeHas_Health_Insurance_DataItem) {\n // validation for constraint: itemType\n if (!$dependent_DataTypeHas_Health_Insurance_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Has_Health_Insurance_DataType) {\n $invalidValues[] = is_object($dependent_DataTypeHas_Health_Insurance_DataItem) ? get_class($dependent_DataTypeHas_Health_Insurance_DataItem) : sprintf('%s(%s)', gettype($dependent_DataTypeHas_Health_Insurance_DataItem), var_export($dependent_DataTypeHas_Health_Insurance_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Has_Health_Insurance_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Has_Health_Insurance_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "public static function isValidValue($value) {\n $values = array_values(\n self::getConstants()\n );\n\n return in_array($value, $values, $strict = true);\n }", "public function testAcceptsAWellDefinedEnumTypeWithEmptyValueDefinition()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => [\n 'FOO' => [],\n 'BAR' => [],\n ],\n ]);\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals('FOO', $enumType->getValue('FOO')->getValue());\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertEquals('BAR', $enumType->getValue('BAR')->getValue());\n }", "function checkArrayCount (array $array, int $count) {\n if (count($array) != $count) {\n return 'Invalid array passed';\n }\n}", "public static function isValidValue($value)\n {\n $values = array_values(self::getConstants());\n return in_array($value, $values, $strict = true);\n }", "public function validate(array $data);", "public function validate(array $data);", "protected function isValidArray($array)\n {\n return (!is_null($array) && is_array($array) && count($array) > 0);\n }", "public function hasEnumFields()\n {\n foreach ($this->fields as $col) {\n if ($col->isEnumType()) {\n return true;\n }\n }\n\n return false;\n }", "public function testInArray() {\n\t\t$array = array(\"a\", \"b\", \"c\");\n\t\t$this->assertTrue(permissionInPermissions($array, \"a\"));\n\t\t$this->assertTrue(permissionInPermissions($array, \"b\"));\n\t\t$this->assertTrue(permissionInPermissions($array, \"c\"));\n\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::GROUND,\nself::STANDARD,\nself::PREMIUM, ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::NOT_ENOUGH_DELIVERY_TARGET,\n self::OUT_OF_STOCK,\n self::OVER_SOV_DAILY_LIMIT,\n self::OVER_SOV_WEEKLY_LIMIT,\n self::UNKNOWN,\n ];\n }", "public function validateEnum($data, $schema, $path)\n {\n if (!isset($schema->enum)) {\n return;\n }\n\n // if $data comes from an array than the action below has already been done in validateArray()\n $needle = (isset($schema->caseSensitive) && !$schema->caseSensitive) ? strtolower($data) : $data;\n $haystack = (isset($schema->caseSensitive) && !$schema->caseSensitive) ? array_map('strtolower', $schema->enum) : $schema->enum;\n\n if (!in_array($needle, $haystack)) {\n\n $this->addError(\n ValidateException::ERROR_USER_ENUM_NEEDLE_NOT_FOUND_IN_HAYSTACK,\n [$path, $data, $this->conjugationObject(count($schema->enum), 'this specific value', 'one of these values'), implode('\\', \\'', $schema->enum)]\n );\n }\n }", "function validateArrayValue($val) {\n\t\tif(!is_array($val)) return false;\n\t\t\n\t\t// Validate against Zend_Date,\n\t\t// but check for empty array keys (they're included in standard form submissions)\n\t\treturn (\n\t\t\tarray_key_exists('year', $val) \n\t\t\t&& (!$val['year'] || Zend_Date::isDate($val['year'], 'yyyy', $this->locale))\n\t\t\t&& array_key_exists('month', $val)\n\t\t\t&& (!$val['month'] || Zend_Date::isDate($val['month'], 'MM', $this->locale))\n\t\t\t&& array_key_exists('day', $val)\n\t\t\t&& (!$val['day'] || Zend_Date::isDate($val['day'], 'dd', $this->locale))\n\t\t);\n\t}", "private function checkException() {\n return in_array(strtolower($this->program_name), $this->exceptions);\n }", "public function testSetMultipleInvalidTypeBoolean(): void\n {\n $keyValuePairs = true;\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->setMultiple($keyValuePairs);\n }", "public static function are_valid_enums($enum_property_list, $params){\n foreach ($enum_property_list as $item){\n $property = $item[\"property\"];\n $enum = $item[\"enum\"];\n if(isset($params[$property])){\n if(!Media::is_valid_enum($enum, $params[$property])){\n $http_response = HttpFailCodes::http_response_fail()->valid_enums;\n $http_response->message = \"Must choose a valid value for \" . $property . \".\";\n APIService::response_fail($http_response);\n }\n }\n }\n return true;\n }", "public function checkArray(): array\n {\n return (new CheckerArray($this->getValue()))->check();\n }", "private function _hasAllArguments()\n {\n $errors = [];\n foreach ($this->action->args as $key => $val) {\n if (!isset($this->args[$key])) {\n $errors[] = $key;\n }\n }\n\n return $errors;\n }", "private function checkEnum(FilterField $filterFieldDefinition, $filter): bool\n {\n if (count($filter->enum) < 1) {\n // no enum criteria for this filter, comparison allowed; everything is fine\n return true;\n }\n\n $filterValue = $filterFieldDefinition->getValue();\n if (is_array($filterValue)) {\n // supplied filter has multiple values; check if all of them are allowed\n foreach ($filterValue as $value) {\n if (!in_array($value, $filter->enum)) {\n // exit on first invalid value\n return false;\n }\n }\n\n // arriving here, the loop above encountered valid values only\n return true;\n }\n\n // supplied filter has only one value; check if it's an allowed value\n return in_array($filterValue, $filter->enum);\n }", "public function testValidateEmptyArray(): void\n {\n $this->assertFalse($this->validate([]));\n }", "public function invalidArrayForArrayConfigurationProvider() {}", "public function invalidArrayForArrayConfigurationIgnoreCaseProvider() {}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public function isButtonValidAllValuesSetExpectTrue() {}", "public static function getAllowableEnumValues()\n {\n return [\n self::_OR,\n self::_AND,\n self::NOTIN,\n self::UNKNOWN,\n ];\n }", "public static function validateResultTypeForArrayConstraintsFromSetResultType(array $values = []): string\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $instantSearchPayloadTypeResultTypeItem) {\n // validation for constraint: enumeration\n if (!\\EnumType\\EwsInstantSearchResultType::valueIsValid($instantSearchPayloadTypeResultTypeItem)) {\n $invalidValues[] = is_object($instantSearchPayloadTypeResultTypeItem) ? get_class($instantSearchPayloadTypeResultTypeItem) : sprintf('%s(%s)', gettype($instantSearchPayloadTypeResultTypeItem), var_export($instantSearchPayloadTypeResultTypeItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \\EnumType\\EwsInstantSearchResultType', is_array($invalidValues) ? implode(', ', $invalidValues) : var_export($invalidValues, true), implode(', ', \\EnumType\\EwsInstantSearchResultType::getValidValues()));\n }\n unset($invalidValues);\n \n return $message;\n }", "function ProcessEnumList($Name, $ValidValues, $List) //Check enum values and return as stringified list\n{\n\tif(is_string($List)) //Turn a string into an array with 1 item\n\t\t$List=Array($List);\n\tif(count(array_intersect($List, $ValidValues))==count($List)) //If all items are valid, return the stringified list\n\t\treturn implode(',', $List);\n\texit('Invalid values in \"'.$Name.'\" enum: '.implode(', ', $List));\n}", "public function validate()\r\n {\r\n foreach ($this->_data as $data) {\r\n if (!in_array($data, $this->_validateAgainst)) $this->addError('Value is not a valid selection.');\r\n }\r\n \r\n return !sizeof($this->_errors);\r\n }", "public static function isValid(array $input)\n {\n static::validate($input);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::UNKNOWN,\n self::PENDING,\n self::PROCESSING,\n self::SUCCESS,\n self::FAIL,\n self::PARTIAL_FAIL,\n self::SYSTEM_ERROR,\n self::DELETED,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_EMPTY,\n self::UNKNOWN,\n self::LITER,\n self::KILOGRAM,\n self::SQUARE_METER,\n self::CUBIC_METER,\n ];\n }", "public function validArrayForArrayConfigurationProvider() {}", "public static function inValidStatusProvider()\n\t{\n\t\treturn array(\n\t\t\tarray(''),\n\t\t\tarray(null),\n\t\t\tarray(false),\n\t\t\tarray(true),\n\t\t\tarray('somethingwrong'),\n\t\t\tarray(array('open')),\n\t\t);\n\t}", "public function testEnumSet(EnumSet $enumSet, array $enums, $expected): void\n {\n if ($expected instanceof Exception) {\n $this->expectException(get_class($expected));\n }\n foreach ($enums as $enum) {\n $enumSet[] = $enum;\n }\n assert(is_array($expected));\n $this->assertEquals($expected, $enumSet->toArray());\n $i = 0;\n foreach ($enumSet as $enum) {\n $this->assertEquals($expected[$i], $enum);\n $this->assertEquals($expected[$i], $enumSet[$enum]);\n $this->assertTrue(isset($enumSet[$enum]));\n unset($enumSet[$enum]);\n $this->assertFalse(isset($enumSet[$enum]));\n ++$i;\n }\n }", "public function supportsValues();", "public function validArrayForArrayConfigurationIgnoreCaseProvider() {}", "public function runOk(): BackedEnum\n {\n $enumClass = StringBackedEnum::class;\n return self::assertEnumHas($enumClass, 'A', $this->error);\n }", "public function testIsValid()\n {\n $this\n ->abstract\n ->expects($this->any())\n ->method('isValidType')\n ->with($this)\n ->will(\n $this->returnCallback(\n function ($object, $value) {\n return is_array($value);\n }\n )\n );\n\n $this->assertFalse(\n $this->abstract->isValid($this, null),\n 'A null value should not be valid.'\n );\n\n // force null as acceptable\n Property::set($this->abstract, 'nullable', true);\n\n $this->assertTrue(\n $this->abstract->isValid($this, null),\n 'A null value should be valid.'\n );\n\n $this->assertFalse(\n $this->abstract->isValid($this, 'This is a test.'),\n 'A string value should not be valid.'\n );\n\n $this->assertTrue(\n $this->abstract->isValid($this, array('This is a test.')),\n 'An array value should be valid.'\n );\n }", "public static function all(self ...$except): array\n {\n static::setup();\n\n $all = [];\n foreach (self::$enumeration['values'] as $value) {\n foreach ($except as $exceptEnum) {\n if ($value & $exceptEnum->value()) {\n continue 2;\n }\n }\n\n $all[] = self::byValue($value);\n }\n\n return $all;\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::NONE,\nself::ON_FIXED_DATE,\nself::AFTER_X_DAYS,\nself::ON_VARIABLE_DATE_TIME,\nself::SET_TO_NULL, ];\n }", "private function _isArray($value) {\n return is_array($value) && array_keys($value) === range(0, sizeof($value) - 1);\n }", "function check_enum_value_type($received_value, $table_name, $table_field, \\PDO $db) {\n $options = \\k1lib\\sql\\get_db_table_enum_values($db, $table_name, $table_field);\n $options_fliped = array_flip($options);\n\n if (!isset($options_fliped[$received_value])) {\n $error_type = print_r($options_fliped, TRUE) . \" value: '$received_value'\";\n// d($received_value, TRUE);\n } else {\n $error_type = FALSE;\n }\n return $error_type;\n}", "public static function getAllowableEnumValues()\n {\n return [\n self::_201,\n self::_202,\n self::_203,\n self::_204,\n self::_244,\n self::_205\n ];\n }", "public function validateData(array $data)\n {\n if (count($data) < 3) {\n throw new InvalidArgumentException(\"Invalid argument count (at least 3 values are expected).\");\n }\n\n if (!array_key_exists('username', $data)) {\n throw new InvalidArgumentException(\"username argument was not found [username].\");\n }\n\n if (!array_key_exists('password', $data)) {\n throw new InvalidArgumentException(\"password argument was not found [password].\");\n }\n\n if (!array_key_exists('applicationId', $data)) {\n throw new InvalidArgumentException(\"applicationId argument was not found [applicationId].\");\n }\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::_NEW,\nself::USED,\nself::COLLECTIBLE,\nself::REFURBISHED,\nself::CLUB, ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::UNKNOWN,\n self::SINGLE,\n self::UNMARRIED,\n self::MARRIED_WITH_CONDITIONS,\n self::MARRIED_IN_COMMUNITY_OF_PROPERTY,\n self::LIVING_TOGETHER_IN_CIVIL_PARTNERSHIP,\n self::LIVING_TOGETHER_WITHOUT_CIVIL_PARTNERSHIP,\n self::PARTNER_REGISTRATION_IN_COMMUNITY_OF_PROPERTY,\n self::PARTNER_REGISTRATION_WITH_TERM_LIFE_INSURANCE,\n self::PARTNER_REGISTRATION_PARTNERSHIP_WITH_CONDITIONS,\n self::WIDOWER,\n self::WIDOW,\n self::DIVORCED,\n self::MARRIED,\n self::MARRIED_IN_LIMITED_COMMUNITY_OF_PROPERTY,\n ];\n }", "public function runOk(): BackedEnum\n {\n $enumClass = IntBackedEnum::class;\n return self::assertEnumHas($enumClass, 1, $this->error);\n }", "public function test_array_returns_true_when_optional_and_input_empty() {\n\t\t$optional = true;\n\n\t\t$result = self::$validator->validate( null, $optional );\n\t\t$this->assertTrue( $result );\n\t}", "public static function getAllowableEnumValues()\n {\n return [\n self::0,\n self::1,\n self::2,\n self::3,\n self::4,\n self::5,\n self::6,\n self::7,\n self::8,\n self::9,\n self::10,\n self::11,\n self::12,\n self::13,\n self::14,\n self::15,\n self::16,\n self::17,\n self::18,\n self::19,\n self::20,\n self::21,\n self::22,\n self::23,\n self::24,\n self::25,\n self::26,\n self::27,\n self::28,\n self::29,\n self::30,\n self::31,\n self::32,\n self::33,\n self::34,\n self::35,\n self::36,\n self::37,\n self::38,\n self::39,\n self::40,\n self::41,\n self::42,\n self::43,\n self::44,\n self::45,\n self::46,\n self::47,\n self::48,\n self::49,\n self::50,\n self::51,\n self::52,\n self::53,\n self::54,\n self::55,\n self::56,\n self::57,\n self::58,\n self::59,\n self::89,\n self::90,\n self::91,\n self::92,\n self::93,\n self::94,\n self::95,\n self::96,\n self::97,\n self::98,\n self::99,\n self::100,\n self::101,\n self::102,\n self::103,\n self::104,\n self::105,\n self::106,\n self::107,\n self::108,\n self::109,\n self::110,\n self::111,\n self::112,\n self::113,\n self::115,\n self::116,\n self::117,\n self::118,\n self::119,\n self::120,\n self::121,\n self::122,\n self::123,\n self::124,\n self::125,\n self::126,\n self::127,\n self::128,\n self::129,\n self::130,\n self::131,\n self::132,\n self::133,\n self::134,\n self::135,\n self::136,\n self::137,\n self::138,\n self::139,\n self::140,\n self::141,\n self::142,\n self::143,\n self::144,\n self::145,\n self::146,\n self::147,\n self::148,\n self::149,\n self::150,\n self::151,\n self::152,\n self::153,\n self::154,\n self::155,\n self::156,\n self::157,\n self::158,\n self::159,\n self::160,\n self::161,\n self::162,\n self::163,\n self::164,\n self::165,\n self::166,\n self::167,\n self::168,\n self::169,\n self::170,\n self::171,\n self::172,\n self::173,\n self::174,\n self::175,\n self::200,\n self::201,\n self::202,\n self::203,\n self::204,\n self::205,\n self::206,\n self::207,\n self::208,\n self::209,\n self::210,\n self::211,\n self::212,\n self::213,\n self::214,\n self::215,\n self::216,\n self::217,\n self::218,\n self::219,\n self::220,\n self::221,\n self::222,\n self::223,\n self::224,\n self::225,\n self::226,\n self::227,\n self::228,\n self::229,\n self::230,\n self::231,\n self::232,\n self::233,\n self::234,\n self::235,\n self::300,\n self::301,\n self::302,\n self::303,\n self::304,\n self::305,\n self::306,\n self::307,\n self::308,\n self::309,\n self::310,\n self::311,\n self::312,\n self::313,\n self::400,\n self::500,\n self::501,\n self::502,\n self::503,\n self::504,\n self::505,\n self::506,\n self::507,\n self::508,\n self::509,\n self::510,\n self::511,\n self::512,\n self::513,\n self::514,\n self::515,\n self::516,\n self::517,\n self::518,\n self::519,\n self::520,\n self::521,\n self::522,\n self::523,\n self::524,\n self::525,\n self::526,\n self::527,\n self::528,\n self::529,\n self::530,\n self::531,\n self::532,\n self::533,\n self::534,\n self::535,\n self::536,\n self::537,\n self::538,\n self::539,\n self::540,\n self::541,\n self::542,\n self::543,\n self::544,\n self::555,\n self::556,\n self::557,\n self::558,\n self::559,\n self::560,\n self::561,\n self::562,\n self::563,\n self::564,\n self::565,\n self::566,\n self::567,\n self::568,\n self::569,\n self::570,\n self::571,\n self::572,\n self::573,\n self::574,\n self::575,\n self::576,\n self::577,\n self::578,\n self::579,\n self::580,\n self::581,\n self::582,\n self::583,\n self::584,\n self::585,\n self::586,\n self::587,\n self::588,\n self::589,\n self::590,\n self::591,\n self::592,\n self::593,\n self::594,\n self::595,\n self::601,\n self::602,\n self::603,\n self::604,\n self::605,\n self::606,\n self::607,\n self::608,\n self::609,\n self::610,\n self::611,\n self::612,\n self::613,\n self::614,\n self::615,\n self::616,\n self::617,\n self::618,\n self::619,\n self::620,\n self::621,\n self::622,\n self::623,\n self::624,\n self::625,\n self::626,\n self::627,\n self::628,\n self::629,\n self::630,\n self::631,\n self::632,\n self::633,\n self::634,\n self::635,\n self::636,\n self::637,\n self::638,\n self::639,\n self::641,\n self::642,\n self::643,\n self::644,\n self::646,\n self::647,\n self::648,\n self::649,\n self::650,\n self::651,\n self::652,\n self::653,\n self::654,\n self::655,\n self::656,\n self::657,\n self::658,\n self::659,\n self::660,\n self::661,\n self::662,\n self::663,\n self::664,\n self::665,\n self::666,\n self::667,\n self::668,\n self::669,\n self::670,\n self::671,\n self::672,\n self::673,\n self::674,\n self::675,\n self::676,\n self::677,\n self::678,\n self::679,\n self::680,\n self::681,\n self::682,\n self::683,\n self::684,\n self::685,\n self::686,\n self::687,\n self::688,\n self::689,\n self::690,\n self::691,\n self::692,\n self::693,\n self::694,\n self::695,\n self::696,\n self::697,\n self::698,\n self::699,\n self::701,\n self::702,\n self::703,\n self::704,\n self::705,\n self::706,\n self::707,\n self::750,\n self::751,\n self::801,\n self::802,\n self::803,\n self::804,\n self::805,\n self::806,\n self::807,\n self::900,\n self::901,\n self::902,\n self::903,\n self::904,\n self::905,\n self::906,\n self::907,\n self::908,\n self::909,\n self::1000,\n self::1001,\n self::1002,\n self::1003,\n self::1004,\n self::1005,\n self::1006,\n self::1007,\n self::1008,\n self::1009,\n self::1100,\n self::1204,\n self::1205,\n self::1218,\n self::1223,\n self::1224,\n self::1225,\n self::1226,\n self::1227,\n self::1229,\n self::1230,\n self::1231,\n self::1232,\n self::1233,\n self::1234,\n self::1235,\n self::1236,\n self::1237,\n self::1238,\n self::1239,\n self::1300,\n self::1301,\n self::1302,\n self::1303,\n self::1304,\n self::1305,\n self::1306,\n self::1307,\n self::1308,\n self::1309,\n self::1310,\n self::1311,\n self::1312,\n self::1313,\n self::1314,\n self::1315,\n self::1316,\n self::1317,\n self::1318,\n self::1400,\n self::1401,\n self::1402,\n self::1403,\n self::1404,\n self::1405,\n self::1500,\n self::1501,\n self::1502,\n self::1600,\n self::1601,\n self::1602,\n self::1603,\n self::1604,\n self::1605,\n self::1606,\n self::1607,\n self::1608,\n self::1609,\n self::1610,\n self::1611,\n self::1612,\n self::1613,\n self::1614,\n self::1615,\n self::1616,\n self::1617,\n self::1618,\n self::1619,\n self::1620,\n self::1621,\n self::1622,\n self::1623,\n self::1624,\n self::1625,\n self::1626,\n self::1627,\n self::1628,\n self::1629,\n self::1630,\n self::1631,\n self::1632,\n self::1633,\n self::1634,\n self::1635,\n self::1636,\n self::1637,\n self::1638,\n self::1639,\n self::1640,\n self::1641,\n self::1642,\n self::1643,\n self::1644,\n self::1645,\n self::1646,\n self::1647,\n self::1648,\n self::1649,\n self::1650,\n self::1651,\n self::1652,\n self::1653,\n self::1654,\n self::1655,\n self::1656,\n self::1657,\n self::1658,\n self::1659,\n self::1660,\n self::1661,\n self::1662,\n self::1663,\n self::1664,\n self::1665,\n self::1666,\n self::1667,\n self::1668,\n self::1669,\n self::1670,\n self::1671,\n self::1672,\n self::1673,\n self::1674,\n self::1675,\n self::1676,\n self::1677,\n self::1678,\n self::1679,\n self::1680,\n self::1681,\n self::1682,\n self::1683,\n self::1684,\n self::1685,\n self::1686,\n self::1687,\n self::1688,\n self::1800,\n self::1801,\n self::1802,\n self::1803,\n self::1804,\n self::1805,\n self::1806,\n self::1900,\n self::1901,\n self::1902,\n self::1903,\n self::1904,\n self::1905,\n self::1906,\n self::1907,\n self::1908,\n self::1910,\n self::1911,\n self::1912,\n self::1913,\n self::1914,\n self::2000,\n self::2001,\n self::2002,\n self::2003,\n self::2004,\n self::2005,\n self::2006,\n self::2007,\n self::2008,\n self::2009,\n self::2010,\n self::2011,\n self::2012,\n self::2013,\n self::2014,\n self::2015,\n self::2016,\n self::2017,\n self::2018,\n self::2019,\n self::2020,\n self::2021,\n self::2022,\n self::2023,\n self::2024,\n self::2025,\n self::2026,\n self::2027,\n self::2028,\n self::2029,\n self::2030,\n self::2031,\n self::2032,\n self::2033,\n self::2034,\n self::2035,\n self::2036,\n self::2037,\n self::2038,\n self::2039,\n self::2040,\n self::2041,\n self::2042,\n self::2043,\n self::2044,\n self::2045,\n self::2046,\n self::2047,\n self::2048,\n self::2049,\n self::2050,\n self::2051,\n self::2052,\n self::2053,\n self::2054,\n self::2055,\n self::2056,\n self::2057,\n self::2058,\n self::2059,\n self::2060,\n self::2061,\n self::2062,\n self::2063,\n self::2064,\n self::2065,\n self::2100,\n self::2101,\n self::2102,\n self::2103,\n self::2104,\n self::2105,\n self::2106,\n self::2107,\n self::2108,\n self::2109,\n self::2110,\n self::2111,\n self::2112,\n self::2113,\n self::2114,\n self::2115,\n self::2116,\n self::2117,\n self::2118,\n self::2119,\n self::2120,\n self::2121,\n self::2122,\n self::2123,\n self::2124,\n self::2125,\n self::2126,\n self::2200,\n self::2201,\n self::2202,\n self::2203,\n self::2204,\n self::2205,\n self::2206,\n self::2207,\n self::2300,\n self::2500,\n self::2501,\n self::2502,\n self::2503,\n self::2504,\n self::2505,\n self::2506,\n self::2600,\n self::2601,\n self::2700,\n self::2701,\n self::2702,\n self::2703,\n self::2800,\n self::2801,\n self::2802,\n self::2803,\n self::2804,\n self::2805,\n self::2806,\n self::2900,\n self::2901,\n self::3000,\n self::3001,\n self::3002,\n self::3003,\n self::3004,\n self::3005,\n self::3006,\n self::3007,\n self::3008,\n self::3009,\n self::3010,\n self::3011,\n self::3012,\n self::3013,\n self::3014,\n self::3015,\n self::3016,\n self::3017,\n self::3018,\n self::3019,\n self::3020,\n self::3021,\n self::3022,\n self::3023,\n self::3024,\n self::3025,\n self::3026,\n self::3027,\n self::3028,\n self::3200,\n self::3201,\n self::3202,\n self::3203,\n self::3204,\n self::3206,\n self::3207,\n self::3208,\n self::3209,\n self::3210,\n self::3211,\n self::3212,\n self::3213,\n self::3214,\n self::3215,\n self::3216,\n self::3217,\n self::3218,\n self::3219,\n self::3220,\n self::3221,\n self::3222,\n self::3300,\n self::3400,\n self::3401,\n self::3402,\n self::3403,\n self::3404,\n self::3405,\n self::3406,\n self::3407,\n self::3408,\n self::3409,\n self::3410,\n self::3411,\n self::3412,\n self::3413,\n self::3414,\n self::3500,\n self::3600,\n self::3702,\n self::3703,\n self::3705,\n self::3706,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::EDUCATION,\n self::HEALTH,\n self::FINANCE,\n self::PROFESSIONAL,\n self::LICENSES,\n self::CERTIFICATES,\n self::LEGAL,\n self::OTHERS\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PREPROCESSING,\n self::STAGING_QUEUED,\n self::STAGING,\n self::STAGING_COMPLETED,\n self::STAGING_FAILED,\n self::TRANSFORMING_QUEUED,\n self::TRANSFORMING,\n self::TRANSFORMING_FAILED,\n self::TRANSFORMING_COMPLETED,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::FOREST_EDGE,\n self::WATERSIDE,\n self::PARK,\n self::ON_BUSY_STREET,\n self::ON_QUIET_STREET,\n self::CENTRAL_CITY_CENTER,\n self::RESIDENTIAL_AREA,\n self::UNOBSTRUCTED_VIEW,\n self::SHELTERED_LOCATION,\n self::OPEN_AREA,\n self::OUTSIDE_VILLAGE,\n self::ON_WATERWAY,\n self::FORESTED_AREA,\n self::NEAR_RAILWAY_STATION,\n self::SUBURB,\n self::BUSINESS_PARK,\n self::OTHER,\n self::LRTE,\n self::HARBOR_AREA,\n self::INDUSTRIAL_AREA,\n self::OFFICE_PARK,\n self::PRTE,\n self::SHOPPING_CENTER,\n self::COUNTRYSIDE,\n self::NEAR_HIGHWAY,\n self::NEAR_PUBLIC_TRANSPORT,\n self::NEAR_SCHOOL,\n self::SEASIDE,\n self::SECLUDED_LOCATION,\n self::STANDALONE,\n self::SUB_DIVISION,\n self::FURNITURE_BOULEVARD,\n self::INDOOR_SHOPPING,\n self::SEA_VIEW,\n ];\n }", "function validate(array $data)\n\t{\n\t}", "public static function _isoneof($value, $field, array $array) {\n\t\treturn in_array($value, $array);\n\t}", "public function validate(array $array)\n {\n $this->setParams([\n 'array' => $array,\n 'keys' => array_keys($array)\n ]);\n\n $value = $this->getValue();\n if (! is_string($value) && ! is_int($value)) {\n // array_key_exists errors on non-string non-int keys.\n return false;\n }\n // using array_keys() converts string numeric keys to integers, which\n // is *not* the behavior we want.\n return array_key_exists($this->getValue(), $array);\n }", "private function valid_team_array() {\r\n if (!is_array($this->teams) || count($this->teams) < 2) {\r\n $this->error = 'Not enough teams in array shape passed';\r\n $this->reset_class_state();\r\n return false;\r\n }\r\n return true;\r\n }", "function checkforempty($valuearray) {\n\n\t$check = Array();\n\tforeach($valuearray as $value) {\n\t\t$check[] = $_REQUEST[$value];\n\t}\n\n\tif(countempty($check) > 0) return false;\n\treturn true;\n\n}", "public function test_array_returns_true_when_not_optional_and_input_array() {\n\t\t$optional = false;\n\n\t\t$result = self::$validator->validate( array('test','test2'), $optional );\n\t\t$this->assertTrue( $result );\n\t}", "function validate() {\n\t\t\n\t\tif(is_array($this->value)) { // If array\n\t\t\tforeach($this->value as $k => $value){\n\t\t\t\t$this->value[$k] = $this->validate_color_rgba($value);\n\t\t\t}//foreach\n\t\t} else { // not array\n\t\t\t$this->value = $this->validate_color_rgba($this->value);\n\t\t} // END array check\n\t\t\n\t}", "public function invalidBooleanValuesDataProvider()\n {\n return array(\n array('INVALID_SOMETHING'),\n array('INVALID_EMPTY'),\n array('INVALID_EMPTY_STRING'),\n array('INVALID_NULL'),\n array('INVALID_NUMBER_POSITIVE'),\n array('INVALID_NUMBER_NEGATIVE'),\n array('INVALID_MINUS'),\n array('INVALID_TILDA'),\n array('INVALID_EXCLAMATION'),\n );\n }", "public function hasValues(){\n return $this->_has(1);\n }", "function _field_checkarray_or($fval) \n {\n return $this->_field_checkarray($fval, 1);\n }", "public function testGetMultipleInvalidTypeString(): void\n {\n $keyValuePairs = \"I like to party sometimes until four\";\n $this->expectException(\\TypeError::class);\n $this->testNotStrict->getMultiple($keyValuePairs);\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::PERSONAL,\n self::ENTERPRISE,\n ];\n }", "public static function validateAnnual_Income_DataForArrayConstraintsFromSetAnnual_Income_Data(array $values = array())\n {\n $message = '';\n $invalidValues = [];\n foreach ($values as $dependent_DataTypeAnnual_Income_DataItem) {\n // validation for constraint: itemType\n if (!$dependent_DataTypeAnnual_Income_DataItem instanceof \\WorkdayWsdl\\\\StructType\\Annual_Income_DataType) {\n $invalidValues[] = is_object($dependent_DataTypeAnnual_Income_DataItem) ? get_class($dependent_DataTypeAnnual_Income_DataItem) : sprintf('%s(%s)', gettype($dependent_DataTypeAnnual_Income_DataItem), var_export($dependent_DataTypeAnnual_Income_DataItem, true));\n }\n }\n if (!empty($invalidValues)) {\n $message = sprintf('The Annual_Income_Data property can only contain items of type \\WorkdayWsdl\\\\StructType\\Annual_Income_DataType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));\n }\n unset($invalidValues);\n return $message;\n }", "private function validate()\n {\n if (!stristr(self::CHARACTER_LIST, $this->value[0])) {\n throw new \\Exception('Invalid first character: ' . $this->value[0]);\n }\n\n if (!in_array($this->value, self::listForCharacter($this->value[0]))) {\n throw new \\Exception('Word not in known list of words: ' . $this->value);\n }\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::EQUAL,\n self::NOT_EQUAL,\n self::GREATER_THAN_EQUALS,\n self::LESS_THAN_EQUALS,\n self::UNKNOWN,\n ];\n }", "public function getEnumValues()\n {\n return array(\n 'success' => self::success,\n 'already_used' => self::already_used,\n 'not_exists' => self::not_exists,\n 'once_only' => self::once_only,\n );\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::LINEAR,\n self::DATA_MATRIX,\n self::QR,\n self::MICRO_QR,\n self::PDF417,\n self::AZTEC,\n ];\n }", "public static function getAllowableEnumValues()\n {\n return [\n self::DAILY,\n self::WEEKLY,\n self::MULTI_WEEKLY,\n self::ONE_WEEK,\n self::MULTI_FORTNIGHT,\n self::MONTHLY,\n self::MULTI_MONTHLY,\n self::RANDOM,\n ];\n }", "static function isEmpty()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isEmpty', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "protected function validateArray($value){\n\t\treturn is_array($value);\n\t}" ]
[ "0.64770406", "0.6343876", "0.62652963", "0.60301703", "0.5991149", "0.5707614", "0.5705691", "0.5651775", "0.5609773", "0.55912817", "0.55842394", "0.55504596", "0.55375534", "0.55088985", "0.5469432", "0.54609114", "0.54570967", "0.5426988", "0.54261255", "0.5413678", "0.5402546", "0.5394117", "0.5370157", "0.5366718", "0.53580356", "0.5357819", "0.5354706", "0.53540254", "0.5345099", "0.5344969", "0.5341532", "0.5341287", "0.53393054", "0.53393054", "0.5335212", "0.532601", "0.531006", "0.52890366", "0.52878743", "0.5283917", "0.5269756", "0.52689016", "0.52687454", "0.5256525", "0.5252382", "0.52489334", "0.5238828", "0.5235918", "0.52342355", "0.5233452", "0.5232716", "0.52322525", "0.52320325", "0.5226519", "0.52241427", "0.52238154", "0.52235436", "0.5203484", "0.5194081", "0.51886255", "0.5184612", "0.51808786", "0.5175812", "0.5171147", "0.51698965", "0.5157378", "0.5157329", "0.5150397", "0.51500034", "0.5143106", "0.5133718", "0.5127217", "0.51241654", "0.5121166", "0.51194125", "0.51181346", "0.5109233", "0.5108644", "0.51062995", "0.5105957", "0.5104719", "0.5104147", "0.5103985", "0.5099567", "0.50987643", "0.50944096", "0.50926304", "0.50911766", "0.5090117", "0.5088612", "0.50874436", "0.5082234", "0.50791186", "0.5077013", "0.5076635", "0.5072461", "0.50682706", "0.50674623", "0.5060012", "0.5057148" ]
0.60433775
3
Tests Transform_Unserialize_Serial>process() with a chain
public function testProcess_Chain() { $mock = $this->getMock('Q\Transform', array('process')); $mock->expects($this->once())->method('process')->with($this->equalTo('test'))->will($this->returnValue('a:2:{s:1:"a";a:1:{s:1:"c";s:3:"abc";}s:1:"d";s:1:"e";}')); $transform = new Transform_Unserialize_Serial(); $transform->chainInput($mock); $contents = $transform->process('test'); $this->assertType('Q\Transform_Unserialize_Serial', $transform); $this->assertEquals(array('a'=>array('c'=>'abc'), 'd'=>'e'), $contents); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetReverse_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform = new Transform_Unserialize_Serial();\n $transform->chainInput($mock);\n \n $this->assertEquals('reverse of mock transformer', $transform->getReverse());\n }", "public function testGetReverse_ChainDouble() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform1 = new Transform_Unserialize_Serial();\n $transform2 = new Transform_Unserialize_Serial();\n \n $transform2->chainInput($mock);\n $transform1->chainInput($transform2);\n \n $this->assertEquals('reverse of mock transformer', $transform1->getReverse());\n }", "public function testCompress_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('process'));\n $mock->expects($this->once())->method('process')->with($this->equalTo('test'))->will($this->returnValue(\"a test string\"));\n \n $this->Compress_Gzip->chainInput($mock);\n $contents = $this->Compress_Gzip->process('test');\n\n $this->assertType('Q\\Transform_Compress_Gzip', $this->Compress_Gzip);\n $this->assertEquals(gzcompress(\"a test string\"), $contents);\n }", "public function testGetReverse_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $this->Compress_Gzip->chainInput($mock);\n \n $this->assertEquals('reverse of mock transformer', $this->Compress_Gzip->getReverse());\n }", "public function testGetReverse_ChainDouble() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform1 = new Transform_Compress_Gzip();\n $transform2 = new Transform_Compress_Gzip();\n \n $transform2->chainInput($mock);\n $transform1->chainInput($transform2);\n \n $this->assertEquals('reverse of mock transformer', $transform1->getReverse());\n }", "public function testProcessSimple2 () {\n \t$csv = <<<TESTDATA\nid,name,qty,qty2\n11,abc,4,41\n11,abc1,4,42\nTESTDATA;\n \tfile_put_contents(\"testCSV.csv\", $csv);\n \tfile_put_contents(\"testCSVOut.csv\", '');\n \tfile_put_contents(\"testCSVOut1.csv\", '');\n \t\n \t\n \t$csvOutput = <<<TESTDATA\nid,name,qty,qty2\n11,abc,4,41\n11,abc1,4,44\n\nTESTDATA;\n \t$csvOutput1 = <<<TESTDATA\nid,name,qty,qty2\n11,abc1,4,44\n\nTESTDATA;\n\n \t$input = (new CSV(\"testCSV.csv\"))\n \t\t->process( function ($v) { return $v['name'] == 'abc1';},\n\t\t \t(new Transient())\n\t\t \t->modify (function(&$data) { $data['qty2'] += 2;\n\t\t \t\t\t\t\treturn Entity::CONTINUE_PROCESSING;\n\t \t\t})\n\t\t \t->saveTo(new CSV(\"testCSVOut1.csv\"))\n\t \t\t)\n \t\t->saveTo(new CSV(\"testCSVOut.csv\"))\n \t\t->transfer();\n \t\n \t$this->assertEquals($csvOutput, file_get_contents(\"testCSVOut.csv\"));\n \t$this->assertEquals($csvOutput1, file_get_contents(\"testCSVOut1.csv\"));\n \t\n \tunlink(\"testCSVOut.csv\");\n \tunlink(\"testCSVOut1.csv\");\n \t\n }", "public function __construct( $input ) {\n $this->mParcelableTypes = array(\n 'boolean' => new BooleanTransformer(),\n 'Boolean' => new BooleanTransformerSafe(),\n 'byte' => new IntegratedTransformer( 'Byte' ),\n 'double' => new IntegratedTransformer( 'Double' ),\n 'float' => new IntegratedTransformer( 'Float' ),\n 'int' => new IntegratedTransformer( 'Int' ),\n 'long' => new IntegratedTransformer( 'Long' ),\n 'Byte' => new IntegratedTransformerSafe( 'Byte' ),\n 'Double' => new IntegratedTransformerSafe( 'Double' ),\n 'Float' => new IntegratedTransformerSafe( 'Float' ),\n 'Integer' => new IntegratedTransformerSafe( 'Int' ),\n 'Long' => new IntegratedTransformerSafe( 'Long' ),\n 'String' => new IntegratedTransformer( 'String' ),\n 'Bundle' => new IntegratedTransformer( 'Bundle' ),\n 'Date' => new DateTransformer(),\n 'List' => new ListTransformer( 'ArrayList' ),\n 'AbstractList' => new ListTransformer( 'LinkedList' ),\n 'AbstractSequentialList' => new ListTransformer( 'ArrayList' ),\n 'ArrayList' => new ListTransformer( 'ArrayList' ),\n 'AttributeList' => new ListTransformer( 'AttributeList' ),\n 'CopyOnWriteArrayList' => new ListTransformer( 'CopyOnWriteArrayList' ),\n 'LinkedList' => new ListTransformer( 'LinkedList' ),\n 'RoleList' => new ListTransformer( 'RoleList' ),\n 'RoleUnresolvedList' => new ListTransformer( 'RoleUnresolvedList' ),\n 'Stack' => new ListTransformer( 'Stack' ),\n 'Vector' => new ListTransformer( 'Vector' ),\n 'JSONObject' => new JSONTransformer( 'Object' ),\n 'JSONArray' => new JSONTransformer( 'Array' ),\n );\n\n // These are some of the most widespread types that cannot be written to Parcel \n $this->mUnsupportedTypes = array(\n 'File',\n 'Map',\n 'Runnable',\n 'Thread',\n 'Handler',\n 'AsyncTask' \n );\n\n $this->parse( $input );\n }", "public function testProcess2()\n {\n $unit1 = $this->getUnit('customer');\n $unit1->setReversedMapping([\n 'email' => 'map.email',\n 'name' => function ($map) {\n return $map['fname'] . ' ' . $map['lname'];\n },\n 'age' => 'map.age',\n ]);\n $unit1->setReversedConnection([\n 'customer_id' => 'id',\n ]);\n $unit1->setMapping([\n 'id' => 'map.id',\n 'fname' => function ($map) {\n list($fname) = explode(\" \", $map['name']);\n return $fname;\n },\n 'lname' => function ($map) {\n list(, $lname) = explode(\" \", $map['name']);\n return $lname;\n },\n 'email' => 'map.email',\n 'age' => 'map.age',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n [1, 'Olaf', 'Stone', '[email protected]', 30],\n [2, 'Peter', 'Ostridge', '[email protected]', 33],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('address');\n $unit2->setReversedMapping([\n 'addr_city' => 'map.city',\n 'addr_street' => 'map.street',\n ]);\n $unit2->setReversedConnection([\n 'customer_id' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'id' => 'map.addr_id',\n 'street' => 'map.addr_street',\n 'city' => 'map.addr_city',\n 'parent_id' => 'map.id',\n ]);\n $unit2->addContribution(function (MapInterface $map) {\n $map->incr('addr_id', 1);\n });\n $unit2->setFilesystem($this->getFS(\n [\n [1, '4100 Marine dr. App. 54', 'Chicago', 1],\n [2, '3300 St. George, Suite 300', 'New York', 1],\n [3, '111 W Jackson', 'Chicago', 4],\n [4, '111 W Jackson-2', 'Chicago', 4],\n // next rows will not be read due to LogicException\n // [5, 'Hollywood', 'LA', 4],\n // false,\n ]\n ));\n $unit2->setTmpFileName('address_tmp.csv');\n $unit2->setParent($unit1);\n\n $expected = [\n [[\n 'email' => '[email protected]',\n 'name' => 'Olaf Stone',\n 'age' => 30,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '4100 Marine dr. App. 54',\n ],\n [\n 'addr_city' => 'New York',\n 'addr_street' => '3300 St. George, Suite 300',\n ]\n ]\n ]],\n ];\n\n $action = $this->getAction([$unit1, $unit2], $expected);\n $action->process($this->getResultMock());\n }", "function testChaining(){\n\t\t#mdx:chaining\n\t\tParam::get('number')\n\t\t\t->filters()\n\t\t\t\t->strip('/[^\\d]/')\n\t\t\t\t->required()\n\t\t\t\t->minlen(5)\n\t\t\t\t->maxlen(10);\n\n\t\t$result = Param::get('number')->process([\n\t\t\t'number' => '203-40-10/80'\n\t\t]);\n\t\t#/mdx var_dump($result->output)\n\t\t$this->assertEquals('203401080',$result->output);\n\n\t}", "public function testProcess()\n {\n $unit1 = $this->getUnit('customer');\n $unit1->setReversedMapping([\n 'email' => 'map.email',\n 'age' => 'map.age',\n ]);\n $unit1->setReversedConnection([\n 'customer_id' => 'id',\n ]);\n $unit1->setMapping([\n 'id' => 'map.id',\n 'email' => 'map.email',\n 'age' => 'map.age',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n [1, '[email protected]', 30],\n [2, '[email protected]', 33],\n [3, '[email protected]', 55],\n [4, '[email protected]', 11],\n false,\n ]\n ));\n $unit1->setIsEntityCondition(function (\n MapInterface $map,\n MapInterface $oldmap\n ) {\n return $oldmap->offsetGet('email') != $map->offsetGet('email');\n });\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('customer_data');\n $unit2->setReversedMapping([\n 'name' => function ($map) {\n return $map['fname'] . ' ' . $map['lname'];\n },\n ]);\n $unit2->setReversedConnection([\n 'customer_id' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'id' => 'map.data_id',\n 'parent_id' => 'map.id',\n 'fname' => function ($map) {\n list($fname) = explode(\" \", $map['name']);\n return $fname;\n },\n 'lname' => function ($map) {\n list(, $lname) = explode(\" \", $map['name']);\n return $lname;\n },\n ]);\n $unit2->setTmpFileName('customer_data_tmp.csv');\n $unit2->setFilesystem($this->getFS(\n [\n [1, 1, 'Olaf', 'Stone'],\n [2, 2, 'Peter', 'Ostridge'],\n [3, 3, 'Bill', 'Murray'],\n [4, 4, 'Peter', 'Pan'],\n false,\n ]\n ));\n $unit2->addSibling($unit1);\n\n $unit3 = $this->getUnit('address');\n $unit3->setReversedMapping([\n 'addr_city' => 'map.city',\n 'addr_street' => 'map.street',\n ]);\n $unit3->setReversedConnection([\n 'customer_id' => 'parent_id',\n ]);\n $unit3->setMapping([\n 'id' => 'map.addr_id',\n 'street' => 'map.addr_street',\n 'city' => 'map.addr_city',\n 'parent_id' => 'map.id',\n ]);\n $unit3->addContribution(function (MapInterface $map) {\n $map->incr('addr_id', 1);\n });\n $unit3->setFilesystem($this->getFS(\n [\n [1, '4100 Marine dr. App. 54', 'Chicago', 1],\n [2, '3300 St. George, Suite 300', 'New York', 1],\n [3, '111 W Jackson', 'Chicago', 2],\n [4, '111 W Jackson-2', 'Chicago', 3],\n [5, '111 W Jackson-3', 'Chicago', 3],\n [6, 'Hollywood', 'LA', 3],\n [7, 'fake', 'LA', 3],\n [8, 'Fairy Tale', 'NY', 4],\n false,\n ]\n ));\n $unit3->setTmpFileName('address_tmp.csv');\n $unit3->setParent($unit1);\n\n $expected = [\n [[\n 'email' => '[email protected]',\n 'name' => 'Olaf Stone',\n 'age' => 30,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '4100 Marine dr. App. 54',\n ],\n [\n 'addr_city' => 'New York',\n 'addr_street' => '3300 St. George, Suite 300',\n ],\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Peter Ostridge',\n 'age' => 33,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson',\n ]\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Bill Murray',\n 'age' => 55,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson-2',\n ],\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson-3',\n ],\n [\n 'addr_city' => 'LA',\n 'addr_street' => 'Hollywood',\n ],\n [\n 'addr_city' => 'LA',\n 'addr_street' => 'fake',\n ]\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Peter Pan',\n 'age' => 11,\n 'address' => [\n [\n 'addr_city' => 'NY',\n 'addr_street' => 'Fairy Tale',\n ]\n ]\n ]],\n ];\n\n $action = $this->getAction([$unit1, $unit2, $unit3], $expected);\n $action->process($this->getResultMock());\n }", "public function testProcessWeirdCase1()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit1->setReversedConnection([\n 'tid' => 'id',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'id' => 'id',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '1'],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('test2');\n $unit2->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit2->setReversedConnection([\n 'tid' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'parent_id' => 'id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '2'],\n false,\n ]\n ));\n $unit2->setTmpFileName('customer_tmp.csv');\n $unit2->setParent($unit1);\n\n $action = $this->getAction([$unit1, $unit2]);\n $action->process($this->getResultMock());\n }", "public function testSerialization(): void\n {\n $items = new ArrayObject([\n 'a' => 1,\n 'b' => 2,\n 'c' => 3,\n ]);\n $expected = (array)$items;\n\n $iterator = new BufferedIterator($items);\n\n $serialized = serialize($iterator);\n $outcome = unserialize($serialized);\n $this->assertEquals($expected, $outcome->toArray());\n }", "abstract protected function _process();", "abstract protected function _process();", "abstract public function get__do_process ( $data );", "public function testProcess1b2l()\n {\n $unit1 = $this->getUnit('customer');\n $unit1->setReversedMapping([\n 'email' => 'map.email',\n 'name' => function ($map) {\n return $map['fname'] . ' ' . $map['lname'];\n },\n 'age' => 'map.age',\n ]);\n $unit1->setReversedConnection([\n 'customer_id' => 'id',\n ]);\n $unit1->setMapping([\n 'id' => 'map.id',\n 'email' => 'map.email',\n 'age' => 'map.age',\n 'fname' => function ($map) {\n list($fname) = explode(\" \", $map['name']);\n return $fname;\n },\n 'lname' => function ($map) {\n list(, $lname) = explode(\" \", $map['name']);\n return $lname;\n },\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n [1, '[email protected]', 30, 'Olaf', 'Stone'],\n [2, '[email protected]', 33, 'Peter', 'Ostridge'],\n [3, '[email protected]', 55, 'Bill', 'Murray'],\n [4, '[email protected]', 11, 'Peter', 'Pan'],\n false,\n ]\n ));\n $unit1->setIsEntityCondition(function (\n MapInterface $map,\n MapInterface $oldmap\n ) {\n return $oldmap->offsetGet('email') != $map->offsetGet('email');\n });\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit3 = $this->getUnit('address');\n $unit3->setReversedMapping([\n 'addr_city' => 'map.city',\n ]);\n $unit3->setReversedConnection([\n 'customer_id' => 'parent_id',\n 'address_id' => 'id',\n ]);\n $unit3->setMapping([\n 'id' => 'map.addr_id',\n 'city' => 'map.addr_city',\n 'parent_id' => 'map.id',\n ]);\n $unit3->addContribution(function (MapInterface $map) {\n $map->incr('addr_id', 1);\n });\n $unit3->setFilesystem($this->getFS(\n [\n [1, 'Chicago', 1],\n [2, 'New York', 1],\n [3, 'Chicago', 2],\n [4, 'Chicago', 3],\n [5, 'Chicago', 3],\n [6, 'LA', 3],\n [7, 'LA', 3],\n [8, 'NY', 4],\n false,\n ]\n ));\n $unit3->setTmpFileName('address_tmp.csv');\n $unit3->setParent($unit1);\n\n $unit2 = $this->getUnit('address_data');\n $unit2->setReversedMapping([\n 'addr_street' => 'map.street',\n ]);\n $unit2->setReversedConnection([\n 'address_id' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'id' => 'map.addr_data_id',\n 'street' => 'map.addr_street',\n 'parent_id' => 'map.address_id',\n ]);\n $unit2->setTmpFileName('customer_data_tmp.csv');\n $unit2->setFilesystem($this->getFS(\n [\n [1, '4100 Marine dr. App. 54', 1],\n [2, '3300 St. George, Suite 300', 2],\n [3, '111 W Jackson', 3],\n [4, '111 W Jackson-2', 4],\n [5, '111 W Jackson-3', 5],\n [6, 'Hollywood', 6],\n [7, 'fake', 7],\n [8, 'Fairy Tale', 8],\n false,\n ]\n ));\n $unit2->addSibling($unit3);\n\n $expected = [\n [[\n 'email' => '[email protected]',\n 'name' => 'Olaf Stone',\n 'age' => 30,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '4100 Marine dr. App. 54',\n ],\n [\n 'addr_city' => 'New York',\n 'addr_street' => '3300 St. George, Suite 300',\n ],\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Peter Ostridge',\n 'age' => 33,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson',\n ]\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Bill Murray',\n 'age' => 55,\n 'address' => [\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson-2',\n ],\n [\n 'addr_city' => 'Chicago',\n 'addr_street' => '111 W Jackson-3',\n ],\n [\n 'addr_city' => 'LA',\n 'addr_street' => 'Hollywood',\n ],\n [\n 'addr_city' => 'LA',\n 'addr_street' => 'fake',\n ]\n ]\n ]],\n [[\n 'email' => '[email protected]',\n 'name' => 'Peter Pan',\n 'age' => 11,\n 'address' => [\n [\n 'addr_city' => 'NY',\n 'addr_street' => 'Fairy Tale',\n ]\n ]\n ]],\n ];\n\n $action = $this->getAction([$unit1, $unit2, $unit3], $expected);\n $action->process($this->getResultMock());\n }", "function deserialise(string $data): void;", "abstract protected function unSerializeData();", "public function testProcessWeirdCase2()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit1->setReversedConnection([\n 'tid' => 'id',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'id' => 'id',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1', '1'],\n false,\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $unit2 = $this->getUnit('test2');\n $unit2->setReversedMapping([\n 'name' => 'map.field1',\n ]);\n $unit2->setReversedConnection([\n 'tid' => 'parent_id',\n ]);\n $unit2->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n 'parent_id' => 'id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n false\n ]\n ));\n $unit2->setTmpFileName('customer_tmp.csv');\n $unit2->setParent($unit1);\n\n $action = $this->getAction([$unit1, $unit2]);\n $action->process($this->getResultMock());\n }", "public function run()\n {\n $result = $this->serializeData(parent::run());\n $result = $this->filterResult($result);\n return $result;\n }", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "public function testProcess(): void\n {\n $this->scopeConfig->method('getValue')->willReturnCallback(static function ($path) {\n if ($path === Import::XML_INRIVER_IMPORT_PATH_CSV) {\n return CsvImportByUrlOperationTest::INRIVER_IMPORT_CSV_PATH;\n }\n\n return null;\n });\n\n $this->downloader->method('download')->willReturn(10);\n\n $output = $this->createMock(ReadInterface::class);\n $output->method('getAbsolutePath')->willReturn(self::FAKE_PATH);\n $this->filesystem->method('getDirectoryRead')->willReturn($output);\n\n $csvImportByUrlOperation = $this->getNewSubject();\n\n $csvImportByUrlOperation->post($this->message);\n }", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "function _unserialize( $serial ) {\n\t\tif( function_exists( 'gzinflate' ) ) {\n\t\t\t$decomp = @gzinflate( $serial );\n\t\t\tif( false !== $decomp ) {\n\t\t\t\t$serial = $decomp;\n\t\t\t}\n\t\t}\n\t\treturn unserialize( $serial );\n\t}", "public function testTransform_invalid()\n {\n $this->transformer->transform('invalid');\n }", "public function testDoubleOptionalProcess()\n {\n $unit1 = $this->getUnit('shipment');\n $unit1->setReversedMapping([\n 'total' => 'map.total'\n ]);\n $unit1->setReversedConnection([\n 'shipment_id' => 'shipment_id',\n ]);\n $unit1->setMapping([\n 'shipment_id' => 'map.shipment_id',\n 'total' => 'map.total',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n [1, 30],\n [2, 33],\n [3, 55],\n [4, 11],\n false,\n ]\n ));\n $unit1->setIsEntityCondition(function (MapInterface $map) {\n return !empty($map['shipment_id']);\n });\n $unit1->setTmpFileName('shipment_tmp.csv');\n\n $unit2 = $this->getUnit('item');\n $unit2->setReversedMapping([\n 'item_name' => 'map.name',\n ]);\n $unit2->setReversedConnection([\n 'shipment_id' => 'shipment_id',\n ]);\n $unit2->setMapping([\n 'id' => 'map.incr(\"item_id\", 1)',\n 'name' => 'map.item_name',\n 'shipment_id' => 'map.shipment_id',\n ]);\n $unit2->setFilesystem($this->getFS(\n [\n [1, 'cool item', 1],\n [2, 'another super item', 1],\n [3, 'Coca Cola', 2],\n [4, 'Pepsi', 3],\n false,\n false,\n ]\n ));\n $unit2->setTmpFileName('item_tmp.csv');\n $unit2->setParent($unit1);\n $unit2->setOptional(true);\n\n $unit3 = $this->getUnit('tracking');\n $unit3->setReversedMapping([\n 'tracking_number' => 'map.tracking_number',\n ]);\n $unit3->setReversedConnection([\n 'shipment_id' => 'shipment_id',\n ]);\n $unit3->setMapping([\n 'id' => 'map.incr(\"track_id\", 1)',\n 'tracking_number' => 'map.tracking_number',\n 'shipment_id' => 'map.shipment_id',\n ]);\n $unit3->setFilesystem($this->getFS(\n [\n [1, '13122333', 3],\n [2, '13343443', 4],\n false,\n ]\n ));\n $unit3->setTmpFileName('tracking_tmp.csv');\n $unit3->addSibling($unit1);\n $unit3->setOptional(true);\n\n $expected = [\n [[\n 'total' => 30,\n 'tracking_number' => null,\n 'item' => [\n [\n 'item_name' => 'cool item'\n ],\n [\n 'item_name' => 'another super item'\n ],\n ],\n ]],\n [[\n 'total' => 33,\n 'tracking_number' => null,\n 'item' => [\n [\n 'item_name' => 'Coca Cola'\n ],\n ],\n ]],\n [[\n 'total' => 55,\n 'tracking_number' => '13122333',\n 'item' => [\n [\n 'item_name' => 'Pepsi'\n ],\n ],\n ]],\n [[\n 'total' => 11,\n 'tracking_number' => '13343443',\n 'item' => [\n [\n 'item_name' => null\n ],\n ],\n ]],\n ];\n\n $action = $this->getAction([$unit1, $unit2, $unit3], $expected);\n $action->process($this->getResultMock());\n }", "public function doProcessData() {}", "public function process(): \\Generator;", "public function testChain()\n\t{\n\t\t$request = $this->createMock(\\Psr\\Http\\Message\\ServerRequestInterface::class);\n\n\t\t$response = $this->createMock(\\Psr\\Http\\Message\\ResponseInterface::class);\n\t\t$response->method('getReasonPhrase')->willReturn('ping');\n\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\t\t$middlewareAdaptor->method('executePipeline')\n\t\t->with(\n\t\t\t$this->equalTo('pipelineFoo'),\n\t\t\t$this->equalTo($request),\n\t\t\t$this->equalTo(null)\n\t\t)\n\t\t->willReturn($response);\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$result = $middleware->chain('pipelineFoo', $request);\n\n\t\t$this->assertEquals('ping', $result->getReasonPhrase());\n\t}", "public function transform(){\r\n\t\tswitch($this->processor){\r\n\t\t\tcase 'saxon':\r\n\t\t\t\t$this->runSaxon();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 'salbotron':\r\n\t\t\tdefault:\r\n\t\t\t\t$this->runSalbatron();\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function processData() {}", "abstract public function process();", "abstract public function process();", "abstract public function process();", "public function process($data);", "protected abstract function process();", "static function process($input, $params = array()) {\n\t\t$return = self::_preProcess($input);\n\t\t// ... Stub\n\t\tself::log('Import finished');\n\t\treturn $return;\n\t}", "function serializationAction(& $body)\n{\n\t$rawResponse = & $body->getResults();\n\n\terror_log (\"[SWX] INFO Method call result = $rawResponse\");\n\n\tadapterMap($rawResponse);\n\n\t$swxAssembler = new SwxAssembler();\n\n\tob_start();\n\n\t$swxAssembler->writeSwf($rawResponse, $GLOBALS['swx']['debug'], 4, $GLOBALS['swx']['url']);\n\n\t$rawResponse = ob_get_contents();\n\tob_end_clean();\n\n\t$body->setResults($rawResponse);\n}", "function MBunserialize($serial_str)\n{\n $serial_str = preg_replace_callback('!s:(\\d+):\"(.*?)\";!s', function($match){return 's:'.strlen($match['2']).':\"'.$match['2'] . '\";';}, $serial_str);\n $serial_str= str_replace(\"\\r\", \"\", $serial_str);\n return unserialize($serial_str);\n}", "public function testPreprocessingUnrotate()\n {\n }", "public function process(array $requestHeader, array $requestBody): Transcription;", "public function run(&$results)\n {\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.02-content-ascii.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"a\"],[\"2\",\"b\"],[\"3\",\"A\"],[\"4\",\"B\"],[\"5\",\"\"],[\"6\",\" abcd\"],[\"7\",\"abcd\"],[\"8\",\"abCD\"],[\"9\",\"ABcd\"],[\"10\",\"ab cd\"],[\"11\",\"ab CD\"],[\"12\",\"AB cd\"]];\n \\Flexio\\Tests\\Check::assertArray('A.1', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.03-content-unicode.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"\"],[\"2\",\"á é í ó ú ý Á É Í Ó Ú Ý\"],[\"3\",\"à è ì ò ù À È Ì Ò Ù\"],[\"4\",\"ä ë ï ö ü ÿ Ä Ë Ï Ö Ü Ÿ\"],[\"5\",\"â ê î ô û ð Â Ê Î Ô Û Ð\"],[\"6\",\"ã ñ õ Ã Ñ Õ\"],[\"7\",\"æ œ Æ Œ ß\"],[\"8\",\"å Å\"],[\"9\",\"ç Ç\"],[\"10\",\"ø Ø\"],[\"11\",\"¿ ¡\"],[\"12\",\"€ £ § º ©\"]];\n \\Flexio\\Tests\\Check::assertArray('A.2', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.04-content-integer.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0\"],[\"2\",\"-1\"],[\"3\",\"1\"],[\"4\",\"9\"],[\"5\",\"10\"],[\"6\",\"-100000000\"],[\"7\",\"100000000\"],[\"8\",\"-100000001\"],[\"9\",\"100000001\"],[\"10\",\"\"],[\"11\",\"-999999999\"],[\"12\",\"999999999\"]];\n \\Flexio\\Tests\\Check::assertArray('A.3', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.05-content-decimal.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0\"],[\"2\",\"-0.000000000001\"],[\"3\",\"0.000000000001\"],[\"4\",\"-0.4\"],[\"5\",\"0.4\"],[\"6\",\"-0.5\"],[\"7\",\"0.5\"],[\"8\",\"-0.9\"],[\"9\",\"0.9\"],[\"10\",\"\"],[\"11\",\"-9999999999999.9\"],[\"12\",\"9999999999999.9\"]];\n \\Flexio\\Tests\\Check::assertArray('A.4', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.06-content-number.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"123,456\"],[\"2\",\" 1.2345678\"],[\"3\",\"1,2345678\"],[\"4\",\"+123,456.78\"],[\"5\",\"-123.456,78\"],[\"6\",\"99999999999999999999\"],[\"7\",\"0.00000000000000000001\"],[\"8\",\"1/2\"],[\"9\",\"1/0\"],[\"10\",\"NaN\"],[\"11\",\"123.\"],[\"12\",\"- 123\"]];\n \\Flexio\\Tests\\Check::assertArray('A.5', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.07-content-scientific.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0e10\"],[\"2\",\"+10E-1\"],[\"3\",\"1.23e+2\"],[\"4\",\"1,23e02\"],[\"5\",\" 1.23 E0\"],[\"6\",\"-.23e+1\"],[\"7\",\"123,456.78E-5\"],[\"8\",\"1.e02\"],[\"9\",\"1E\"],[\"10\",\"E1\"],[\"11\",\"1e-99\"],[\"12\",\"1e99\"]];\n \\Flexio\\Tests\\Check::assertArray('A.6', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.08-content-amount.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0%\"],[\"2\",\" 1.2345%\"],[\"3\",\".1%\"],[\"4\",\"-98.6%\"],[\"5\",\"100,01 %\"],[\"6\",\"( 49% )\"],[\"7\",\"+7%\"],[\"8\",\"\"],[\"9\",\"NET WT. 20 OZ.\"],[\"10\",\"1 LB. 4 OZ.\"],[\"11\",\"(1 LB 4 OZ)\"],[\"12\",\"567g\"]];\n \\Flexio\\Tests\\Check::assertArray('A.7', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.09-content-financial.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"$1\"],[\"2\",\" $10\"],[\"3\",\"-$0.01\"],[\"4\",\"$ 1,234.56\"],[\"5\",\"$1,234,567.89\"],[\"6\",\"($1234567.89)\"],[\"7\",\"€1.234,56\"],[\"8\",\"€ 1.234.567,89 EUR\"],[\"9\",\"EUR 1.234.567,89\"],[\"10\",\"£ 1.234,56\"],[\"11\",\"£1.234.567,89\"],[\"12\",\"GBP 1.234.567,89\"]];\n \\Flexio\\Tests\\Check::assertArray('A.8', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.10-content-identifier.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"123456\"],[\"2\",\"000123456\"],[\"3\",\"123456000\"],[\"4\",\"001234560\"],[\"5\",\"000-123-456\"],[\"6\",\"000 123 456\"],[\"7\",\"000.123.456\"],[\"8\",\"(123) 456-7890\"],[\"9\",\"a123b456C\"],[\"10\",\"A01230B4560C\"],[\"11\",\"#98\"],[\"12\",\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.9', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.11-content-null.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"null\"],[\"2\",\"NULL\"],[\"3\",\"Null\"],[\"4\",null],[\"5\",\"\\\\\\\\N\"],[\"6\",\"\\\\\\\\\\\\\\\\N\"],[\"7\",\"\\\\n\"],[\"8\",\"\\\\\\\\n\"],[\"9\",\"\\\\\\\\\\\\\\\\n\"],[\"10\",\"\\\\0\"],[\"11\",\"\\\\\\\\0\"],[\"12\",\"\\\\\\\\\\\\\\\\0\"]];\n \\Flexio\\Tests\\Check::assertArray('A.10', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.12-content-escape.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"\\\\\"],[\"2\",\"\\\\\\\\\"],[\"3\",\"\\\\\\\\\\\\\"],[\"4\",\"\\\\\\\\\\\\\\\\\"],[\"5\",\"\\\\n\"],[\"6\",\"\\\\r\"],[\"7\",\"\\\\r\\\\n\"],[\"8\",\"\\\\t\"],[\"9\",\"\\\\/\"],[\"10\",\"\\\\\\\\/\"],[\"11\",\"\\\\'\"],[\"12\",\"\\\\\\\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.11', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.13-content-symbol.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"?\"],[\"2\",\"!\"],[\"3\",\"@\"],[\"4\",\"#\"],[\"5\",\"$\"],[\"6\",\"%\"],[\"7\",\"^\"],[\"8\",\"&\"],[\"9\",\"*\"],[\"10\",\"-\"],[\"11\",\"=\"],[\"12\",\"+\"]];\n \\Flexio\\Tests\\Check::assertArray('A.12', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.14-content-separator.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\";\"],[\"2\",\",\"],[\"3\",\".\"],[\"4\",\"|\"],[\"5\",\":\"],[\"6\",\"~\"],[\"7\",\"_\"],[\"8\",\"\\\" \\\"\"],[\"9\",\"\\\" \\\"\"],[\"10\",\"\\\\t\"],[\"11\",\"\\\\f\"],[\"12\",\"\"]];\n \\Flexio\\Tests\\Check::assertArray('A.13', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.15-content-bracket.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"(\"],[\"2\",\")\"],[\"3\",\"[\"],[\"4\",\"]\"],[\"5\",\"{\"],[\"6\",\"}\"],[\"7\",\"<\"],[\"8\",\">\"],[\"9\",\"'\"],[\"10\",\"\\\"\"],[\"11\",\"`\"],[\"12\",\"/\"]];\n \\Flexio\\Tests\\Check::assertArray('A.14', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.16-content-code.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",'\";break;$b=\"'],[\"2\",'\\';$a=1/0;$b=\\''],[\"3\",\"true;\"],[\"4\",\"throw new Exception('Problem.');\"],[\"5\",'\" or \"a\" != \"'],[\"6\",\"' or 'a' != '\"],[\"7\",\"// /*\"],[\"8\",\".*\"],[\"9\",\"/.*/\"],[\"10\",\"' || true || '\"],[\"11\",\"' || true;\"],[\"12\",\"''; while (1) {}\"]];\n \\Flexio\\Tests\\Check::assertArray('A.15', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.17-content-date.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"0000-00-00\"],[\"2\",\"1582-10-05\"],[\"3\",\"1582-10-15\"],[\"4\",\"1969-12-31\"],[\"5\",\"1970-01-01\"],[\"6\",\"\"],[\"7\",\"1999-12-31\"],[\"8\",\"2000-01-01\"],[\"9\",\"2001-02-03\"],[\"10\",\"2016-02-29\"],[\"11\",\"2038-01-19\"],[\"12\",\"2038-01-20\"]];\n \\Flexio\\Tests\\Check::assertArray('A.16', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.18-content-date-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"20011225\"],[\"2\",\" 2001-12-25\"],[\"3\",\"12-25-2001\"],[\"4\",\"December 25, 2001\"],[\"5\",\"Dec 25, 2001\"],[\"6\",\"25 December 2001\"],[\"7\",\"25 Dec 2001\"],[\"8\",\"12.25.01\"],[\"9\",\"11/12/99\"],[\"10\",\"12/11/99\"],[\"11\",\"12/13/1999\"],[\"12\",\"13/12/1999\"]];\n \\Flexio\\Tests\\Check::assertArray('A.17', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.19-content-datetime.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"1969-12-31 23:59:59\"],[\"2\",\"1970-01-01 00:00:00\"],[\"3\",\"1970-01-01 00:00:01\"],[\"4\",\"\"],[\"5\",\"1999-12-31 23:59:59\"],[\"6\",\"2000-01-01 00:00:00\"],[\"7\",\"2000-01-01 00:00:01\"],[\"8\",\"2001-02-03 04:05:06\"],[\"9\",\"2016-02-29 00:00:00\"],[\"10\",\"2038-01-19 03:14:06\"],[\"11\",\"2038-01-19 03:14:07\"],[\"12\",\"2038-01-19 03:14:08\"]];\n \\Flexio\\Tests\\Check::assertArray('A.18', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.20-content-datetime-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"24 Dec 2001 23:59:60Z\"],[\"2\",\"25 Dec 2001 00:00:00Z\"],[\"3\",\"Dec 31, 1999 10:01:02\"],[\"4\",\"December 31, 1999 10:01:02 PM\"],[\"5\",\"Friday, December 31, 1999\"],[\"6\",\"Fri, 31 Dec 1999 23:59:59 +0000\"],[\"7\",\"25 December 2001 01:02:03\"],[\"8\",\"25 Dec 2001 04:05:06Z\"],[\"9\",\"2001-12-25T16:56:42+00:00\"],[\"10\",\"20011225T12:00:00\"],[\"11\",\" 2001-12-25 01:02:03\"],[\"12\",\"2016-02-29 01:02:03.4 +0005\"]];\n \\Flexio\\Tests\\Check::assertArray('A.19', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.21-content-bool.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"true\"],[\"2\",\"true\"],[\"3\",\"\"],[\"4\",\"false\"],[\"5\",\"false\"],[\"6\",\"false\"],[\"7\",\"true\"],[\"8\",\"true\"],[\"9\",\"true\"],[\"10\",\"true\"],[\"11\",\"false\"],[\"12\",\"false\"]];\n \\Flexio\\Tests\\Check::assertArray('A.20', 'Convert Delimited; content conversion', $actual, $expected, $results);\n\n // BEGIN TEST\n $task = self::createConvertTask(\"\\t\", \"\", false);\n $stream = \\Flexio\\Tests\\Util::createStream('/text/03.22-content-bool-format.tsv');\n $process = \\Flexio\\Jobs\\Process::create()->setStdin($stream)->execute($task);\n $output = $process->getStdout()->getReader()->read();\n $output = json_decode($output,true);\n $actual = self::getTableValues($output);\n $expected = [[\"1\",\"True\"],[\"2\",\"False\"],[\"3\",\"TRUE\"],[\"4\",\"FALSE\"],[\"5\",\"t\"],[\"6\",\"f\"],[\"7\",\"T\"],[\"8\",\"F\"],[\"9\",\"1\"],[\"10\",\"0\"],[\"11\",\"Y\"],[\"12\",\"N\"]];\n \\Flexio\\Tests\\Check::assertArray('A.21', 'Convert Delimited; content conversion', $actual, $expected, $results);\n }", "abstract public function process($parameters);", "#[ReturnTypeWillChange]\n public function __unserialize($data)\n {\n foreach ($data as $item) {\n $this->unshift($item);\n }\n }", "public function testTransformData()\n {\n $request = new Request;\n $request->attributes->set('transformer', 'MJanssen\\Fixtures\\Transformer\\TestTransformer');\n\n $app = new Application();\n\n $service = new TransformerService($request, $app);\n\n $data = array('foo' => 'baz');\n\n $this->assertEquals($data, $service->transformHydrateData($data));\n $this->assertEquals($data, $service->transformExtractData($data));\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"CorpId\",$param) and $param[\"CorpId\"] !== null) {\n $this->CorpId = $param[\"CorpId\"];\n }\n\n if (array_key_exists(\"BatchId\",$param) and $param[\"BatchId\"] !== null) {\n $this->BatchId = $param[\"BatchId\"];\n }\n\n if (array_key_exists(\"TaskId\",$param) and $param[\"TaskId\"] !== null) {\n $this->TaskId = $param[\"TaskId\"];\n }\n\n if (array_key_exists(\"Phase\",$param) and $param[\"Phase\"] !== null) {\n $this->Phase = $param[\"Phase\"];\n }\n\n if (array_key_exists(\"PhaseName\",$param) and $param[\"PhaseName\"] !== null) {\n $this->PhaseName = $param[\"PhaseName\"];\n }\n\n if (array_key_exists(\"ChainStatus\",$param) and $param[\"ChainStatus\"] !== null) {\n $this->ChainStatus = $param[\"ChainStatus\"];\n }\n\n if (array_key_exists(\"Type\",$param) and $param[\"Type\"] !== null) {\n $this->Type = $param[\"Type\"];\n }\n\n if (array_key_exists(\"TraceId\",$param) and $param[\"TraceId\"] !== null) {\n $this->TraceId = $param[\"TraceId\"];\n }\n\n if (array_key_exists(\"TraceItems\",$param) and $param[\"TraceItems\"] !== null) {\n $this->TraceItems = [];\n foreach ($param[\"TraceItems\"] as $key => $value){\n $obj = new TraceItem();\n $obj->deserialize($value);\n array_push($this->TraceItems, $obj);\n }\n }\n\n if (array_key_exists(\"Status\",$param) and $param[\"Status\"] !== null) {\n $this->Status = $param[\"Status\"];\n }\n\n if (array_key_exists(\"PhaseData\",$param) and $param[\"PhaseData\"] !== null) {\n $this->PhaseData = new PhaseData();\n $this->PhaseData->deserialize($param[\"PhaseData\"]);\n }\n }", "public function testChain()\n {\n $filter = Solar::factory('Solar_Filter');\n \n // required, but no filter\n $filter->setChainRequire('foo');\n \n // one filter\n $filter->addChainFilter('bar', 'validateInt');\n \n // many filters\n $filter->addChainFilters('baz', array(\n 'sanitizeInt',\n array('validateRange', 1, 9),\n ));\n \n // required, one filter\n $filter->setChainRequire('dib');\n $filter->addChainFilter('dib', 'validateInt');\n \n // required, many filters\n $filter->setChainRequire('zim');\n $filter->addChainFilters('zim', array(\n 'sanitizeInt',\n array('validateRange', 1, 9),\n ));\n \n /**\n * expected output after being sanitized\n */\n $expect = array(\n 'foo' => 'anything',\n 'bar' => 123,\n 'baz' => 4,\n 'dib' => 678,\n 'zim' => 7,\n );\n \n /**\n * apply filter with \"valid\" user input\n */\n \n // user input\n $data = array(\n 'foo' => 'anything',\n 'bar' => 123,\n 'baz' => 4.5,\n 'dib' => 678,\n 'zim' => 7.9,\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertTrue($valid);\n \n // should have sanitized the data in-place\n $this->assertSame($data, $expect);\n \n /**\n * apply filter with invalid user input\n */\n \n // user input\n $data = array(\n 'foo' => 'anything',\n 'bar' => 'abc', // validateInt\n 'baz' => 123, // validateRange\n 'dib' => 456,\n 'zim' => -78, // validateRange\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertSame($keys, array('bar', 'baz', 'zim'));\n \n /**\n * apply filter with missing requires\n */\n \n // user input\n $data = array(\n 'foo' => null,\n 'bar' => 123,\n 'baz' => 4.5,\n 'dib' => '',\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertSame($keys, array('foo', 'dib', 'zim'));\n \n /**\n * apply filter with invalid user input and missing requires\n */\n \n // user input\n $data = array(\n 'bar' => 'abc', // validateInt\n 'baz' => 123, // validateRange\n 'dib' => 4.5,\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertEquals($keys, array('foo', 'zim', 'bar', 'baz', 'dib'));\n }", "function process() {\n return $this->_parse();\n }", "public function testProcessException1()\n {\n $unit1 = $this->getUnit('test');\n $unit1->setReversedMapping([\n 'name' => 'field3',\n ]);\n $unit1->setReversedConnection([\n 'id' => 'field4',\n ]);\n $unit1->setMapping([\n 'field1' => 'name',\n 'field2' => 'code',\n ]);\n $unit1->setFilesystem($this->getFS(\n [\n ['Pete', 'tst1']\n ]\n ));\n $unit1->setTmpFileName('customer_tmp.csv');\n\n $action = $this->getAction([$unit1]);\n $action->process($this->getResultMock());\n }", "public abstract function process();", "public function parse()\n {\n $raw = $this->getRaw();\n $count = count($raw);\n for ($i = 7; $i < $count; $i++) {\n $line = $raw[$i];\n\n $process = new Process(\n $line[11],\n $line[0],\n floatval($line[8]),\n floatval($line[9])\n );\n\n $this->processes[] = $process;\n }\n }", "public function testInvalidSerializedData()\n {\n $someData = 12;\n\n $serializer = ArrayObject::DEFAULT_SERIALIZER;\n $serializer = new $serializer;\n\n $data = new ArrayObject;\n $data->unserialize($serializer->serialize($someData));\n }", "abstract public function transform();", "public function testProcessDataCommunication() {\n $process = new Process(function() use (&$process) {\n // Don't do this!\n // Because $process is here a copy of the parent process!\n });\n\n $process = new Process(function(Process $proc) {\n $value = $proc->receiveData( true );\n $value *= 10;\n $proc->sendData($value);\n });\n\n $process->run();\n\n $processes = $this->readProcessIDs();\n\n $this->assertContains( $process->getProcessID(), $processes );\n $this->assertContains( $process->getChildProcessID(), $processes );\n\n usleep(100000);\n\n $processes = $this->readProcessIDs();\n\n $this->assertContains( $process->getProcessID(), $processes );\n $this->assertContains( $process->getChildProcessID(), $processes );\n\n $process->sendData(12);\n $value = $process->receiveData(true);\n\n $process->wait();\n\n $processes = $this->readProcessIDs();\n\n $this->assertContains( $process->getProcessID(), $processes );\n $this->assertNotContains( $process->getChildProcessID(), $processes );\n\n $this->assertEquals(120, $value);\n }", "public function testPreprocessingBinarize()\n {\n }", "public function extractTransformLoad()\n {\n $startEtlTime = microtime(true);\n\n $extractTime = 0.0;\n $transformTime = 0.0;\n $loadTime = 0.0;\n\n #--------------------------------------------------\n # Extract the record ID batches\n #--------------------------------------------------\n $startExtractTime = microtime(true);\n $recordIdBatches = $this->dataProject->getRecordIdBatches(\n (int) $this->configuration->getBatchSize()\n );\n $endExtractTime = microtime(true);\n $extractTime += $endExtractTime - $startExtractTime;\n\n # Count and log the number of record IDs found\n $recordIdCount = 0;\n foreach ($recordIdBatches as $recordIdBatch) {\n $recordIdCount += count($recordIdBatch);\n }\n $this->log(\"Number of record_ids found: \". $recordIdCount);\n\n #--------------------------------------------------------------\n # Foreach record_id, get all REDCap records for that record_id.\n # There will be one record for each event for each record_id\n #--------------------------------------------------------------\n $recordEventsCount = 0;\n \n #-------------------------------------------------------\n # For each batch of data, extract, transform, and load\n #-------------------------------------------------------\n foreach ($recordIdBatches as $recordIdBatch) {\n #---------------------------------\n # Extract the data from REDCap\n #---------------------------------\n $startExtractTime = microtime(true);\n $recordBatch = $this->dataProject->getRecordBatch($recordIdBatch);\n $endExtractTime = microtime(true);\n $extractTime += $endExtractTime - $startExtractTime;\n\n if ($this->configuration->getExtractedRecordCountCheck()) {\n if (count($recordBatch) < count($recordIdBatch)) {\n $message = \"Attempted to retrieve \".count($recordIdBatch).\" records, but only \"\n .count($recordBatch).\" were actually retrieved.\"\n .\" This error can be caused by a very large batch size. If you are using a large\"\n .\" batch size (1,000 or greater), try reducing it to 500 or less.\"\n .\" This error could also be caused by records being deleted while the ETL process\"\n .\" is running.\"\n .\" You can turn this error check off by setting the \"\n .ConfigProperties::EXTRACTED_RECORD_COUNT_CHECK.\" to false.\";\n $code = EtlException::INPUT_ERROR;\n throw new EtlException($message, $code);\n } elseif (count($recordBatch) > count($recordIdBatch)) {\n $message = \"Attempted to retrieve \".count($recordIdBatch).\" records, but \"\n .count($recordBatch).\" were actually retrieved.\"\n .\" This error could be caused by records being added while the\"\n .\" ETL process is running.\"\n .\" You can turn this error check off by setting the \"\n .ConfigProperties::EXTRACTED_RECORD_COUNT_CHECK.\" to false.\";\n $code = EtlException::INPUT_ERROR;\n throw new EtlException($message, $code);\n }\n }\n\n foreach ($recordBatch as $recordId => $records) {\n $recordEventsCount += count($records);\n\n #-----------------------------------\n # Transform the data\n #-----------------------------------\n $startTransformTime = microtime(true);\n # For each root table, because processing will be done\n # recursively to the child tables\n foreach ($this->schema->getRootTables() as $rootTable) {\n // Transform the records for this record_id into rows\n $this->transform($rootTable, $records, '', '');\n }\n $endTransformTime = microtime(true);\n $transformTime += $endTransformTime - $startTransformTime;\n }\n\n #print(\"\\n\\n===============================================================\\n\");\n #print(\"\\n\\nSCHEMA MAP\\n{$this->schema->toString()}\\n\\n\");\n #print(\"\\n\\n===============================================================\\n\");\n \n #-------------------------------------\n # Load the data into the database\n #-------------------------------------\n $startLoadTime = microtime(true);\n foreach ($this->schema->getTables() as $table) {\n # Single row storage (stores one row at a time):\n # foreach row, load it\n $this->loadTableRows($table);\n }\n #####$this->loadRows();\n $endLoadTime = microtime(true);\n $loadTime += $endLoadTime - $startLoadTime;\n }\n\n $endEtlTime = microtime(true);\n $this->logInfoToFile('Extract time: '.$extractTime.' seconds');\n $this->logInfoToFile('Transform time: '.$transformTime.' seconds');\n $this->logInfoToFile('Load time: '.$loadTime.' seconds');\n $this->logInfoToFile('ETL total time: '.($endEtlTime - $startEtlTime).' seconds');\n\n $this->reportRows();\n\n $this->log(\"Number of record events transformed: \". $recordEventsCount);\n \n return $recordIdCount;\n }", "public function testSerializationIsStable() {\n\n\t\t$serializer = $this->createSerializer();\n\n\t\t$lexeme = NewLexeme::havingId( new LexemeId( 'L1' ) )\n\t\t\t->withLanguage( 'Q1' )\n\t\t\t->withLexicalCategory( 'Q2' )\n\t\t\t->withLemma( 'en', 'color' )\n\t\t\t->withLemma( 'en_gb', 'colour' )\n\t\t\t->withForm(\n\t\t\t\tNewForm::havingId( 'F1' )\n\t\t\t\t\t->andRepresentation( 'en', 'color' )\n\t\t\t\t\t->andRepresentation( 'en_gb', 'colour' )\n\t\t\t\t\t->andGrammaticalFeature( 'Q3' )\n\t\t\t\t\t->andStatement( new PropertyNoValueSnak( new PropertyId( 'P1' ) ) )\n\t\t\t)->withForm(\n\t\t\t\tNewForm::havingId( 'F2' )\n\t\t\t\t\t->andRepresentation( 'en', 'colors' )\n\t\t\t\t\t->andRepresentation( 'en_gb', 'colours' )\n\t\t\t\t\t->andGrammaticalFeature( 'Q4' )\n\t\t\t\t\t->andStatement( new PropertySomeValueSnak( new PropertyId( 'P2' ) ) )\n\t\t\t)->withSense(\n\t\t\t\tNewSense::havingId( 'S1' )\n\t\t\t\t\t->withGloss(\n\t\t\t\t\t\t'en',\n\t\t\t\t\t\t'the property of an object of producing different sensations on the eye'\n\t\t\t\t\t)->withStatement(\n\t\t\t\t\t\tnew PropertyValueSnak(\n\t\t\t\t\t\t\tnew PropertyId( 'P3' ),\n\t\t\t\t\t\t\tnew EntityIdValue( new ItemId( 'Q5' ) )\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t)->withStatement( new PropertySomeValueSnak( new PropertyId( 'P4' ) ) )\n\t\t\t->withStatement( new PropertyNoValueSnak( new PropertyId( 'P5' ) ) )\n\t\t\t->build();\n\n\t\t$lexemeSerialization = $serializer->serialize( $lexeme );\n\n\t\t$expectedSerialization = [\n\t\t\t'type' => 'lexeme',\n\t\t\t'id' => 'L1',\n\t\t\t'lemmas' => [\n\t\t\t\t'en' => [ 'language' => 'en', 'value' => 'color' ],\n\t\t\t\t'en_gb' => [ 'language' => 'en_gb', 'value' => 'colour' ],\n\t\t\t],\n\t\t\t'lexicalCategory' => 'Q2',\n\t\t\t'language' => 'Q1',\n\t\t\t'claims' => [\n\t\t\t\t'P4' => [ [\n\t\t\t\t\t'mainsnak' => [\n\t\t\t\t\t\t'snaktype' => 'somevalue',\n\t\t\t\t\t\t'property' => 'P4',\n\t\t\t\t\t\t'hash' => 'ede91cc55952400386a2401405bb09e446b1867b',\n\t\t\t\t\t],\n\t\t\t\t\t'type' => 'statement',\n\t\t\t\t\t'rank' => 'normal',\n\t\t\t\t] ],\n\t\t\t\t'P5' => [ [\n\t\t\t\t\t'mainsnak' => [\n\t\t\t\t\t\t'snaktype' => 'novalue',\n\t\t\t\t\t\t'property' => 'P5',\n\t\t\t\t\t\t'hash' => '6ee46c6e25606f949a870c84ae6694be8b5d4a02',\n\t\t\t\t\t],\n\t\t\t\t\t'type' => 'statement',\n\t\t\t\t\t'rank' => 'normal',\n\t\t\t\t] ],\n\t\t\t],\n\t\t\t'nextFormId' => 3,\n\t\t\t'forms' => [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'L1-F1',\n\t\t\t\t\t'representations' => [\n\t\t\t\t\t\t'en' => [ 'language' => 'en', 'value' => 'color' ],\n\t\t\t\t\t\t'en_gb' => [ 'language' => 'en_gb', 'value' => 'colour' ],\n\t\t\t\t\t],\n\t\t\t\t\t'grammaticalFeatures' => [ 'Q3' ],\n\t\t\t\t\t'claims' => [\n\t\t\t\t\t\t'P1' => [ [\n\t\t\t\t\t\t\t'mainsnak' => [\n\t\t\t\t\t\t\t\t'snaktype' => 'novalue',\n\t\t\t\t\t\t\t\t'property' => 'P1',\n\t\t\t\t\t\t\t\t'hash' => 'c77761897897f63f151c4a1deb8bd3ad23ac51c6',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'type' => 'statement',\n\t\t\t\t\t\t\t'rank' => 'normal',\n\t\t\t\t\t\t], ],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'L1-F2',\n\t\t\t\t\t'representations' => [\n\t\t\t\t\t\t'en' => [ 'language' => 'en', 'value' => 'colors' ],\n\t\t\t\t\t\t'en_gb' => [ 'language' => 'en_gb', 'value' => 'colours' ],\n\t\t\t\t\t],\n\t\t\t\t\t'grammaticalFeatures' => [ 'Q4' ],\n\t\t\t\t\t'claims' => [\n\t\t\t\t\t\t'P2' => [ [\n\t\t\t\t\t\t\t'mainsnak' => [\n\t\t\t\t\t\t\t\t'snaktype' => 'somevalue',\n\t\t\t\t\t\t\t\t'property' => 'P2',\n\t\t\t\t\t\t\t\t'hash' => '0cf42a63838da890a0b23c220bdb7705ca9c7892',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'type' => 'statement',\n\t\t\t\t\t\t\t'rank' => 'normal',\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'senses' => [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'S1',\n\t\t\t\t\t'glosses' => [\n\t\t\t\t\t\t'en' => [\n\t\t\t\t\t\t\t'language' => 'en',\n\t\t\t\t\t\t\t'value' => 'the property of an object of producing' .\n\t\t\t\t\t\t\t\t' different sensations on the eye',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t'claims' => [\n\t\t\t\t\t\t'P3' => [ [\n\t\t\t\t\t\t\t'mainsnak' => [\n\t\t\t\t\t\t\t\t'snaktype' => 'value',\n\t\t\t\t\t\t\t\t'property' => 'P3',\n\t\t\t\t\t\t\t\t'hash' => '4c2e17bc6d4c930be2beccbf929724b2cd431f3d',\n\t\t\t\t\t\t\t\t'datavalue' => [\n\t\t\t\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t\t\t\t'entity-type' => 'item',\n\t\t\t\t\t\t\t\t\t\t'numeric-id' => 5,\n\t\t\t\t\t\t\t\t\t\t'id' => 'Q5',\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t'type' => 'wikibase-entityid',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'type' => 'statement',\n\t\t\t\t\t\t\t'rank' => 'normal',\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$this->assertEquals( $expectedSerialization, $lexemeSerialization );\n\t}", "public function testNormalize() {\n $this->data['Account'][] = array(\n 'AccountID' => $this->createGuid(),\n 'Name' => $this->getRandomGenerator()->word(10),\n 'Code' => '200',\n 'Type' => 'BANK'\n );\n $expect = $this->data;\n\n $string_def = DataDefinition::create('string');\n $integer_def = DataDefinition::create('integer');\n $guid[] = new StringData($string_def);\n $guid[] = new StringData($string_def);\n $name[] = new StringData($string_def);\n $name[] = new StringData($string_def);\n $code[] = new IntegerData($integer_def);\n $code[] = new IntegerData($integer_def);\n $type[] = new StringData($string_def);\n $type[] = new StringData($string_def);\n\n $guid[0]->setValue($this->data['Account'][0]['AccountID']);\n $name[0]->setValue($this->data['Account'][0]['Name']);\n $code[0]->setValue($this->data['Account'][0]['Code']);\n $type[0]->setValue($this->data['Account'][0]['Type']);\n $guid[1]->setValue($this->data['Account'][1]['AccountID']);\n $name[1]->setValue($this->data['Account'][1]['Name']);\n $code[1]->setValue($this->data['Account'][1]['Code']);\n $type[1]->setValue($this->data['Account'][1]['Type']);\n\n $itemList = XeroItemList::createInstance($this->listDefinition);\n $account = Account::createInstance($this->accountDefinition);\n $account->setValue($this->data['Account'][0], FALSE);\n\n $account2 = Account::createInstance($this->accountDefinition);\n $account2->setValue($this->data['Account'][1], FALSE);\n\n $this->typedDataManager->expects($this->any())\n ->method('create')\n ->with($this->listDefinition, $this->data['Account'])\n ->will($this->returnValue($itemList));\n\n $this->typedDataManager->expects($this->any())\n ->method('getPropertyInstance')\n ->withConsecutive(\n array($itemList, 0, $account),\n array($itemList, 1, $account2),\n array($account, 'AccountID', $this->data['Account'][0]['AccountID']),\n array($account, 'Code', $this->data['Account'][0]['Code']),\n array($account, 'Name', $this->data['Account'][0]['Name']),\n array($account, 'Type', $this->data['Account'][0]['Type']),\n array($account, 'Description', null),\n array($account, 'TaxType', null),\n array($account, 'EnablePaymentsToAccount', null),\n array($account, 'ShowInExpenseClaims', null),\n array($account, 'Class', null),\n array($account, 'Status', null),\n array($account, 'SystemAccount', null),\n array($account, 'BankAccountNumber', null),\n array($account, 'CurrencyCode', null),\n array($account, 'ReportingCode', null),\n array($account, 'ReportingCodeName', null),\n array($account2, 'AccountID', $this->data['Account'][1]['AccountID']),\n array($account2, 'Code', $this->data['Account'][1]['Code']),\n array($account2, 'Name', $this->data['Account'][1]['Name']),\n array($account2, 'Type', $this->data['Account'][1]['Type'])\n )\n ->will($this->onConsecutiveCalls(\n $account, $account2, $guid[0], $code[0], $name[0], $type[0],\n null, null, null, null, null, null, null, null, null, null, null,\n $guid[1], $code[1], $name[1], $type[1]\n ));\n\n $itemList->setValue([0 => $account, 1 => $account2]);\n\n $items = $this->typedDataManager->create($this->listDefinition, $this->data['Account']);\n\n $data = $this->normalizer->normalize($items, 'xml', array('plugin_id' => 'xero_account'));\n\n $this->assertArrayEquals($expect, $data, print_r($data, TRUE));\n }", "public function traverse(callable $transformation);", "public function processOutput() {}", "public function __unserialize(array $data): void\n {\n $this->createFromArray($data);\n }", "public function testSerializationDeserialization()\n {\n $obj = new Payout(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getSenderBatchHeader());\n $this->assertNotNull($obj->getItems());\n $this->assertNotNull($obj->getLinks());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function testConvert()\n {\n $methodInterface = $this->getMockForAbstractClass(\\Magento\\Payment\\Model\\MethodInterface::class);\n\n $paymentData = ['test' => 'test2'];\n $data = ['some_id' => 1];\n $paymentMethodTitle = 'TestTitle';\n $additionalInfo = ['token' => 'TOKEN-123'];\n\n $this->paymentMock->expects($this->once())->method('getMethodInstance')->willReturn($methodInterface);\n $methodInterface->expects($this->once())->method('getTitle')->willReturn($paymentMethodTitle);\n $this->objectCopyMock->expects($this->once())->method('getDataFromFieldset')->with(\n 'quote_convert_payment',\n 'to_order_payment',\n $this->paymentMock\n )->willReturn($paymentData);\n\n $this->paymentMock->expects($this->once())\n ->method('getAdditionalInformation')\n ->willReturn($additionalInfo);\n $ccNumber = 123456798;\n $ccCid = 1234;\n $this->paymentMock->expects($this->once())\n ->method('getCcNumber')\n ->willReturn($ccNumber);\n $this->paymentMock->expects($this->once())\n ->method('getCcCid')\n ->willReturn($ccCid);\n\n $orderPayment = $this->getMockForAbstractClass(\n \\Magento\\Sales\\Api\\Data\\OrderPaymentInterface::class,\n [],\n '',\n false,\n true,\n true,\n ['setCcNumber', 'setCcCid', 'setAdditionalInformation']\n );\n $orderPayment->expects($this->once())\n ->method('setAdditionalInformation')\n ->with(array_merge($additionalInfo, [Substitution::INFO_KEY_TITLE => $paymentMethodTitle]))\n ->willReturnSelf();\n $orderPayment->expects($this->once())\n ->method('setCcNumber')\n ->willReturnSelf();\n $orderPayment->expects($this->once())\n ->method('setCcCid')\n ->willReturnSelf();\n\n $this->orderPaymentRepositoryMock->expects($this->once())->method('create')->willReturn($orderPayment);\n $this->dataObjectHelper->expects($this->once())\n ->method('populateWithArray')\n ->with(\n $orderPayment,\n array_merge($paymentData, $data),\n \\Magento\\Sales\\Api\\Data\\OrderPaymentInterface::class\n )\n ->willReturnSelf();\n\n $this->assertSame($orderPayment, $this->converter->convert($this->paymentMock, $data));\n }", "function _safe_unserialize($str)\n{\n\tif(strlen($str) > MAX_SERIALIZED_INPUT_LENGTH)\n\t{\n\t\tthrow new Exception('safe_unserialize: input exceeds ' . MAX_SERIALIZED_INPUT_LENGTH);\n\t}\n\n\tif(empty($str) || !is_string($str))\n\t{\n\t\treturn false;\n\t}\n\n\t$stack = array();\n\t$expected = array();\n\n\t/*\n\t * states:\n\t * 0 - initial state, expecting a single value or array\n\t * 1 - terminal state\n\t * 2 - in array, expecting end of array or a key\n\t * 3 - in array, expecting value or another array\n\t */\n\t$state = 0;\n\twhile($state != 1)\n\t{\n\t\t$type = isset($str[0]) ? $str[0] : '';\n\n\t\tif($type == '}')\n\t\t{\n\t\t\t$str = substr($str, 1);\n\t\t}\n\t\telse if($type == 'N' && $str[1] == ';')\n\t\t{\n\t\t\t$value = null;\n\t\t\t$str = substr($str, 2);\n\t\t}\n\t\telse if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))\n\t\t{\n\t\t\t$value = $matches[1] == '1' ? true : false;\n\t\t\t$str = substr($str, 4);\n\t\t}\n\t\telse if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))\n\t\t{\n\t\t\t$value = (int)$matches[1];\n\t\t\t$str = $matches[2];\n\t\t}\n\t\telse if($type == 'd' && preg_match('/^d:(-?[0-9]+\\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))\n\t\t{\n\t\t\t$value = (float)$matches[1];\n\t\t\t$str = $matches[3];\n\t\t}\n\t\telse if($type == 's' && preg_match('/^s:([0-9]+):\"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '\";')\n\t\t{\n\t\t\t$value = substr($matches[2], 0, (int)$matches[1]);\n\t\t\t$str = substr($matches[2], (int)$matches[1] + 2);\n\t\t}\n\t\telse if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches) && $matches[1] < MAX_SERIALIZED_ARRAY_LENGTH)\n\t\t{\n\t\t\t$expectedLength = (int)$matches[1];\n\t\t\t$str = $matches[2];\n\t\t}\n\t\telse if($type == 'O')\n\t\t{\n\t\t\tthrow new Exception('safe_unserialize: objects not supported');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception('safe_unserialize: unknown/malformed type: '.$type);\n\t\t}\n\n\t\tswitch($state)\n\t\t{\n\t\t\tcase 3: // in array, expecting value or another array\n\t\t\t\tif($type == 'a')\n\t\t\t\t{\n\t\t\t\t\tif(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array nesting exceeds ' . MAX_SERIALIZED_ARRAY_DEPTH);\n\t\t\t\t\t}\n\n\t\t\t\t\t$stack[] = &$list;\n\t\t\t\t\t$list[$key] = array();\n\t\t\t\t\t$list = &$list[$key];\n\t\t\t\t\t$expected[] = $expectedLength;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type != '}')\n\t\t\t\t{\n\t\t\t\t\t$list[$key] = $value;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: missing array value');\n\n\t\t\tcase 2: // in array, expecting end of array or a key\n\t\t\t\tif($type == '}')\n\t\t\t\t{\n\t\t\t\t\tif(count($list) < end($expected))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size less than expected ' . $expected[0]);\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($list);\n\t\t\t\t\t$list = &$stack[count($stack)-1];\n\t\t\t\t\tarray_pop($stack);\n\n\t\t\t\t\t// go to terminal state if we're at the end of the root array\n\t\t\t\t\tarray_pop($expected);\n\t\t\t\t\tif(count($expected) == 0) {\n\t\t\t\t\t\t$state = 1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type == 'i' || $type == 's')\n\t\t\t\t{\n\t\t\t\t\tif(count($list) >= MAX_SERIALIZED_ARRAY_LENGTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size exceeds ' . MAX_SERIALIZED_ARRAY_LENGTH);\n\t\t\t\t\t}\n\t\t\t\t\tif(count($list) >= end($expected))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array size exceeds expected length');\n\t\t\t\t\t}\n\n\t\t\t\t\t$key = $value;\n\t\t\t\t\t$state = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: illegal array index type');\n\n\t\t\tcase 0: // expecting array or value\n\t\t\t\tif($type == 'a')\n\t\t\t\t{\n\t\t\t\t\tif(count($stack) >= MAX_SERIALIZED_ARRAY_DEPTH)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception('safe_unserialize: array nesting exceeds ' . MAX_SERIALIZED_ARRAY_DEPTH);\n\t\t\t\t\t}\n\n\t\t\t\t\t$data = array();\n\t\t\t\t\t$list = &$data;\n\t\t\t\t\t$expected[] = $expectedLength;\n\t\t\t\t\t$state = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($type != '}')\n\t\t\t\t{\n\t\t\t\t\t$data = $value;\n\t\t\t\t\t$state = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception('safe_unserialize: not in array');\n\t\t}\n\t}\n\n\tif(!empty($str))\n\t{\n\t\tthrow new Exception('safe_unserialize: trailing data in input');\n\t}\n\treturn $data;\n}", "public function testReverseTransform_invalid()\n {\n $this->transformer->reverseTransform(44);\n }", "public function __unserialize(array $data): void\n {\n $this->__construct($data);\n }", "function maybe_unserialize($data)\n {\n }", "public function testInvalidUnserializeArgument($invalidArgument)\n {\n $data = new ArrayObject;\n $data->unserialize($invalidArgument);\n }", "public static function process() {}", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "abstract protected function doActualConvert();", "private function parse()\n {\n $lines = file($this->filename);\n\n // skip get worker info\n $offset = 0;\n while (isset($lines[$offset])) {\n $line = $lines[$offset];\n\n if (preg_match('/(?:\\[0m\\t)(\\[.*\\])\\s*({.*})(?:[\\r\\n]*)$/', $line, $matches)) {\n $ctx = json_decode($matches[2], true);\n if (isset($ctx['receive'])) {\n $this->in[] = [$matches[1], $matches[2]];\n $offset++;\n continue;\n }\n\n $this->out[] = [$matches[1], $matches[2]];\n }\n\n $offset++;\n }\n }", "function processData() ;", "function maybe_unserialize( $item ){\n if( is_serialized( $item ) ){\n \n try{\n \n // Try unzerialising\n $output = unserialize( $item );\n \n } catch( Exception $e ){\n \n // If there's an error it might be corrupted, so try uncorrupting then unserializing\n $output = unserialize( serialize_fix( $item ) );\n \n }\n \n return $output;\n \n } else {\n return $item;\n }\n}", "abstract protected function _preProcess();", "public function testTransformsAdd(): void\n {\n $pipe = new EtlPipe();\n\n $pipe->extract(new CsvExtractor($this->testFile));\n\n $pipe->transformers([\n (new CaseTransformer())->transformColumn('test', 'lower'),\n ]);\n\n $this->assertInstanceOf(EtlPipe::class, $pipe);\n }", "public function testSerializationDeserialization()\n {\n $obj = new TX(self::getJson());\n\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getBlockHash());\n $this->assertNotNull($obj->getBlockHeight());\n $this->assertNotNull($obj->getHash());\n $this->assertNotNull($obj->getAddresses());\n $this->assertNotNull($obj->getTotal());\n $this->assertNotNull($obj->getFees());\n // TODO: Only included when the includeHex URL property is set to true.\n //$this->assertNotNull($obj->getHex());\n $this->assertNotNull($obj->getPreference());\n $this->assertNotNull($obj->getRelayedBy());\n $this->assertNotNull($obj->getConfirmed());\n $this->assertNotNull($obj->getReceived());\n $this->assertNotNull($obj->getVer());\n $this->assertNotNull($obj->getLockTime());\n $this->assertNotNull($obj->getDoubleSpend());\n // TODO: Only present for unconfirmed transactions\n //$this->assertNotNull($obj->getReceiveCount());\n $this->assertNotNull($obj->getVinSz());\n $this->assertNotNull($obj->getVoutSz());\n $this->assertNotNull($obj->getConfirmations());\n $this->assertNotNull($obj->getConfidence());\n $this->assertNotNull($obj->getInputs());\n $this->assertNotNull($obj->getOutputs());\n $this->assertNotNull($obj->getNextInputs());\n\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function process()\n {\n parent::process();\n $data = $this->getBody();\n if (!isset($data)) {\n $data = array();\n }\n\n try {\n if ($this->_validateSchema()) {\n $resultSet = $this->_processLookup($data);\n $customer = $resultSet['customer'];\n if (!is_null($customer)) {\n $response = array(\n 'customer' => $customer,\n 'destination_id' => $this->getPublisherPseudonym(),\n 'correlation_id' => $this->getCorrelationId(),\n );\n $this->_sendSuccess($response);\n }\n if (sizeof($resultSet['errors']) > 0) {\n $response = array(\n 'errors' => $resultSet['errors'],\n 'destination_id' => $this->getPublisherPseudonym(),\n 'correlation_id' => $this->getCorrelationId(),\n );\n $this->_sendFailure($response);\n }\n }\n } catch (Exception $ex) {\n Mage::logException($ex);\n\n\n $errorResponse = array(\n 'id' => $data['id'],\n 'errors' => array(\n array(\n 'code' => empty($code) ? '-1' : '' . $code,\n 'message' => $ex->getMessage(),\n 'parameters' => null\n )\n ),\n 'destination_id' => $this->getPublisherPseudonym(),\n 'correlation_id' => $this->getCorrelationId(),\n );\n $this->_sendFailure($errorResponse);\n }\n return $this;\n }", "public function testItShouldReturnSameValueAfterEncodeAndDecode()\n {\n $driver = new ChainDriver([\n new HexDriver(),\n new PrefixDriver(['prefix' => 'ABC']),\n ]);\n\n $input = '123456';\n $encoded = $driver->encode($input);\n $decoded = $driver->decode($encoded);\n\n $this->assertNotSame($input, $encoded);\n $this->assertSame($input, $decoded);\n }", "public function testBrokenPipe(): void\n {\n $passable = '(0)';\n $container = new Container();\n $pipeline = new Pipeline($container);\n\n $result = $pipeline\n ->send($passable)\n ->through([\n PipeOne::class => 'a',\n PipeTwo::class => 'b',\n BrokenPipeOne::class => 'c',\n ])\n ->via('handle')\n ->then(function ($passable) {\n return $passable . '(e)';\n })\n ->run();\n\n self::assertEquals('(-2b)(-1a)', $result);\n }", "public function testDebuggingTransformCalls()\n {\n $mock_response = new MockHttpResponse(\n 200,\n '{\"apikey\": \"someapikey\", \"errors\": \"some errors\"}'\n );\n\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $stub_http_client->method('request')\n ->willReturn($mock_response);\n\n $client = new FilestackClient(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client\n );\n\n $transform_tasks = [\n 'resize' => ['w' => '100', 'h' => '100'],\n 'detect_faces' => []\n ];\n\n $json_response = $client->debug($this->test_file_handle, $transform_tasks);\n\n $this->assertNotNull($json_response);\n }", "function process($process, $method) {\n while ($process->hasNext()) {\n $input = $process->next();\n if ($input->isOperand()) {\n $method->addElement($input->Value);\n } else if ($input->isOperator()) {\n try {\n $operand_a = $method->getElement();\n $operand_b = $method->getElement();\n } catch (EmptyStackException $exp) {\n // TODO Must return the previous last value !\n // OR do we want the continue?\n throw new NotImplementedException(\"Not Implemented Yet\" . $exp->getMessage());\n }\n\n try {\n $result = $input->execute($operand_b, $operand_a);\n $method->addElement($result);\n $method->log($input->Value . \" performed on $operand_b & $operand_a\");\n } catch (NotImplementedException $ignore) {\n $method->log($input->Value . 'Not Implemented');\n }\n }\n $method->printStack();\n }\n\n return $method->getElement();\n}", "public function testSerializationCapabilities()\n {\n $generator = $this->getTokenGeneratorForTesting();\n\n $tmp = serialize($generator);\n $tmp = unserialize($tmp);\n\n $this->assertEquals($generator, $tmp);\n $this->assertNotEmpty($tmp->getTokenString(10));\n\n unset($tmp);\n $this->assertNotNull($generator);\n }", "public function testPreprocessingBinarizeAdvanced()\n {\n }", "public function testTransform_null()\n {\n $this->assertNull($this->transformer->transform(null));\n }", "public function testTransform()\n {\n $startTime = new \\DateTime();\n $endTime = new \\DateTime(\"+2 hours\");\n\n $shift = mockery::mock(Shift::class);\n $shift->shouldReceive('getId')->twice()->withNoArgs()->andReturn(1);\n $shift->shouldReceive('getBreak')->once()->withNoArgs()->andReturn(12.5);\n $shift->shouldReceive('getStartTime')->once()->withNoArgs()->andReturn($startTime);\n $shift->shouldReceive('getEndTime')->once()->withNoArgs()->andReturn($endTime);\n\n $transformer = new ShiftTransformer;\n $transformedData = $transformer->transform($shift);\n\n $this->assertEquals([\n 'id' => 1,\n 'break' => 12.5,\n 'start_time' => $startTime->format('r'),\n 'end_time' => $endTime->format('r'),\n 'links' => [\n [\n 'rel' => 'self',\n 'uri' => '/shifts/1'\n ]\n ]\n ], $transformedData);\n }", "public function deserialize($param)\n {\n if ($param === null) {\n return;\n }\n if (array_key_exists(\"BiopsyPart\",$param) and $param[\"BiopsyPart\"] !== null) {\n $this->BiopsyPart = new BiopsyPart();\n $this->BiopsyPart->deserialize($param[\"BiopsyPart\"]);\n }\n\n if (array_key_exists(\"Desc\",$param) and $param[\"Desc\"] !== null) {\n $this->Desc = new EndoscopyDesc();\n $this->Desc->deserialize($param[\"Desc\"]);\n }\n\n if (array_key_exists(\"Summary\",$param) and $param[\"Summary\"] !== null) {\n $this->Summary = new Summary();\n $this->Summary->deserialize($param[\"Summary\"]);\n }\n }", "public function testDecode(): void\n {\n $tx = MinterTx::decode(self::VALID_SIGNATURE);\n $validTx = $this->makeTransaction();\n\n $this->assertSame($validTx->getNonce(), $tx->getNonce());\n $this->assertSame($validTx->getGasCoin(), $tx->getGasCoin());\n $this->assertSame($validTx->getGasPrice(), $tx->getGasPrice());\n $this->assertSame($validTx->getChainID(), $tx->getChainID());\n $this->assertSame($validTx->getData()->coins, $tx->getData()->coins);\n $this->assertSame($validTx->getData()->minimumValueToBuy, $tx->getData()->minimumValueToBuy);\n $this->assertSame(self::MINTER_ADDRESS, $tx->getSenderAddress());\n }", "public function process() {}", "public function process() {}", "public function process() {}", "public function process() {}", "function testProcess(){\n\t\t#mdx:process\n\t\t$field = new MyField('username');\n\t\t$field->context(['username'=>'Jack']);\n\t\t#/mdx echo $field->process()->output\n\t\t$this->assertEquals('Jack',$field->process()->output);\n\t}", "public function testBypassPipe(): void\n {\n $passable = '(0)';\n $container = new Container();\n $pipeline = new Pipeline($container);\n\n $result = $pipeline\n ->send($passable)\n ->through([\n PipeOne::class => 'a',\n BypassPipe::class => 'c',\n PipeTwo::class => 'b',\n ])\n ->via('handle')\n ->then(function ($passable) {\n return $passable . '(e)';\n })\n ->run();\n\n self::assertEquals('(0)(1a)(-1a)', $result);\n }" ]
[ "0.6494883", "0.6243429", "0.5968294", "0.5685148", "0.55904967", "0.543727", "0.5375368", "0.5365713", "0.52476954", "0.5242949", "0.51979697", "0.5149354", "0.5097645", "0.5097645", "0.5096598", "0.50465333", "0.5031752", "0.49766967", "0.49701434", "0.4945104", "0.49326783", "0.49326783", "0.49326783", "0.49326783", "0.4884503", "0.48748508", "0.48748508", "0.48748508", "0.48748508", "0.48649386", "0.48070556", "0.47864228", "0.47843444", "0.478362", "0.4781032", "0.47699112", "0.47690538", "0.47671494", "0.47671494", "0.47671494", "0.47646052", "0.47479343", "0.4742073", "0.47243416", "0.46887496", "0.46626562", "0.46557707", "0.46500838", "0.46489257", "0.46317342", "0.46217245", "0.4613957", "0.460931", "0.4590122", "0.45842892", "0.4573977", "0.45498312", "0.4543682", "0.45410913", "0.45389575", "0.45380533", "0.45145544", "0.45087883", "0.45072028", "0.44932014", "0.44869798", "0.44762585", "0.44716454", "0.44436628", "0.44369802", "0.4434622", "0.44319937", "0.44317928", "0.44240034", "0.44131175", "0.44129765", "0.4406459", "0.44031143", "0.44006968", "0.43951786", "0.43902126", "0.43890694", "0.43860275", "0.43798205", "0.4376313", "0.4364475", "0.43597323", "0.43536845", "0.43519294", "0.43429637", "0.43391103", "0.43244448", "0.43240908", "0.4314956", "0.43112928", "0.43098983", "0.43098983", "0.43098983", "0.43088785", "0.43009147" ]
0.820725
0
Tests Transform_Unserialize_Serial>getReverse() with a chain
public function testGetReverse_Chain() { $mock = $this->getMock('Q\Transform', array('getReverse', 'process')); $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer')); $transform = new Transform_Unserialize_Serial(); $transform->chainInput($mock); $this->assertEquals('reverse of mock transformer', $transform->getReverse()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetReverse_ChainDouble() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform1 = new Transform_Unserialize_Serial();\n $transform2 = new Transform_Unserialize_Serial();\n \n $transform2->chainInput($mock);\n $transform1->chainInput($transform2);\n \n $this->assertEquals('reverse of mock transformer', $transform1->getReverse());\n }", "public function testGetReverse_ChainDouble() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform1 = new Transform_Compress_Gzip();\n $transform2 = new Transform_Compress_Gzip();\n \n $transform2->chainInput($mock);\n $transform1->chainInput($transform2);\n \n $this->assertEquals('reverse of mock transformer', $transform1->getReverse());\n }", "public function testGetReverse_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $this->Compress_Gzip->chainInput($mock);\n \n $this->assertEquals('reverse of mock transformer', $this->Compress_Gzip->getReverse());\n }", "public function reversal()\n {\n }", "public function reversed();", "public function reverse() {}", "private function reverseTransaction() {\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionReversal',\n 'TransactionID' => ' ',\n 'Amount' => ' ',\n 'ReceiverParty' => ' ',\n 'RecieverIdentifierType' => '4',\n 'QueueTimeOutURL' => $this->apiBaseUrl.'/mobilepay/tran_reverse/time_out',\n 'ResultURL' => $this->apiBaseUrl.'/mobilepay/tran_reverse/result',\n 'Remarks' => ' ',\n 'Occasion' => ' '\n ];\n return $this->remotePostCall('mpesa/reversal/v1/request', $data);\n }", "public function testProcess_Chain() \n {\n \t$mock = $this->getMock('Q\\Transform', array('process'));\n \t$mock->expects($this->once())->method('process')->with($this->equalTo('test'))->will($this->returnValue('a:2:{s:1:\"a\";a:1:{s:1:\"c\";s:3:\"abc\";}s:1:\"d\";s:1:\"e\";}'));\n \t\n $transform = new Transform_Unserialize_Serial();\n $transform->chainInput($mock);\n $contents = $transform->process('test');\n\n $this->assertType('Q\\Transform_Unserialize_Serial', $transform);\n $this->assertEquals(array('a'=>array('c'=>'abc'), 'd'=>'e'), $contents);\n }", "public function testReverseTransform_invalid()\n {\n $this->transformer->reverseTransform(44);\n }", "public function reverse();", "public function reverse();", "public function reverse();", "public function reverse();", "abstract public function reverse($preserveKeys = false);", "function reverse($object);", "public function testGetReverse_useReverseMethod()\n {\n $this->Compress_Gzip->mode = FORCE_DEFLATE;\n $reverse = $this->Compress_Gzip->getReverse();\n $this->assertType('Q\\Transform_Decompress_Gzip', $reverse);\n $this->assertEquals(FORCE_DEFLATE, $reverse->mode);\n }", "public function testReverseTransform()\n {\n $invite = m::mock('Braincrafted\\Bundle\\UserBundle\\Entity\\Invite');\n\n $repository = m::mock('Doctrine\\Common\\Persistence\\ObjectRepository');\n $repository\n ->shouldReceive('findOneBy')\n ->with(array('code' => 'abcdef'))\n ->once()\n ->andReturn($invite);\n\n $this->om\n ->shouldReceive('getRepository')\n ->with('Braincrafted\\Bundle\\UserBundle\\Entity\\Invite')\n ->once()\n ->andReturn($repository);\n\n $this->assertEquals($invite, $this->transformer->reverseTransform('abcdef'));\n }", "public function testReverseTransform_null()\n {\n $this->assertNull($this->transformer->reverseTransform(null));\n $this->assertNull($this->transformer->reverseTransform(''));\n }", "public function GetReverseParams ();", "function reverse()\n {\n }", "public function reverse() {\n\t\t$clone = clone $this;\n\t\t\n\t\tif (is_array($clone->order)) {\n\t\t\tforeach ($clone->order as &$value) {\n\t\t\t\t$value[1] = $value[1] == 'DESC' ? 'ASC' : 'DESC';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$clone->sql = null;\n\t\treturn $clone;\n\t}", "public function reverse()\n {\n $array = $this->toArray();\n return static::createFormArray(array_reverse($array), false);\n }", "public function reverse()\n {\n return $this::from(array_reverse($this->hash, true));\n }", "public function testReverseTransformFunctionWithValidData(array $input)\n {\n /** @var \\Integrated\\Bundle\\ContentBundle\\Document\\ContentType\\Embedded\\CustomField $output */\n $output = $this->customTransformer->reverseTransform($input);\n\n $this->assertInstanceOf('\\Integrated\\Bundle\\ContentBundle\\Document\\ContentType\\Embedded\\CustomField', $output);\n $this->assertSame($input['label'], $output->getLabel());\n $this->assertSame($input['type'], $output->getType());\n\n if (!empty($input['required'])) {\n $options = $output->getOptions();\n $this->assertTrue($options['required']);\n }\n\n if (isset($input['name'])) {\n $this->assertSame($input['name'], $output->getName());\n }\n }", "public function reverse() {\n $str = Input::get ( 'value' );\n $task = new My_task;\n $result = $task->reverse($str);\n return $result;\n }", "public function reverse()\n {\n $this->dataToArray();\n $preserveKeys = (\\Sledgehammer\\is_indexed($this->data) === false);\n\n return new self(array_reverse($this->data, $preserveKeys));\n }", "function reverse () {\r\n\t$rev = $this;\r\n $rev->edits = array();\r\n foreach ($this->edits as $edit) {\r\n $rev->edits[] = $edit->reverse();\r\n }\r\n\treturn $rev;\r\n }", "public function reverse()\n {\n $reversed = UTF8::strrev($this->str);\n\n return static::create($reversed, $this->encoding);\n }", "public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }", "public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }", "public function reverse(): self\n {\n return Factory::create(array_reverse($this->items, true));\n }", "public function it_creates_with_2_reversed_args()\n {\n $a2 = $this->get('spec\\Aspire\\DIC\\A2', ['Foo', $this->get('spec\\Aspire\\DIC\\ExtendedB')]);\n\n $a2->b->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\B');\n $a2->c->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\C');\n $a2->foo->shouldEqual('Foo');\n }", "protected function initReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\t$reverse = NULL;\n\t\tif ($this->reverse !== NULL) {\n\t\t\t$reverse = $this->reverse;\n\t\t} else if ($this->pattern !== NULL) {\n\t\t\t$reverse = $this->pattern;\n\t\t} else/* if ($this->pattern === NULL)*/ {\n\t\t\tif ($this->redirect !== NULL)\n\t\t\t\treturn $this->initFlagsByPatternOrReverse(\n\t\t\t\t\t$this->pattern !== NULL\n\t\t\t\t\t\t? $this->pattern\n\t\t\t\t\t\t: str_replace(['\\\\', '(?', ')?', '/?'], '', $this->match)\n\t\t\t\t);\n\t\t\t$this->throwExceptionIfKeyPropertyIsMissing('reverse', 'pattern');\n\t\t}\n\n\t\t$this->lastPatternParam = NULL;\n\n\t\t$this->reverseSections = $this->initSectionsInfo($reverse);\n\t\t$this->reverse = $reverse;\n\n\t\t$match = NULL;\n\t\t$this->reverseParams = $this->initReverseParams(\n\t\t\t$reverse, $this->reverseSections, $this->constraints, $match\n\t\t);\n\n\t\t$this->initFlagsByPatternOrReverse($reverse);\n\t}", "public function reverse() {\n $prev = NULL;\n $curr = $this->head;\n $next = $this->head->next;\n $this->tail = $this->head;\n\n while (!empty($curr)) {\n $curr->next = $prev;\n $prev = $curr;\n $curr = $next;\n $next = $next->next;\n }\n $this->head = $prev; \n }", "function _unserialize( $serial ) {\n\t\tif( function_exists( 'gzinflate' ) ) {\n\t\t\t$decomp = @gzinflate( $serial );\n\t\t\tif( false !== $decomp ) {\n\t\t\t\t$serial = $decomp;\n\t\t\t}\n\t\t}\n\t\treturn unserialize( $serial );\n\t}", "public function reverse() {\n $rev = $this;\n $rev->edits = [];\n foreach ($this->edits as $edit) {\n $rev->edits[] = $edit->reverse();\n }\n return $rev;\n }", "function setReverseMode(){\n\t\t$this->mode = SUSHEE_DEP_REVERSE_MODE;\n\t}", "function MyMod_Sort_Reverse_Get($reverse=\"\")\n {\n $reverse=$this->Reverse;\n if ($reverse==\"\")\n {\n $value=$this->CGI_GETint($this->ModuleName.\"_Reversed\");\n \n if (!empty($value))\n {\n $reverse=$value;\n }\n else\n {\n $reverse=0;\n }\n }\n\n return $reverse;\n }", "function deserialise(string $data): void;", "public function testReverseTransformFunctionWithInvalidData($input)\n {\n $this->assertNull($this->customTransformer->reverseTransform($input));\n }", "public function reversal($request);", "abstract protected function unSerializeData();", "public function reverse(): CollectionInterface;", "public function reverseMap(): MappingInterface;", "public function isReversed() {\n\t\treturn $this->attributes['reversed'];\n\t}", "public function testReverseWithExtension(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}/{action}/*');\n Router::extensions('json', false);\n\n $request = new ServerRequest([\n 'url' => '/posts/view/1.json',\n 'params' => [\n 'controller' => 'Posts',\n 'action' => 'view',\n 'pass' => [1],\n '_ext' => 'json',\n ],\n ]);\n $result = Router::reverse($request);\n $expected = '/Posts/view/1.json';\n $this->assertSame($expected, $result);\n }", "public function reverse(): \\IvoPetkov\\DataList\n {\n $this->actions[] = ['reverse'];\n return $this;\n }", "public function reverse()\n {\n return new static(array_reverse($this->objects, true));\n }", "public function reverse()\r\n\t{\r\n\t\tarray_reverse($this->_items);\r\n\t}", "public function reverseMap()\n {\n $mappedData = [];\n\n foreach ($this->rawData as $index => $field) {\n $mappedData[$index]['id'] = getVal($field, ['id'], '');\n $mappedData[$index]['reference'] = getVal($field, ['transaction', 'reference'], '');\n $mappedData[$index]['date'] = getVal($field, ['transaction', 'transaction_date', 0, 'date'], '');\n $mappedData[$index]['amount'] = getVal($field, ['transaction', 'value', 0, 'amount'], '');\n $mappedData[$index]['currency'] = getVal($field, ['transaction', 'value', 0, 'currency'], '');\n $mappedData[$index]['description'] = getVal($field, ['transaction', 'description', 0, 'narrative', 0, 'narrative'], '');\n $mappedData[$index]['organisation'] = getVal($field, ['transaction', 'receiver_organization', 0, 'narrative', 0, 'narrative'], '');\n }\n\n return $mappedData;\n }", "public function reversal($values)\n\t{\n\t\treturn $this->getRequest('Reversal', $values);\n\t}", "public function reverse($destinationFieldValue, $field, $source, $destination);", "public function setReversed($reversed) {\n\t\t$this->attributes['reversed'] = $reversed;\n\t\treturn $this;\n\t}", "public function setReverseOrder($reverse = true)\n {\n $this->reverse = $reverse;\n return $this;\n }", "public function reverse(array $params = array())\n {\n $parsed = $this->reverse;\n foreach ($params as $name => $value) {\n $parsed = str_replace(':' . $name, $value, $parsed);\n }\n return $parsed;\n }", "public function testBuildCreditCardReversal()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $card = new Card();\n $card->setToken('test-token')\n ->setName('TEST')\n ->setNumber('8696969')\n ->setExpiryMonth('09')\n ->setExpiryYear('18')\n ->setCvv('200');\n\n $data = new SinglePayData();\n $data->setOrderAmount('10.00')\n ->setCard($card);\n\n $creditCardReversal = ExpressFactory::buildCreditCardReversal($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\CreditCardReversal', $creditCardReversal);\n $this->assertInternalType('array', $creditCardReversal->extendedParameters);\n $this->assertInternalType('int', $creditCardReversal->extendedParameters[0]->Value->enc_type);\n }", "public function reverseMe(): CollectionInterface;", "function reverse() {\r\n return new self(array_reverse($this->list));\r\n }", "public function reverse() {\n\t\tarray_reverse( $this->elements );\n\n\t\treturn $this;\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new Payout(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getSenderBatchHeader());\n $this->assertNotNull($obj->getItems());\n $this->assertNotNull($obj->getLinks());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "public function reverse($preserve = true) {\n\t\t$this->_value = array_reverse($this->_value, $preserve);\n\n\t\treturn $this;\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new TX(self::getJson());\n\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getBlockHash());\n $this->assertNotNull($obj->getBlockHeight());\n $this->assertNotNull($obj->getHash());\n $this->assertNotNull($obj->getAddresses());\n $this->assertNotNull($obj->getTotal());\n $this->assertNotNull($obj->getFees());\n // TODO: Only included when the includeHex URL property is set to true.\n //$this->assertNotNull($obj->getHex());\n $this->assertNotNull($obj->getPreference());\n $this->assertNotNull($obj->getRelayedBy());\n $this->assertNotNull($obj->getConfirmed());\n $this->assertNotNull($obj->getReceived());\n $this->assertNotNull($obj->getVer());\n $this->assertNotNull($obj->getLockTime());\n $this->assertNotNull($obj->getDoubleSpend());\n // TODO: Only present for unconfirmed transactions\n //$this->assertNotNull($obj->getReceiveCount());\n $this->assertNotNull($obj->getVinSz());\n $this->assertNotNull($obj->getVoutSz());\n $this->assertNotNull($obj->getConfirmations());\n $this->assertNotNull($obj->getConfidence());\n $this->assertNotNull($obj->getInputs());\n $this->assertNotNull($obj->getOutputs());\n $this->assertNotNull($obj->getNextInputs());\n\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "function eT_dtora_reverse2dritta($datareverse, $sepaore=\":\", $sepadtora=\" \", $sepadt=\"/\") {\n $anno = substr($datareverse,0,4);\n $mese = substr($datareverse,4,2);\n $giorno = substr($datareverse,6,2);\n $ore = substr($datareverse,8,2);\n $minuti = substr($datareverse,10,2);\n $secondi = substr($datareverse,12,2);\n \n return $giorno.$sepadt.$mese.$sepadt.$anno.$sepadtora.$ore.$sepaore.$minuti.$sepaore.$secondi; \n}", "#[ReturnTypeWillChange]\n public function __unserialize($data)\n {\n foreach ($data as $item) {\n $this->unshift($item);\n }\n }", "public function reverse()\n\t{\n\t\treturn new static(array_reverse($this->stack));\n\t}", "public function reverse() {\n\t\t$out = new CMS_Navigation3_LinkSet();\n\t\t$rev = array_reverse((array)$this->links);\n\t\tforeach($rev as $link) {\n\t\t\t$out->links[] = $link;\n\t\t}\n\t\treturn $out;\n\t}", "public function getReversePhone()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_REVERSEPHONE);\n\t\treturn $this->_result;\n\t}", "public function uncompress() {}", "public function uncompress() {}", "public function testFlip() {\n $data = array(\n 'true' => true,\n 'false' => false,\n 'null' => null,\n 'zero' => 0,\n 'stringZero' => '0',\n 'empty' => array(),\n 'array' => array(\n 'false' => false,\n 'null' => null,\n 'empty' => array()\n )\n );\n\n $this->assertEquals(array(\n 1 => 'true',\n 0 => 'stringZero',\n 'empty' => array(),\n 'array' => array(\n 'empty' => array()\n )\n ), Hash::flip($data));\n\n $data = array(\n 'foo' => 'bar',\n 1 => 'one',\n 2 => 'two',\n true,\n false,\n null,\n 'key' => 'value',\n 'baz' => 'bar',\n );\n\n $this->assertEquals(array(\n 'bar' => 'baz',\n 'one' => '',\n 'two' => '',\n 1 => '',\n 'value' => 'key'\n ), Hash::flip($data));\n\n $this->assertEquals(array(\n 1 => 'boolean',\n 123 => 'integer',\n 'foobar' => 'strings',\n 1988 => 'numeric',\n 'empty' => array(),\n 'one' => array(\n 1 => 'depth',\n 'two' => array(\n 2 => 'depth',\n 'three' => array(\n 3 => 'depth',\n 1 => 'true',\n 0 => 'zero',\n 'four' => array(\n 'five' => array(\n 'six' => array(\n 'seven' => array(\n 'We can go deeper!' => 'key'\n )\n )\n )\n )\n )\n )\n )\n ), Hash::flip($this->expanded));\n }", "public function testSerializationDeserialization()\n {\n $obj = new LookupDataEntry(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getKey());\n $this->assertNotNull($obj->getValue());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function flip()\n\t{\n\t\treturn $this->toBase()->flip();\n\t}", "public function deQueue()\n {\n /*var_dump('#outgoing#');\n var_dump($this->outgoing);\n var_dump('#outgoing empty#'.$this->outgoing->isEmpty());\n var_dump('#incoming#');\n var_dump($this->incoming);\n var_dump('#incoming empty#'.$this->incoming->isEmpty());*/\n if($this->outgoing->isEmpty() && $this->incoming->isEmpty()){\n return self::createEmpty();\n }\n if($this->outgoing->isEmpty()){\n //var_dump('flip active');\n $fliped = $this->flip();\n //var_dump('#fliped#');\n //var_dump($fliped);\n $popFliped = $fliped->pop();\n //var_dump('#$popFliped#');\n //var_dump($popFliped);\n //var_dump(new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1));\n return new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1);\n }\n /*if($this->outgoing->isEmpty()){\n $fliped = $this->flip();\n $this->outgoing = $fliped;\n //var_dump('#fliped#');\n //var_dump($fliped);\n //$popFliped = $fliped->pop();\n $this->outgoing = $this->outgoing->pop();\n //var_dump('#$popFliped#');\n //var_dump($popFliped);\n //var_dump(new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1));\n return new self(ImmutableStack::createEmpty(),$this->outgoing,$this->size-1);\n }*/\n $pop = $this->outgoing->pop();\n\n return new self($this->incoming, $pop, $this->size-1);\n }", "protected function _processTransactionPaymentReversed($parameters) {\n\t\t\tif (\n\t\t\t\t!empty($parameters['invoice_id']) &&\n\t\t\t\t!empty($parameters['user'])\n\t\t\t) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t'subject' => 'Invoice #' . $invoice['data']['invoice']['id'] . ' payment pending reversal',\n\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t'name' => 'payment_reversal',\n\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t'invoice' => $invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t'transaction' => array_merge($parameters, array(\n\t\t\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t);\n\t\t\t\t\t$this->_sendMail($mailParameters);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}", "public function afterSerialize($serializedData, $unserializedData) {\n\t\treturn $serializedData;\n\t}", "public function reverseDeposit(FinancialTransactionInterface $transaction, $retry);", "public function reverse(): void\n {\n $ranks = $this->ranks;\n\n $this->commit(array_values(collect($ranks)->reverse()->all()));\n }", "abstract public function decode(array $options = array());", "public function decompress() {}", "public function reverse()\n {\n return Collection::new(array_reverse($this->items));\n }", "public function testReduceRight() {\n\t\t$array = str_split('reverse');\n\t\t$string = _::reduceRight($array, function($memo, $value) {\n\t\t\treturn \"$memo$value\";\n\t\t});\n\t\t$this->assertEquals('esrever', $string);\n\t}", "public function reversePart($lo,$hi);", "public function reverse()\n {\n if ($this->getLen() <= 1) {\n return true;\n }\n $node = $this->getHead();\n $newNode = new SingleNode($node->Data, null);\n while ($node = $node->Next) {\n $newNode = new SingleNode($node->Data, $newNode);\n }\n $newNode = $this->setHead($newNode);\n return true;\n }", "private function normToModel(mixed $value): mixed\n {\n try {\n $transformers = $this->config->getModelTransformers();\n\n for ($i = \\count($transformers) - 1; $i >= 0; --$i) {\n $value = $transformers[$i]->reverseTransform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to reverse value for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "public function flip()\n {\n return $this->toBase()->flip();\n }", "public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}", "function pass($data, array $chain, callable $finish)\n{\n $reversed = array_reverse($chain);\n\n $result = array_reduce($reversed, function (callable $next, callable $fn) {\n return function ($data) use ($next, $fn) {\n return $fn($data, $next);\n };\n }, $finish);\n\n return $result($data);\n}", "public function decode($in) {}", "public function reverseTransform($value)\n {\n return $value;\n }", "public function testInvert() {\n\t\t$array = array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$expected = array(1 => 'one', 2 => 'two', 3 => 'three');\n\t\t$result = _::invert($array);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test with an object\n\t\t$object = (object)$array;\n\t\t$result = _::invert($object);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function reversed(iterable $it) : \\Generator\n {\n $array = [];\n foreach ( $it as $key => $item ) {\n $array[] = [ $key, $item ];\n }\n\n for ( end($array); key($array) !== null; prev($array) ) {\n [ $key, $item ] = current($array);\n\n yield $key => $item;\n }\n }", "public static function deserializeReverseCsvResponse(string $rawResponse): ReverseCsvResponse {\n return static::deserializeCsvResponse($rawResponse, new ReverseCsvResponse());\n }", "public function unserialize($serialized=null){ }", "public function reverse() {\r\n\t\t$this->collection = array_reverse($this->collection);\r\n return $this;\r\n }", "abstract public function revert();", "protected function reverseTransform($value)\n {\n if (null === $this->valueTransformer) {\n return '' === $value ? null : $value;\n }\n return $this->valueTransformer->reverseTransform($value, $this->data);\n }", "public function deserialize($data);", "public function reverseTransform($value)\n {\n if (!is_string($value)) {\n throw new UnexpectedTypeException($value, 'string');\n }\n\n if ('' === $value) {\n return null;\n }\n\n $value = json_decode($value, true);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new TransformationFailedException($this->getLastError(json_last_error()));\n }\n\n return $value;\n }", "public function testDecode()\n {\n $json = $this->_newJson();\n \n $before = '{ \"test\": { \"foo\": \"bar\" } }';\n \n $actual = var_export($json->decode($before), 1);\n \n $expect = \"stdClass::__set_state(array(\\n\"\n . \" 'test' => \\n\"\n . \" stdClass::__set_state(array(\\n\"\n . \" 'foo' => 'bar',\\n\"\n . \" )),\\n\"\n . \"))\";\n \n $this->assertSame($actual, $expect);\n }" ]
[ "0.75660837", "0.66889006", "0.6677965", "0.6240784", "0.61688167", "0.61540484", "0.61508316", "0.61504894", "0.6074951", "0.59442", "0.59442", "0.59442", "0.59442", "0.591658", "0.59154224", "0.5853217", "0.58103627", "0.5676281", "0.5646193", "0.5595553", "0.5431423", "0.5373707", "0.53495646", "0.5324432", "0.52822465", "0.5258017", "0.5212726", "0.520557", "0.52027535", "0.52027535", "0.51947767", "0.51609427", "0.5154439", "0.5139298", "0.51181966", "0.5093672", "0.5091353", "0.5065922", "0.50519985", "0.5042689", "0.50377905", "0.50030065", "0.50029045", "0.4958846", "0.49358198", "0.49146086", "0.4911931", "0.49116006", "0.4901049", "0.4892612", "0.48891598", "0.48584035", "0.48125562", "0.4800835", "0.47946236", "0.47903877", "0.47773716", "0.47765905", "0.47695416", "0.47559488", "0.47421944", "0.47342476", "0.4714364", "0.47067708", "0.47058895", "0.47011906", "0.46823767", "0.4656634", "0.4653575", "0.46534085", "0.45986906", "0.45956865", "0.4593599", "0.4593012", "0.45892143", "0.45778447", "0.45719102", "0.45675153", "0.45634672", "0.45400348", "0.45341375", "0.45279995", "0.45250204", "0.45220405", "0.45216525", "0.45204693", "0.45019463", "0.44936615", "0.44873786", "0.44743702", "0.44742918", "0.44729832", "0.44715735", "0.44696167", "0.44643465", "0.44544455", "0.44541574", "0.44520685", "0.4449451", "0.44449395" ]
0.7750612
0
Tests Transform_Unserialize_Serial>getReverse() with a chain
public function testGetReverse_ChainDouble() { $mock = $this->getMock('Q\Transform', array('getReverse', 'process')); $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer')); $transform1 = new Transform_Unserialize_Serial(); $transform2 = new Transform_Unserialize_Serial(); $transform2->chainInput($mock); $transform1->chainInput($transform2); $this->assertEquals('reverse of mock transformer', $transform1->getReverse()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetReverse_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Serialize_Serial'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform = new Transform_Unserialize_Serial();\n $transform->chainInput($mock);\n \n $this->assertEquals('reverse of mock transformer', $transform->getReverse());\n }", "public function testGetReverse_ChainDouble() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $transform1 = new Transform_Compress_Gzip();\n $transform2 = new Transform_Compress_Gzip();\n \n $transform2->chainInput($mock);\n $transform1->chainInput($transform2);\n \n $this->assertEquals('reverse of mock transformer', $transform1->getReverse());\n }", "public function testGetReverse_Chain() \n {\n $mock = $this->getMock('Q\\Transform', array('getReverse', 'process'));\n $mock->expects($this->once())->method('getReverse')->with($this->isInstanceOf('Q\\Transform_Decompress_Gzip'))->will($this->returnValue('reverse of mock transformer'));\n \n $this->Compress_Gzip->chainInput($mock);\n \n $this->assertEquals('reverse of mock transformer', $this->Compress_Gzip->getReverse());\n }", "public function reversal()\n {\n }", "public function reversed();", "public function reverse() {}", "private function reverseTransaction() {\n $data = [\n 'Initiator' => ' ',\n 'SecurityCredential' => ' ',\n 'CommandID' => 'TransactionReversal',\n 'TransactionID' => ' ',\n 'Amount' => ' ',\n 'ReceiverParty' => ' ',\n 'RecieverIdentifierType' => '4',\n 'QueueTimeOutURL' => $this->apiBaseUrl.'/mobilepay/tran_reverse/time_out',\n 'ResultURL' => $this->apiBaseUrl.'/mobilepay/tran_reverse/result',\n 'Remarks' => ' ',\n 'Occasion' => ' '\n ];\n return $this->remotePostCall('mpesa/reversal/v1/request', $data);\n }", "public function testProcess_Chain() \n {\n \t$mock = $this->getMock('Q\\Transform', array('process'));\n \t$mock->expects($this->once())->method('process')->with($this->equalTo('test'))->will($this->returnValue('a:2:{s:1:\"a\";a:1:{s:1:\"c\";s:3:\"abc\";}s:1:\"d\";s:1:\"e\";}'));\n \t\n $transform = new Transform_Unserialize_Serial();\n $transform->chainInput($mock);\n $contents = $transform->process('test');\n\n $this->assertType('Q\\Transform_Unserialize_Serial', $transform);\n $this->assertEquals(array('a'=>array('c'=>'abc'), 'd'=>'e'), $contents);\n }", "public function testReverseTransform_invalid()\n {\n $this->transformer->reverseTransform(44);\n }", "public function reverse();", "public function reverse();", "public function reverse();", "public function reverse();", "function reverse($object);", "abstract public function reverse($preserveKeys = false);", "public function testGetReverse_useReverseMethod()\n {\n $this->Compress_Gzip->mode = FORCE_DEFLATE;\n $reverse = $this->Compress_Gzip->getReverse();\n $this->assertType('Q\\Transform_Decompress_Gzip', $reverse);\n $this->assertEquals(FORCE_DEFLATE, $reverse->mode);\n }", "public function testReverseTransform()\n {\n $invite = m::mock('Braincrafted\\Bundle\\UserBundle\\Entity\\Invite');\n\n $repository = m::mock('Doctrine\\Common\\Persistence\\ObjectRepository');\n $repository\n ->shouldReceive('findOneBy')\n ->with(array('code' => 'abcdef'))\n ->once()\n ->andReturn($invite);\n\n $this->om\n ->shouldReceive('getRepository')\n ->with('Braincrafted\\Bundle\\UserBundle\\Entity\\Invite')\n ->once()\n ->andReturn($repository);\n\n $this->assertEquals($invite, $this->transformer->reverseTransform('abcdef'));\n }", "public function testReverseTransform_null()\n {\n $this->assertNull($this->transformer->reverseTransform(null));\n $this->assertNull($this->transformer->reverseTransform(''));\n }", "public function GetReverseParams ();", "function reverse()\n {\n }", "public function reverse() {\n\t\t$clone = clone $this;\n\t\t\n\t\tif (is_array($clone->order)) {\n\t\t\tforeach ($clone->order as &$value) {\n\t\t\t\t$value[1] = $value[1] == 'DESC' ? 'ASC' : 'DESC';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$clone->sql = null;\n\t\treturn $clone;\n\t}", "public function reverse()\n {\n $array = $this->toArray();\n return static::createFormArray(array_reverse($array), false);\n }", "public function reverse()\n {\n return $this::from(array_reverse($this->hash, true));\n }", "public function testReverseTransformFunctionWithValidData(array $input)\n {\n /** @var \\Integrated\\Bundle\\ContentBundle\\Document\\ContentType\\Embedded\\CustomField $output */\n $output = $this->customTransformer->reverseTransform($input);\n\n $this->assertInstanceOf('\\Integrated\\Bundle\\ContentBundle\\Document\\ContentType\\Embedded\\CustomField', $output);\n $this->assertSame($input['label'], $output->getLabel());\n $this->assertSame($input['type'], $output->getType());\n\n if (!empty($input['required'])) {\n $options = $output->getOptions();\n $this->assertTrue($options['required']);\n }\n\n if (isset($input['name'])) {\n $this->assertSame($input['name'], $output->getName());\n }\n }", "public function reverse() {\n $str = Input::get ( 'value' );\n $task = new My_task;\n $result = $task->reverse($str);\n return $result;\n }", "public function reverse()\n {\n $this->dataToArray();\n $preserveKeys = (\\Sledgehammer\\is_indexed($this->data) === false);\n\n return new self(array_reverse($this->data, $preserveKeys));\n }", "function reverse () {\r\n\t$rev = $this;\r\n $rev->edits = array();\r\n foreach ($this->edits as $edit) {\r\n $rev->edits[] = $edit->reverse();\r\n }\r\n\treturn $rev;\r\n }", "public function reverse()\n {\n $reversed = UTF8::strrev($this->str);\n\n return static::create($reversed, $this->encoding);\n }", "public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }", "public function reverse($value) {\n return $this->setProperty('reverse', $value);\n }", "public function reverse(): self\n {\n return Factory::create(array_reverse($this->items, true));\n }", "public function it_creates_with_2_reversed_args()\n {\n $a2 = $this->get('spec\\Aspire\\DIC\\A2', ['Foo', $this->get('spec\\Aspire\\DIC\\ExtendedB')]);\n\n $a2->b->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\B');\n $a2->c->shouldBeAnInstanceOf('spec\\Aspire\\DIC\\C');\n $a2->foo->shouldEqual('Foo');\n }", "protected function initReverse () {\n\t\tif ($this->reverseSections !== NULL) return;\n\t\t$reverse = NULL;\n\t\tif ($this->reverse !== NULL) {\n\t\t\t$reverse = $this->reverse;\n\t\t} else if ($this->pattern !== NULL) {\n\t\t\t$reverse = $this->pattern;\n\t\t} else/* if ($this->pattern === NULL)*/ {\n\t\t\tif ($this->redirect !== NULL)\n\t\t\t\treturn $this->initFlagsByPatternOrReverse(\n\t\t\t\t\t$this->pattern !== NULL\n\t\t\t\t\t\t? $this->pattern\n\t\t\t\t\t\t: str_replace(['\\\\', '(?', ')?', '/?'], '', $this->match)\n\t\t\t\t);\n\t\t\t$this->throwExceptionIfKeyPropertyIsMissing('reverse', 'pattern');\n\t\t}\n\n\t\t$this->lastPatternParam = NULL;\n\n\t\t$this->reverseSections = $this->initSectionsInfo($reverse);\n\t\t$this->reverse = $reverse;\n\n\t\t$match = NULL;\n\t\t$this->reverseParams = $this->initReverseParams(\n\t\t\t$reverse, $this->reverseSections, $this->constraints, $match\n\t\t);\n\n\t\t$this->initFlagsByPatternOrReverse($reverse);\n\t}", "public function reverse() {\n $prev = NULL;\n $curr = $this->head;\n $next = $this->head->next;\n $this->tail = $this->head;\n\n while (!empty($curr)) {\n $curr->next = $prev;\n $prev = $curr;\n $curr = $next;\n $next = $next->next;\n }\n $this->head = $prev; \n }", "function _unserialize( $serial ) {\n\t\tif( function_exists( 'gzinflate' ) ) {\n\t\t\t$decomp = @gzinflate( $serial );\n\t\t\tif( false !== $decomp ) {\n\t\t\t\t$serial = $decomp;\n\t\t\t}\n\t\t}\n\t\treturn unserialize( $serial );\n\t}", "public function reverse() {\n $rev = $this;\n $rev->edits = [];\n foreach ($this->edits as $edit) {\n $rev->edits[] = $edit->reverse();\n }\n return $rev;\n }", "function setReverseMode(){\n\t\t$this->mode = SUSHEE_DEP_REVERSE_MODE;\n\t}", "function MyMod_Sort_Reverse_Get($reverse=\"\")\n {\n $reverse=$this->Reverse;\n if ($reverse==\"\")\n {\n $value=$this->CGI_GETint($this->ModuleName.\"_Reversed\");\n \n if (!empty($value))\n {\n $reverse=$value;\n }\n else\n {\n $reverse=0;\n }\n }\n\n return $reverse;\n }", "function deserialise(string $data): void;", "public function testReverseTransformFunctionWithInvalidData($input)\n {\n $this->assertNull($this->customTransformer->reverseTransform($input));\n }", "public function reversal($request);", "public function reverse(): CollectionInterface;", "abstract protected function unSerializeData();", "public function reverseMap(): MappingInterface;", "public function isReversed() {\n\t\treturn $this->attributes['reversed'];\n\t}", "public function testReverseWithExtension(): void\n {\n $routes = Router::createRouteBuilder('/');\n $routes->connect('/{controller}/{action}/*');\n Router::extensions('json', false);\n\n $request = new ServerRequest([\n 'url' => '/posts/view/1.json',\n 'params' => [\n 'controller' => 'Posts',\n 'action' => 'view',\n 'pass' => [1],\n '_ext' => 'json',\n ],\n ]);\n $result = Router::reverse($request);\n $expected = '/Posts/view/1.json';\n $this->assertSame($expected, $result);\n }", "public function reverse()\n {\n return new static(array_reverse($this->objects, true));\n }", "public function reverse(): \\IvoPetkov\\DataList\n {\n $this->actions[] = ['reverse'];\n return $this;\n }", "public function reverse()\r\n\t{\r\n\t\tarray_reverse($this->_items);\r\n\t}", "public function reverseMap()\n {\n $mappedData = [];\n\n foreach ($this->rawData as $index => $field) {\n $mappedData[$index]['id'] = getVal($field, ['id'], '');\n $mappedData[$index]['reference'] = getVal($field, ['transaction', 'reference'], '');\n $mappedData[$index]['date'] = getVal($field, ['transaction', 'transaction_date', 0, 'date'], '');\n $mappedData[$index]['amount'] = getVal($field, ['transaction', 'value', 0, 'amount'], '');\n $mappedData[$index]['currency'] = getVal($field, ['transaction', 'value', 0, 'currency'], '');\n $mappedData[$index]['description'] = getVal($field, ['transaction', 'description', 0, 'narrative', 0, 'narrative'], '');\n $mappedData[$index]['organisation'] = getVal($field, ['transaction', 'receiver_organization', 0, 'narrative', 0, 'narrative'], '');\n }\n\n return $mappedData;\n }", "public function reversal($values)\n\t{\n\t\treturn $this->getRequest('Reversal', $values);\n\t}", "public function reverse($destinationFieldValue, $field, $source, $destination);", "public function setReversed($reversed) {\n\t\t$this->attributes['reversed'] = $reversed;\n\t\treturn $this;\n\t}", "public function setReverseOrder($reverse = true)\n {\n $this->reverse = $reverse;\n return $this;\n }", "public function reverse(array $params = array())\n {\n $parsed = $this->reverse;\n foreach ($params as $name => $value) {\n $parsed = str_replace(':' . $name, $value, $parsed);\n }\n return $parsed;\n }", "public function testBuildCreditCardReversal()\n {\n $config = new SinglePayConfig();\n $config->setServiceConfig(self::$testConfig);\n\n $card = new Card();\n $card->setToken('test-token')\n ->setName('TEST')\n ->setNumber('8696969')\n ->setExpiryMonth('09')\n ->setExpiryYear('18')\n ->setCvv('200');\n\n $data = new SinglePayData();\n $data->setOrderAmount('10.00')\n ->setCard($card);\n\n $creditCardReversal = ExpressFactory::buildCreditCardReversal($config, $data);\n $this->assertInstanceOf('\\SinglePay\\PaymentService\\Element\\Express\\Method\\CreditCardReversal', $creditCardReversal);\n $this->assertInternalType('array', $creditCardReversal->extendedParameters);\n $this->assertInternalType('int', $creditCardReversal->extendedParameters[0]->Value->enc_type);\n }", "public function reverseMe(): CollectionInterface;", "function reverse() {\r\n return new self(array_reverse($this->list));\r\n }", "public function reverse() {\n\t\tarray_reverse( $this->elements );\n\n\t\treturn $this;\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new Payout(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getSenderBatchHeader());\n $this->assertNotNull($obj->getItems());\n $this->assertNotNull($obj->getLinks());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "#[\\ReturnTypeWillChange]\n public function __unserialize($data)\n {\n }", "public function reverse($preserve = true) {\n\t\t$this->_value = array_reverse($this->_value, $preserve);\n\n\t\treturn $this;\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new TX(self::getJson());\n\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getBlockHash());\n $this->assertNotNull($obj->getBlockHeight());\n $this->assertNotNull($obj->getHash());\n $this->assertNotNull($obj->getAddresses());\n $this->assertNotNull($obj->getTotal());\n $this->assertNotNull($obj->getFees());\n // TODO: Only included when the includeHex URL property is set to true.\n //$this->assertNotNull($obj->getHex());\n $this->assertNotNull($obj->getPreference());\n $this->assertNotNull($obj->getRelayedBy());\n $this->assertNotNull($obj->getConfirmed());\n $this->assertNotNull($obj->getReceived());\n $this->assertNotNull($obj->getVer());\n $this->assertNotNull($obj->getLockTime());\n $this->assertNotNull($obj->getDoubleSpend());\n // TODO: Only present for unconfirmed transactions\n //$this->assertNotNull($obj->getReceiveCount());\n $this->assertNotNull($obj->getVinSz());\n $this->assertNotNull($obj->getVoutSz());\n $this->assertNotNull($obj->getConfirmations());\n $this->assertNotNull($obj->getConfidence());\n $this->assertNotNull($obj->getInputs());\n $this->assertNotNull($obj->getOutputs());\n $this->assertNotNull($obj->getNextInputs());\n\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "function eT_dtora_reverse2dritta($datareverse, $sepaore=\":\", $sepadtora=\" \", $sepadt=\"/\") {\n $anno = substr($datareverse,0,4);\n $mese = substr($datareverse,4,2);\n $giorno = substr($datareverse,6,2);\n $ore = substr($datareverse,8,2);\n $minuti = substr($datareverse,10,2);\n $secondi = substr($datareverse,12,2);\n \n return $giorno.$sepadt.$mese.$sepadt.$anno.$sepadtora.$ore.$sepaore.$minuti.$sepaore.$secondi; \n}", "public function reverse()\n\t{\n\t\treturn new static(array_reverse($this->stack));\n\t}", "#[ReturnTypeWillChange]\n public function __unserialize($data)\n {\n foreach ($data as $item) {\n $this->unshift($item);\n }\n }", "public function reverse() {\n\t\t$out = new CMS_Navigation3_LinkSet();\n\t\t$rev = array_reverse((array)$this->links);\n\t\tforeach($rev as $link) {\n\t\t\t$out->links[] = $link;\n\t\t}\n\t\treturn $out;\n\t}", "public function getReversePhone()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_REVERSEPHONE);\n\t\treturn $this->_result;\n\t}", "public function uncompress() {}", "public function uncompress() {}", "public function testFlip() {\n $data = array(\n 'true' => true,\n 'false' => false,\n 'null' => null,\n 'zero' => 0,\n 'stringZero' => '0',\n 'empty' => array(),\n 'array' => array(\n 'false' => false,\n 'null' => null,\n 'empty' => array()\n )\n );\n\n $this->assertEquals(array(\n 1 => 'true',\n 0 => 'stringZero',\n 'empty' => array(),\n 'array' => array(\n 'empty' => array()\n )\n ), Hash::flip($data));\n\n $data = array(\n 'foo' => 'bar',\n 1 => 'one',\n 2 => 'two',\n true,\n false,\n null,\n 'key' => 'value',\n 'baz' => 'bar',\n );\n\n $this->assertEquals(array(\n 'bar' => 'baz',\n 'one' => '',\n 'two' => '',\n 1 => '',\n 'value' => 'key'\n ), Hash::flip($data));\n\n $this->assertEquals(array(\n 1 => 'boolean',\n 123 => 'integer',\n 'foobar' => 'strings',\n 1988 => 'numeric',\n 'empty' => array(),\n 'one' => array(\n 1 => 'depth',\n 'two' => array(\n 2 => 'depth',\n 'three' => array(\n 3 => 'depth',\n 1 => 'true',\n 0 => 'zero',\n 'four' => array(\n 'five' => array(\n 'six' => array(\n 'seven' => array(\n 'We can go deeper!' => 'key'\n )\n )\n )\n )\n )\n )\n )\n ), Hash::flip($this->expanded));\n }", "public function flip()\n\t{\n\t\treturn $this->toBase()->flip();\n\t}", "public function testSerializationDeserialization()\n {\n $obj = new LookupDataEntry(self::getJson());\n $this->assertNotNull($obj);\n $this->assertNotNull($obj->getKey());\n $this->assertNotNull($obj->getValue());\n $this->assertEquals(self::getJson(), $obj->toJson());\n return $obj;\n }", "public function deQueue()\n {\n /*var_dump('#outgoing#');\n var_dump($this->outgoing);\n var_dump('#outgoing empty#'.$this->outgoing->isEmpty());\n var_dump('#incoming#');\n var_dump($this->incoming);\n var_dump('#incoming empty#'.$this->incoming->isEmpty());*/\n if($this->outgoing->isEmpty() && $this->incoming->isEmpty()){\n return self::createEmpty();\n }\n if($this->outgoing->isEmpty()){\n //var_dump('flip active');\n $fliped = $this->flip();\n //var_dump('#fliped#');\n //var_dump($fliped);\n $popFliped = $fliped->pop();\n //var_dump('#$popFliped#');\n //var_dump($popFliped);\n //var_dump(new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1));\n return new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1);\n }\n /*if($this->outgoing->isEmpty()){\n $fliped = $this->flip();\n $this->outgoing = $fliped;\n //var_dump('#fliped#');\n //var_dump($fliped);\n //$popFliped = $fliped->pop();\n $this->outgoing = $this->outgoing->pop();\n //var_dump('#$popFliped#');\n //var_dump($popFliped);\n //var_dump(new self(ImmutableStack::createEmpty(),$popFliped,$this->size-1));\n return new self(ImmutableStack::createEmpty(),$this->outgoing,$this->size-1);\n }*/\n $pop = $this->outgoing->pop();\n\n return new self($this->incoming, $pop, $this->size-1);\n }", "protected function _processTransactionPaymentReversed($parameters) {\n\t\t\tif (\n\t\t\t\t!empty($parameters['invoice_id']) &&\n\t\t\t\t!empty($parameters['user'])\n\t\t\t) {\n\t\t\t\t$invoice = $this->_call('invoices', array(\n\t\t\t\t\t'methodName' => 'invoice',\n\t\t\t\t\t'methodParameters' => array(\n\t\t\t\t\t\t'invoices',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'id' => $parameters['invoice_id']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t)\n\t\t\t\t));\n\n\t\t\t\tif (!empty($invoice['data'])) {\n\t\t\t\t\t$mailParameters = array(\n\t\t\t\t\t\t'from' => $this->settings['from_email'],\n\t\t\t\t\t\t'subject' => 'Invoice #' . $invoice['data']['invoice']['id'] . ' payment pending reversal',\n\t\t\t\t\t\t'template' => array(\n\t\t\t\t\t\t\t'name' => 'payment_reversal',\n\t\t\t\t\t\t\t'parameters' => array(\n\t\t\t\t\t\t\t\t'invoice' => $invoice['data']['invoice'],\n\t\t\t\t\t\t\t\t'transaction' => array_merge($parameters, array(\n\t\t\t\t\t\t\t\t\t'payment_method' => $this->_retrieveTransactionPaymentMethod($parameters['payment_method_id'])\n\t\t\t\t\t\t\t\t)),\n\t\t\t\t\t\t\t\t'user' => $parameters['user']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'to' => $parameters['user']['email']\n\t\t\t\t\t);\n\t\t\t\t\t$this->_sendMail($mailParameters);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}", "public function afterSerialize($serializedData, $unserializedData) {\n\t\treturn $serializedData;\n\t}", "public function reverseDeposit(FinancialTransactionInterface $transaction, $retry);", "public function reverse(): void\n {\n $ranks = $this->ranks;\n\n $this->commit(array_values(collect($ranks)->reverse()->all()));\n }", "abstract public function decode(array $options = array());", "public function decompress() {}", "public function reverse()\n {\n return Collection::new(array_reverse($this->items));\n }", "public function testReduceRight() {\n\t\t$array = str_split('reverse');\n\t\t$string = _::reduceRight($array, function($memo, $value) {\n\t\t\treturn \"$memo$value\";\n\t\t});\n\t\t$this->assertEquals('esrever', $string);\n\t}", "public function reversePart($lo,$hi);", "public function reverse()\n {\n if ($this->getLen() <= 1) {\n return true;\n }\n $node = $this->getHead();\n $newNode = new SingleNode($node->Data, null);\n while ($node = $node->Next) {\n $newNode = new SingleNode($node->Data, $newNode);\n }\n $newNode = $this->setHead($newNode);\n return true;\n }", "private function normToModel(mixed $value): mixed\n {\n try {\n $transformers = $this->config->getModelTransformers();\n\n for ($i = \\count($transformers) - 1; $i >= 0; --$i) {\n $value = $transformers[$i]->reverseTransform($value);\n }\n } catch (TransformationFailedException $exception) {\n throw new TransformationFailedException(sprintf('Unable to reverse value for property path \"%s\": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception, $exception->getInvalidMessage(), $exception->getInvalidMessageParameters());\n }\n\n return $value;\n }", "public function flip()\n {\n return $this->toBase()->flip();\n }", "public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}", "function pass($data, array $chain, callable $finish)\n{\n $reversed = array_reverse($chain);\n\n $result = array_reduce($reversed, function (callable $next, callable $fn) {\n return function ($data) use ($next, $fn) {\n return $fn($data, $next);\n };\n }, $finish);\n\n return $result($data);\n}", "public function decode($in) {}", "public function reverseTransform($value)\n {\n return $value;\n }", "public function testInvert() {\n\t\t$array = array('one' => 1, 'two' => 2, 'three' => 3);\n\t\t$expected = array(1 => 'one', 2 => 'two', 3 => 'three');\n\t\t$result = _::invert($array);\n\t\t$this->assertEquals($expected, $result);\n\n\t\t// test with an object\n\t\t$object = (object)$array;\n\t\t$result = _::invert($object);\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function reversed(iterable $it) : \\Generator\n {\n $array = [];\n foreach ( $it as $key => $item ) {\n $array[] = [ $key, $item ];\n }\n\n for ( end($array); key($array) !== null; prev($array) ) {\n [ $key, $item ] = current($array);\n\n yield $key => $item;\n }\n }", "public static function deserializeReverseCsvResponse(string $rawResponse): ReverseCsvResponse {\n return static::deserializeCsvResponse($rawResponse, new ReverseCsvResponse());\n }", "public function unserialize($serialized=null){ }", "public function reverse() {\r\n\t\t$this->collection = array_reverse($this->collection);\r\n return $this;\r\n }", "protected function reverseTransform($value)\n {\n if (null === $this->valueTransformer) {\n return '' === $value ? null : $value;\n }\n return $this->valueTransformer->reverseTransform($value, $this->data);\n }", "abstract public function revert();", "public function deserialize($data);", "public function reverseTransform($value)\n {\n if (!is_string($value)) {\n throw new UnexpectedTypeException($value, 'string');\n }\n\n if ('' === $value) {\n return null;\n }\n\n $value = json_decode($value, true);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new TransformationFailedException($this->getLastError(json_last_error()));\n }\n\n return $value;\n }", "public function testDecode()\n {\n $json = $this->_newJson();\n \n $before = '{ \"test\": { \"foo\": \"bar\" } }';\n \n $actual = var_export($json->decode($before), 1);\n \n $expect = \"stdClass::__set_state(array(\\n\"\n . \" 'test' => \\n\"\n . \" stdClass::__set_state(array(\\n\"\n . \" 'foo' => 'bar',\\n\"\n . \" )),\\n\"\n . \"))\";\n \n $this->assertSame($actual, $expect);\n }" ]
[ "0.77503055", "0.66885215", "0.6677177", "0.6240599", "0.6170473", "0.61553895", "0.61520016", "0.61476904", "0.607417", "0.5945706", "0.5945706", "0.5945706", "0.5945706", "0.59170383", "0.591687", "0.5853025", "0.5810367", "0.56759506", "0.56476384", "0.55959487", "0.543253", "0.5375059", "0.53507125", "0.5322391", "0.52827865", "0.5258638", "0.5213316", "0.52065796", "0.52045006", "0.52045006", "0.5196143", "0.51613635", "0.51556206", "0.5140801", "0.51155275", "0.5094709", "0.5091632", "0.50680536", "0.50483495", "0.5041155", "0.503918", "0.50043046", "0.499892", "0.49588683", "0.4937701", "0.49159443", "0.49132872", "0.4912078", "0.49014363", "0.48914683", "0.4891264", "0.48588294", "0.48136038", "0.48027173", "0.47966847", "0.47901753", "0.47783887", "0.47780076", "0.47705323", "0.47549036", "0.47383457", "0.47351363", "0.47135597", "0.470769", "0.47028264", "0.4702655", "0.4683461", "0.4658442", "0.46504244", "0.46502563", "0.45983702", "0.45944205", "0.45936275", "0.45934", "0.45896658", "0.457638", "0.45733577", "0.45685485", "0.4561353", "0.45374265", "0.45357612", "0.45284837", "0.45258397", "0.45237324", "0.45214587", "0.45213604", "0.4501332", "0.44942638", "0.44854861", "0.44739145", "0.44731846", "0.44730297", "0.44715604", "0.44670168", "0.44654828", "0.4453853", "0.4453795", "0.44490504", "0.4448614", "0.44434893" ]
0.75659686
1
/ Function: get factor from database Parameter: Atom1, Atom2, bond order, primary/secondary table Return: Factor
function get_factor($Atom1, $Atom2, $BondOrder, $tb_name) { global $conn; global $PRIMARY_TB; // Check if all the parameters are valid if (!$Atom1) { die("Atom 1 is not specified."); } elseif (!$Atom2) { die("Atom 2 is not specified."); } elseif (!$BondOrder) { die("Bond order is not specified."); } $query_str = "SELECT Factor FROM $tb_name ". "WHERE (Atom1='$Atom1' AND Atom2='$Atom2')". "AND BondOrder=$BondOrder"; $result = $conn->query($query_str); // Everything is ok if ($result->num_rows == 1) { $row = $result->fetch_assoc(); return $row['Factor']; } // There is something wrong if ($BondOrder == 1) { $boName = "single"; } elseif ($BondOrder == 2) { $boName = "double"; } elseif ($BondOrder == 3) { $boName = "tripple"; } else { $boName = $BondOrder; } // If such bond DNE, print error if($result->num_rows == 0) { if ($tb_name == $PRIMARY_TB) { die("The $Atom1-$Atom2 $boName bond does not exist in the database."); } else { return 0; } } // If there are multiple entries if ($result->num_rows > 1) { die("There are multiple entries in the database of the $Atom1-$Atom2 $boName bond."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_factor_query($is_aromatic_ring) {\n\t\n\tglobal $PRIMARY_TB, $SECONDARY_TB, $l_0;\n\t\n\t$bonds = json_decode($_GET['json_query'], true);\n\t$sum = 0;\n\tforeach ($bonds as $bond) {\n\t\t// $bond has keys: Atom1, Atom2, BondOrder, Proximity\n\t\tif ($bond[\"Proximity\"] == 1) {\n\t\t\t$f = get_factor($bond[\"Atom1\"], $bond[\"Atom2\"], $bond[\"BondOrder\"], $PRIMARY_TB);\n\t\t\t$l_char = \"<i>L</i>\";\n\t\t} elseif ($bond[\"Proximity\"] == 2) {\n\t\t\t$f = get_factor($bond[\"Atom1\"], $bond[\"Atom2\"], $bond[\"BondOrder\"], $SECONDARY_TB);\n\t\t\t$l_char = \"<i>l</i>\";\n\t\t}\n\t\t$sum += $f;\n\t\tif ($bond[\"BondOrder\"] == 1) {\n\t\t\t$bond_char = \"-\";\n\t\t} elseif ($bond[\"BondOrder\"] == 2) {\n\t\t\t$bond_char = \"=\";\n\t\t} elseif ($bond[\"BondOrder\"] == 3) {\n\t\t\t$bond_char = \"&equiv;\";\n\t\t}\n\t\techo \"<p>\".$l_char.\"<sub>\".$bond[\"Atom1\"].$bond_char.$bond[\"Atom2\"].\"</sub> = \".$f.\"</p>\";\n\t}\n\tif ($is_aromatic_ring == \"true\") {\n\t\t$sum += $l_0;\n\t\techo \"<p>l<sub>0</sub> = \".$l_0.\"</p>\";\n\t}\n\techo \"<h4>&beta; = \".($sum+1).\"</h4>\";\n}", "public function factor();", "public function getFactor()\n\t{\n\t\treturn $this->factor;\n\t}", "function calculDeterminent($tab)\n {\n\n $detemninent = $tab[0][1] * (-1) * (($tab[1][0] * $tab[2][2]) - ($tab[1][2] * $tab[2][0])) +\n $tab[1][1] * (1) * (($tab[0][0] * $tab[2][2]) - ($tab[2][0] * $tab[0][2])) +\n $tab[2][1] * (-1) * (($tab[0][0] * $tab[1][2]) - ($tab[1][0] * $tab[0][2]));\n\n return $detemninent;\n }", "function get_franimeischdisc_pid($fid,$pid)\r\n\t{\r\n\t\t$ddet_res = $this->db->query(\"select menuid,catid,brandid from king_deals a join king_dealitems b on a.dealid = b.dealid where pnh_id = ? \",$pid);\r\n\t\tif($ddet_res->num_rows())\r\n\t\t{\r\n\t\t\t$ddet = $ddet_res->row_array();\r\n\t\t\treturn @$this->db->query(\"select scheme_type,credit_value,if(scheme_type,concat(credit_value,'%'),concat('Rs ',credit_value)) as disc,\r\n\t\t\t\t\t\t\t\t\t\t\tmenuid,categoryid,brandid \r\n\t\t\t\t\t\t\t\t\t\t\tfrom imei_m_scheme \r\n\t\t\t\t\t\t\t\t\t\t\twhere franchise_id = ? and brandid = ? and categoryid = ? and menuid = ?\r\n\t\t\t\t\t\t\t\t\t\t\tand unix_timestamp() between scheme_from and scheme_to \r\n\t\t\t\t\t\t\t\t\t\t\tand is_active = 1 order by id desc limit 1\",array($fid,$ddet['brandid'],$ddet['catid'],$ddet['menuid']))->row()->disc;\r\n\t\t}\r\n\t\treturn 0;\t\r\n\t}", "public function getF()\n {\n if (isset($this->f)) {\n return $this->f;\n }\n\n if (isset($this->b)) {\n // f = (a-b)/a\n return ($this->a - $this->b) / $this->a;\n }\n\n if (isset($this->rf)) {\n // r = 1/rf\n return 1 / $this->rf;\n }\n }", "public function getCaracteristicaFactor($id, $idComponente) {\n if($idComponente == 0){\n $sql = 'select * FROM caracteristica as caracte \nINNER JOIN factores AS fact ON caracte.id_factor = fact.id \nINNER JOIN componentes AS comp ON comp.id = fact.idParent\nWHERE caracte.id_factor = \"' . $id . '\"';\n }else{\n $sql = 'select * FROM caracteristica as caracte \nINNER JOIN factores AS fact ON caracte.id_factor = fact.id \nINNER JOIN componentes AS comp ON comp.id = fact.idParent\nWHERE caracte.id_factor = \"' . $id . '\" AND comp.id = \"' . $idComponente . '\" ';\n }\n $results = $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n return $results;\n }", "private function AsrFactor($asrParam)\n\t{\n\t\treturn $asrParam == AsrMethod::Standard ? 1 : 0;\n\t}", "function gain($l_column,$other_column,$res){\r\n\t$res_gain = array();\r\n\r\n\t$information = information_for_each_column($other_column,$res);\r\n\t$entropy_lastColumn = entropy($l_column);\r\n\t\r\n\tfor ($i = 0; $i < count($information); $i++){\r\n\t\t$temp = $entropy_lastColumn - $information[$i];\r\n\t\tarray_push($res_gain, $temp);\r\n\t}\r\n\treturn $res_gain;\r\n}", "public function getFactor(array $options = [])\n {\n return $this->getResourceProperty(self::FACTOR, Stormpath::FACTOR, $options);\n }", "private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }", "private static function _getFactor($token, $parent)\n {\n $factor = self::_newFactor($token);\n $parentIndex = $parent->getIndex();\n $factor->setParentIndex($parentIndex);\n\n return $factor;\n }", "function getCommonFactor($first, $second, $tenPoint, $height) {\n $allNumbers = array(intval($first), intval($second));\n $upDown = $down;\n $interval = 1;\n $isCommon = false;\n $testNumber = intval(0.2181818181 * ($height/$tenPoint)); // when we've got more height than font, we'll start looking at a higher number for the common factor. Default will be 12.\n while(!$isCommon AND $testNumber > 3) {\n\t\t$isCommon = true; // if we make it through the following loop without changing this, then we've found our number!\n\t\tforeach($allNumbers as $num) {\n\t\t\t$remainder = $num % $testNumber;\n if($remainder != 0) {\n $isCommon = false;\n }\n\t\t}\n if(!$isCommon) {\n if($upDown == \"down\") {\n $testNumber = $testNumber - $interval;\n $upDown = \"up\";\n } else {\n $testNumber = $testNumber + $interval;\n $upDown = \"down\";\n }\n $interval++;\n }\n\t}\n if(!$isCommon) {\n return 12;\n } else {\n return $testNumber;\n }\n}", "private static function _identifyFactor($token)\n {\n foreach (RX::FACTOR_SYM_DEF as $type => $regex) {\n if (preg_match($regex, $token) === 1) {\n return K::DESC[$type];\n }\n }\n if (self::_isEnclosure($token)) {\n return K::FACTOR_ENCLOSURE;\n }\n return K::POWER;\n }", "function getCompatibilityByWeight2($searchee=array(), $candidate=array()){\r\n\t\t$similarItems = $this->getSimilarItems ( $searchee, $candidate );\r\n\t\t$n = count($similarItems);\r\n\t\tif ($n==0){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t$sum1 = $this->sumUpWeights($searchee, $similarItems);\r\n\t\t$sum2 = $this->sumUpWeights($candidate, $similarItems);\r\n\t\t$sumPow1 = $this->sumUpWeights($searchee, $similarItems, \"sumpower\");\r\n\t\t$sumPow2 = $this->sumUpWeights($candidate, $similarItems, \"sumpower\");\r\n\t\t$sameItems1 = $this->getSimilarItemsPerPerson($searchee, $similarItems);\r\n\t\t$sameItems2 = $this->getSimilarItemsPerPerson($candidate, $similarItems);\r\n\t\t$sumMul = 0;\r\n\t\tfor($i=0;$i<$n;$i++){\r\n\t\t\t$sumMul += ($sameItems1[$i][\"weight\"]*$sameItems2[$i][\"weight\"]);\r\n\t\t}\r\n\t\t//$numerator = $sumMul*$n - (($sum1*$sum2)/$n);\r\n\t\t$numerator = ($sumMul*$n - ($sum1*$sum2))/$n;\r\n\t\t$denominator = sqrt(\r\n\t\t\t($sumPow1 - (pow($sum1, 2)/$n))*($sumPow2 - (pow($sum2, 2)/$n))\r\n\t\t\r\n\t\t);\r\n\t\tif ($numerator==$denominator){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ($denominator==0){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn $numerator/$denominator;\r\n\t}", "private static function _getFactorObject($token, int $type)\n {\n switch ($type) {\n case K::FACTOR_ENCLOSURE:\n $factor = new FactorEnclosure($token);\n break;\n case K::FRACTION:\n $fstr = substr($token, 1);\n $ft = self::_identifyFactor($fstr);\n switch ($ft) {\n case K::FACTOR_ENCLOSURE:\n $factor = new FactorEnclosure($token);\n break;\n default:\n $factor = new Factor($token);\n }\n $factor->setFactorType($ft);\n return $factor;\n default:\n $factor = new Factor($token);\n }\n return $factor;\n }", "function OBTENER_FORMULA($_ARGS) {\r\n\t$sql = \"SELECT Formula FROM pr_concepto WHERE CodConcepto = '\".$_ARGS['CONCEPTO'].\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) {\r\n\t\t$field = mysql_fetch_array($query);\r\n\t\treturn $field['Formula'];\r\n\t} else return \"\";\r\n}", "function getCompatibilityByWeight($searchee=array(), $candidate=array(), $type=1){\r\n\t\t$commonItems = 0;\r\n\t\t$sim = 0;\r\n\t\tforeach($searchee[\"MemberAttributeWeight\"] as $weight_searchee){\r\n\t\t\tforeach($candidate[\"MemberAttributeWeight\"] as $weight_candidate){\r\n\t\t\t\tif ($weight_searchee[\"attribute_id\"]==$weight_candidate[\"attribute_id\"]){\r\n\t\t\t\t\t$attribute = $this->controller->Attribute->find(\"first\", array(\"conditions\"=>array(\"Attribute.id\"=>$weight_candidate[\"attribute_id\"])));\r\n\t\t\t\t\t//if ($attribute[\"attribute_type_id\"]==$type){\r\n\t\t\t\t\t\t$commonItems++;\r\n\t\t\t\t\t\t$weight1 = $weight_searchee[\"weight\"];\r\n\t\t\t\t\t\t$weight2 = $weight_candidate[\"weight\"];\r\n\t\t\t\t\t\t$sim+=pow(($weight1-$weight2), 2);\r\n\t\t\t\t\t//}\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($commonItems>0){\r\n\t\t\t$sim = sqrt($sim/$commonItems);\r\n\t\t\t$sim = 1 - tanh($sim);\r\n\t\t\t$maxItems = min(count($searchee[\"MemberAttributeWeight\"]), count($candidate[\"MemberAttributeWeight\"]));\r\n\t\t\t$sim = $sim * ($commonItems/$maxItems);\r\n\t\t}\r\n\t\treturn $sim;\r\n\t}", "public function getSlavePriceFriendRank($uid)\n {\n \t$sql = \" SELECT (COUNT(a.fid)+1) AS rank_price FROM (SELECT f.fid FROM slave_friend AS f WHERE f.uid=:uid\n \t\t\t UNION SELECT u.uid FROM slave_user AS u WHERE u.uid=:uid) a,\n\t\t\t\t slave_user b WHERE a.fid = b.uid\n\t\t\t\t AND b.price > (SELECT price FROM slave_user WHERE uid=:uid)\";\n\n \treturn $this->_rdb->fetchOne($sql, array('uid' => $uid));\n }", "function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}", "public static function getFactorings($fechai, $fechaf, $tercero)\n {\n $query = Factoring1::query();\n $query->select(DB::raw(\"SUM(factoring3_saldo) AS factoring\"), DB::raw(\"COUNT(factoring1_numero) AS numerofactoring\"));\n $query->join('factoring3', function($join){\n $join->on('factoring3_numero', '=', 'factoring1_numero');\n $join->on('factoring3_sucursal', '=', 'factoring1_sucursal');\n });\n $query->whereRaw(\"factoring3_numero = factoring1_numero\");\n $query->whereRaw(\"factoring3_numero = factoring1_numero\");\n $query->where('factoring3_tercero_cartera', $tercero->tercero_nit)->orWhere('factoring3_tercero_endoso', $tercero->tercero_nit);\n $query->where('factoring1_fecha', '>=', $fechai);\n $query->where('factoring1_fecha', '<', $fechaf);\n return $query->first();\n }", "public function getB()\n {\n if (isset($this->b)) {\n return $this->b;\n }\n\n if (isset($this->f)) {\n // f = (a-b)/a ∴ fa = a-b ∴ b = a-fa\n return $this->a - ($this->f * $this->a);\n }\n\n if (isset($this->rf)) {\n // rf = a/(a-b) ∴ rf/a = a-b ∴ b = a-rf/a\n return $this->a - ($this->rf / $this->a);\n }\n }", "public function calculateFactor($number){\n\n //Variables that define the multiples of three and five\n $ofThree = $number%3 === 0;\n $ofFive = $number%5 === 0;\n $ofBoth = $ofThree && $ofFive;\n\n //Push all the answers to the container\n $container = [];\n array_push($container, $ofThree, $ofFive, $ofBoth, false);\n $size = 3;\n \n $count = 0;\n $count_true = 0;\n $index = 0;\n \n //Finds the first true, add 1 to the end to match the values later\n while($container[$index] !== true && $index < $size){\n $index++;\n }\n $index++;\n\n //Counts the total number of trues\n while($count < $size){\n $count_true += $container[$count];\n $count++;\n }\n\n //Array that contains the map for the answer\n $arr_values = [0 => $number, 1 => 'Linio', 2 => 'IT', 3 => 'Linianos'];\n\n //Only if that evaluate if there is one true and gives the value with $index\n if($count_true == 1){\n return $arr_values[$index];\n }\n\n //Return the arr value in case there is less or more than one true\n return $arr_values[$count_true];\n }", "private function convertCurrencyByAmount($transaction) {\nlist($currency, $amount)=explode(\" \", $transaction);\n\n$stmt=$this->mysqli->prepare(\"SELECT currencyType, currencyRate FROM currencyrates WHERE currencyType=?\");\n$stmt->bind_param(\"s\", $currency);\n$stmt->execute();\n$res=$stmt->get_result();\n$row=$res->fetch_assoc();\n$stmt->close();\n\nreturn $this->basecurrency . ' ' . number_format((float)$row['currencyRate'] * (float)$amount, 2);\n}", "public function datosFactura($idFactura, $vector)\n{\n conectar::conexiones();\n $sql=\"SELECT * FROM pedidos WHERE id='\".$this->filtroNumerico($idFactura).\"'\";\n $query=mysql_query($sql);\n $rs=mysql_fetch_array($query);\n\n switch ($vector) {\n case 'nroPedido':\n # code...\n return $rs[\"nroPedido\"];\n break;\n\n case 'idCliente':\n # code...\n return $rs[\"idCliente\"];\n break;\n\n case 'idVendedor':\n # code...\n return $rs[\"idVendedor\"];\n break;\n\n\n case 'fechaPedido':\n # code...\n return $rs[\"fechaPedido\"];\n break;\n\n\n case 'valorPedido':\n # code...\n return $rs[\"valorPedido\"];\n break;\n\n case 'debe':\n # code...\n return $rs[\"debe\"];\n break;\n\n\n\n default:\n # code...\n return 'No hay datos';\n break;\n }\n conectar::desconectar();\n}", "final public function useFactor($value) {\n\t\treturn $this->factor*$value;\n\t}", "function retrieveFunds() {\n return -110.98;\n }", "function getCIMaxcnt($account_id_local,$DbConnection)\n{\n\t$query=\"SELECT MAX(docket_no) as max_count from consignment_info USE INDEX(accountId_status) WHERE\".\n\t\t \" account_id=$account_id_local AND status=1\";\n\t$result=mysql_query($query,$DbConnection);\n\t$max_no = mysql_fetch_row($result1);\n\treturn $row[0];\n}", "function getFondoPatrimonial(){\n\t\t$sql = \"SELECT\n\t\t\tSUM(`operaciones_mvtos`.`afectacion_real` *\n\t\t\t`eacp_config_bases_de_integracion_miembros`.`afectacion`) AS 'monto'\n\n\t\tFROM\n\t\t\t`operaciones_mvtos` `operaciones_mvtos`\n\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\tON `operaciones_mvtos`.`tipo_operacion` =\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\t\tWHERE\n\t\t\t(`operaciones_mvtos`.`socio_afectado` =\" . $this->mCodigo . \")\n\t\t\tAND\n\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 2607)\n\t\t\tGROUP BY\n\t\t\t\t`operaciones_mvtos`.`fecha_afectacion`,\n\t\t\t\t`operaciones_mvtos`.`socio_afectado`,\n\t\t\t\t`operaciones_mvtos`.`docto_afectado`,\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\n\t\t\tORDER BY\n\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\";\n\n\t\t$monto = mifila($sql, \"monto\");\n\t\treturn $monto;\n\t}", "public function get_balance1($dist_id)\n {\n $q=$this->db->where(['dist_id'=>$dist_id])->get('distributor');\n return $q->result_array()[0]['dist_balance'];\n }", "function determine_compound_structural_formula ($chemical_compound_name) {\n\t\n\t\n}", "function Factor($n){\n while($n%2==0){\n echo \"2 \\n\";\n $n=$n/2;\n }\n for($i=3;$i<=sqrt($n);$i=$i+2){\n while($n%$i==0){\n echo \"$i \\n\";\n $n=$n/$i;\n }\n }\n if($n>2){\n echo \"$n\\n\";\n }\n }", "function c2f ($value){\n $fahrenheit=$value/5*9+32;\n return $fahrenheit;\n }", "function get_constituency_id($constituency_name, $conn_huduma_db) {\n $constituency_result = mysql_query(\"SELECT `id` FROM boundary WHERE LOWER(boundary_name) = '\".trim(strtolower($constituency_name)).\"'\", $conn_huduma_db);\n\n if($constituency_result) {\n if($my_array = mysql_fetch_array($constituency_result)) {\n return $my_array[0];\n }\n\n return null;\n }\n\n return null;\n}", "function factorielle($n) : float\n{\n\treturn ($n === 0) ? 1 : $n*factorielle($n-1);\n}", "function getSpecificValue($con, $table, $column1, $column2, $value1)\n{\n $result = mysqli_query($con, \"SELECT $column2 \"\n . \"FROM $table \"\n . \"WHERE $column1='$value1'\");\n $valueArray = mysqli_fetch_array($result);\n\n return $valueArray[0];\n}", "public function getCFU(): int\n {\n return array_reduce($this->esami, function ($acc, $esame) {\n return $acc + $esame->cfu * $esame->in_cdl;\n }, 0);\n }", "abstract function getEmissionFactors();", "function valore_assoluto_costo_mio_gas($id_ordine,$id_gas){\r\n //echo $ordine.\" - \".$gas;\r\n global $db;\r\n $query = \"SELECT * FROM retegas_referenze WHERE id_ordine_referenze='$id_ordine' AND id_gas_referenze='$id_gas';\";\r\n $result = $db->sql_query($query);\r\n $row = $db->sql_fetchrow($result);\r\n\r\n return (float)$row[\"maggiorazione_referenza\"]; \r\n}", "public function getRF()\n {\n if (isset($this->rf)) {\n return $this->rf;\n }\n\n if (isset($this->b)) {\n // rf = a/(a-b)\n return $this->a / ($this->a - $this->b);\n }\n\n if (isset($this->f)) {\n // rf = 1/f\n return 1 / $this->f;\n }\n }", "function calculate_commitions($p_id,$conn)\n {\n $sql=\"select price,branch_commision,com_type from products where id=$p_id\";\n $res=$conn->query($sql);\n $row=$res->fetch_assoc();\n \n if($row['com_type']=='Percentage')\n {\n $cc=$row['price']*$row['branch_commision']/100;\n }\n else\n {\n $cc=$row['branch_commision'];\n }\n return $cc;\n }", "static public function ctrCalcularFolio(){\r\n\t\t$tabla = \"banco6278\";\r\n\r\n\t\t$respuesta = ModeloBanco6278Diario::mdlCalcularFolio($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "function obtener_pct_anio_mes($anio, $mes, $result_inflacion) {\n \n mysql_data_seek($result_inflacion, 0);\n\n while ($row = mysql_fetch_array($result_inflacion))\n {\n if ($row[0] == $anio && $row[1] == $mes) {\n return $row[2];\n }\n }\n return -1;\n}", "public function getFee(): float;", "function calc_dream_mp_score_a($db, $dreamid, $personid) {\n global $pwpdo;\n $query = \"select pw_vote.vote as mpvote, pw_dyn_dreamvote.vote as dreamvote from\n pw_vote, pw_dyn_dreamvote, pw_division, pw_mp where\n pw_vote.division_id = pw_division.division_id and\n pw_dyn_dreamvote.division_number = pw_division.division_number and\n pw_dyn_dreamvote.division_date = pw_division.division_date\n and pw_vote.mp_id = pw_mp.mp_id\n and pw_mp.person = ? and pw_dyn_dreamvote.dream_id = ?\";\n\n $qrowarray=$pwpdo->fetch_all_rows($query,array($personid,$dreamid));\n $t = 0.0;\n $c = 0.0;\n foreach ($qrowarray as $qrow)\n {\n $weight = 1;\n $mpvote = $qrow['mpvote'];\n $mpvote = str_replace(\"tell\", \"\", $mpvote);\n $dreamvote = $qrow['dreamvote'];\n if ($dreamvote == \"aye3\" or $dreamvote == \"no3\") {\n $dreamvote = str_replace(\"3\", \"\", $dreamvote);\n $weight = 3;\n }\n $t += $weight;\n\n if ($mpvote == $dreamvote)\n $c += $weight;\n elseif ($mpvote == \"both\" or $dreamvote == \"both\")\n $c = $c + ($weight / 2);\n }\n\n return array($c, $t);\n}", "public function getBasis();", "public function getIndicatorByFactor($factor)\n {\n $indicator = DB::select('select al_i.name from al_indicators as al_i inner join al_factor as al_f on al_i.al_factor_id = al_f.al_factor_id where al_f.name =\"' . $factor . '\"');\n return $indicator;\n }", "function gainRatios($last_column,$columns_after_cut,$res) {\r\n\t$res_gainRatios = array();\r\n\t\r\n\t$gain = gain($last_column,$columns_after_cut,$res);\r\n\t$splitInfo = splitInfo($columns_after_cut);\r\n\t\r\n\tfor ($i = 0; $i < count($gain); $i++){\r\n\t\tif ($splitInfo[$i] != 0){\r\n\t\t\t$temp = $gain[$i] / $splitInfo[$i];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$temp = \"SplitInfo = 0\";\r\n\t\t}\r\n\t\tarray_push($res_gainRatios, $temp);\r\n\t}\r\n\t\r\n\treturn $res_gainRatios;\r\n}", "function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }", "function getMaxDocketNoConsignmentInfo($account_id_local,$DbC)\n{\n\t$query1=\"SELECT MAX(docket_no) as max_count FROM consignment_info WHERE account_id=$account_id_local\";\n\t$result1=mysql_query($query1,$DbC);\n\t$max_no = mysql_fetch_object($result1);\n\t$max_no1=$max_no->max_count;\n\treturn $max_no1;\n}", "function get_commission($conn,$p_id)\n {\n $sql=\"select price,branch_commision,com_type from products where id=$p_id\";\n $res=$conn->query($sql);\n $row = $res->fetch_assoc();\n if($row['com_type']=='Percentage')\n {\n $commision=$row['price']*$row['branch_commision']/100;\n }\n else\n {\n $commision=$row['branch_commision'];\n }\n return $commision;\n }", "public function adj_test($parameter){\n // print_r($parameter);\n $storedProcedure='adj_get_brand_name';\n $this -> dbmodel = new DBModel();\n $retrieval = $this -> dbmodel -> call_dbFunction($storedProcedure, $parameter);\n \n $i=0;\n $data=array();\n while($row=mysql_fetch_array($retrieval)){\n $data[$i]['id'] = $row['id'];\n $data[$i]['b_category_name'] = $row['b_category_name'];\n \n $i++;\n }\n $retrieval = $this -> dbmodel -> make_result($data);\n \n return $retrieval;\n }", "public function fat()\n\t{\n\t\treturn $this->macronutrients()['fat'];\n\t}", "static public function mdlCalcularUtilidad2($tabla){\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set utilidad2 = ((precioUnitario2-precioCompra2)/precioUnitario2)*100 where idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t\t$stmt -> bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\t\t\tif ($stmt -> execute()) {\r\n\r\n\t\t\t\treturn \"ok\";\r\n\r\n\t\t\t}else {\r\n\r\n\t\t\t\treturn \"error\";\r\n\r\n\t\t\t}\r\n\t\t\t$stmt -> close();\r\n\r\n\t\t\t$stmt = null;\r\n\r\n\r\n\t}", "function GetFiesPercentual($p_WPessoa_Id, $dBase='', $p_Incidencia = '' )\r\n {\r\n \tif ($dBase == '')\r\n \t{\r\n \t\t$dBase = date('d/m/Y');\r\n \t}\r\n \r\n \t$aReturn = '';\r\n \r\n \t$sql = \"select\r\n\t \t\t\t\t\tBolsa_gnPercentual(bolsa.id, to_char( to_date( '\". $dBase .\"' ), 'mm'), 3)\tas percentual,\r\n \t\t\t\t\t\tto_char(bolsa.dtinicio, 'dd/mm/yyyy')\t\t\t\t\t\t\t\t\t\tas dtinicio,\r\n \t\t\t\t\t\tto_char(bolsa.dttermino, 'dd/mm/yyyy')\t\t\t\t\t\t\t\t\t\tas dttermino,\r\n\t \t\t\t\t\treplace(bolsa.valor , ',','.')\t\t\t\t\t\t\t\t\t\t\t\tas valor,\r\n\t \t\t\t\t\tbolsa.bolsati_id\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tas bolsati_id \t\t\t\r\n\t\t\t\t\tfrom\r\n\t\t\t\t\t\tBolsa join Bolsati on bolsati_id=bolsati.id\r\n\t\t\t\t\twhere\r\n \t\t\t(\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.mensalidade = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'MENSALIDADE'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.licenciatura = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'LICENCIATURA'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.dependencia = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'DEPENDENCIA'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.adaptacao = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'ADAPTACAO'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.estagioprof = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'ESTAGIOPROF'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t(\r\n \t\t\t\t\t\t\tbolsati.monografia = 'on'\r\n \t\t\t\t\t\tand\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' = 'MONOGRAFIA'\r\n \t\t\t\t\t\t)\r\n \t\t\t\t\t\tor\r\n \t\t\t\t\t\t(\r\n \t\t\t\t\t\t\t'\" . $p_Incidencia . \"' is null\r\n \t\t\t\t\t\t)\t\t\t\r\n \t\t\t\t\t)\r\n \t\t\t\t\tand \r\n \t\t\t\t\t\tto_date( '\" . $dBase . \"' ) between to_date(bolsa.dtinicio) and to_date(bolsa.dttermino)\r\n \t\t\t\t\tand\r\n \t\t\t\t\t\tbolsa.bolsati_id in ( 10600000000048, 10600000000156, 10600000000152, 10600000000153, 10600000000160 ) \r\n \t\t\t\t\tand\r\n \t\t\t\t\t\tbolsa.state_id=3000000018003\r\n \t\t\t\t\tand\r\n\t \t\t\t\t\tbolsa.WPessoa_Id = nvl ( '\" . $p_WPessoa_Id . \"' ,0)\r\n \t\t\t\t\torder by bolsati.nome\";\r\n \r\n \r\n \t$dbData = new DbData($this->db);\r\n \r\n \t$dbData->Get($sql);\r\n \r\n \twhile ($row = $dbData->Row())\r\n \t{\r\n \t\t$aReturn[] = $row;\r\n \t}\r\n \r\n \tunset($dbData);\r\n \r\n \r\n \treturn $aReturn;\r\n }", "function ml_compute_ranking($r_id){\n\tglobal $dbh1, $dbh2; // Global variables for database connections\n\t$sql = 'SELECT student_id FROM student_recruiter WHERE recruiter_id='.$r_id;\n\t$result = mysql_query($sql, $dbh1);\n\t$rank_dist = [];\n\t\n\twhile ($data = mysql_fetch_array($result)){\n\t\t$s_id = $data['student_id'];\n\t\t// Extract feature vector from s_id\n\t\t$sql1 = 'SELECT feature FROM ml_feature_vectors WHERE recruiter_id='.$r_id.' AND student_id='.$s_id;\n\t\t$result1 = mysql_query($sql1, $dbh2);\n\t\t$data1 = mysql_fetch_array($result1);\n\t\t$feature = $data1['feature'];\n\t\t\n\t\t// Convert feature vector string to array of integers\n\t\t$feature_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$feature_array[$i] = (int)$feature[$i];\n\t\t}\n\t\t\n\t\t// Create best array --> For Comparison\n\t\t$best_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$best_array[$i] = 5;\n\t\t}\n\t\t// Calculate distance between feature vector and best vector based on Cosine similarity distance\n\t\t$cdist = cosinus($feature_array, $best_array);\n\t\t$rank_dist[$s_id] = $cdist;\n\t\t\t\n\t} //while (student)\n\t\n\t// Sort $rank_dist array\n\tarsort($rank_dist);\n\t$rank_dist_keys = array_keys($rank_dist);\n\t\n\t$rank_id = '';\n\tfor($i=0; $i<count($rank_dist_keys); $i++){\n\t\tif($i==(count($rank_dist_keys)-1) )\n\t\t\t$rank_id = $rank_id.$rank_dist_keys[$i];\n\t\telse $rank_id = $rank_id.$rank_dist_keys[$i].',';\n\t}\n\t\n\t$sql2 = 'SELECT * FROM ml_rank WHERE recruiter_id='.$r_id; \n\t$result2 = mysql_query($sql2, $dbh2);\n\t$count2 = mysql_num_rows($result2);\n\t\n\tif ($count2==0)\n\t\t$sql3 = 'INSERT INTO ml_rank VALUES('.$r_id.',\"'.$rank_id.'\")';\n\telse\n\t\t$sql3 = 'UPDATE ml_rank SET rank_id=\"'.$rank_id.'\" WHERE recruiter_id='.$r_id;\n\tmysql_query($sql3, $dbh2);\n\t\t\n\n}", "function retrieveFunds() {\n return -58.98;\n }", "private static function _newFactor($token)\n {\n $type = self::_identifyFactor($token);\n $factor = self::_getFactorObject($token, $type);\n $factor->setType($type);\n\n return $factor;\n }", "static public function setRelationCoef() {\n $link_db = Piwidict::getDatabaseConnection();\n \n $rk = array();\n $query = \"SELECT id, name FROM relation_type\";\n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row = $res->fetch_object()){\n// if ($row->name == 'synonyms') \n if ($row->name != 'synonyms') \n\t $rk[$row->id] = 1;\n\t else \t\n\t $rk[$row->id] = 0.5;\n } \n return $rk;\n }", "public static function COUPDAYS(\n $settlement,\n $maturity,\n $frequency,\n $basis = FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n ) {\n $settlement = Functions::flattenSingleValue($settlement);\n $maturity = Functions::flattenSingleValue($maturity);\n $frequency = Functions::flattenSingleValue($frequency);\n $basis = ($basis === null)\n ? FinancialConstants::BASIS_DAYS_PER_YEAR_NASD\n : Functions::flattenSingleValue($basis);\n\n try {\n $settlement = FinancialValidations::validateSettlementDate($settlement);\n $maturity = FinancialValidations::validateMaturityDate($maturity);\n self::validateCouponPeriod($settlement, $maturity);\n $frequency = FinancialValidations::validateFrequency($frequency);\n $basis = FinancialValidations::validateBasis($basis);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n\n switch ($basis) {\n case FinancialConstants::BASIS_DAYS_PER_YEAR_365:\n // Actual/365\n return 365 / $frequency;\n case FinancialConstants::BASIS_DAYS_PER_YEAR_ACTUAL:\n // Actual/actual\n if ($frequency == FinancialConstants::FREQUENCY_ANNUAL) {\n $daysPerYear = (int) Helpers::daysPerYear(Functions::scalar(DateTimeExcel\\DateParts::year($settlement)), $basis);\n\n return $daysPerYear / $frequency;\n }\n $prev = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_PREVIOUS);\n $next = self::couponFirstPeriodDate($settlement, $maturity, $frequency, self::PERIOD_DATE_NEXT);\n\n return $next - $prev;\n default:\n // US (NASD) 30/360, Actual/360 or European 30/360\n return 360 / $frequency;\n }\n }", "public function Taxecumule2($part)\n\t{\n\t\t$taxecumule = 0;\n\t\t$part = $part - 1594;\n\t\tif ($part <= 0)\n\t\t\treturn (0);\n\t\telse\n\t\t{\n\t\t\t$taxecumule = $part * 55 / 100;\n\t\t\treturn ($taxecumule);\n\t\t}\n\t\treturn (-1);\n\t}", "function get_divide_denial_accounts()\n\t{\n\t return $this->db->select()\n\t\t ->from('pamm_accounts')\n\t\t ->where('divide_denial','1')\n\t\t ->get()->result();\n\t}", "function convert_cm_to_feet($cm_value)\n{\n\t//TODO: Convert cm to feet eg. 5'7\n\treturn $cm_value;\n}", "function getMainArticleID($db) {\n $sql = \"SELECT ArticleID FROM Featured WHERE FeaturedType = 'Main';\";\n $result = mysqli_query($db, $sql);\n\n $row = mysqli_fetch_array($result, MYSQLI_ASSOC);\n return $row['ArticleID'];\n}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('ActivityEfficiencyFormulas');\n }", "function getPairValue($pair,$type='ask') { \r\n\t$curl = new Curl;\r\n\t$ticker = (array)$curl->get(\"https://api.bitfinex.com/v1/pubticker/$pair\");\r\n\treturn $ticker[$type];\r\n}", "function evclid($name1, $name2, $film1, $film2, $t)\n{\n $res = sqrt( \n\tpow($t->$name1->$film1 - $t->$name2->$film1,2 )\n\t+ pow ($t->$name1->$film2 - $t->$name2->$film2,2)\n );\n\n #return 1/(1+$res);\n return $res;\n}", "public function adj_get_brand_category_name($parameter){\n // print_r($parameter);\n $storedProcedure='adj_get_brand_category_name';\n $this -> dbmodel = new DBModel();\n $retrieval = $this -> dbmodel -> call_dbFunction($storedProcedure, $parameter);\n \n $i=0;\n $data=array();\n while($row=mysql_fetch_array($retrieval)){\n $data[$i]['category_id'] = $row['id'];\n $data[$i]['b_category_name'] = $row['b_category_name'];\n $data[$i]['check_val'] = $row['check_val'];\n \n $i++;\n }\n $retrieval = $this -> dbmodel -> make_result($data);\n \n return $retrieval;\n }", "function extra_calc_scenario_two($base, $goal) {\n\tif ($base >= $goal) {\n\t\treturn 0;\n\t} else {\n\t\t$ce_db = access_db();\n\n\t\t$diff = $goal - $base;\n\t\t$curr_data = $_COOKIE['ce_info'];\n\t\t$pieces = explode(\"|\" , $curr_data);\n\t\t$account_id = $pieces[0];\n\t\t$account_name = $pieces[1];\n\t\t$game_id = $pieces[2];\n\t\t$period_id = $pieces[3];\n\t\t$company_id = $pieces[4];\n\t\t$plant_id = $pieces[5];\n\t\t$game_start_date = $pieces[6];\n\t\t$game_period_id = $pieces[7];\n\n\t\t$query = \"SELECT * FROM ce_game WHERE game_id = $game_id AND game_period_id = $game_period_id\";\n\t\t$result = $ce_db->get_results($query, ARRAY_A);\n\t\t$carbon_price = $result[\"carbon_price_last_perd\"];\n\n\n\t}\n}", "function ObtenerDisc($userSec, $periodA)\n{\n\tglobal $con;\n\t\n\t$query_ConsultaFuncion = sprintf(\"SELECT discountcode FROM cart WHERE id_student = %s AND id_term = %s\",\n\t\t\t\t\t\t\t\t\t\t GetSQLValueString($userSec, \"int\"),\n\t\t\t\t\t\t\t\t\t\t GetSQLValueString($periodA, \"int\"));\n\t//echo $query_ConsultaFuncion;\n\t$ConsultaFuncion = mysqli_query($con, $query_ConsultaFuncion) or die(mysqli_error($con));\n\t$row_ConsultaFuncion = mysqli_fetch_assoc($ConsultaFuncion);\n\t$totalRows_ConsultaFuncion = mysqli_num_rows($ConsultaFuncion);\n\t\n\treturn $row_ConsultaFuncion[\"discountcode\"];\t\n\t\n\tmysqli_free_result($ConsultaFuncion);\n}", "function distance_lookup($c1,$c2,$distance_table){\n //TODO make this return infinite if there's nothing in the table\n return $distance_table[$c1][$c2]['duration']['value'];\n}", "function getCalibrationMaxSerial($DbConnection)\n{\n\t$query =\"select Max(sno)+1 as seiral_no from calibration\"; \n\t$result=mysql_query($query,$DbConnection);\n\t$row=mysql_fetch_row($result);\n\treturn $row[0];\n}", "static public function ctrCalcularFolio(){\r\n\r\n\t\t$tabla = \"banco1219\";\r\n\r\n\t\t$respuesta = ModeloBanco1219Diario::mdlCalcularFolio($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "function calculatePrice( &$item ) {\r\n\t\r\n\tglobal $db, $site;\r\n\t\r\n\t$resultPrice = $basePrice = $item['price'];\r\n\t\r\n\t$pricing = $db->getAll( 'select * from '. ATTRPRICING_TABLE.\" where product_id='$item[id]' and site_key='$site'\" );\r\n\t\r\n\tforeach ( $pricing as $pidx=>$price ) {\r\n\t\t\r\n\t\t$match = true;\r\n\t\t\r\n\t\tif ( $item['attributes'] )\r\n\t\tforeach( $item['attributes'] as $attr_id=>$attr ) {\r\n\t\t\t\r\n\t\t\t$values = $db->getRow( 'select value1, value2 from '. ATTRPRICEVALUES_TABLE.\" where price_id='$price[id]' and attr_id='$attr_id'\" );\r\n\t\t\t\r\n\t\t\tif ( !$values )\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t$value1 = $values['value1'];\r\n\t\t\t$value2 = $values['value2'];\r\n\t\t\t$value = $attr['value'];\r\n\t\t\r\n\t\t\tswitch( $attr['type'] ) {\r\n\t\t\t\tcase 'number':\r\n/*\t\t\t\t\tif ( strlen( $value1 ) )\r\n\t\t\t\t\t\t$match &= $value >= $value1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ( strlen( $value2 ) )\r\n\t\t\t\t\t\t$match &= $value <= $value2;\r\n\t\t\t\t\tbreak;\r\n*/\t\t\t\t\t\r\n\t\t\t\tcase 'single-text':\r\n\t\t\t\tcase 'multi-text':\r\n\t\t\t\tcase 'date':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$match &= $value == $value1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( $match ) {\r\n\t\t\t$resultPrice = getPriceValue( $price, $basePrice );\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $resultPrice;\r\n\t\r\n}", "private function get_disc_max_price() : float {\n\t\tpreg_match( '/runParams\\.actMaxPrice=\"(.*?)\";/s', $this->request, $matches );\n\t\tif ( empty( $matches[1] ) ) {\n\t\t\treturn 0.0;\n\t\t}\n\t\treturn floatval( $matches[1] );\n\t}", "public function FaciPerClassHandle(){\n # include the needed / required library\n require_once('DBConnection.php');\n # instantiate the DBConnection and assign it to the faciperfaciperclass attribute DB_CONNECTION \n $databaseConnection = new DBConnection();\n $this->DB_CONNECTION = $databaseConnection->DB_CONNECTION;\n }", "function getfid_tid($tid)\n{\n $fid = mysql_fetch_array(mysql_query(\"SELECT fid FROM ibwf_topics WHERE id='\".$tid.\"'\"));\n return $fid[0];\n}", "public function getFeasibilityPlus($idea_id,$version = 0){\r\n \r\n $model = new Ynidea_Model_DbTable_Ideavotes; \r\n $select = $model->select()\r\n ->from('engine4_ynidea_ideavotes',array('SUM(feasibility_plus) AS feasibility_plus'))\r\n ->where('idea_id = ?',$idea_id)->where('version_id=?',$version); \r\n $row = $model->fetchRow($select);\r\n return $row->feasibility_plus; \r\n }", "public function getFaciPerClassItem ($item, $FaciPerClassId) {\n /*if ($this->DB_CONNECTION == NULL) {\n return $errorArray['DB_NOTCONNECTED'];\n }\n else {*/\n # protection against SQL injection, add slashes to escape all escape characters\n $FaciPerClassId = addslashes($FaciPerClassId);\n $item = addslashes($item);\n # prepare the statement\n $statement = \"SELECT $item FROM faciperfaciperclass WHERE idfaciperfaciperclass = '$FaciPerClassId'\";\n # query & check if error has occured\n if(!$result = mysql_query($statement)) {\n return $errorArray['DB_QUERYERROR'] . ' -[FaciPerClassHandle:getFaciPerClassItem]';\n }\n else {\n # debugging purposes <remove on production> \n //echo \"got it\";\n \n # get the entry values\n $resultArray = mysql_fetch_assoc($result);\n # return the values \n return $resultArray[$item];\n } \n //}\n }", "function get_focal_point_permohonan($where) {\n $CI = & get_instance();\n $CI->load->database();\n\n $CI->db->from('m_pdln as mp');\n $CI->db->where($where);\n $id_fp = $CI->db->get()->row()->unit_fp;\n return $id_fp;\n}", "public function prepareSaveFactors($params) {\n \textract($params);\n \t$reduction = new ReductionScheme($db);\n \t$reduction->setFactors($facilityID,$AREfactor,$TEfactor);\n }", "function get_portfolio($connection, $id, $symbol)\n{\n try {\n $sql = \"SELECT symbol, amount FROM portfolio WHERE userId = ? AND symbol = ?\";\n $statement = runQuery($connection, $sql, array($id, $symbol));\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n return $result;\n }\n catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('CompFact');\n }", "public function getFaciPerClass ($FaciPerClassId) {\n # check if the DB_CONNECTION has connected to the database\n /*if ($this->DB_CONNECTION == NULL) {\n return $errorArray['DB_NOTCONNECTED'];\n }\n else {*/\n # protection against SQL injection, add slashes to escape all escape characters\n $FaciPerClassId = addslashes($FaciPerClassId);\n # prepare the statement\n $statement = \"SELECT * FROM faciperfaciperclass WHERE idfaciperfaciperclass = '$FaciPerClassId'\";\n # query & check if error has occured\n if(!$result = mysql_query($statement)) {\n return $errorArray['DB_QUERYERROR'] . ' -[FaciPerClassHandle:getFaciPerClass]';\n }\n else {\n # debugging purposes <remove on production> \n //echo \"got it\";\n \n # get the entry values\n $resultArray = mysql_fetch_array($result);\n # return the values \n return $resultArray;\n }\n //}\n }", "function estcalcinksidespart($quoteid, $quotestockid) {\n global $conn, $lang,$userid,$active_company;\n $sides=1;\n $recordSet=&$conn->Execute('select estquotestockink.side from estquote,estquotestock,estquotestockink where estquote.id=estquotestock.quoteid and estquotestock.id=estquotestockink.quotestockid and estquotestockink.quotestockid='.sqlprep($quotestockid).' and estquote.id='.sqlprep($quoteid));\n if ($recordSet&&!$recordSet->EOF) $sides=$recordSet->fields[0];\n return $sides;\n }", "function calculatePriceForRabatt(){\r\n// @ToDo remove static Values \r\n\r\n\t $basketIns = array_merge($this->basket->get_articles_by_article_type_uid_asuidlist(1)); //,$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponNormalType']),$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponRelatedType'])); // 4 and 5\r\n\t $value = array('net'=>0,'gross'=>0);\r\n\t \r\n\t foreach ($basketIns as $itemObjId) {\r\n\t\t$temp = $this->basket->basket_items[$itemObjId];\r\n\t\t$temp->recalculate_item_sums();\r\n\t\t\r\n\t\t$value['net'] += $temp->get_item_sum_net();\r\n\t\t$value['gross'] += $temp->get_item_sum_gross();\r\n\t }\r\n\r\n\t if($value['net']< 0){\r\n\t\t$value['net'] = 0;\r\n\t }\r\n\r\n\t if($value['gross'] < 0){\r\n\t\t$value['gross'] = 0;\r\n\t }\r\n\t return $value;\r\n\t}", "public function totalq1($modalite)\r\n\t{\r\n\t$conge = new Default_Model_Conge();\r\n\t$debut_mois = $this->getAnnee_reference().'-01-01';\r\n\t$fin_mois = $this->getAnnee_reference().'-12-31'; // il faut la remplacer par l'annee de reference\r\n\t\r\n\t\r\n\t$jours_ouvres_de_annee_ref = $conge->joursOuvresDuMois($debut_mois,$fin_mois);\r\n\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t$personne = new Default_Model_Personne();\r\n\t$id_entite =1; // MBA : pourquoi entite 1 pour personne? \r\n\t$personne = $personne->fetchall('id_entite ='.$id_entite. '&&'. 'id ='.$this->getPersonne()->getId());\r\n\t//var_dump($personne);\r\n\tif (null!==$personne)\r\n\t\r\n\t{\r\n\t\tif ($modalite == 4)\r\n\t\t{\r\n\t\t\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t\t\tif($nbr_heurs_ouvrees_annee >1607)\r\n\t\t\t{\r\n\t\t\t\treturn 0.5;\r\n\t\t\t}\r\n\t\t\telseif($nbr_heurs_ouvrees_annee <1607.5)\r\n\t\t\t{\r\n\t\t\t\treturn 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 5 ||$modalite == 6 )\r\n\t\t{\r\n\t\t\t$nbr_jours_ouvrees_annee = $jours_ouvres_de_annee_ref-243;\r\n\t\t\tif($nbr_jours_ouvrees_annee < 10)\r\n\t\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t\t}\r\n\t\t\telseif($nbr_jours_ouvrees_annee >10)\r\n\t\t\t{\r\n\t\t\t\treturn $nbr_jours_ouvrees_annee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 1 ||$modalite == 2 ||$modalite == 3)\r\n\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\telse return 0;\r\n\t\r\n\t}", "public function getFeasibilityMinus($idea_id,$version = 0){\r\n \r\n $model = new Ynidea_Model_DbTable_Ideavotes; \r\n $select = $model->select()\r\n ->from('engine4_ynidea_ideavotes',array('SUM(feasibility_minus) AS feasibility_minus'))\r\n ->where('idea_id = ?',$idea_id)->where('version_id=?',$version); \r\n $row = $model->fetchRow($select);\r\n return $row->feasibility_minus; \r\n }", "public function getCompanyRate($companyName,$rate) {\n\n$con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect($this->myHost, $this->username, $this->password));\nif (!$con)\n {\n die('Could not connect: ' . ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n }\n\n((bool)mysqli_query( $con, \"USE \" . $this->database));\n\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT ($rate) as rate FROM Company WHERE companyName = '$companyName' \");\n\nwhile($row = mysqli_fetch_array($result))\n {\nreturn $row['rate'];\n }\n\n}", "function calcDTI() {\n try {\n $results = $db->query(\"SELECT * FROM borrower_tbl WHERE id='\" . $borrowerId . \"';\" );\n } catch (Exception $e) {\n echo \"Could not connect to database!: \" . $e->getMessage();\n exit;\n }\n $borrower = $results->fetchAll(PDO::FETCH_ASSOC);\n \n }", "abstract function getPriceFromAPI($pair);", "public function getPairsFee($pairs) {\n\t\treturn $this->makePublicMethod( self::PUBLIC_METHOD_FEE, $pairs);\n\t}", "function getPrimary(string $table);", "function weight_factor($section, $rating_rules){\r\n\t$weight_fact = 1 ;\r\n\tforeach($rating_rules as $kew=> $val){\r\n\t\tif(!empty($section) & $val['RatingRule']['section'] == $section){\r\n\t\t\t$weight_fact=$val['RatingRule']['Weight_factor'];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn ($weight_fact);\r\n}", "function CONCEPTO($_ARGS, $_CONCEPTO) {\r\n\t$sql = \"SELECT Monto\r\n\t\t\tFROM pr_tiponominaempleadoconcepto\r\n\t\t\tWHERE\r\n\t\t\t\tCodTipoNom = '\".$_ARGS['NOMINA'].\"' AND\r\n\t\t\t\tPeriodo = '\".$_ARGS['PERIODO'].\"' AND\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tCodOrganismo = '\".$_ARGS['ORGANISMO'].\"' AND\r\n\t\t\t\tCodTipoProceso = '\".$_ARGS['PROCESO'].\"' AND\r\n\t\t\t\tCodConcepto = '\".$_CONCEPTO.\"'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) $field = mysql_fetch_array($query);\r\n\treturn $field['Monto'];\r\n}", "public static function findRDV($NuMedecin,$value, $column = 'id_rdv', $table_name = 'rdv') {\n $data = Model::findBy($value, $column, $table_name);\n if(($data != null) && ($data['Nu_medecin']==$NuMedecin)){\n $rdv = new RDV();\n $rdv->setIdRDV($data['id_rdv']);\n $rdv->setCINP($data['CIN']);\n $rdv->setNuMedecin($data['Nu_medecin']);\n $rdv->setDateRdv($data['date_rdv']);\n $rdv->setEtat($data['Etat']);\n return $rdv;\n }else {\n return null;\n }\n\n\n }", "private static function itemToItemSimilarityMatrix($matrixRanking){\n\t\t$numerator=0;\n\t\t$denominator=1;\n\t\t$itemToItemSimilarityMatrix=array($matrixRanking[0]);\n\t\tfor ($i=0; $i < count($itemToItemSimilarityMatrix[0]); $i++) { //Creates associative arrays with key value (id object learning) and empty spaces to put the results from similarity cosine\n\t\t\t$tmpNew = array($itemToItemSimilarityMatrix[0][$i]=>$itemToItemSimilarityMatrix[0][$i]) + array_fill(0,count($itemToItemSimilarityMatrix[0]), '');\n\t\t\t$itemToItemSimilarityMatrix[]=$tmpNew;\n\t\t}\n\t\tfor ($i=0; $i < count($matrixRanking[0]); $i++) { // We create two item-vectors, v1 for item m1 and v2 for item m2, in the user-space of (u2,u3) and then find the cosine of angle between these vectors. A zero angle or overlapping vectors with cosine value of 1 means total similarity (or per user, across all items, there is same rating) and an angle of 90 degree would mean cosine of 0 or no similarity. Thus, the two item-vectors would be,\n //v1 = 5 u2 + 3 u3\n //v2 = 3 u2 + 3 u3\n\n\t\t\tfor ($j=($i+1); $j < count($matrixRanking[0]); $j++) { //The cosine similarity between the two vectors, v1 and v2, would then be:\n //cos(v1,v2) = (5*3 + 3*3)/sqrt[(25 + 9)*(9+9)] = 0.76\n\t\t\t\tfor ($k=1; $k < count($matrixRanking); $k++) { \n\t\t\t\t\t$v1=$matrixRanking[$k][$i];\n\t\t\t\t\t$v2=$matrixRanking[$k][$j];\n\t\t\t\t\t\n\t\t\t\t\tif($v1!=''&&$v2!=''){\n\t\t\t\t\t\t$numerator=$numerator+($v1*$v2);\n\t\t\t\t\t\t$tmpSum=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor ($l=0; $l < count($matrixRanking[0]); $l++) { \n\t\t\t\t\t\t\tif($matrixRanking[$k][$l]!=''){\n\t\t\t\t\t\t\t$tmpSum=$tmpSum+pow($matrixRanking[$k][$l],2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$denominator=$denominator*sqrt($tmpSum);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$cos=$numerator/$denominator;\n\t\t\t\t$itemToItemSimilarityMatrix[$i+1][$i]=1;\n\t\t\t\t$itemToItemSimilarityMatrix[$i+1][$j]=$cos;\n\t\t\t\t$itemToItemSimilarityMatrix[$j+1][$i]=$cos;\n\t\t\t\t\n\t\t\t\t$numerator=0;\n\t\t\t\t$denominator=1;\n\t\t\t}\n\t\t}\n\t\treturn $itemToItemSimilarityMatrix;//We now have the complete item-to-item similarity matrix as follows:\n// \t\tm1\t m2\t m3\n// m1\t1\t 0.76\t0.78\n// m2\t0.76\t1\t 0.86\n// m3\t0.78\t0.86\t1\n\t}", "function getUnitCost( $modelid, $dealerid, $cost )\n{\nglobal $db;\n\n//08.21.2015 ghh - first we're going to see if there is a dealer specific price for \n//this item and if so we'll just pass it back\n$query = \"select Cost from UnitModelCost where ModelID=$modelid and \n\t\t\t\tDealerID=$dealerid\";\nif (!$result = $db->sql_query($query))\n\t{\n\tRestLog(\"Error 16562 in query: $query\\n\".$db->sql_error());\n\tRestUtils::sendResponse(500,\"16562 - There was a problem attempting find the dealer cost\"); //Internal Server Error\n\treturn false;\n\t}\n\n$row = $db->sql_fetchrow( $result );\n\n//if there is a cost then lets just return it.\nif ( $row['Cost'] > 0 )\n\treturn $row['Cost'];\n\nreturn $cost;\n}", "function getCreateCompound($parameters){\n\t$ownConnection = false;\n\t//Make a connection to the DB if none is given.\n\tif(isset($parameters['connection'])){\n\t\t\t$connection = $parameters['connection'];\n\t}\n\telse{\n\t\t$connection = makeConnectionToDIAMONDS();\n\t\t$ownConnection = true;\n\t}\n\t\n\t//Create variables to allow for non-required fields to be empty when creating the compound\n\t$compoundName = ''; \n\t$compoundCAS = ''; \n\t$compoundAbbr ='';\n\t$compoundOfficialName = '';\n\t$compoundSynonyms = '';\n\t\n\tif(isset($parameters['name'])){\n\t\t$compoundName = $parameters['name'];\n\t}else{ echo \"Did not specify a compoundName to search a compound!\";}\n\t\n\tif(isset($parameters['casNumber'])){\n\t\t$compoundCAS = $parameters['casNumber'];\n\t}else{ echo \"Did not specify a compoundCAS to search a compound!\";}\n\t\n\tif(isset($parameters['abbreviation'])){\n\t\t$compoundAbbr = $parameters['abbreviation'];\n\t}\n\t\n\tif(isset($parameters['officialName'])){\n\t\t$compoundOfficialName = $parameters['officialName'];\n\t}\n\t//If synonyms are submitted, insert them into tcompoundsynonyms if not already present\n\tif(isset($parameters['synonyms'])){\n\t\t$compoundSynonyms = $parameters['synonyms'];\n\t}\n\n\t//Check if compound already exist\n\t$query = \"SELECT idCompound FROM tCompound WHERE casNumber = '$compoundCAS'\";\n\tif ($result = mysqli_query($connection, $query)) {\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\treturn $row['idCompound'];\n\t\t}\n\t}\n\t\n\t//Create compound if it does not already exist\n\t$sqlStatement = \"INSERT INTO tCompound (name, casNumber, abbreviation, officialName)\n\tVALUES (?,?,?,?)\";\n\t\n\t$sqlQuery = prepareSQLStatement($connection, $sqlStatement);\n\t\n\t//Bind the variables to the SQL parameters\n\t$sqlQuery->bind_param('ssss',\n\t$compoundName,\n\t$compoundCAS,\n\t$compoundAbbr,\n\t$compoundOfficialName\n\t);\n\t\n\t$id = executeSQLStatementGetID($connection, $sqlQuery);\n\t//Also add the synonyms to this compound if any were given, else just return the id\n\tif($compoundSynonyms != ''){\n\t\tforeach(explode(',',$compoundSynonyms) as $compoundSyn){\n\t\t\t$sqlStatement = \"INSERT INTO tCompoundsynonyms (idCompound, synonym)\n\t\tVALUES (?,?)\";\n\t\t\n\t\t\t$sqlQuery = prepareSQLStatement($connection, $sqlStatement);\n\t\t\t\n\t\t\t//Bind the variables to the SQL parameters\n\t\t\t$sqlQuery->bind_param('ds',\n\t\t\t$id,\n\t\t\t$compoundSyn\n\t\t\t);\n\t\t\t\n\t\t\texecuteSQLStatementGetIDNonID($connection, $sqlQuery);\n\t\t}\n\t}\n\t\n\t$connection->commit();\n\t\n\tif($ownConnection == true){\n\t\tcloseConnectionDB($connection);\n\t}\n\treturn $id;\n\t\n}", "function ULTIMO_CONCEPTO($_CONCEPTO) {\r\n\tglobal $_ARGS;\r\n\t$sql = \"SELECT Monto\r\n\t\t\tFROM pr_tiponominaempleadoconcepto\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tPeriodo < '\".$_ARGS['PERIODO'].\"' AND\r\n\t\t\t\tCodConcepto = '\".$_CONCEPTO.\"'\r\n\t\t\tORDER BY Periodo DESC\r\n\t\t\tLIMIT 0, 1\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) $field = mysql_fetch_array($query);\r\n\treturn $field['Monto'];\r\n}" ]
[ "0.58923936", "0.5406703", "0.52434677", "0.48543575", "0.4839819", "0.469212", "0.467898", "0.4612812", "0.45833796", "0.4533701", "0.4524233", "0.45230362", "0.4512122", "0.45047995", "0.44994777", "0.44635758", "0.4456885", "0.43951088", "0.43903002", "0.43697584", "0.43500063", "0.43494195", "0.43475246", "0.4341942", "0.4334254", "0.43043473", "0.42944166", "0.4293232", "0.4292172", "0.42883018", "0.42800018", "0.42795885", "0.42687872", "0.4263158", "0.42619386", "0.42594662", "0.42508885", "0.42486438", "0.42421326", "0.42415628", "0.42408052", "0.4237749", "0.42312497", "0.4214289", "0.42114687", "0.42072", "0.4203889", "0.4201008", "0.41999763", "0.4188815", "0.41659656", "0.41583562", "0.41578695", "0.41551843", "0.41496247", "0.41445875", "0.414239", "0.41359004", "0.41287965", "0.41240203", "0.4120893", "0.41043442", "0.41016048", "0.41004524", "0.4093489", "0.40909174", "0.4090748", "0.40880227", "0.40841332", "0.40830964", "0.40807182", "0.40805402", "0.40753523", "0.40651727", "0.40637895", "0.40632364", "0.4063063", "0.40585044", "0.40574735", "0.40551957", "0.40409774", "0.4040244", "0.4037037", "0.40327945", "0.4032351", "0.40314266", "0.4028117", "0.4027674", "0.40261373", "0.4022308", "0.40190026", "0.40162078", "0.40139103", "0.40060818", "0.40045455", "0.40032706", "0.4002251", "0.3999853", "0.3999203", "0.39985323" ]
0.80697685
0
/ For all of the associative arrays passed through $_GET if (Proximity == 1) get_factor($Atom1, $Atom2, $BondOrder, $primary_tb); get_factor($Atom1, $Atom2, $BondOrder, $secondary_tb); primary secondary is the number. else get_factor($Atom1, $Atom2, $BondOrder, $secondary_tb); Add everything together, and that is the answer.
function process_factor_query($is_aromatic_ring) { global $PRIMARY_TB, $SECONDARY_TB, $l_0; $bonds = json_decode($_GET['json_query'], true); $sum = 0; foreach ($bonds as $bond) { // $bond has keys: Atom1, Atom2, BondOrder, Proximity if ($bond["Proximity"] == 1) { $f = get_factor($bond["Atom1"], $bond["Atom2"], $bond["BondOrder"], $PRIMARY_TB); $l_char = "<i>L</i>"; } elseif ($bond["Proximity"] == 2) { $f = get_factor($bond["Atom1"], $bond["Atom2"], $bond["BondOrder"], $SECONDARY_TB); $l_char = "<i>l</i>"; } $sum += $f; if ($bond["BondOrder"] == 1) { $bond_char = "-"; } elseif ($bond["BondOrder"] == 2) { $bond_char = "="; } elseif ($bond["BondOrder"] == 3) { $bond_char = "&equiv;"; } echo "<p>".$l_char."<sub>".$bond["Atom1"].$bond_char.$bond["Atom2"]."</sub> = ".$f."</p>"; } if ($is_aromatic_ring == "true") { $sum += $l_0; echo "<p>l<sub>0</sub> = ".$l_0."</p>"; } echo "<h4>&beta; = ".($sum+1)."</h4>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_factor($Atom1, $Atom2, $BondOrder, $tb_name) {\n\t\n\tglobal $conn;\n\tglobal $PRIMARY_TB;\n\t\n\t// Check if all the parameters are valid\n\tif (!$Atom1) {\n\t\tdie(\"Atom 1 is not specified.\");\n\t} elseif (!$Atom2) {\n\t\tdie(\"Atom 2 is not specified.\");\n\t} elseif (!$BondOrder) {\n\t\tdie(\"Bond order is not specified.\");\n\t}\n\n\t$query_str = \"SELECT Factor FROM $tb_name \".\n\t \"WHERE (Atom1='$Atom1' AND Atom2='$Atom2')\".\n\t \"AND BondOrder=$BondOrder\";\n\t$result = $conn->query($query_str);\n\t\n\t\n\t// Everything is ok\n\tif ($result->num_rows == 1) {\n\t\t$row = $result->fetch_assoc();\n\t\treturn $row['Factor'];\n\t}\n\t\n\t// There is something wrong\n\tif ($BondOrder == 1) {\n\t\t$boName = \"single\";\n\t} elseif ($BondOrder == 2) {\n\t\t$boName = \"double\";\n\t} elseif ($BondOrder == 3) {\n\t\t$boName = \"tripple\";\n\t} else {\n\t\t$boName = $BondOrder;\n\t}\n\n\t// If such bond DNE, print error\n\tif($result->num_rows == 0) {\n\t\tif ($tb_name == $PRIMARY_TB) {\n\t\t\tdie(\"The $Atom1-$Atom2 $boName bond does not exist in the database.\");\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\t\n\t// If there are multiple entries\n\tif ($result->num_rows > 1) {\n\t\tdie(\"There are multiple entries in the database of the $Atom1-$Atom2 $boName bond.\");\n\t}\n\t\n}", "function sim_distance($prefs, $p1, $p2){\r\n\t//returns the distance based on the similarity between the persons\r\n\t$sharedItems = array();\r\n\t$sum_sq = 0;\r\n\t//get the movie list for person 2\r\n\t$keys = array_keys($prefs[$p2]);\r\n\t//print_r($keys);\r\n\r\n\t//get the list of common things between the two\r\n\tforeach($prefs[$p1] as $k => $v){\r\n\t\tif(in_array($k, $keys)){\r\n\t\t\t$sharedItems[] = $k;\r\n\t\t\t//calculating the diiference in rating\r\n\t\t\t$diff = $prefs[$p2][$k] - $prefs[$p1][$k];\r\n\t\t\t$sum_sq += pow($diff, 2); \r\n\t\t}\r\n\t}\r\n\t//echoing everything\r\n\t//print_r($sharedItems);\r\n\r\n\t//if there is no similarity return the zero\r\n\tif($sum_sq === 0){\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t//calculating the distance\r\n\t$dist = pow($sum_sq, 1/2);\r\n\treturn 1 / (1 + $dist);\r\n}", "function old_calculate_position($fingerPrints, $user_signals)\n{\n\n\t$closest_distance = 100000000.0;\n\t$closest_coordinates = \"000,000\";\n\t$closest_room = \"default\";\n\t$a = 0;\n\tforeach ($fingerPrints as $outer) {\n\t\t$temp_sum = 0.0;\n\t\tforeach ($outer as $value) {\t\n\t\t\tforeach($user_signals as $mac => $sig) {\n\t\t\t\tif ($mac == $value->get_mac()) {\n\t\t\t\t\t$signal_distance = $value->get_average() - $sig;\n\t\t\t\t\t$absolute_distance = abs($signal_distance);\n\t\t\t\t\t$temp_sum = $temp_sum + $absolute_distance;\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\t\t\t \n\t\t}\n\t\tif ($temp_sum < $closest_distance) {\n\t\t\t$closest_distance = $temp_sum;\n\t\t\t$closest_coordinates = $fingerPrints[$a][0]->get_position();\n\t\t$closest_room = $fingerPrints[$a][0]->get_room();\n\t\t}\n\t\t$a = $a + 1;\n\t}\n\techo $closest_coordinates; \n\techo \"_\";\n\techo $closest_room;\n}", "function calc_dream_mp_score_a($db, $dreamid, $personid) {\n global $pwpdo;\n $query = \"select pw_vote.vote as mpvote, pw_dyn_dreamvote.vote as dreamvote from\n pw_vote, pw_dyn_dreamvote, pw_division, pw_mp where\n pw_vote.division_id = pw_division.division_id and\n pw_dyn_dreamvote.division_number = pw_division.division_number and\n pw_dyn_dreamvote.division_date = pw_division.division_date\n and pw_vote.mp_id = pw_mp.mp_id\n and pw_mp.person = ? and pw_dyn_dreamvote.dream_id = ?\";\n\n $qrowarray=$pwpdo->fetch_all_rows($query,array($personid,$dreamid));\n $t = 0.0;\n $c = 0.0;\n foreach ($qrowarray as $qrow)\n {\n $weight = 1;\n $mpvote = $qrow['mpvote'];\n $mpvote = str_replace(\"tell\", \"\", $mpvote);\n $dreamvote = $qrow['dreamvote'];\n if ($dreamvote == \"aye3\" or $dreamvote == \"no3\") {\n $dreamvote = str_replace(\"3\", \"\", $dreamvote);\n $weight = 3;\n }\n $t += $weight;\n\n if ($mpvote == $dreamvote)\n $c += $weight;\n elseif ($mpvote == \"both\" or $dreamvote == \"both\")\n $c = $c + ($weight / 2);\n }\n\n return array($c, $t);\n}", "function postcode_dist($postcode1, $postcode2, $suburb1 = '', $suburb2 = '') {\n//Get lat and lon for postcode 1\n $extra = \"\";\n if ($suburb1 != '') {\n $extra = \" and suburb = '$suburb1'\";\n }\n $sqlquery = \"SELECT * FROM postcode_db WHERE lat <> 0 and lon <> 0 and postcode = '$postcode1'$extra\";\n $res = mysqli_query($sqlquery);\n $num = mysqli_num_rows($res);\n\n\n//Get lat and lon for postcode 2\n\n $extra = \"\";\n if ($suburb2 != '') {\n $extra = \" and suburb = '$suburb2'\";\n }\n $sqlquery = \"SELECT * FROM postcode_db WHERE lat <> 0 and lon <> 0 and postcode = '$postcode2'$extra\";\n $res1 = mysqli_query($sqlquery);\n $num1 = mysqli_num_rows($res1);\n\n if ($num != 0 && $num1 != 0) {\n//proceed\n $lat1 = mysql_result($res, 0, \"lat\");\n $lon1 = mysql_result($res, 0, \"lon\");\n $lat2 = mysql_result($res1, 0, \"lat\");\n $lon2 = mysql_result($res1, 0, \"lon\");\n $dist = calc_dist($lat1, $lon1, $lat2, $lon2);\n if (is_numeric($dist)) {\n return $dist;\n } else {\n return \"Unknown\";\n }\n } else {\n return \"Unknown\";\n }\n}", "function noun_scoring($id, $base_form, $noun2, $host, $uname, $pass, $dbname){\n\n\t$conn = new mysqli ($host,$uname,$pass,$dbname);\n\n\t$score = $count = 0;\n\t$syn_tok = $noun_tok = \"\";\n\t\n\t$sql = $conn->query(\"SELECT synset FROM synset_table WHERE synset LIKE '% \".$base_form.\",%' OR synset like '%, \".$base_form.\"' OR synset like '\".$base_form.\",%'\");\n\t$result = $sql->fetch_assoc();\n\t$synonyms = $result['synset'];\n\n\t$syn_tok = explode(\", \", $synonyms);\n\n\tfor ($i=0; $i<count($syn_tok); $i++){\n\t\t$noun2_tok = explode(\" \",$noun2);\n\n\t\tfor ($j=0; $j<count($noun2_tok); $j++){\n\n\t\t\tif ($syn_tok[$i] == $noun2_tok[$j]){\n\t\t\t\t$score+=5;\n\t\t\t\t$count++;\n\n\t\t\t\t$sql1 = $conn->query(\"SELECT num_vachana FROM morph\".$id.\" WHERE form = 'Noun' AND statement = 1 AND base_form = '\".$base_form.\"'\");\n\t\t\t\t$sql2 = $conn->query(\"SELECT num_vachana FROM morph\".$id.\" WHERE form = 'Noun' AND statement = 2 AND base_form = '\".$noun2_tok[$j].\"'\");\n\n\t\t\t\t$result1 = $sql1->fetch_assoc();\n\t\t\t\t$result2 = $sql2->fetch_assoc();\n\n\t\t\t\t$number1 = $result1['num_vachana'];\n\t\t\t\t$number2 = $result2['num_vachana'];\n\n\t\t\t\tif ($number1 == $number2){\n\t\t\t\t\t$score+=2;\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\n\t\t\t\tif ($GLOBALS['score_array'][$j] < ($score + floor($count/2))){\n\t\t\t\t\t$GLOBALS['score_array'][$j] = $score + floor($count/2);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\t}\n\n\t$conn->close();\n}", "function get_recommendations($prefs, $p1){\r\n\t//if he is very similar, then get the books from those that he has not read\r\n\r\n\t//saving the array in a different array\r\n\t$prefsOriginal = $prefs;\r\n\r\n\t//unsetting the person from the array - for whom we are getting the recommendation\r\n\tunset($prefs[$p1]);\r\n\r\n\t//array to save the person and the distance\r\n\t$personDistance = array();\r\n\r\n\t//calculating the similarity of this person with other users\r\n\tforeach($prefs as $k => $v){\r\n\t\t$dist = sim_distance($prefsOriginal, $p1, $k);\r\n\t\t$personDistance[$k] = $dist;\r\n\t}\r\n\r\n\t//sorting the array based on the distance - nearest first\r\n\tarsort($personDistance);\r\n\r\n\t//printing the top recommenders\r\n\t//print_r($personDistance);\r\n\r\n\t//getting the books from the distance people - taking top 3\r\n\t$i = 0;\r\n\t$recommendedBooks = array();\r\n\t$topBooks = array();\r\n\tforeach($personDistance as $k => $v){\r\n\t\t//get the top books for this person\r\n\t\t$topBooks = top_matches($prefs, $k, $v);\r\n\t\tif(sizeof($topBooks) >= 1){\r\n\t\t\t$recommendedBooks[] = $topBooks;\r\n\t\t\t$i += 1;\r\n\t\t}\r\n\t\tif($i > RECOM_NUM) break; //condition to take the recommendations only from the top matches\r\n\t}\r\n\t//printing the combine array\r\n\t//print_r($recommendedBooks);\r\n\r\n\t//echo ('<br><br>');\r\n\r\n\t$recBooks = array();\r\n\r\n\t//merging the arrays based on the RECOM_NUM\r\n\tforeach($recommendedBooks as $rks){\r\n\t\tforeach ($rks as $key => $value) {\r\n\t\t\t//check if the key already exists\r\n\t\t\tif(array_key_exists($key, $recBooks)){\r\n\t\t\t\t//see whether the value that we are going to insert is higher\r\n\t\t\t\tif($recBooks[$key] < $value){\r\n\t\t\t\t\t$recBooks[$key] = $value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$value = $recBooks[$key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$recBooks[$key] = $value;\t\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//getting the name of the books\r\n\t//$recBooks = array_keys($recBooks);\r\n\t//print_r($recBooks);\r\n\r\n\t//subtracting the items that the user has already seen\r\n\tforeach($prefsOriginal[$p1] as $k => $v){\r\n\t\t// echo('kitaab hai = '.$k);\r\n\t\t// echo ('<br>');\r\n\t\tif (in_array($k, $recBooks)){\r\n\t\t\t$key = array_search($k, $recBooks);\r\n\t\t\t//print $key;\r\n\t\t\tunset($recBooks[$key]);\r\n\t\t}\r\n\t}\r\n\r\n\t//getting the order of the books in which to display based on the rating match\r\n\t//sorting the array based on the key\r\n\tarsort($recBooks);\r\n\r\n\t//printing after removing the read books\r\n\t//echo ('<br><br>');\r\n\r\n\treturn $recBooks;\r\n\r\n}", "private function EvaluateOne($DISTANCES, $GT, &$BestThreshold, &$BestFP, &$BestFN)\n {\n # Flatten and sort distances vector\n $FVKEYS = array_keys($DISTANCES);\n $FlatDists = array();\n foreach ($DISTANCES as $k => $v)\n foreach ($v as $kk => $vv)\n $FlatDists[$k . \",\" . $kk] = $vv;\n asort($FlatDists);\n \n # Start from the top\n $BestThreshold = 0;\n $BestFP = 0;\n $FP = [];\n $BestFN = $FN = count($GT);\n $step = 0.01;\n $eps = 0.00001;\n $found = [];\n foreach($GT as $file) $found[$file] = false;\n \n for ($i=0; $i<1; $i+=$step)\n {\n foreach($FlatDists as $pair => $dist)\n {\n list($left, $right) = explode(\",\", $pair);\n if (($dist < $i || abs($dist-$i) < $eps) && $dist > $i-$step)\n {\n if (in_array($left, $GT) && !$found[$left]) { $found[$left] = true; $FN--; }\n if (in_array($right, $GT) && !$found[$right]) { $found[$right] = true; $FN--; }\n if (!in_array($left, $GT) && !in_array($left, $FP))\n $FP[] = $left;\n if (!in_array($right, $GT) && !in_array($right, $FP))\n $FP[] = $right;\n }\n else if ($dist > $i-$step)\n break;\n }\n //print \"Threshold $i FP \".count($FP).\" FN $FN\\n\";\n $quality = $FN + count($FP);\n $best = $BestFP + $BestFN;\n if ($quality < $best || $i == 0)\n {\n $BestFP = count($FP);\n $BestFN = $FN;\n $BestThreshold = $i;\n }\n }\n }", "function _fourD_analysis_calculate_project_goal_weight( $nid, $uid=0, $goals, $project ) {\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); <br>----------------------------<br>' );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $goals: '.print_r($goals, true) );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); $project: '.print_r($project, true) );\n \n if( !count($goals) || !$project ){\n return 0.0;\n }\n \n $weight = 0;\n $indirectParents = array();\n if( isset($project['project_goal']) ){\n foreach( $goals as $gid=>$g ){\n\n $goal = fourD_analysis_goal_entry_get($gid, $uid);\n// fourD_analysis_debug('----- _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($goal, true) );\n\n if($goal && isset($goal['goal_weight']) ){\n if( isset($project['project_goal'][$gid]['rating']) ){\n \n// fourD_analysis_debug('+++++ _fourD_analysis_calculate_project_goal_weight; : Goal: '.$project['project_goal'][$gid]['title'].'; Info: '.print_r($project['project_goal'][$gid], true) );\n\n\n /* Direct parent and top-level are G1*W1 */\n if( _fourD_analysis_is_goal_applicable_to_project_input($nid, $g) ){\n $weight += ( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] );\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; INPUT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); INPUT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n /* Indirect parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n// elseif( _fourD_analysis_is_goal_applicable_to_project($nid, $g) ){\n// $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; APPLICABLE: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n// }\n \n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($project['project_goal'][$gid], true) );\n }\n \n \n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n }\n\n else{\n /* ALL parents are simply (*W6*W7) - Note: not (G6*W6+G7*W7) */\n if( _fourD_analysis_is_goal_parent_to_project($nid, $g) ){\n $indirectParents[$gid] = $goal['goal_weight'];\n// fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight; PARENT: Goal: '.$project['project_goal'][$gid]['title'].'; nid: '. $gid.'; W'.$gid.' = '.$goal['goal_weight'].'; G'.$gid.' = '.$project['project_goal'][$gid]['rating'].'; W'.$gid.'*G'.$gid.' = '.( $goal['goal_weight']*$project['project_goal'][$gid]['rating'] ). '; Cumlative: '.$weight );\n //fourD_analysis_debug('_fourD_analysis_calculate_project_goal_weight('.$nid.'); PARENT: Goal: '.print_r($g, true) );\n }\n }\n }\n\n\n }\n\n /* Finally, factor in any indirect parents */\n foreach($indirectParents as $nid=>$w){\n $weight = ($weight*$w);\n }\n }\n \n return $weight;\n}", "function top_matches($prefs, $p, $dist){\r\n\t//get the top rated books only\r\n\t$topBooks = array();\r\n\tforeach($prefs[$p] as $k => $v){\r\n\t\tif ($v > RATING_MIN){\r\n\t\t\t//add the code to increase the rating if there is a similarity between the users\r\n\t\t\t//checking if the distance is greater that SOMEthING, then bumping up the rating\r\n\t\t\tif ($dist > SIM_NUM){\r\n\t\t\t\t$v += $v*$dist;\t\t\r\n\t\t\t}\r\n\t\t\t$topBooks[$k] = $v;\r\n\t\t}\r\n\t}\r\n\tarsort($topBooks);\r\n\t//print_r($topBooks);\r\n\treturn $topBooks;\r\n}", "function calculateScore($aryTip, $aryResult, $blnSD, $blnUserSD)\n { \n \t$aryScore = array\n\t(\n\t\t\"perfect\" => 3,\n\t\t\"correctScore\"=> 2,\n\t\t\"correctTeam\" => 1\n\t); \t\n \t\n \t$intResultDiff = $aryResult[0] - $aryResult[1];\t\t\n\t$intTipDiff = $aryTip[0] - $aryTip[1];\t\t\t\n\t\n\t$intScore = 0;\n\tif(is_numeric($aryTip[0]) AND is_numeric($aryTip[1]))\n\t{\n\t\t/* Sudden Death? */\n\t\t//\n\t\tif(FALSE) /* SD can't be tipped anymore!! */\n\t\t{\t\n\t\t\t/* user tipped a SD? */\n\t\t\tif( $blnUserSD == $blnSD )\n\t\t\t{\n\t\t\t\t/* correct team -> PERFECT */\t\n\t\t\t\tif( ($intResultDiff * $intTipDiff) > 0 )\n\t\t\t\t{\n\t\t\t\t\t$intScore += $aryScore['perfect'] + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\t\n\t\t\t/* PERFECT */\n\t\t\tif( ($aryResult[0] == $aryTip[0]) AND ($aryResult[1] == $aryTip[1]) )\n\t\t\t{\n\t\t\t\t//echo \"perfect\";\n\t\t\t\t$intScore += $aryScore['perfect'];\n\t\t\t}\n\t\t\t/* Correct Score */\n\t\t\telseif( $intResultDiff == $intTipDiff )\n\t\t\t{\n\t\t\t\t//echo \"Correct Score\";\n\t\t\t\t$intScore += $aryScore['correctScore'];\n\t\t\t}\n\t\t\t/* correct Team */\n\t\t\telseif( ($intResultDiff * $intTipDiff) > 0 )\n\t\t\t{\n\t\t\t\t//echo \"Correct Team\";\n\t\t\t\t$intScore += $aryScore['correctTeam'];\n\t\t\t}\t\t\t\n\t\t} \t\t\n\t}\n\treturn $intScore;\n}", "function promedio_general($vector){ \n $promedio=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n $promedio=$promedio+$n;\n }\n }\n return ($promedio/10);\n }", "function score_other($id, $base_form, $other2, $host, $uname, $pass, $dbname){\n\n\t$conn = new mysqli ($host,$uname,$pass,$dbname);\n\n\t$score = $count = 0;\n\t$syn_tok = $other2_tok = \"\";\n\n\t$sql = $conn->query(\"SELECT synset FROM synset_table WHERE synset LIKE '% \".$base_form.\",%' OR synset like '%, \".$base_form.\"' OR synset like '\".$base_form.\",%'\");\n\t$result = $sql->fetch_assoc();\n\t$synonyms = $result['synset'];\n\n\tif ($synonyms){\n\t\t$syn_tok = explode(\", \", $synonyms);\n\n\t\tfor ($i=0; $i<count($syn_tok); $i++){\n\t\t\t$other2_tok = explode(\" \",$other2);\n\n\t\t\tfor ($j=0; $j<count($other2_tok); $j++){\n\t\t\t\tif ($syn_tok[$i] == $other2_tok[$j]){\n\t\t\t\t\t$GLOBALS['score_array'][$j] = $GLOBALS['incr_other'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t$other2_tok = explode(\" \",$other2);\n\n\t\tfor ($j=0; $j<count($other2_tok); $j++){\n\t\t\tif ($base_form == $other2_tok[$j]){\n\t\t\t\t$GLOBALS['score_array'][$j] = $GLOBALS['incr_other'];\n\t\t\t}\n\t\t}\n\t}\n\t\n\t$conn->close();\n}", "function absolute_distance($allRelations, $user_signals_relations)\n{\n\t$userComparison = array();\n\tforeach ($allRelations as $value) {\n\t\t$localRelations = array();\n\t\t$helperArray = $value->get_relations();\n\t\tforeach ($user_signals_relations as $key => $value_2) {\n\t\t\t$keyBackwards_firstPart = $key[18].$key[19].$key[20].$key[21].$key[22].$key[23].$key[24].\n\t\t\t\t$key[25].$key[26].$key[27].$key[28].$key[29].$key[30].$key[31]\n\t\t\t\t.$key[32].$key[33].$key[34].\"-\";\n\t\t\t$keyBackwards_secondPart = $key[0].$key[1].$key[2].$key[3].$key[4].$key[5].$key[6].\n\t\t\t\t$key[7].$key[8].$key[9].$key[10].$key[11].$key[12].$key[13].$key[14].\n\t\t\t\t$key[15].$key[16];\n\t\t\t$keyBackwards = $keyBackwards_firstPart . $keyBackwards_secondPart;\n\t\t\tif (array_key_exists($key, $helperArray)) {\n\t\t\t\t$localRelations[$key] = abs($value_2 - $helperArray[$key]); \n\t\t\t}\n\t\t\tif (array_key_exists((string)$keyBackwards, $helperArray)) {\n\t\t\t\t$localRelations[$key] = abs($value_2 + $helperArray[$keyBackwards]);\n\t\t\t}\n\t\t}\n\t\t$comparisonRelations = new FprintRelations($value->get_room(), $value->get_position(), $localRelations);\n\t\tarray_push($userComparison, $comparisonRelations);\n\t}\n\n\treturn $userComparison;\n\n\n}", "function getCompatibilityByWeight($searchee=array(), $candidate=array(), $type=1){\r\n\t\t$commonItems = 0;\r\n\t\t$sim = 0;\r\n\t\tforeach($searchee[\"MemberAttributeWeight\"] as $weight_searchee){\r\n\t\t\tforeach($candidate[\"MemberAttributeWeight\"] as $weight_candidate){\r\n\t\t\t\tif ($weight_searchee[\"attribute_id\"]==$weight_candidate[\"attribute_id\"]){\r\n\t\t\t\t\t$attribute = $this->controller->Attribute->find(\"first\", array(\"conditions\"=>array(\"Attribute.id\"=>$weight_candidate[\"attribute_id\"])));\r\n\t\t\t\t\t//if ($attribute[\"attribute_type_id\"]==$type){\r\n\t\t\t\t\t\t$commonItems++;\r\n\t\t\t\t\t\t$weight1 = $weight_searchee[\"weight\"];\r\n\t\t\t\t\t\t$weight2 = $weight_candidate[\"weight\"];\r\n\t\t\t\t\t\t$sim+=pow(($weight1-$weight2), 2);\r\n\t\t\t\t\t//}\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($commonItems>0){\r\n\t\t\t$sim = sqrt($sim/$commonItems);\r\n\t\t\t$sim = 1 - tanh($sim);\r\n\t\t\t$maxItems = min(count($searchee[\"MemberAttributeWeight\"]), count($candidate[\"MemberAttributeWeight\"]));\r\n\t\t\t$sim = $sim * ($commonItems/$maxItems);\r\n\t\t}\r\n\t\treturn $sim;\r\n\t}", "function gainRatios($last_column,$columns_after_cut,$res) {\r\n\t$res_gainRatios = array();\r\n\t\r\n\t$gain = gain($last_column,$columns_after_cut,$res);\r\n\t$splitInfo = splitInfo($columns_after_cut);\r\n\t\r\n\tfor ($i = 0; $i < count($gain); $i++){\r\n\t\tif ($splitInfo[$i] != 0){\r\n\t\t\t$temp = $gain[$i] / $splitInfo[$i];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$temp = \"SplitInfo = 0\";\r\n\t\t}\r\n\t\tarray_push($res_gainRatios, $temp);\r\n\t}\r\n\t\r\n\treturn $res_gainRatios;\r\n}", "function calculate_points($all_desired_list, $all_answers_list, $all_importance_list) {\n global $importance;\n $all_answers_array = explode(\",\", $all_answers_list);\n $all_importance_array = explode(\",\", $all_importance_list);\n $all_desired_array = explode(\",\", $all_desired_list);\n\n $total_questions = min(count($all_answers_array), count($all_importance_array), count($all_desired_array));\n\n $earned_points = 0;\n $max_points = 0;\n\n for($i = 0; $i < $total_questions; $i++) {\n if (strpos($all_desired_array[$i] , '-') !== false) {\n $all_desired_array_explode = explode(\"-\", $all_desired_array[$i]);\n $earned_points += get_points($all_desired_array_explode, $all_answers_array[$i], $all_importance_array[$i]).\"<br />\";\n } else {\n $earned_points += get_points($all_desired_array[$i], $all_answers_array[$i], $all_importance_array[$i]).\"<br />\";\n }\n $max_points += $importance[$all_importance_array[$i]];\n } \n\n if($earned_points != 0 || $max_points != 0) {\n return floor(($earned_points / $max_points) * 100);\n } else {\n return \"0\";\n }\n }", "function scoreBMI(){\n //Find the BMI of the user, and compare that to others.\n $userGender=$_POST[\"gender\"];\n $calcHeight=($_POST[\"height-ft\"] * 12)+$_POST[\"height-in\"];\n $userHeight=$calcHeight*2.54/100;\n $userWeight=($_POST[\"weight\"]*0.453592);\n\n $userBMI=$userWeight / pow($userHeight,2);\n if($userBMI < 18.5){\n $BMIpoints=7.5;\n } elseif($userBMI > 18.5 && $userBMI < 24.9){\n $BMIpoints=20;\n } elseif($userBMI > 24.9 && $userBMI < 29.9){\n $BMIpoints=10;\n } elseif($userBMI > 29.9){\n $BMIpoints=5;\n }\n return $BMIpoints;\n $url = 'data/bmi.json';\n $JSON = file_get_contents($url);\n $BMI = json_decode($JSON);\n foreach ($BMI as $category) {\n if($category->SEX == $userGender && $category->GEO == $userProvince){\n switch($userGender){\n case \"Males\":\n $baseline=68.5;\n break;\n case \"Females\":\n $baseline=73.5;\n break;\n }\n }\n }\n}", "function calculatePriceForRabatt(){\r\n// @ToDo remove static Values \r\n\r\n\t $basketIns = array_merge($this->basket->get_articles_by_article_type_uid_asuidlist(1)); //,$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponNormalType']),$this->basket->get_articles_by_article_type_uid_asuidlist($this->pObj->conf['couponRelatedType'])); // 4 and 5\r\n\t $value = array('net'=>0,'gross'=>0);\r\n\t \r\n\t foreach ($basketIns as $itemObjId) {\r\n\t\t$temp = $this->basket->basket_items[$itemObjId];\r\n\t\t$temp->recalculate_item_sums();\r\n\t\t\r\n\t\t$value['net'] += $temp->get_item_sum_net();\r\n\t\t$value['gross'] += $temp->get_item_sum_gross();\r\n\t }\r\n\r\n\t if($value['net']< 0){\r\n\t\t$value['net'] = 0;\r\n\t }\r\n\r\n\t if($value['gross'] < 0){\r\n\t\t$value['gross'] = 0;\r\n\t }\r\n\t return $value;\r\n\t}", "private function calcDistScores() {\n foreach ($this->cities as $city) { \n $cityLat = $city['Latitude'];\n $cityLong = $city['Longitude']; \n $distance = $this->distance($cityLat, $cityLong, \n $this->latitude, $this->longitude);\n $this->distScores[] = $distance; \n }\n }", "function getCompatibilityByWeight2($searchee=array(), $candidate=array()){\r\n\t\t$similarItems = $this->getSimilarItems ( $searchee, $candidate );\r\n\t\t$n = count($similarItems);\r\n\t\tif ($n==0){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t$sum1 = $this->sumUpWeights($searchee, $similarItems);\r\n\t\t$sum2 = $this->sumUpWeights($candidate, $similarItems);\r\n\t\t$sumPow1 = $this->sumUpWeights($searchee, $similarItems, \"sumpower\");\r\n\t\t$sumPow2 = $this->sumUpWeights($candidate, $similarItems, \"sumpower\");\r\n\t\t$sameItems1 = $this->getSimilarItemsPerPerson($searchee, $similarItems);\r\n\t\t$sameItems2 = $this->getSimilarItemsPerPerson($candidate, $similarItems);\r\n\t\t$sumMul = 0;\r\n\t\tfor($i=0;$i<$n;$i++){\r\n\t\t\t$sumMul += ($sameItems1[$i][\"weight\"]*$sameItems2[$i][\"weight\"]);\r\n\t\t}\r\n\t\t//$numerator = $sumMul*$n - (($sum1*$sum2)/$n);\r\n\t\t$numerator = ($sumMul*$n - ($sum1*$sum2))/$n;\r\n\t\t$denominator = sqrt(\r\n\t\t\t($sumPow1 - (pow($sum1, 2)/$n))*($sumPow2 - (pow($sum2, 2)/$n))\r\n\t\t\r\n\t\t);\r\n\t\tif ($numerator==$denominator){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ($denominator==0){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn $numerator/$denominator;\r\n\t}", "function fiftyone_degrees_evaluate_numeric_nodes(\n $useragent_bytes,\n &$node_offsets,\n &$lowest_score,\n &$debug_info,\n $headers) {\n\n $current_position = count($useragent_bytes) - 1;\n $existing_node_index = count($node_offsets) - 1;\n\n $lowest_score = NULL;\n\n $root_node_offsets = fiftyone_degrees_read_root_node_offsets($headers);\n while ($current_position > 0) {\n // $existing_node = fiftyone_degrees_read_node($node_offsets[$existing_node_index], $headers);\n if ($existing_node_index >= 0) {\n $root_node = fiftyone_degrees_get_nodes_root_node(\n $node_offsets[$existing_node_index],\n $headers);\n $root_node_position = $root_node['position'];\n }\n\n if ($existing_node_index < 0 || $root_node_position < $current_position) {\n $debug_info['root_nodes_evaluated']++;\n $position_root = fiftyone_degrees_read_node(\n $root_node_offsets[$current_position],\n $headers);\n\n $node = fiftyone_degrees_get_complete_numeric_node(\n $position_root,\n $current_position,\n $useragent_bytes,\n $lowest_score,\n $debug_info,\n $headers);\n\n\n if ($node != NULL\n && fiftyone_degrees_get_any_nodes_overlap($node, $node_offsets, $headers)) {\n // Insert the node and update the existing index so that\n // it's the node to the left of this one.\n\n $index = fiftyone_degrees_integer_binary_search(\n $node_offsets,\n $node['offset']);\n array_splice($node_offsets, ~$index, 0, $node['offset']);\n $existing_node_index = ~$index - 1;\n\n // Move to the position of the node found as \n // we can't use the next node incase there's another\n // not part of the same signatures closer.\n $current_position = $node['position'];\n }\n else\n $current_position--;\n }\n else {\n // The next position to evaluate should be to the left\n // of the existing node already in the list.\n $existing_node = fiftyone_degrees_read_node($node_offsets[$existing_node_index], $headers);\n $current_position = $existing_node['position'];\n\n // Swap the existing node for the next one in the list.\n $existing_node_index--;\n }\n }\n return $node_offsets;\n}", "public function interpretation() {\n $functiontype = $this->inputarray[$this->position];\n \n /* Gets target position indicated by the third element after the function position\n Sets target position in the array to equal the result of the addition \n Advances index position by 4 to continue to next function */\n if ($functiontype == 1) {\n $target = $this->inputarray[$this->position+3];\n $this->inputarray[$target] = $this->one();\n $this->position = $this->position+4;\n return;\n }\n \n /* Gets target position indicated by the third element after the function position\n Sets target position in the array to equal the result of the multiplication \n Advances index position by 4 to continue to next function */\n if ($functiontype == 2) {\n $target = $this->inputarray[$this->position+3];\n $this->inputarray[$target] = $this->two();\n $this->position = $this->position+4;\n return;\n }\n \n /* Sets the final calculated value at position 0 and returns 99 to end the while loop*/\n if ($functiontype == 99) {\n $this->finalvalue = $this->inputarray[0];\n return $this->inputarray[$this->position];\n }\n }", "private function calcTempScores() {\n foreach ($this->cities as $city){\n $cityTemp = $city['Temp']; \n $difference = abs($this->preferredTemp - $cityTemp); \n $score = ((self::TEMP_BASE - $difference)/4)*$this->citiesInputed; \n $this->tempScores[] = $score; \n }\n }", "private function _setup_weight_factors()\n\t{\n\t\t$default_factors = $this->_weight_factors = array(\n\t\t\t'frequency' => array(\n\t\t\t\t'search' => 'COUNT(*) / (MAX(t.num_replies) + 1)',\n\t\t\t\t'results' => '(t.num_replies + 1)',\n\t\t\t),\n\t\t\t'age' => array(\n\t\t\t\t'search' => 'CASE WHEN MAX(m.id_msg) < {int:min_msg} THEN 0 ELSE (MAX(m.id_msg) - {int:min_msg}) / {int:recent_message} END',\n\t\t\t\t'results' => 'CASE WHEN t.id_first_msg < {int:min_msg} THEN 0 ELSE (t.id_first_msg - {int:min_msg}) / {int:recent_message} END',\n\t\t\t),\n\t\t\t'length' => array(\n\t\t\t\t'search' => 'CASE WHEN MAX(t.num_replies) < {int:huge_topic_posts} THEN MAX(t.num_replies) / {int:huge_topic_posts} ELSE 1 END',\n\t\t\t\t'results' => 'CASE WHEN t.num_replies < {int:huge_topic_posts} THEN t.num_replies / {int:huge_topic_posts} ELSE 1 END',\n\t\t\t),\n\t\t\t'subject' => array(\n\t\t\t\t'search' => 0,\n\t\t\t\t'results' => 0,\n\t\t\t),\n\t\t\t'first_message' => array(\n\t\t\t\t'search' => 'CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END',\n\t\t\t),\n\t\t\t'sticky' => array(\n\t\t\t\t'search' => 'MAX(t.is_sticky)',\n\t\t\t\t'results' => 't.is_sticky',\n\t\t\t),\n\t\t\t'likes' => array(\n\t\t\t\t'search' => 'MAX(t.num_likes)',\n\t\t\t\t'results' => 't.num_likes',\n\t\t\t),\n\t\t);\n\n\t\t// These are fallback weights in case of errors somewhere.\n\t\t// Not intended to be passed to the hook\n\t\t$default_weights = array(\n\t\t\t'search_weight_frequency' => 30,\n\t\t\t'search_weight_age' => 25,\n\t\t\t'search_weight_length' => 20,\n\t\t\t'search_weight_subject' => 15,\n\t\t\t'search_weight_first_message' => 10,\n\t\t);\n\n\t\tcall_integration_hook('integrate_search_weights', array(&$this->_weight_factors));\n\n\t\t// Set the weight factors for each area (frequency, age, etc) as defined in the ACP\n\t\t$this->_calculate_weights($this->_weight_factors, $this->_input_weights);\n\n\t\t// Zero weight. Weightless :P.\n\t\tif (empty($this->_weight_total))\n\t\t{\n\t\t\t// Admins can be bothered with a failure\n\t\t\tif ($this->_is_admin)\n\t\t\t{\n\t\t\t\tthrow new Exception('search_invalid_weights');\n\t\t\t}\n\n\t\t\t// Even if users will get an answer, the admin should know something is broken\n\t\t\tErrors::instance()->log_lang_error('search_invalid_weights');\n\n\t\t\t// Instead is better to give normal users and guests some kind of result\n\t\t\t// using our defaults.\n\t\t\t// Using a different variable here because it may be the hook is screwing\n\t\t\t// things up\n\t\t\t$this->_calculate_weights($default_factors, $default_weights);\n\t\t}\n\t}", "function moment_of_resistance($E, &$designParameter, &$designParameterRes)\n{\n\n// You may assign relavent names to input parameters\n\n$b = $designParameter[0] ;\n$d = $designParameter[1] ;\n\n// Perform alculations to find results / values of output parameters\n$Area = $b * $d ;\n$Peri = 2 * ( $b + $d ) ;\n\n// Put output parameters in array in sequence / order.\n$designParameterRes[] = $Area ; \n$designParameterRes[] = $Peri ;\n// $designParameterRes[] = $otheParameters ; // other parameters ...\n \n}", "private function calcTotalScores() {\n $enteredCities = [trim(strtolower($this->cityOne)), \n trim(strtolower($this->cityTwo)), trim(strtolower($this->cityThree))]; \n \n for($x=0; $x<$this->numberOfCities; $x++) {\n $this->totalScores[$x] = $this->tempScores[$x] + $this->traitScores[$x];\n if ($this->totalScores[$x] > $this->maxScore) {\n $testCity = $this->map[$x]; \n if (!in_array(strtolower($testCity), $enteredCities)) {\n # if Day Trip selected, will bypass certain cities too far away\n if($this->purposeForTravel == 'Close Trip') {\n if($this->distScores[$x] > $this->tripDistance)\n continue; \n }\n $this->maxScore = $this->totalScores[$x];\n $this->chosenCity = $testCity; \n }\n }\n }\n }", "function craft($item,$qty,$ft){\r\n\tglobal $recipe,$fuel;\r\n\t$items=Array();\r\n\t$itemsq=Array();\r\n\t$nitems=Array();\r\n\t$nitemsq=Array();\r\n\t$items[0]=$item;\r\n\t$itemsq[0]=$qty;\r\n\tdo{\r\n\t\t$allend=0;\r\n\t\tforeach($items as $k=>$v){\r\n\t\t\tif(!isset($recipe[$v])) echo('Error processing item: <b>'.$v.'</b>. Please report this to [email protected]<br>');\r\n\t\t\telse{\r\n\t\t\t\tif($recipe[$v]!='end'){\r\n\t\t\t\t\t$allend+=1;\r\n\t\t\t\t\t$tmp=explode(',',$recipe[$v]);\r\n\t\t\t\t\tforeach($tmp as $t){\r\n\t\t\t\t\t\t$t2=explode(':',$t);\r\n\t\t\t\t\t\t$nitems[count($nitems)]=$t2[0];\r\n\t\t\t\t\t\t$nitemsq[count($nitemsq)]=($t2[1]*$itemsq[$k]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if($v=='fuel'){\r\n\t\t\t\t\t$allend+=1;\r\n\t\t\t\t\t$nitems[count($nitems)]=$ft;\r\n\t\t\t\t\t$nitemsq[count($nitemsq)]=($itemsq[$k]/$fuel[$ft]);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$nitems[count($nitems)]=$v;\r\n\t\t\t\t\t$nitemsq[count($nitemsq)]=$itemsq[$k];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$items=$nitems;\r\n\t\t$itemsq=$nitemsq;\r\n\t\t$nitems=Array();\r\n\t\t$nitemsq=Array();\r\n\t}while($allend!=0);\r\n\tforeach($items as $key=>$val){\r\n\t\t$re[$val]+=$itemsq[$key];\r\n\t}\r\n\treturn $re;\r\n}", "abstract protected function doPairs();", "function getCommonFactor($first, $second, $tenPoint, $height) {\n $allNumbers = array(intval($first), intval($second));\n $upDown = $down;\n $interval = 1;\n $isCommon = false;\n $testNumber = intval(0.2181818181 * ($height/$tenPoint)); // when we've got more height than font, we'll start looking at a higher number for the common factor. Default will be 12.\n while(!$isCommon AND $testNumber > 3) {\n\t\t$isCommon = true; // if we make it through the following loop without changing this, then we've found our number!\n\t\tforeach($allNumbers as $num) {\n\t\t\t$remainder = $num % $testNumber;\n if($remainder != 0) {\n $isCommon = false;\n }\n\t\t}\n if(!$isCommon) {\n if($upDown == \"down\") {\n $testNumber = $testNumber - $interval;\n $upDown = \"up\";\n } else {\n $testNumber = $testNumber + $interval;\n $upDown = \"down\";\n }\n $interval++;\n }\n\t}\n if(!$isCommon) {\n return 12;\n } else {\n return $testNumber;\n }\n}", "function ml_compute_ranking($r_id){\n\tglobal $dbh1, $dbh2; // Global variables for database connections\n\t$sql = 'SELECT student_id FROM student_recruiter WHERE recruiter_id='.$r_id;\n\t$result = mysql_query($sql, $dbh1);\n\t$rank_dist = [];\n\t\n\twhile ($data = mysql_fetch_array($result)){\n\t\t$s_id = $data['student_id'];\n\t\t// Extract feature vector from s_id\n\t\t$sql1 = 'SELECT feature FROM ml_feature_vectors WHERE recruiter_id='.$r_id.' AND student_id='.$s_id;\n\t\t$result1 = mysql_query($sql1, $dbh2);\n\t\t$data1 = mysql_fetch_array($result1);\n\t\t$feature = $data1['feature'];\n\t\t\n\t\t// Convert feature vector string to array of integers\n\t\t$feature_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$feature_array[$i] = (int)$feature[$i];\n\t\t}\n\t\t\n\t\t// Create best array --> For Comparison\n\t\t$best_array = array();\n\t\tfor($i=0;$i<strlen($feature);$i++){\n\t\t\t$best_array[$i] = 5;\n\t\t}\n\t\t// Calculate distance between feature vector and best vector based on Cosine similarity distance\n\t\t$cdist = cosinus($feature_array, $best_array);\n\t\t$rank_dist[$s_id] = $cdist;\n\t\t\t\n\t} //while (student)\n\t\n\t// Sort $rank_dist array\n\tarsort($rank_dist);\n\t$rank_dist_keys = array_keys($rank_dist);\n\t\n\t$rank_id = '';\n\tfor($i=0; $i<count($rank_dist_keys); $i++){\n\t\tif($i==(count($rank_dist_keys)-1) )\n\t\t\t$rank_id = $rank_id.$rank_dist_keys[$i];\n\t\telse $rank_id = $rank_id.$rank_dist_keys[$i].',';\n\t}\n\t\n\t$sql2 = 'SELECT * FROM ml_rank WHERE recruiter_id='.$r_id; \n\t$result2 = mysql_query($sql2, $dbh2);\n\t$count2 = mysql_num_rows($result2);\n\t\n\tif ($count2==0)\n\t\t$sql3 = 'INSERT INTO ml_rank VALUES('.$r_id.',\"'.$rank_id.'\")';\n\telse\n\t\t$sql3 = 'UPDATE ml_rank SET rank_id=\"'.$rank_id.'\" WHERE recruiter_id='.$r_id;\n\tmysql_query($sql3, $dbh2);\n\t\t\n\n}", "function weight_factor($section, $rating_rules){\r\n\t$weight_fact = 1 ;\r\n\tforeach($rating_rules as $kew=> $val){\r\n\t\tif(!empty($section) & $val['RatingRule']['section'] == $section){\r\n\t\t\t$weight_fact=$val['RatingRule']['Weight_factor'];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn ($weight_fact);\r\n}", "function discriminateInput($input, $discriminators = null) {\n\n if ($discriminators == null) {\n $discriminators = array('accept', 'clear');\n } \n\n\n\n $default_discriminator_thresholds = array(2=>0.3, 3=>0.3, 4=>0.3);\n\n if (count($discriminators) > 4) {\n $minimum_discrimination = $default_discriminator_thresholds[4];\n } else {\n $minimum_discrimination = $default_discriminator_thresholds[count($discriminators)];\n }\n\n\n\n $aliases = array();\n\n $aliases['accept'] = array('accept','add','+');\n $aliases['clear'] = array('clear','drop', 'clr', '-');\n\n\n\n $words = explode(\" \", $input);\n\n $count = array();\n\n $total_count = 0;\n // Set counts to 1. Bayes thing... \n foreach ($discriminators as $discriminator) {\n $count[$discriminator] = 1;\n\n $total_count = $total_count + 1;\n }\n // ...and the total count.\n\n\n\n foreach ($words as $word) {\n\n foreach ($discriminators as $discriminator) {\n\n if ($word == $discriminator) {\n $count[$discriminator] = $count[$discriminator] + 1;\n $total_count = $total_count + 1;\n //echo \"sum\";\n }\n\n foreach ($aliases[$discriminator] as $alias) {\n\n if ($word == $alias) {\n $count[$discriminator] = $count[$discriminator] + 1;\n $total_count = $total_count + 1;\n //echo \"sum\";\n }\n }\n }\n\n }\n\n //echo \"total count\"; $total_count;\n // Set total sum of all values to 1.\n\n $normalized = array();\n foreach ($discriminators as $discriminator) {\n $normalized[$discriminator] = $count[$discriminator] / $total_count; \n }\n\n\n // Is there good discrimination\n arsort($normalized);\n\n\n // Now see what the delta is between position 0 and 1\n\n foreach ($normalized as $key=>$value) {\n //echo $key, $value;\n\n if ( isset($max) ) {$delta = $max-$value; break;}\n if ( !isset($max) ) {$max = $value;$selected_discriminator = $key; }\n }\n\n\n //echo '<pre> Agent \"Train\" normalized discrimators \"';print_r($normalized);echo'\"</pre>';\n\n\n if ($delta >= $minimum_discrimination) {\n //echo \"discriminator\" . $discriminator;\n return $selected_discriminator;\n } else {\n return false; // No discriminator found.\n } \n\n return true;\n }", "function WeightedMatrix($con,$user_id,$filteredSimilarity)\n{\n// print_r($score_array);\n// die;\n\n $not_rated_product = [];\n $query1 = \"Select place.place_id from place WHERE place.place_id NOT IN (Select place.place_id from place join place_user on place_user.place_id = place.place_id WHERE user_id = {$user_id})\";\n $result1 = mysqli_query($con, $query1);\n\n while ($not_rated_place_id = mysqli_fetch_assoc($result1)) {\n $not_rated_product[] = $not_rated_place_id;\n\n }\n \n// print_r($not_rated_product);\n// die;\n\n $not_rated_product_map = [];\n $recommended_places = [];\n\n for ($i = 0; $i < sizeof($not_rated_product); $i++) {\n $id = $not_rated_product[$i]['place_id'];\n $query_rate = \"Select user_id,rating,place_id from place_user WHERE place_id = '$id' AND user_id != '$user_id'\";\n // echo $query_rate;\n // die;\n $result = mysqli_query($con, $query_rate);\n\n // echo \"</br>\";\n // print_r($result);\n // die;\n // echo \"Rating by other user\";\n $rate_from_user = array();\n\n while ($rating = mysqli_fetch_assoc($result)) {\n $rate_from_user[] = $rating;\n }\n\n \n \n // echo \" </br> rating is </br>\";\n // foreach($rate_from_user as $rate => $lol){\n // print_r($lol['rating']);\n // echo \"</br>\";\n // }\n \n // echo \"</br> score array is </br>\";\n // print_r($score_array);\n \n \n \n \n\n\n /// MAtching the user id from rate_from_user and score array\n\n $sum_sim_mul_rate = 0;\n $sim_mul_rate = 0;\n $sum_sim = 0;\n \n \n\n for ($k = 0; $k < sizeof($rate_from_user); $k++) {\n for ($j = 0; $j < sizeof($filteredSimilarity); $j++) {\n if ($rate_from_user[$k]['user_id'] == $filteredSimilarity[$j][0]) {\n \n \n $sum_sim = $sum_sim + $filteredSimilarity[$j][1];\n $sim_mul_rate = $rate_from_user[$k]['rating'] * $filteredSimilarity[$j][1];\n $sum_sim_mul_rate = $sum_sim_mul_rate + $sim_mul_rate;\n\n\n }\n // echo $sum_sim_mul_rate;\n \n }\n }\n ;\n \n if ($sum_sim == 0) {\n $sum_sim = 0.01;\n }\n $ratio = $sum_sim_mul_rate / $sum_sim;\n //$recommended_places[] = array($id,$ratio);\n $recommended_places[$id] = $ratio;\n\n\n }\n \n\n\n// echo \"</br> The recommened place are => </br>\";\n// echo json_encode($recommended_places) ;\n\n //print_r(arsort($recommended_places));\n\n// echo \"THe sorted\";\n\n\n// for($i = 0; $i < sizeof($recommended_places); $i++){\n// //$rec_pro_id[] = $recommended_places[$i][0];\n// $rec_pro_id[] = $recommended_places[$i][0];\n//\n// }\n\n //\n arsort($recommended_places);\n\n //--------------------------------------------------------------\n // This is the recommended place with their score\n // echo \"<pre>\";\n // print_r($recommended_places);\n // die;\n\n\n $rec_pro_id = [];\n // $count = 0;\n foreach ($recommended_places as $key => $value) {\n if ($value != 0) {\n $rec_pro_id[] = $key;\n // $count++;\n \n }\n // if ($count == 5) {\n // break;\n // }\n\n }\n //echo \"The id are \";\n //$arr=array();\n\n\n foreach ( $rec_pro_id as $abc){\n //print_r($abc);\n $arr[$i]=$abc;\n //array_push($arr,$abc);\n }\n // print_r($rec_pro_id);\n $arr=array_values($rec_pro_id);\n // print_r($arr);\n // die;\n\n return $rec_pro_id;\n\n\n\n}", "public function completions() {\n\t\t$completions_calc = $this->_completions/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$completions_calc -= .3;\n\t\tif ($completions_calc * 5 < 0) {\n\t\t\t$completions_calc = 0;\n\t\t} elseif ($completions_calc * 5 > 2.375) {\n\t\t\t$completions_calc = 2.375;\n\t\t} else {\n\t\t\t$completions_calc *= 5;\n\t\t}\n\t\treturn $completions_calc;\n\t}", "function interpersonal($cit1,$cit2,$action)\n\t{\n\t\t$sql = \"INSERT INTO relationship (cit1,cit2,value) VALUES ({$cit1}, {$cit2}, 1) ON DUPLICATE KEY UPDATE weight = weight+{$action}\";\n\t\ttry { $this->db->exec($sql);}catch(PDOException $e) { echo $e->getMessage();}\n\t\t\n\t}", "abstract protected function calcular($x, $y);", "function fiftyone_degrees_get_signature_score (\n $signature,\n $node_offsets,\n $useragent_bytes,\n $lowest_score,\n $last_node_character,\n $is_closest,\n $headers) {\n $sig_length = fiftyone_degrees_get_signature_length($signature, $headers);\n if ($is_closest === TRUE)\n $running_score = abs($last_node_character + 1 - $sig_length);\n else\n $running_score = 0;\n\n // We only need to check the nodes that are different. As the nodes\n // are in the same order we can simply look for those that are different.\n $match_node_index = 0;\n $signature_node_index = 0;\n while ($signature_node_index < count($signature['node_indexs'])\n && $running_score < $lowest_score) {\n $match_node_offset = $match_node_index >= count($node_offsets)\n ? PHP_INT_MAX : $node_offsets[$match_node_index];\n $signature_node_offset = $signature['node_indexs'][$signature_node_index];\n if ($match_node_offset > $signature_node_offset) {\n // The matched node is either not available, or is higher than\n // the current signature node. The signature node is not contained\n // in the match so we must score it.\n if ($is_closest) {\n $score = fiftyone_degrees_get_score(\n $signature['node_indexs'][$signature_node_index],\n $useragent_bytes,\n $lowest_score,\n $headers);\n }\n else {\n $score = fiftyone_degrees_get_nearest_score(\n $signature['node_indexs'][$signature_node_index],\n $useragent_bytes,\n $headers);\n \n }\n if ($score < 0) {\n return PHP_INT_MAX;\n }\n $running_score += $score;\n $signature_node_index++;\n }\n else if ($match_node_offset == $signature_node_offset) {\n // They both are the same so move to the next node in each.\n $match_node_index++;\n $signature_node_index++;\n }\n else if ($match_node_offset < $signature_node_offset) {\n // The match node is lower so move to the next one and see if\n // it's higher or equal to the current signature node.\n $match_node_index++;\n }\n }\n\n return $running_score;\n}", "function restaurant_check($meal,$tax,$tip){\n $tax_amount=$meal*($tax/100);\n $tip_amount=$meal*($tip/100);\n $total_amount=$meal+$tax_amount+$tip_amount;\n return $total_amount;\n}", "function formula_transfer($fcoords, $tcoords, $speed, $h2need)\n {\n //look at ./templates/fleets2.thtml\n $a=$tcoords['gal'];\n $b=$tcoords['sys'];\n $c=$tcoords['plan'];\n $p=10;\n $d=-1;\n $en=\"\";\n $fa=$fcoords['gal'];\n $fb=$fcoords['sys'];\n $fc=$fcoords['plan'];\n if($a!=$fa)\n {\n $d=abs(($a-$fa)*20000);\n }\n else if($b!=$fb)\n {\n $d=2700+5*abs(($b-$fb)*19);\n }\n else if($c!=$fc)\n {\n $d=1000+abs(($c-$fc)*5);\n }\n if($a<1|$a>199|$b<1|$b>300|$c<0|$c>199)\n {\n $d=-1;\n }\n $e=round($h2need*$d/35000*(($p/10)+1)*(($p/10)+1))+1;\n $s=round(35000/$p*sqrt($d*10/$speed));\n //$s is time ind secounds\n //$e is h2 needed...\n //$d is distance in Mm (Mega meters) ($d000 km)\n $ret['h2need'] = $e;\n $ret['time'] = $s;\n $ret['dist'] = $d;\n //echo \"e: $e, s: $s, d: $d<br>\";\n return $ret;\n }", "function update_dreammp_person_distance($db, $dreamid)\n{\n # update the number of votes and number of motions edited\n# print \"update_dreammp_person_distance $dreamid<p>\\n\";\n\n global $pwpdo;\n\tglobal $bdebug;\n\t$query = \"SELECT cache_uptodate\n\t\t\t FROM pw_cache_dreaminfo\n\t\t\t WHERE dream_id = ?\";\n $row=$pwpdo->get_single_row($query,array($dreamid));\n\tif ($row == null) {\n\t\tupdate_dreammp_votemeasures($db, $dreamid, 0);\n $row=$pwpdo->get_single_row($query,array($dreamid));\n\t\tif ($row == null) {\n\t\t\t// case of no votes yet by Dream MP\n\t\t\treturn;\n\t\t}\n\t}\n\telse\n\t\tupdate_dreammp_votemeasures($db, $dreamid, $row[\"cache_uptodate\"]); # forces the sums to add up properly\n\tif ($row[\"cache_uptodate\"] == 1)\n\t\treturn;\n\n\t# now go and rebuild all the distances\n\n\t$div_aye_vote = \"(SELECT count(*) FROM pw_vote pv2 WHERE pv2.division_id = pw_division.division_id AND vote = 'aye')\";\n\t$div_no_vote = \"(SELECT count(*) FROM pw_vote pv2 WHERE pv2.division_id = pw_division.division_id AND vote = 'no')\";\n\t$qselect = \"SELECT pw_mp.person AS person,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye' AND pw_vote.vote = 'aye')\n\tOR (pw_dyn_dreamvote.vote = 'aye' AND pw_vote.vote = 'tellaye' AND $div_aye_vote > 0)\n\tOR (pw_dyn_dreamvote.vote = 'no' AND pw_vote.vote = 'no')\n\tOR (pw_dyn_dreamvote.vote = 'no' AND pw_vote.vote = 'tellno' AND $div_no_vote > 0)\n) AS nvotessame,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye3' AND pw_vote.vote = 'aye')\n\tOR (pw_dyn_dreamvote.vote = 'aye3' AND pw_vote.vote = 'tellaye' AND $div_aye_vote > 0)\n\tOR (pw_dyn_dreamvote.vote = 'no3' AND pw_vote.vote = 'no')\n\tOR (pw_dyn_dreamvote.vote = 'no3' AND pw_vote.vote = 'tellno' AND $div_no_vote > 0)\n) AS nvotessamestrong,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye' AND pw_vote.vote = 'no')\n\tOR (pw_dyn_dreamvote.vote = 'aye' AND pw_vote.vote = 'tellno' AND $div_no_vote > 0)\n\tOR (pw_dyn_dreamvote.vote = 'no' AND pw_vote.vote = 'aye')\n\tOR (pw_dyn_dreamvote.vote = 'no' AND pw_vote.vote = 'tellaye' AND $div_aye_vote > 0)\n) AS nvotesdiffer,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye3' AND pw_vote.vote = 'no')\n\tOR (pw_dyn_dreamvote.vote = 'aye3' AND pw_vote.vote = 'tellno' AND $div_no_vote > 0)\n\tOR (pw_dyn_dreamvote.vote = 'no3' AND pw_vote.vote = 'aye')\n\tOR (pw_dyn_dreamvote.vote = 'no3' AND pw_vote.vote = 'tellaye' AND $div_aye_vote > 0)\n) AS nvotesdifferstrong,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye' OR pw_dyn_dreamvote.vote = 'no')\n\tAND (\n\t\tpw_vote.vote = 'both'\n\t\tOR pw_vote.vote IS null\n\t\tOR (pw_vote.vote = 'tellno' AND $div_no_vote = 0)\n\t\tOR (pw_vote.vote = 'tellaye' AND $div_aye_vote = 0)\n\t)\n) AS nvotesabsent,\nSUM(\n\t(pw_dyn_dreamvote.vote = 'aye3' OR pw_dyn_dreamvote.vote = 'no3')\n\tAND (\n\t\tpw_vote.vote = 'both'\n\t\tOR pw_vote.vote IS null\n\t\tOR (pw_vote.vote = 'tellno' AND $div_no_vote = 0)\n\t\tOR (pw_vote.vote = 'tellaye' AND $div_aye_vote = 0)\n\t)\n) AS nvotesabsentstrong,\nSUM(pw_vote.vote IS NOT null) AS nvotesoverlap \";\n\n\t# (no score from dreamMP absents or abstentions)\n\n\t$qfrom = \" FROM pw_mp\";\n\t$qjoin = \" LEFT JOIN pw_dyn_dreamvote ON pw_dyn_dreamvote.dream_id = ?\";\n\t$qjoin .= \" LEFT JOIN pw_division\n\t\t\t\t\tON pw_division.division_date = pw_dyn_dreamvote.division_date\n\t\t\t\t\tAND pw_division.division_number = pw_dyn_dreamvote.division_number\n\t\t\t\t\tAND pw_division.house = pw_dyn_dreamvote.house\";\n\t$qjoin .= \" LEFT JOIN pw_cache_divinfo\n\t\t\t\t\tON pw_cache_divinfo.division_id = pw_division.division_id\";\n\t$qjoin .= \" LEFT JOIN pw_vote\n\t\t\t\t\tON pw_vote.division_id = pw_division.division_id\n\t\t\t\t\tAND pw_vote.mp_id = pw_mp.mp_id\";\n\n\t# we do for one dreammp against all the votes they share with each MP\n\t$qwhere = \" WHERE pw_mp.entered_house <= pw_division.division_date\n\t\t\t\t AND pw_mp.left_house > pw_division.division_date\n AND pw_mp.house = pw_division.house\";\n\t$qgroup = \" GROUP BY pw_mp.person\";\n\n\t$query = $qselect.$qfrom.$qjoin.$qwhere.$qgroup;\n\n\t# do the database/scoring thing\n $rowarray=$pwpdo->fetch_all_rows($query,array($dreamid));\n\n\t# lock and clear the table\n $pwpdo->query('LOCK TABLE pw_cache_dreamreal_distance WRITE',array());\n $pwpdo->query('DELETE FROM pw_cache_dreamreal_distance WHERE dream_id = ?',array($dreamid));\n\n\t# this likes votes that are all one side or other\n\t$dconsistencyn = 0.0;\n\t$dconsistencyc = 0.0;\n\n\tforeach ($rowarray as $row)\n\t{\n\t\tif (!$row['nvotesoverlap']) { # can't quite see how to filter these out in the query\n #print \"nvotesoverlap \".$row['person'].\"\\n\";\n #print_r($row);\n\n # Actually, don't bother filtering it! We want to know when somebody didn't\n # attend all the votes on one subject, and need that recording in table. Can\n # check for their being no common attendance elsewhere.\n #continue\n\n if (!$row['nvotessame']) {\n $row['nvotessame']= 0;\n }\n if (!$row['nvotessamestrong']) {\n $row['nvotessamestrong']= 0;\n }\n if (!$row['nvotesdiffer']) {\n $row['nvotesdiffer']= 0;\n }\n if (!$row['nvotesdifferstrong']) {\n $row['nvotesdifferstrong']= 0;\n }\n if (!$row['nvotesabsent']) {\n $row['nvotesabsent']= 0;\n }\n if (!$row['nvotesabsentstrong']) {\n $row['nvotesabsentstrong']= 0;\n }\n }\n\t\t$nvotessame = $row['nvotessame'];\n\t\t$nvotessamestrong = $row['nvotessamestrong'];\n\t\t$nvotesdiffer = $row['nvotesdiffer'];\n\t\t$nvotesdifferstrong = $row['nvotesdifferstrong'];\n\t\t$nvotesabsent = $row['nvotesabsent'];\n\t\t$nvotesabsentstrong = $row['nvotesabsentstrong'];\n\t\t$person = $row['person'];\n\n\t\t$distancea = calc_dreammp_person_distance($nvotessame, $nvotessamestrong,\n\t\t\t\t\t\t\t\t\t\t\t \t $nvotesdiffer, $nvotesdifferstrong,\n\t\t\t\t\t\t\t\t\t\t\t \t $nvotesabsent, $nvotesabsentstrong);\n\n\t\t# score without absentions\n\t\t$distanceb = calc_dreammp_person_distance($nvotessame, $nvotessamestrong,\n\t\t\t\t\t\t\t\t\t\t\t \t $nvotesdiffer, $nvotesdifferstrong, 0, 0);\n\n\n\t\t$query = \"INSERT INTO pw_cache_dreamreal_distance\n (dream_id, person,\n\t\t\t\t\t\tnvotessame, nvotessamestrong,\n\t\t\t\t\t\tnvotesdiffer, nvotesdifferstrong,\n\t\t\t\t\t\tnvotesabsent, nvotesabsentstrong,\n\t\t\t\t\t\tdistance_a, distance_b)\n \tVALUES (?,?,?,?,\n \t?,?,?,?,\n\t\t\t\t\t?,?)\";\n\t\t$placeholders=array($dreamid,$person,$nvotessame, $nvotessamestrong,\n $nvotesdiffer, $nvotesdifferstrong,$nvotesabsent, $nvotesabsentstrong,\n $distancea, $distanceb);\n\n $pwpdo->query($query,$placeholders);\n\n\t\t# quick hack until better formulae are found\n\t\tif ($distancea < 0.1 or $distancea > 0.9)\n\t\t\t$dconsistencyn += 1.0;\n\t\t$dconsistencyc += 1.0;\n\t}\n\n\t# unlock, then post update(?)\n\t$pwpdo->query(\"UNLOCK TABLES\",array());\n\n\n\t$dconsistency = ($dconsistencyc != 0.0 ? $dconsistencyn / $dconsistencyc : 0.0);\n\n # Mark as updated\n $pwpdo->query('UPDATE pw_cache_dreaminfo\n\t\t\t\tSET cache_uptodate = 1, consistency_with_mps = ?\n\t\t\t\tWHERE dream_id =?',array($dconsistency,$dreamid));\n}", "function gain($l_column,$other_column,$res){\r\n\t$res_gain = array();\r\n\r\n\t$information = information_for_each_column($other_column,$res);\r\n\t$entropy_lastColumn = entropy($l_column);\r\n\t\r\n\tfor ($i = 0; $i < count($information); $i++){\r\n\t\t$temp = $entropy_lastColumn - $information[$i];\r\n\t\tarray_push($res_gain, $temp);\r\n\t}\r\n\treturn $res_gain;\r\n}", "private function getPossibleDistance(array $orthogonalDistances) : float\n {\n $possibleDistance = 0.;\n foreach ($orthogonalDistances as $orthogonalDistance) {\n $possibleDistance += $orthogonalDistance;\n }\n\n return $possibleDistance;\n }", "function PatternMatching($a_link)\r\n{\r\n\t$con = mysql_connect(\"localhost\",\"Phishsecure\")or die(\"Unable to connect to MySQL\");\r\n\tmysql_select_db(\"phishsecure\", $con);\r\n\t$result2 = mysql_query(\"SELECT surl FROM seedset\");\r\n\twhile($row2 = mysql_fetch_array($result2))\r\n\t{\r\n\t\tif($row2['surl']===$a_link)\r\n\t\t{\r\n\t\t\treturn 3;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$bv = Similarity($row2['surl'], $a_link);\r\n\t\t\tif($bv===true)\r\n\t\t\t{\r\n\t\t\t\t$phishing=2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$phishing=0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif($phishing === 0)\r\n\t{\r\n\t\t$result3 = mysql_query(\"SELECT wurl FROM whitelist\"); \r\n\t\twhile($row3 = mysql_fetch_array($result3))\r\n\t\t{\r\n\t\t\t$bv = Similarity($row3['wurl'], $a_link);\r\n\t\t\tif($bv===true)\r\n\t\t\t{\r\n\t\t\t\t$phishing=2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$phishing=0;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tmysql_close($con);\r\n\treturn $phishing;\r\n}", "private function setResult() {\n $result = 0;\n foreach ($this->process AS $key => $value) {\n $total = $value['pivot'] * $value['adj']['result'];\n if($key == 0) {\n $result = $result + $total;\n }\n elseif($key == 1) {\n $result = $result - $total;\n }\n else {\n if($key % 2 == 0) {\n $result = $result + $total;\n }\n else {\n $result = $result - $total;\n }\n }\n }\n unset($key, $value, $total);\n return $result;\n }", "public function computeReliabilityScore($knownNumbers){\n\t\t$score=0;\n\t\t//$score-=count(array_intersect($knownNumbers,$this->operands))*20;\n\t\t// commented out, finally this is hard to justify such a rule for the general case\n\t\t\t\n\t\t//we really dont want that an operand is amongst the other numbers\n\t\t$score-=count($this->possibleAnomalies)*20; \n\t\t// This way, when selecting a formula scores are used only if the number of anomalies are the same \n\t\tforeach($this->numberReliabilityScore as $numScore){\n\t\t\t$score+=$numScore; \n\t\t}\n\t\treturn $score;\n\t\t\n\t}", "function fiftyone_degrees_get_score(\n $node_offset,\n $useragent_bytes,\n $lowest_score,\n $headers) {\n\n $score = 0;\n $node = fiftyone_degrees_read_node($node_offset, $headers);\n $node_characters = fiftyone_degrees_get_node_characters($node, $headers);\n $node_index = count($node_characters) - 1;\n\n $target_index\n = $node['position'] + fiftyone_degrees_get_node_length($node, $headers);\n\n // Adjust the score and indexes if the node is too long.\n $useragent_length = count($useragent_bytes);\n if ($target_index >= $useragent_length) {\n $score = $target_index - $useragent_length;\n $node_index -= $score;\n $target_index = $useragent_length - 1;\n }\n\n while ($node_index >= 0 && $score < $lowest_score) {\n $difference = abs(\n $useragent_bytes[$target_index] - $node_characters[$node_index]);\n if ($difference != 0) {\n $numeric_difference = fiftyone_degrees_get_numeric_difference(\n $node_characters,\n $useragent_bytes,\n $node_index,\n $target_index);\n if ($numeric_difference != 0)\n $score += $numeric_difference;\n else\n $score += $difference;\n }\n $node_index--;\n $target_index--;\n }\n return $score;\n}", "abstract public function calculate(array $results): int;", "private function score_weight_nutrition(){\r\n\t\t$data = $this->data['weight_nutrition'];\r\n\r\n\t\t$q21 = $this->scoreValue(array(5,1,3),$data['q21']);\r\n\t\t$q22 = $this->scoreValue(array(1,3,5),$data['q22']);\r\n\r\n\t\t$qn24 = $this->scoreValue(array(1,2,3,4,5), $data['qn24']);\r\n\t\t$qn25 = $this->scoreValue(array(1,2,3,4,5), $data['qn25']);\r\n\r\n\t\t//fruit & veg _1 & 2\r\n\t\t$q23a = 0;\r\n\t\t$f = $data['q23_1'];\r\n\t\t$v = $data['q23_2'];\r\n\t\t\r\n\t\tif ($f > 0) $f--;\r\n\t\tif ($v > 0) $v--;\r\n\t\t$table = array(\r\n\t\t array(1,1,1,2,2),\t\r\n\t\t array(1,1,2,2,3),\r\n\t\t array(1,2,2,3,3),\r\n\t\t array(2,2,3,4,5),\r\n\t\t array(2,3,3,5,5),\r\n\t\t);\r\n\t\t$q23a = $table[$v][$f];\r\n\t\t\r\n\t\t//Fats\r\n\t\t$q23b = 0;\r\n\t\tfor($x = 3; $x <= 7; $x++){\r\n\t\t\t$q23b += $this->scoreValue(array(0,3,5,12,25),$data['q23_'.$x]);\r\n\t\t}\r\n\t\t$q23b = $q23b/5;\r\n\t\tif ($q23b > 10) $q23b = 1;\r\n\t\telse if ($q23b > 5.1) $q23b = 2;\r\n\t\telse if ($q23b > 3.2) $q23b = 3;\r\n\t\telse if ($q23b > 2) $q23b = 4;\r\n\t\telse $q23b = 5;\r\n\t\t\r\n\t\t///breads & Grains _8\r\n\t\t$q23c = $this->scoreValue(array(0,3,5,12,25),$data['q23_8']);\r\n\t\tif ($q23c > 12) $q23c = 5;\r\n\t\telse if ($q23c > 8) $q23c = 4;\r\n\t\telse if ($q23c > 4.9) $q23c = 3;\r\n\t\telse if ($q23c > 3) $q23c = 2;\r\n\t\telse $q23c = 1;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=0;\r\n\t\t$ob->data=array('q21'=>array($q21,.1),\r\n\t\t\t\t\t\t'q22'=>array($q22,.1),\r\n\t\t\t\t\t\t'q23_1'=>array($q23a,.25),\r\n\t\t\t\t\t\t'q23_2'=>array($q23b,.25),\r\n\t\t\t\t\t\t'q23_3'=>array($q23c,.1),\r\n\t\t\t\t\t\t'qn24'=>array($qn24,.1),\r\n\t\t\t\t\t\t'qn25'=>array($qn25,.1)\r\n\t\t);\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2]=$rec[0]*$rec[1];\r\n\t\t\t$ob->total+=$rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "private function compute($base){\n\t\t$amount = \n\t\t $this->getSkillPercent($this->miningSkill) *\n\t\t $this->getSkillPercent($this->astroSkill) *\n\t\t $this->getSkillPercent($this->frigateSkill) *\n\t\t $this->getSkillPercent($this->upgradeLaser)\t\t\n\t\t;\n\t\treturn $base * $amount * $this->getVentureBonus();\n\t}", "public function calculateAccuracy($method = '', $coefficients = array()){\n\n $this->verifyMethod($method);\n\n $rating = 0;\n\n if ($this->store_mapping)\n $this->curves[$method]['data_map'] = array();\n\n for ($i = 0; $i < count($this->base_data_set); $i++){\n $value = array($this->base_data_set[$i][0], $this->evaluateCurve($method,$this->base_data_set[$i][0]));\n $distance = abs( $value[1] - $this->base_data_set[$i][1] );\n $rating += $distance;\n if ($this->store_mapping)\n $this->curves[$method]['data_map'][$i] = $value;\n }\n\n return $rating;\n\n }", "function distance_lookup($c1,$c2,$distance_table){\n //TODO make this return infinite if there's nothing in the table\n return $distance_table[$c1][$c2]['duration']['value'];\n}", "function getPairValue($pair,$type='ask') { \r\n\t$curl = new Curl;\r\n\t$ticker = (array)$curl->get(\"https://api.bitfinex.com/v1/pubticker/$pair\");\r\n\treturn $ticker[$type];\r\n}", "function atom_mass_task ($input_array, $options_array) {\n\t\n\tglobal $CONST_atomicMass;\n\t\n\tif ($input_array[\"task_type\"] == 1) {\n\t\t/// Oblicz % zawartość pierwiastków w związkach chemicznych\n\t\t\n\t\t//// Liczymy poszczególne atomy\n\t\t\n\t\t\n\t}\n\t\n\t\n\tif ($input_array[\"task_type\"] == 2) {\n\t\t/// Znając masę atomu [pierwiastek] która wynosi [liczba w notacji wykładniczej] oblicz jego masę atomową\n\t\t\n\t\t//// Liczymy proporcję\n\t\t/*\n\t\t\n\t\t1u - 0,166 * 10 -23\n\t\tx - 0,167 * 10 -23\n\t\t\n\t\t0,167 * 10 -23 = 0,166 * 10 -23 x\n\t\t\n\t\t\n\t\t\n\t\t*/\n\t\t\n\t\t// Calculate formula ///\n\t\t\n\t\t$atomic_mass = $input_array[\"atom_mass\"]/$CONST_atomicMass;\n\t\t\n\t\treturn $atomic_mass;\n\t\t\n\t}\n\t\n\tif ($input_array[\"task_type\"] == 2) {\n\t\t/// Znając masę atomową [pierwiastek] która wynosi [liczba w unitach] oblicz jego masę atomu\n\t\t\n\t\t//// Liczymy proporcję\n\t\t/*\n\t\t\n\t\t*/\n\t\t\n\t\t// Calculate formula ///\n\t\t\n\t\t$atom_mass = $input_array[\"atomic_mass\"]*$CONST_atomicMass;\n\t\t\n\t\treturn $atom_mass;\n\t\t\n\t}\n\t\n\t\n\t\n}", "function calculateUserSimilarity($con,$user_id_sess ){\n\n $user = array();\n\n $query_user = \"Select * from users\";\n $result = mysqli_query($con,$query_user);\n\n\n while ($user_one = mysqli_fetch_assoc($result)) {\n $user[] = $user_one;\n\n }\n\n\n// echo \"<pre>\";\n// print_r($user);\n// die;\n\n $score_array = array();\n\n \n for ($j=0; $j <sizeof($user); $j++){\n if($user_id_sess!= $user[$j]['id'] ){\n// echo $user[$i]['username'];\n// echo \"----------\";\n// echo $user[$j]['username';\n // echo $user_id_sess;\n // echo $user[$j]['id'].\" \";\n $score_array[] = PearsonSimilarity($user_id_sess,$user[$j]['id'],$con);\n }\n\n }\n\n $filteredSimilarity = array_filter($score_array, 'filter');\n\n \n \n\n//--------------------------------------------------------------\n // This is the pearson correaltion score \n // echo \"<pre>\";\n // print_r($filteredSimilarity);\n // die;\n\n\n $rec_pro_id = WeightedMatrix($con,$user_id_sess,$filteredSimilarity);\n // echo \"<pre>\";\n // print_r($rec_pro_id);\n // die;\n\n return $rec_pro_id ;\n\n\n \n\n\n\n\n\n\n\n}", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "function calc_value_potion ($level, $alch_perk, $phys_perk, $bene_perk, $pois_perk, $pure_perk) {\n\t\tdb_CRUD::select('ingredient_effect', 'eid, iid, magnitude_modifier, gold_modifier', \"iid in (select iid from effect where specials = 'y')\", 'eid');\n\t\t$nonStandard_data = db_CRUD::get_result();\n\t\t$cost_arr = array();\n\t\tforeach($this->temp_potion as $potion) {\n\t\t\t$cost_arr = array();\n\t\t\t//for each effect in potion: calculate price of effect\n\t\t\tforeach($potion->effect as $eff) {\n\t\t\t\t$select = \"eid, base_cost, base_magnitude, base_duration, poison, specials\";\n\t\t\t\t$where = \"eid = $eff\";\n\t\t\t\tdb_CRUD::select('effect', $select, $where);\n\t\t\t\t$result = db_CRUD::get_result();\n\t\t\t\t$mag_mod = 0;\n\t\t\t\t$gold_mod = 0;\n\t\t\t\t//if ingredient includes special variants: check if ingredient used is non-standard\n\t\t\t\tif($result[5] == 'y') {\n\t\t\t\t\tforeach($nonStandard_data as $nsd) {\n\t\t\t\t\t\tif($potion->ingredient1 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($potion->ingredient2 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if($potion->ingredient_cnt == 3 && $potion->ingredient3 == $nsd[1] && $eff == $nsd[0]) {\n\t\t\t\t\t\t\tif(($nsd[2] * $nsd[3]) > ($mag_mod * $gold_mod)) {\n\t\t\t\t\t\t\t\t$mag_mod = $nsd[2];\n\t\t\t\t\t\t\t\t$gold_mod = $nsd[3];\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\telse {\n\t\t\t\t\t$mag_mod = 1;\n\t\t\t\t\t$gold_mod = 1;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//specialized effect magnitude formulas\n\t\t\t\tif($eff != 30 && $eff != 34 && $eff != 50 && $eff != 49) {\n\t\t\t\t\t$mag = $result[2] * $mag_mod * 4 * pow(1.5, $level/100) * (1 + $alch_perk/100);\n\t\t\t\t\tif($eff == 46 || $eff == 47 || $eff || 48)\n\t\t\t\t\t\t$mag *= (1 + $phys_perk/100);\n\t\t\t\t\tif($result[5] == 'y')\n\t\t\t\t\t\t$mag *= (1 + $pois_perk/100);\n\t\t\t\t\telse\n\t\t\t\t\t\t$mag *= (1 + $bene_perk/100);\n\t\t\t\t\t$dur = $result[3];\n\t\t\t\t}\n\t\t\t\t//common effect duration formulas\n\t\t\t\telse {\n\t\t\t\t\t$dur = $result[3] * 4 * pow(1.5, $level/100) * (1 + $alch_perk/100);\n\t\t\t\t\tif($result[5] == 'y')\n\t\t\t\t\t\t$dur *= (1 + $pois_perk/100);\n\t\t\t\t\telse\n\t\t\t\t\t\t$mag *= (1 + $bene_perk/100);\n\t\t\t\t\t$mag = $result[2];\n\t\t\t\t}\n\t\t\t\tif($mag != 0 && $dur != 0) \n\t\t\t\t\t$eff_cost = floor($result[1] * $gold_mod * pow($mag, 1.1) * 0.0794328 * pow($dur, 1.1));\n\t\t\t\telse if($mag == 0)\n\t\t\t\t\t$eff_cost = floor($result[1] * $gold_mod * 0.0794328 * pow($dur, 1.1));\n\t\t\t\telse\n\t\t\t\t\t$eff_cost = floor($result[1] * pow($mag, 1.1));\n\t\t\t\t$cost_arr[] = array($eff_cost, $result[4]);\n\t\t\t} //end foreach $eff\n\t\t\t//if purity perk is active: find most valuable effect to decide potion/poison\n\t\t\tif($pure_perk == 'y') {\n\t\t\t\t$max = 0;\n\t\t\t\t$x = 0;\n\t\t\t\tforeach($cost_arr as $i => $cost) {\n\t\t\t\t\tif($cost[0] > $max) {\n\t\t\t\t\t\t$max = $cost[0];\n\t\t\t\t\t\t$x = $i;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$potion->poison = $cost_arr[$x][1];\n\t\t\t\t$total = 0;\n\t\t\t\tforeach($cost_arr as $cost) {\n\t\t\t\t\tif($cost[1] == $cost_arr[$x][1]) {\n\t\t\t\t\t\t$total += $cost[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if no purity perk, sum all effect values\n\t\t\telse {\n\t\t\t\t$total = 0;\n\t\t\t\tforeach($cost_arr as $cost) {\n\t\t\t\t\t$total += $cost[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$potion->value = $total;\n\t\t} //end foreach $potion\n\t}", "function calc_dreammp_person_distance($nvotessame, $nvotessamestrong,\n\t\t\t\t\t\t\t\t\t $nvotesdiffer, $nvotesdifferstrong,\n\t\t\t\t\t\t\t\t\t $nvotesabsent, $nvotesabsentstrong)\n{\n\t# absents have low weighting, except where it was 3-line\n\t# 3-line has higher than 3 to make it rise above the noise.\n\t$tlw = 5.0;\n\t$weight = $nvotessame + $tlw * $nvotessamestrong + $nvotesdiffer + $tlw * $nvotesdifferstrong +\n\t\t\t 0.2 * $nvotesabsent + $tlw * $nvotesabsentstrong;\n\n\t$score = $nvotesdiffer + $tlw * $nvotesdifferstrong + 0.1 * $nvotesabsent + ($tlw / 2) * $nvotesabsentstrong;\n\tif ($weight == 0.0)\n\t\treturn -1.0;\n\treturn $score / $weight;\n}", "function scoreHealth(){\n //Find the BMI of the user, and compare that to others.\n return $_POST['health1']+$_POST['health2']+$_POST['health3']+$_POST['health4']+$_POST['health5']+$_POST['health6'];\n}", "function query_chemical_formula($chemical_formula, $query_keyword)\n\t{\n\t\t// Connect to database\n\t\tinclude('../connect.php');\n\t\tmysqli_select_db($conn, 'rios');\n\t\t\n\t\t$chemical_formula = mysqli_real_escape_string($conn,$chemical_formula);\n\t\n\t\t// Read database\n\t\t/*\n\t\t$sql = 'SELECT * from molecule_data WHERE BINARY Molecule=\"'.$chemical_formula.'\"';\n\t\t////echo \"<p>\".$sql.\"</p>\";\n\t\t\n\t\t$retval = mysqli_query($conn, $sql);\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t\t// Use prepared statements to prevent SQL injection\n\t\t$stmt = $conn->prepare(\"SELECT * from molecule_data WHERE BINARY Molecule=?\");\n\t\t$stmt->bind_param(\"s\", $chemical_formula);\n\t\t$stmt->execute();\n\t\t$retval = $stmt->get_result();\n\t\t\n\t\t\n\t\tif(! $retval)\n\t\t{\n\t\t\tdie('Error: cannot read data: ' . mysqli_error($conn));\n\t\t}\n\n\t\t// Get the number of query results\n\t\t$N_results = $retval->num_rows;\n\t\t\n\t\t\n\t\tif($N_results < 1)\n\t\t{\n\t\t\tdie('No results found for \"'.$chemical_formula.'\". Please check the chemical formula, or get the list of available molecules via /api/?query=list_molecules.');\n\t\t}\n\n\t\t// Get the results\n\t\t$idAll_in = array(); \n\t\t$idMol = array();\n\t\t$molecules = array();\n\t\t$states = array();\n\t\t$masses = array();\n\t\t$Te = array();\n\t\t$omega_e = array();\n\t\t$omega_ex_e = array();\n\t\t$Be = array();\n\t\t$alpha_e = array();\n\t\t$De = array();\n\t\t$Re = array();\n\t\t$D0 = array();\n\t\t$IPs = array();\n\t\t$dates = array();\n\t\t$references = array();\n\t\t\n\t\twhile($row = mysqli_fetch_array($retval, MYSQLI_ASSOC))\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$mass_au = round($row['Mass'] * 1822.8884, 3);\n\t\t\tarray_push($idAll_in, $row['idAll_in']);\n\t\t\tarray_push($idMol, $row['idMol']);\n\t\t\tarray_push($molecules, $row['Molecule']);\n\t\t\tarray_push($states, $row['State']);\n\t\t\tarray_push($masses, $mass_au);\n\t\t\tarray_push($Te, $row['Te']);\n\t\t\tarray_push($omega_e, $row['omega_e']);\n\t\t\tarray_push($omega_ex_e, $row['omega_ex_e']);\n\t\t\tarray_push($Be, $row['Be']);\n\t\t\tarray_push($alpha_e, $row['alpha_e']);\n\t\t\tarray_push($De, $row['De']);\n\t\t\tarray_push($Re, $row['Re']);\n\t\t\tarray_push($D0, $row['D0']);\n\t\t\tarray_push($IPs, $row['IP']);\n\t\t\tarray_push($dates, $row['reference_date']);\n\t\t\tarray_push($references, $row['reference']);\n\t\t}\n\t\t\n\t\t\n\t\t// Output the results\n\t\t\n\t\t$accessed_date = date('Y-m-d H:i:s');\n\t\t$id_molecule = (int)$idMol[0];\n\t\t$output_obj = array('accessed' => $accessed_date, 'id_molecule' => $id_molecule, 'chemical_formula' => $chemical_formula, 'n_records' => $N_results);\n\t\t\n\t\t\n\t\t$output_obj_main = array();\n\t\t\n\t\t/*\n\t\tif($query_keyword == 'states')\n\t\t{\n\t\t\t$output_obj_main['states'] = $states;\n\t\t}\n\t\t*/\n\t\t\n\t\t//die(\"query_keyword=\".$query_keyword.\";if query_keyword == omega_ex_e:\".($query_keyword=='Te'));\n\t\t\n\t\tfor($i = 0; $i < $N_results; $i++)\n\t\t{\n\t\t\t\n\t\t\t$output_obj_i = array();\n\t\t\t$output_obj_i['reference'] = $references[$i];\n\t\t\t$output_obj_i['reference_date'] = $dates[$i];\n\t\t\t$output_obj_i['id_record'] = (int)$idAll_in[$i];\n\t\t\t$output_obj_i['state'] = $states[$i];\n\t\t\t$output_obj_i['mass'] = $masses[$i];\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif(($query_keyword == 'Te') || ($query_keyword == 'all'))\n\t\t\t{ \n\t\t\t\t$output_obj_i['Te'] = $Te[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'omega_e') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['omega_e'] = $omega_e[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'omega_ex_e') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['omega_ex_e'] = $omega_ex_e[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'Be') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['Be'] = $Be[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'alpha_e') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['alpha_e'] = $alpha_e[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'De') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['De'] = $De[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'Re') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['Re'] = $Re[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'D0') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['D0'] = $D0[$i];\n\t\t\t}\n\t\t\tif(($query_keyword == 'IP') || ($query_keyword == 'all'))\n\t\t\t{\n\t\t\t\t$output_obj_i['IP'] = $IPs[$i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tarray_push($output_obj_main, $output_obj_i);\n\t\t}\n\n\t\t$output_obj['data'] = $output_obj_main;\n\t\t\n\n\t\t// Free memory\n\t\tmysqli_free_result($retval);\n\n\t\tmysqli_close($conn);\t\n\t\t\n\t\treturn($output_obj);\n\t}", "protected function fareCalculator($args) {\n\n if ($args['ent_type_id'] == '' || $args['ent_from_lat'] == '' || $args['ent_from_long'] == '' || $args['ent_from_lat'] == '' || $args['ent_from_long'] == '' || $args['ent_to_lat'] == '' || $args['ent_to_long'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n// $arr = array();\n\n $getTypeDataQry = \"select * from workplace_types where type_id = '\" . $args['ent_type_id'] . \"'\";\n $getTypeDataRes = mysql_query($getTypeDataQry, $this->db->conn);\n\n $cur_to_pick_arr = $this->_getDirectionsData(array('lat' => $args['ent_curr_lat'], 'long' => $args['ent_curr_long']), array('lat' => $args['ent_from_lat'], 'long' => $args['ent_from_long']));\n\n $cur_to_pick_distance_text = $cur_to_pick_arr['routes'][0]['legs'][0]['distance']['text'];\n\n $arr = $this->_getDirectionsData(array('lat' => $args['ent_from_lat'], 'long' => $args['ent_from_long']), array('lat' => $args['ent_to_lat'], 'long' => $args['ent_to_long']));\n\n $distance_in_mtr = $arr['routes'][0]['legs'][0]['distance']['value'];\n $distance_text = $arr['routes'][0]['legs'][0]['distance']['text'];\n\n $typeData = mysql_fetch_assoc($getTypeDataRes);\n\n $fare1 = number_format($typeData['basefare'] + (float) (($distance_in_mtr / $this->distanceMetersByUnits) * $typeData['price_per_km']), 2, '.', '');\n\n// $distance_in_mts = $arr['routes'][0]['legs'][0]['distance']['value'];\n// $dis_in_km = (float) ($distance_in_mts / $this->distanceMetersByUnits);\n\n $calculatedAmount = $typeData['min_fare']; //(float) $dis_in_km * $typeData['price_per_km'];\n\n $fare = ($calculatedAmount < $fare1) ? $fare1 : $calculatedAmount;\n\n $errMsgArr = $this->_getStatusMessage(21, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'dis' => $distance_text, 'fare' => $fare, 'curDis' => $cur_to_pick_distance_text, 't' => $arr, 't1' => $arr);\n }", "function do_combustion_reaction ($input_array, $options_array)\n{\n\n\t// // USING REGULAR FORMULA ///////\n\t// // ALKANES, ALKENES, ALKYNES ///\n\n\tif ($input_array[\"combusted_compound_type\"] == \"hydrocarbon\") { /// sprawdzamy czy to jest węglowodór\n\t\t$combusted_compound = $input_array[\"combusted_compound\"];\n\t\t$atoms_numbers_array = get_atom_number_in_compound($combusted_compound, $options_array);\n\t\t$n = $atoms_numbers_array[\"C\"]; /// check number of carbon atoms\n\t\t$hydrocarbon_type = get_hydrocarbon_type($combusted_compound, $options_array);\n\t\tif ($input_array[\"combustion_type\"] == \"complete\") { ///// spalanie całkowite\n\t\t\tif ($input_array[\"output_type\"] == \"detailed\") {\n\t\t\t\tif ($hydrocarbon_type == \"alkan\") {\n\t\t\t\t\t$oxygen_compouding_number = (3 * $n + 1);\n\t\t\t\t\t$water_compouding_number = $n + 1;\n\t\t\t\t\tif ($oxygen_compouding_number % 2 == 0) {\n\t\t\t\t\t\t$oxygen_compouding_number = $oxygen_compouding_number / 2;\n\t\t\t\t\t\t$reaction_ready_array[0] = $combusted_compound . \" + \" . $oxygen_compouding_number . \"O<sub>2</sub>\" . \" &rarr; \" . $n . \"CO<sub>2</sub>\" . \" + \" . $water_compouding_number . \"H<sub>2</sub>O\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$fraction1 = '<div class=\"frac\"><span>' . $oxygen_compouding_number . '</span><span class=\"symbol\" style=\"background: white; color: white;\">/</span><span class=\"bottom\">2</span></div>';\n\t\t\t\t\t\t$n2 = $n * 2;\n\t\t\t\t\t\t$water_compouding_number_double = $water_compouding_number * 2;\n\t\t\t\t\t\t$reaction_ready_array[0] = $combusted_compound . \" + \" . $fraction1 . \"O<sub>2</sub>\" . \" &rarr; \" . $n . \"CO<sub>2</sub>\" . \" + \" . $water_compouding_number . \"H<sub>2</sub>O &nbsp; / &bull;2\";\n\t\t\t\t\t\t$reaction_ready_array[1] = \"2\" . $combusted_compound . \" + \" . $oxygen_compouding_number . \"O<sub>2</sub>\" . \" &rarr; \" . $n2 . \"CO<sub>2</sub>\" . \" + \" . $water_compouding_number_double . \"H<sub>2</sub>O\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$unbalanced_reaction_chain = $combusted_compound . \" + \" . \"O2 = CO2 + H2O\";\n\t\t\t\t$reaction_balanced_array = balance_reaction($unbalanced_reaction_chain);\n\t\t\t}\n\t\t}\n\n\t\tif ($input_array[\"combustion_type\"] == \"semi_combustion\") { ///// półspalanie\n\t\t\tif ($input_array[\"output_type\"] == \"detailed\") {\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$unbalanced_reaction_chain = $combusted_compound . \" + \" . \"O2 = CO + H2O\";\n\n\t\t\t\t//\techo $unbalanced_reaction_chain;\n\n\t\t\t\t$reaction_balanced_array = balance_reaction($unbalanced_reaction_chain);\n\t\t\t}\n\t\t}\n\n\t\tif ($input_array[\"combustion_type\"] == \"incomplete\") { ///// spalanie całkowite\n\t\t\tif ($input_array[\"output_type\"] == \"detailed\") {\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$unbalanced_reaction_chain = $combusted_compound . \" + \" . \"O2 = C + H2O\";\n\t\t\t\t$reaction_balanced_array = balance_reaction($unbalanced_reaction_chain);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($input_array[\"output_type\"] != \"detailed\") {\n\t\t$output_array[\"products\"] = $reaction_balanced_array[1];\n\t\t$output_array[\"substrats\"] = $reaction_balanced_array[0];\n\t\treturn $output_array;\n\t\t//return $reaction_balanced_array[0] . \" = \" . $reaction_balanced_array[1];\n\t}\n}", "private function _calculate_weights($factors, $weights)\n\t{\n\t\tforeach ($factors as $weight_factor => $value)\n\t\t{\n\t\t\t$this->_weight[$weight_factor] = (int) ($weights['search_weight_' . $weight_factor] ?? 0);\n\t\t\t$this->_weight_total += $this->_weight[$weight_factor];\n\t\t}\n\t}", "function get_query_params(&$query_params, $db_question, $question) {\n\t\t$mapping_function = $db_question['FedQuestion']['queryable'];\n\t\tif ($mapping_function == 'age') {\n\t\t\t$query_params['age_from'] = min($question['PreCodes']);\n\t\t\t$query_params['age_to'] = max($question['PreCodes']);\n\t\t}\n\t\telseif ($mapping_function == 'gender') {\n\t\t\t// two genders is same as all, so this can be excluded\n\t\t\tif (count($question['PreCodes']) > 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$query_params['gender'] = FedMappings::$mapping_function(current($question['PreCodes']));\n\t\t}\n\t\telseif (in_array($mapping_function, array('hhi'))) {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'postal_code') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$query_params['postal_code'][] = $precode;\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'dma') {\n\t\t\t$dmas = $this->GeoZip->getDmas();\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\tif (array_key_exists($precode, $dmas)) {\n\t\t\t\t\t$query_params['dma_code'][] = $precode;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'ethnicity') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'hispanic') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'children') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'employment') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'job') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'industry') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'organization_size') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode, $question['QuestionID']);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\tif (is_array($result)) {\n\t\t\t\t\t\t$query_params[$mapping_function] = isset($query_params[$mapping_function]) ? array_merge($query_params[$mapping_function], $result) : $result;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'organization_revenue') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'department') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'education') {\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\t$result = FedMappings::$mapping_function($precode);\n\t\t\t\tif ($result !== false) {\n\t\t\t\t\t$query_params[$mapping_function][] = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif ($mapping_function == 'state') { // Question_id = 96 is matched.\n\t\t\tApp::import('Model', 'GeoState');\n\t\t\t$State = new GeoState();\n\t\t\tforeach ($question['PreCodes'] as $precode) {\n\t\t\t\tforeach ($db_question['FedAnswer'] as $answer) {\n\t\t\t\t\tif ($precode == $answer['precode']) {\n\t\t\t\t\t\t$geo_state = $State->find('first', array(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'GeoState.state' => $answer['answer']\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t));\n\t\t\t\t\t\tif ($geo_state) {\n\t\t\t\t\t\t\t$query_params[$mapping_function][] = $geo_state['GeoState']['state_abbr'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function get_noun_score($id, $vibhakthi_number, $host, $uname, $pass, $dbname){\n\n\t/*\tCreate connection\t*/\n\t$conn = new mysqli ($host,$uname,$pass,$dbname);\n\n\t$noun_score = 0;\n\n\t$sql = $conn->query(\"SELECT \".$vibhakthi_number.\" from vibhakthi\".$id.\" WHERE no = 1\");\n\t$result = $sql->fetch_assoc();\n\t$noun1 = $result[$vibhakthi_number];\n\n\t$sql = $conn->query(\"SELECT \".$vibhakthi_number.\" from vibhakthi\".$id.\" WHERE no = 2\");\n\t$result = $sql->fetch_assoc();\n\t$noun2 = $result[$vibhakthi_number];\n\n\t$GLOBALS['score_array'] = array_fill(0, sizeof(explode(\" \",$noun2)), 0);\n\n\t$tok_noun1 = strtok($noun1, \" \");\n\twhile($tok_noun1 !== false){\n\n\t\tnoun_scoring($id, $tok_noun1, $noun2, $host, $uname, $pass, $dbname);\n\t\t$tok_noun1 = strtok(\" \");\n\n\t}\n\n\tfor ($i=0; $i < sizeof($GLOBALS['score_array']); $i++){\n\t\t$noun_score += $GLOBALS['score_array'][$i];\n\t}\n\n\t$conn->close();\n\n\treturn $noun_score;\n}", "function calculatePrice( &$item ) {\r\n\t\r\n\tglobal $db, $site;\r\n\t\r\n\t$resultPrice = $basePrice = $item['price'];\r\n\t\r\n\t$pricing = $db->getAll( 'select * from '. ATTRPRICING_TABLE.\" where product_id='$item[id]' and site_key='$site'\" );\r\n\t\r\n\tforeach ( $pricing as $pidx=>$price ) {\r\n\t\t\r\n\t\t$match = true;\r\n\t\t\r\n\t\tif ( $item['attributes'] )\r\n\t\tforeach( $item['attributes'] as $attr_id=>$attr ) {\r\n\t\t\t\r\n\t\t\t$values = $db->getRow( 'select value1, value2 from '. ATTRPRICEVALUES_TABLE.\" where price_id='$price[id]' and attr_id='$attr_id'\" );\r\n\t\t\t\r\n\t\t\tif ( !$values )\r\n\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t$value1 = $values['value1'];\r\n\t\t\t$value2 = $values['value2'];\r\n\t\t\t$value = $attr['value'];\r\n\t\t\r\n\t\t\tswitch( $attr['type'] ) {\r\n\t\t\t\tcase 'number':\r\n/*\t\t\t\t\tif ( strlen( $value1 ) )\r\n\t\t\t\t\t\t$match &= $value >= $value1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif ( strlen( $value2 ) )\r\n\t\t\t\t\t\t$match &= $value <= $value2;\r\n\t\t\t\t\tbreak;\r\n*/\t\t\t\t\t\r\n\t\t\t\tcase 'single-text':\r\n\t\t\t\tcase 'multi-text':\r\n\t\t\t\tcase 'date':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$match &= $value == $value1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ( $match ) {\r\n\t\t\t$resultPrice = getPriceValue( $price, $basePrice );\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $resultPrice;\r\n\t\r\n}", "function checkCFC($attempted, $answer, $activity_id, $activity, $selected, $maxScore, $completion_state){\n\n\n $selected_options = array();\n\n\n\n foreach ($selected as $key => $value) {\n $val = null;\n if($value[\"type\"] == \"formula\"){\n\n $val = $value[\"value\"];\n\n }else{\n\n $val = floatval($value[\"value\"]);\n\n }\n $selected_options[$value[\"source\"]][$value[\"type\"]] = $val;\n\n }\n\n //////////error_log(json_encode($selected_options), 0);\n\n $correct = array();\n $incorrect = array();\n $totals = array();\n $score = 0;\n // $scales = $activity[\"content\"][\"scale\"];\n $optionsLen = 23;\n // //$pointsForEachSelected = $activity[\"points\"];\n\n $totalPoints = $activity[\"points\"];\n $points = $totalPoints;\n\n // foreach ($answer as $source_id => $values) {\n // if($source_id != \"points\"){\n\n // foreach ($values as $type => $val) {\n // //////error_log('RUUUUUUNN'.json_encode($activity[\"points\"]).$type,0);\n\n // $totalPoints += $activity[\"points\"][$type];\n // $points = $totalPoints;\n\n\n // }\n\n // }\n\n\n // }\n\n\n $completeFeedback = array();\n\n // ////////error_log(json_encode($answer), 0);\n\n\n foreach ($answer as $source_id => $values) {\n if($source_id != \"points\"){\n\n\n\n $checkNum = count($values);\n\n foreach ($values as $header => $value) {\n\n\n $checked = array(\n\n \"source_id\"=>$source_id,\n \"type\"=>$header\n\n );\n\n if($selected_options[$source_id][$header] == $value){\n\n array_push($correct, $checked);\n\n }else{\n\n array_push($incorrect, $checked);\n // $points -= ($totalPoints/$completion_state);\n //\n //\n ////error_log(\"Activity ID -\".json_encode($activity[\"id\"]), 0);\n ////error_log(\"Total Points -\".json_encode($totalPoints), 0);\n ////error_log(\"completion_state -\".$completion_state, 0);\n\n\n $points = $points - ($totalPoints/$completion_state);\n\n $checkNum --;\n\n\n $feedback = array();\n\n $feedback[\"source\"] = $source_id;\n $feedback[\"type\"] = $header;\n\n\n if($header == \"formula\"){\n foreach ($activity[\"content\"][\"formulas\"] as $formulaInd => $formulaObj) {\n if($formulaObj[\"formula_id\"] == $value){\n\n $value = $formulaObj[\"formula_name\"];\n\n }\n }\n }\n $feedback[\"answer\"] = $value;\n array_push($completeFeedback, $feedback);\n\n\n }\n\n\n\n\n }\n\n //if($checkNum == count($selected_options[$source_id])){\n\n //defaults\n\n $ecf = 1;\n $amount = 0;\n $co2 = 0;\n $ch4 = 0;\n $n2o = 0;\n $ef = 0;\n\n //Removed\n $aircon_leakage = 1;\n\n\n if(isset($selected_options[$source_id][\"amount\"])){\n $amount = $selected_options[$source_id][\"amount\"];\n }\n\n if(isset($selected_options[$source_id][\"ecf\"])){\n $ecf = $selected_options[$source_id][\"ecf\"];\n }\n\n if(isset($selected_options[$source_id][\"ch4\"])){\n $ch4 = $selected_options[$source_id][\"ch4\"];\n }\n\n if(isset($selected_options[$source_id][\"n2o\"])){\n $n2o = $selected_options[$source_id][\"n2o\"];\n }\n\n if(isset($selected_options[$source_id][\"co2\"])){\n $co2 = $selected_options[$source_id][\"co2\"];\n }\n\n $ef = ($co2+$ch4+$n2o);\n\n if(isset($selected_options[$source_id][\"ef\"])){\n $ef = $selected_options[$source_id][\"ef\"];\n }\n\n\n if($source_id == \"air_conditioners\"){\n\n $total = array(\n\n \"source_id\"=>$source_id,\n\n \"total\"=>$amount*$aircon_leakage*$ecf*$ef/1000\n\n );\n\n }else{\n\n $total = array(\n\n \"source_id\"=>$source_id,\n\n \"total\"=>$amount*$ecf*$ef/1000\n\n );\n\n }\n\n array_push($totals, $total);\n\n\n }\n\n }\n\n //error_log(\"feedback array: \".json_encode($completeFeedback).\" - \".$attempted.\" - \".$activity[\"attempts\"],0);\n\n if(!(($attempted >= $activity[\"attempts\"]) || (count($incorrect) == 0))){\n\n $completeFeedback = array();\n }\n\n $score = ($points/($totalPoints))*$maxScore;\n\n return array(\"correct\"=>$correct, \"incorrect\"=>$incorrect, \"score\"=>$score, \"possible_score\"=>$maxScore, \"points\"=>$points, \"possible_points\"=>$totalPoints, \"tco2e\"=>$totals, \"answer\"=>$completeFeedback);\n\n\n }", "private function score_tobaco_use(){\r\n\t\t$data = $this->data['tobaco_use'];\r\n\t\t$q44 = $this->scoreValue(array(1,4,3,5),$data['q44']);\r\n//\t\t$q45 = $this->scoreValue(array(4,4,3,2,1),$data['q45']);\r\n//\t\t$q46 = $this->scoreValue(array(4,4,3,2,1), $data['q46']);\r\n//\t\tif ($q44 == 5) {\r\n//\t\t\t$q45 = 5;\r\n//\t\t\t$q46 = 5;\r\n//\t\t}\r\n/*\r\n\t\t$q44Raw = $q44;\r\n\t\t$q44 = ($q44 > $q45) ? $q44 : $q45;\r\n\t\t$q45 = $q44;\r\n\t\t\t\r\n\t\t$q46 = $this->scoreValue(array(3,3,2,2,1),$data['q46']);\r\n\t\t$q46 = ($q44Raw > $q46) ? $q44Raw : $q46;\r\n*/\t\t\t\r\n//\t\t$q47 = $this->scoreValue(array(5,3,2,1,1),$data['q47']);\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('q44' => array($q44,1));\r\n//\t\t\t\t\t\t'q45' => array($q45,.30),\r\n//\t\t\t\t\t\t'q46' => array($q46,.30),\r\n//\t\t\t\t\t\t'q47' => array($q47,.10));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "function similarity($rep, $guessrep) {\r\n//usleep(15);\r\n if (stripos($rep, ';')) {\r\n $repExplodArray = explode(';', $rep);\r\n } elseif (stripos($rep, ',')) {\r\n $repExplodArray = explode(',', $rep);\r\n } else {\r\n $repExplodArray = array($rep);\r\n }\r\n if (stripos($guessrep, ';')) {\r\n $gpExplodArray = explode(';', $guessrep);\r\n } elseif (stripos($guessrep, ',')) {\r\n $gpExplodArray = explode(',', $guessrep);\r\n } else {\r\n $gpExplodArray = array($guessrep);\r\n }\r\n $rep_part_count = count($repExplodArray);\r\n $matchcount = 0;\r\n foreach ($repExplodArray as $key => $value) {\r\n $value = trim($value);\r\n for ($j = 0; $j < count($gpExplodArray); $j++) {\r\n $gpExplodArray[$j] = trim($gpExplodArray[$j]);\r\n if ($value === $gpExplodArray[$j]) {\r\n $matchcount = $matchcount + 1;\r\n }\r\n }\r\n }\r\n $similarityRatio = $matchcount / $rep_part_count;\r\n $percentage=($similarityRatio*100).'%';\r\n\t\r\n//\t//Something to write to txt log\r\n//\t$log = \"date: \".date(\"F j, Y, g:i a\").PHP_EOL.\r\n// \"Guessrep: \". $guessrep.PHP_EOL.\r\n// \"rep: \". $rep.PHP_EOL.\t\t\r\n// \"-------------------------\".PHP_EOL;\r\n////Save string to log, use FILE_APPEND to append.\r\n//\tfile_put_contents('./log_'.date(\"j.n.Y\").'.txt', $log, FILE_APPEND);\r\n\r\n return $percentage;\r\n}", "public function getProximitySearch() {\n return 10;\n }", "function _fourD_analysis_calculate_project_weight( $nid, $uid=0, $getsubtotal=false ) {\n\n $weight = 0.0;\n \n /* Factor in the Ability to Assess, by each user */\n if( $uid ){\n $weight = _fourD_analysis_calculate_project_weight_internal( $nid, $uid, $getsubtotal );\n }\n \n else{\n// if( $getsubtotal ){\n /* Factor in the Ability to Assess, by each user */\n $usrs = db_query(\"SELECT uid, assess_ability FROM {node_4dnetwork_analysis} WHERE nid = '%d'\", $nid);\n $users = array();\n while( $u = db_fetch_object($usrs) ) {\n $users[$u->uid] = $u->assess_ability;\n }\n \n // Formula: (Wxq\"*Axq+Wyq\"*Ayq ... )/(Axq+Ayq...)\n $ability_total = 0;\n foreach($users as $auid=>$ability){\n $ability_total += $ability;\n $weight += ( _fourD_analysis_calculate_project_weight_internal( $nid, $auid, $getsubtotal, true ) * $ability );\n }\n \n if( $ability_total > 0 ){\n $weight = $weight/$ability_total;\n }\n// }\n }\n \n return $weight;\n}", "function getResult($resultUser1, $resultUser2, $resultAdmin1, $resultAdmin2, $result)\n{\n $scoreTotal = 0;\n global $puntaje_resultado;\n global $puntaje_empate;\n global $puntaje_ganar;\n global $puntaje_perder;\n\n //verificamos si es el resultado exacto\n if ($resultUser1 == $resultAdmin1 && $resultUser2 == $resultAdmin2)\n $scoreTotal += $puntaje_resultado;\n //verificamos si hay empate\n if ($resultUser1 == $resultUser2 && $resultAdmin1 == $resultAdmin2)\n $scoreTotal += $puntaje_empate;\n //verificamos si gano el equipo uno gano o perdio\n $scoreTotal += ($resultUser1 > $resultUser2 && $resultAdmin1 > $resultAdmin2) ? $puntaje_ganar : $puntaje_perder;;\n //verificamos si gano el equipo dos gano o perdio\n $scoreTotal += ($resultUser1 < $resultUser2 && $resultAdmin1 < $resultAdmin2) ? $puntaje_ganar : $puntaje_perder;\n\n if ($result == \"C\" || $result == \"S\")\n $scoreTotal = 0;\n\n return $scoreTotal;\n}", "function cariPosisi($batas){\nif(empty($_GET[halprofile])){\n\t$posisi=0;\n\t$_GET[halprofile]=1;\n}\nelse{\n\t$posisi = ($_GET[halprofile]-1) * $batas;\n}\nreturn $posisi;\n}", "abstract public function getWeights($visits, $conversions, $xSales, $revenue, $sumSqRev);", "function protein_charge($pK,$aminoacid_content,$pH){\r\n $charge = partial_charge($pK[\"N_terminus\"],$pH);\r\n $charge+= partial_charge($pK[\"K\"],$pH)*$aminoacid_content[\"K\"];\r\n $charge+= partial_charge($pK[\"R\"],$pH)*$aminoacid_content[\"R\"];\r\n $charge+= partial_charge($pK[\"H\"],$pH)*$aminoacid_content[\"H\"];\r\n $charge-= partial_charge($pH,$pK[\"D\"])*$aminoacid_content[\"D\"];\r\n $charge-= partial_charge($pH,$pK[\"E\"])*$aminoacid_content[\"E\"];\r\n $charge-= partial_charge($pH,$pK[\"C\"])*$aminoacid_content[\"C\"];\r\n $charge-= partial_charge($pH,$pK[\"Y\"])*$aminoacid_content[\"Y\"];\r\n $charge-= partial_charge($pH,$pK[\"C_terminus\"]);\r\n return $charge;\r\n}", "function findRoute()\r\n{\r\n\t// --------- GLOBALIZE ---------\r\n\tglobal $route;\r\n\t// ------ CONVERT TO INTEGER ------\r\n\t$P1 = intval(GET_INC('p1'));\r\n\t$P2 = intval(GET_INC('p2'));\r\n\t$P2n = GET_INC('p2name');\r\n\t$city = GET_INC('city');\r\n\t// ------- FIND ROUTE -------\r\n\t$route->findRoute($P1,$P2,$city);\r\n\t$route->nature($P2n);\r\n\t// ------- OUTPUT RESULT -------\r\n\tfor ( $i=1;$i<=$route->num;$i++ )\r\n\t{\r\n\t\t// Split with Dollar Sign\r\n\t\tif ( $i != 1 )\r\n\t\t\techo '$$$';\r\n\t\techo $route->nat[$i];\r\n\t}\r\n}", "function show_position($userComparison) \n{\n\t$allTotals = array();\n\n\t$smallestValue = -1.0;\n\n\t$rightRoom = \"default\";\n\n\t$rightCoordinates = \"default\";\n\n\tforeach($userComparison as $value) {\n\t\n\n\t\t$local_relations = $value->get_relations();\n\n\t\t$temp_sum = 0.0;\n\n\t\t$n = 0;\n\n\t\tforeach($local_relations as $value_2) {\t\n\t\t\t$temp_sum = $temp_sum + $value_2;\n\t\t\t$n = $n + 1;\t\n\t\t\t}\n\t\n\t\tif ( $n >= 3) {\n\n\t\t\t$relative_sum = $temp_sum / (double)($n);\n\n\t\t\tif ($smallestValue == -1.0) {\n\n\t\t\t\t$smallestValue = $relative_sum;\n\t\t\t\t$rightRoom = $value->get_room();\n\t\t\t\t$rightCoordinates = $value->get_position();\n\n\t\t\t\t}\n\t\t\telseif ($smallestValue > $relative_sum) {\n\t\t\t\n\t\t\t\t$smallestValue = $relative_sum;\n\t\t\t\t$rightRoom = $value->get_room();\n\t\t\t\t$rightCoordinates = $value->get_position();\n\t\t\t\n\t\t\t\t}\n\n\n\t\t\t$totalDifference = new FprintDifference($value->get_room(), $value->get_position(), $relative_sum);\n\t\t\tarray_push($allTotals, $totalDifference);\n\t\t\t}\n\n\t}\n\n\n\techo $rightRoom . \": \" . $rightCoordinates . \", relative distance was:\" . $smallestValue;\n\n\n\treturn $allTotals;\n\n\n}", "public function similarity($id_lbb_aktif = 3) // $id_lbb_aktif adalah lbb yang sedang dilihat dan dicari nilai kemiripan terhapat lbb lain\n {\n $tabel_tf_idf_balik = $this->tabel_tf_idf_balik();\n $rata_term = $this->rata_term();\n $similarity = [];\n\n\n foreach ($tabel_tf_idf_balik as $id_lbb => $row){\n $sim_atas = 0;\n $bawah1 = 0;\n $bawah2 = 0;\n $sim_bawah = 0;\n\n if ($id_lbb == $id_lbb_aktif){ // $id_lbb_aktif adalah LBB yang dicari kemiripannya dengan LBB lain\n continue;\n }\n\n foreach ($row as $term_aktivitas => $tf_idf){\n//\n if ($tf_idf == 0 || $tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas] == 0){\n continue;\n }\n\n $sim_atas = $sim_atas + (($tf_idf-$rata_term[$term_aktivitas])*($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas]));\n $bawah1 = $bawah1 + (pow($tf_idf-$rata_term[$term_aktivitas],2));\n $bawah2 = $bawah2 + (pow($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas], 2));\n $sim_bawah = sqrt($bawah1)*sqrt($bawah2);\n }\n////\n if ($sim_bawah == 0){ //similarity bawah bernilai 0 terjadi karena tidak ada bisa dicari nilai kemiripan lbb aktif dengan lbb n lainnya\n continue;\n }\n\n $similarity [$id_lbb] = $sim_atas / $sim_bawah;\n }\n// arsort($similarity);\n return $similarity;\n }", "public abstract function get_pairwise(string $their_did): ?array;", "function _fourD_analysis_calculate_project_prerequisite_weight( $nid, $uid=0, $project=false ) {\n\n //$goals = _fourD_analysis_get_goals();\n if( !$project ) {\n $project = fourD_analysis_project_entry_get($nid, $uid);\n }\n \n if( !$project ){\n return 0.0;\n }\n \n $weight = 0;\n if( isset($project['project_prereq']) ){\n foreach( $project['project_prereq'] as $pid=>$pre){\n $weight += $pre['rating'];\n //fourD_analysis_debug('calculate_project_prerequisite_weight; pid: '. $pid.'; Weight: '.$pre['rating'].'; Cumlative: '.$weight );\n }\n }\n \n return $weight;\n \n}", "function checkSimilarity ($nutrient){\n\t//list of nutrients\n\t$nutrientList = array(\"Energy\",\"Protein\",\"Fat\",\"Carbohydrate\",\"Sugars\",\"Sodium\",\"Vitamin E\",\"Vitamin K\",\"Vitamin C\", \"Vitamin A\",\"Vitamin D\",\"Vitamin B6\",\"Biotin\",\"Thiamin\",\"Riboflavin\",\"Niacin\",\"Folic Acid\",\"Vitamin B12\",\"Calcium\",\"Iron\",\"Zinc\",\"Pantothenic Acid\",\"Folate\",\"Phosphorus\",\"Iodine\",\"Magnesium\",\"Selenium\",\"Copper\",\"Manganese\",\"Chromium\",\"Molybdenum\",\"Chloride\");\n\t$test=str_replace(' ', '', $nutrient);\n\tfor ($x=0;$x<count($nutrientList);$x++)\n\t{\n\t\t$test2=str_replace(' ', '', $nutrientList[$x]);\n\t\t//$sim = similar_text(strtolower($nutrient), strtolower($nutrientList[$x]), $perc);\n\t\t$sim = similar_text(strtolower($test), strtolower($test2), $perc);\n\t\tif ($perc>70 && abs(strlen($test)-strlen($test2)<2))\n\t\t{\n\t\t\t//if (strcmp(substr(strtolower($nutrient,0,7))),\"vitamin\")===0){\n\t\t\t//check if it is a vitamin\n\t\t\tif (strcmp(substr(strtolower($test2),0,7),\"vitamin\")===0){\n\t\t\t\tif ($perc>90) return $nutrientList[$x];\n\t\t\t\telse continue;\n\t\t\t}\n\t\t\t//else return strtoupper(substr($nutrient,0,1)).strtolower(substr($nutrient,1));\n\t\t\telse return $nutrientList[$x];\n\t\t}\n\t}\n\treturn \"INVALID\";\n}", "function displayResults($arrayName) \n{\n //Display Non-aggregated results: \n //(Non-Aggregated Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Y/N Seen, value[5] Original URL, value[6] Cleaned Snippet placeholder)\n if ($_POST['result_type']==='Non-Aggregated' ) {\n //Loop through Array and check that values have been stored in it:\n foreach ($arrayName as $key => $value) {\n echo \"<p style=\\\"text-align:justify\\\">\n <a href=\\\"$value[5]\\\">$value[1]</a><br />\" \n . $value[2] //snippet\n . \"<br />Score: <strong>\" \n . number_format($value[3], 2, '.', '') //score\n . \"</strong>\" \n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n } else if ($_POST['result_type']==='Aggregated'\n || $_POST['result_type']==='Weighted'\n ) {\n //Display Aggregated or Weighted results:\n //(Aggregated Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Y/N Seen, value[5] Original URL, \n //value[6] Cleaned Snippet placeholder, value[7] coordinate placeholder)\n foreach ($arrayName as $key => $value) {\n echo \"<p class=\\\"text-center\\\">\n <a href=\\\"$value[4]\\\">$value[1]</a><br />\"\n . $value[2] //snippet\n . \"<br />Score: <strong>\" . number_format($value[3], 2, '.', '') \n . \"</strong>\"\n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n } else {\n //Display Clustered Results\n //(Clustered Arrays have the following elements:\n //value[0]Trimmed URL, value[1] Title, value[2] Snippet, value[3] Score, \n //value[4] Original URL, value[5] Cleaned Snippet, \n //value[6] Coordinate)\n foreach ($arrayName as $key => $value) {\n echo \"<p style=\\\"text-align:justify\\\">\n <a href=\\\"$value[4]\\\">$value[1]</a><br />\"\n . $value[2] //snippet\n . \"<br />Score: <strong>\" . number_format($value[3], 2, '.', '') \n . \"</strong>\"\n . \"<br /><a href=\\\"#top\\\"><small>new search</small></a></p>\";\n }\n }\n}", "function calculateTermQualityPoints($clid,$semester,$year){\n //Initialize the temporary variables\n $totalhours=0;\n //Query to return the student's grades and credit hours\n $result = mysql_query(\"Select grade, sum(credit_hours) FROM(( Select grade, credit_hours FROM take T, class Cl WHERE T.grade IS NOT NULL and T.grade<>'I' and T.grade <> 'CR' and T.grade <> 'NC' and T.grade <> 'W' and T.clid = '$clid' and Cl.section_num = T.section_num and Cl.semester = T.semester and Cl.year = T.year and Cl.course_num = T.course_num and Cl.course_dept = T.course_dept and Cl.credit_hours IS NOT NULL and T.semester='$semester' and T.year='$year') UNION ALL (Select T.grade,Co.credit_hours FROM take T,course Co WHERE T.grade IS NOT NULL and T.grade<>'I' and T.grade <> 'NC' and T.grade <> 'W' and T.grade <> 'CR' and T.clid = '$clid' and T.course_dept = Co.course_dept and T.course_num = Co.course_num and T.semester='$semester' and T.year='$year' and NOT EXISTS(select * from class Cl WHERE Cl.course_dept = Co.course_dept and Cl.course_num = Co.course_num and Cl.credit_hours IS NOT NULL))) AS result GROUP BY grade;\") or die(mysql_error());\n //Find the quality points per class\n while($row = mysql_fetch_array($result)){\n //Is the grade an A?\n if($row['grade'] == 'A')\n //If so, increment totalhours by four times the sum of the credit hours\n $totalhours+=4*$row['sum(credit_hours)'];\n //Is the grade a B?\n else if ($row['grade']=='B')\n //If so, increment totalhours by 3 times the sum of the credit hours\n $totalhours+=3*$row['sum(credit_hours)'];\n //Is the grade a C?\n else if ($row['grade']=='C')\n //If so, increment totalhours by 2 times the sum of the credit hours\n $totalhours+=2*$row['sum(credit_hours)'];\n //Is the grade a D?\n else if ($row['grade']=='D')\n //If so, increment totalhours by the sum of the credit hours\n $totalhours+=1*$row['sum(credit_hours)'];\n }\n return $totalhours;\n}", "function fiftyone_degrees_evaluate_signature(\n $matched_nodes,\n $signature_index,\n $useragent_bytes,\n $last_node_character,\n &$lowest_score,\n $is_closest,\n &$debug_info,\n $headers) {\n $signature = fiftyone_degrees_read_signature($signature_index, $headers);\n\n $debug_info['signatures_compared']++;\n\n $score = fiftyone_degrees_get_signature_score (\n $signature,\n $matched_nodes,\n $useragent_bytes,\n $lowest_score,\n $last_node_character,\n $is_closest,\n $headers);\n\n if ($score < $lowest_score) {\n $lowest_score = $score;\n return TRUE;\n }\n else {\n return FALSE;\n }\n}", "function countScores($graph, $node, $nodesArray, $finish)\n{\n\tglobal $successArray;\n\n\tforeach ($graph[$node] as $key => $value) {\n\t\t\n\t\t$key1 = array_search($key, $nodesArray['node']);\n\n\t\tif ($nodesArray[$key1]['score'] == 100000) {\n\t\t\t$nodesArray[$key1]['score'] = 0;\n\t\t}\n\n\t\t$nodesArray[$key1]['score'] += $value; // this wont do in cases of the shorter routes \n\t\t$nodesArray[$key1]['route'] .= \"->\" . $node . \"->\" . $key;\n\n\t\tif ($key == $finish) {\n\t\t\tarray_push($successArray, $nodesArray[$key1]); // check this\n\t\t}\n\t}\n\n\treturn $nodesArray;\n}", "function getLamCost ($totalSheets, &$rawCost, &$labor, $quantity, $Nup) {\n\tif ($_POST[\"lam\"] == \"lam\") {\n\t\t$lamCost = 0;\n\t\t$lamCost += ($totalSheets * LAMCOST);\n\t}\n\telse {\n\t\t$lamCost = 0;\n\t\t}\n$rawCost += $lamCost;\n\n\n// if booklet + lam\n\tif ($_POST[\"lamcover\"] == \"lamcover\") {\n\t\t$lamCoverLabor = 0;\n\t\t$lamCoverLabor += (( $quantity / $Nup ) * LAMTIME * HOUR );\n\t\t$lamCoverCost = 0;\n\t\t$lamCoverCost += ($quantity * LAMCOST);\n\t}\n\telse {\n\t\t$lamCoverLabor = 0;\n\t\t$lamCoverCost = 0;\n\t}\n$labor += $lamCoverLabor;\n$rawCost += $lamCoverCost;\n\n\n//Determine Lam Labor\n\tif ($_POST[\"lam\"] == \"lam\") {\n\t\t$lamLabor = 0;\n\t\t$lamLabor += ((($totalSheets/4) * LAMTIME) * HOUR);\n\t}\n\telse {\n\t\t$lamLabor = 0;\n\t}\n$labor += $lamLabor;\n}", "function arrayManipulation($number, $queries) {\n\n $array=[];\n for ($index = 0; $index < count($queries); $index++)\n {\n $array[$queries[$index][0]-1]=0;\n $array[$queries[$index][1]]=0;\n }\n for ($index = 0; $index < count($queries); $index++)\n {\n $a= $queries[$index][0];\n $b= $queries[$index][1];\n $k= $queries[$index][2];\n $array[$a-1] += $k;\n $array[$b] -= $k;\n }\n\n $sum=0;\n $max=0;\n for ($index = 0; $index < $number; $index++)\n {\n @$sum += $array[$index];\n if ($sum > $max)\n $max = $sum;\n }\n return $max;\n}", "function get_points($desired_answers_array, $given_answers, $importance_item) {\n global $importance;\n if(is_array($desired_answers_array)) {\n return (in_array($given_answers, $desired_answers_array)) ? ($importance[$importance_item]) : 0;\n }\n else return ($desired_answers_array == $given_answers) ? $importance[$importance_item] : 0;\n }", "function MontantGlobal()\n{\n\t\n\t \nif (isset($_SESSION['panier']))\n\t {\n $total=0;\n for($i = 0; $i < count($_SESSION['panier']['id_produit']); $i++)\n {\n $total += $_SESSION['panier']['qte_produit'][$i] * $_SESSION['panier']['prix_produit'][$i];\n }\n return $total;\n\t }\n\t else\n\t\t return 0;\n}", "public function totalq1($modalite)\r\n\t{\r\n\t$conge = new Default_Model_Conge();\r\n\t$debut_mois = $this->getAnnee_reference().'-01-01';\r\n\t$fin_mois = $this->getAnnee_reference().'-12-31'; // il faut la remplacer par l'annee de reference\r\n\t\r\n\t\r\n\t$jours_ouvres_de_annee_ref = $conge->joursOuvresDuMois($debut_mois,$fin_mois);\r\n\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t$personne = new Default_Model_Personne();\r\n\t$id_entite =1; // MBA : pourquoi entite 1 pour personne? \r\n\t$personne = $personne->fetchall('id_entite ='.$id_entite. '&&'. 'id ='.$this->getPersonne()->getId());\r\n\t//var_dump($personne);\r\n\tif (null!==$personne)\r\n\t\r\n\t{\r\n\t\tif ($modalite == 4)\r\n\t\t{\r\n\t\t\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t\t\tif($nbr_heurs_ouvrees_annee >1607)\r\n\t\t\t{\r\n\t\t\t\treturn 0.5;\r\n\t\t\t}\r\n\t\t\telseif($nbr_heurs_ouvrees_annee <1607.5)\r\n\t\t\t{\r\n\t\t\t\treturn 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 5 ||$modalite == 6 )\r\n\t\t{\r\n\t\t\t$nbr_jours_ouvrees_annee = $jours_ouvres_de_annee_ref-243;\r\n\t\t\tif($nbr_jours_ouvrees_annee < 10)\r\n\t\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t\t}\r\n\t\t\telseif($nbr_jours_ouvrees_annee >10)\r\n\t\t\t{\r\n\t\t\t\treturn $nbr_jours_ouvrees_annee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 1 ||$modalite == 2 ||$modalite == 3)\r\n\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\telse return 0;\r\n\t\r\n\t}", "function fiftyone_degrees_get_signature(\n &$matched_node_indexs,\n $useragent_bytes,\n &$method,\n &$timings,\n &$debug_info,\n &$headers) {\n\n $matched_signature = fiftyone_degrees_signature_binary_seach(\n $matched_node_indexs,\n $debug_info,\n $headers);\n\n if ($matched_signature < 0) {\n $timings['numeric_match_time'] = microtime(TRUE);\n // No. So find any other nodes that match if numeric differences\n // are considered.\n $lowest_score = NULL;\n $matched_numeric_nodes = fiftyone_degrees_evaluate_numeric_nodes(\n $useragent_bytes,\n $matched_node_indexs,\n $lowest_score,\n $debug_info,\n $headers);\n\n // Can a precise match be found based on the nodes?\n $matched_signature = fiftyone_degrees_signature_binary_seach(\n $matched_numeric_nodes,\n $debug_info,\n $headers);\n\n $timings['numeric_match_time'] = microtime(TRUE) - $timings['numeric_match_time'];\n\n if ($matched_signature >= 0) {\n // Yes a precise match was found.\n $method = 'numeric';\n return $matched_signature;\n }\n $timings['get_closest_sigs_time'] = microtime(TRUE);;\n if (count($matched_node_indexs) > 0) {\n $sig_indexs = fiftyone_degrees_get_closest_signature_indexs(\n $matched_node_indexs,\n $timings,\n $debug_info,\n $headers);\n $ranked_sig_indexs = array_splice($sig_indexs, 0, $headers['info']['max_signatures']);\n $timings['get_closest_sigs_time'] = microtime(TRUE) - $timings['get_closest_sigs_time'];\n $timings['get_sig_from_rank_time'] = microtime(TRUE);\n $signatures = array();\n foreach($ranked_sig_indexs as $s) {\n $signatures[] = fiftyone_degrees_get_ranked_signature_related_offset($s, $headers);\n }\n $timings['get_sig_from_rank_time'] = microtime(TRUE) - $timings['get_sig_from_rank_time'];\n \n // Store the score that we've got from the numeric difference\n // calculations.\n $starting_score = $lowest_score;\n $timings['eval_nearest_sigs_time'] = microtime(TRUE);\n $matched_signature = fiftyone_degrees_evaluate_signatures(\n $matched_numeric_nodes,\n $signatures,\n FALSE,\n $useragent_bytes,\n $timings,\n $debug_info,\n $headers);\n\n $method = 'nearest';\n $timings['eval_nearest_sigs_time'] = microtime(TRUE) - $timings['eval_nearest_sigs_time'];\n if($matched_signature === NULL) {\n $method = 'closest';\n $timings['eval_closest_sigs_time'] = microtime(TRUE);\n $matched_signature = fiftyone_degrees_evaluate_signatures(\n $matched_numeric_nodes,\n $signatures,\n TRUE,\n $useragent_bytes,\n $timings,\n $debug_info,\n $headers);\n // Increase the lowest score by the starting value.\n $lowest_score += $starting_score;\n $debug_info['difference'] = $lowest_score;\n $timings['eval_closest_sigs_time'] = microtime(TRUE) - $timings['eval_closest_sigs_time'];\n }\n }\n }\n else {\n $method = 'exact';\n }\n return $matched_signature;\n}", "private function calcTraitScores() {\n # scale trait scores based on trip purpose\n $traitScore = ($this->purposeForTravel == 'Vacation') ? self::TRAIT_SCORE \n : self::TRAIT_SCORE*.75; \n \n foreach ($this->cities as $city){\n $score = 0; \n foreach($this->perfectCity as $desiredCityTrait) {\n if (in_array($desiredCityTrait, $city['Vacation'])) {\n $score += $traitScore; \n }\n }\n if($this->purposeForTravel == 'Permanent') {\n foreach($this->perfectCity as $desiredCityTrait) {\n if(in_array($desiredCityTrait, $city['Permanent']))\n $score += $traitScore; \n }\n }\n $this->traitScores[] = $score; \t\n }\n }", "function calculateAct($clid){\n //Query to get the student's individual ACT scores\n $result = mysql_query(\"Select S.act_english, S.act_reading, S.act_math, S.act_science\n FROM student S\n WHERE S.clid = '$clid';\") or die(mysql_error());\n $row = mysql_fetch_array($result);\n //Add the results of the query and divide by 4\n $tempcomp = ($row['act_english'] + $row['act_reading'] + $row['act_math'] + $row['act_science'])/4.0;\n //Round to the nearest integer\n $tempcomp = round($tempcomp);\n return $tempcomp;\n \n}", "private function score_biometric_data(){\t\t\r\n\t\t$data = $this->data['biometric_data'];\r\n\t\t$bp_systolic = $data['bp_systolic'];\r\n\t\tif ($bp_systolic > 140) $bp_systolic = 1;\r\n\t\telse if ($bp_systolic > 120) $bp_systolic = 3;\r\n\t\telse if ($bp_systolic == 0) $bp_systolic = 0;\r\n\t\telse $bp_systolic = 5;\r\n\t\t\t\r\n\t\tif ($data['bp_diastolic'] > 90) $bp_diastolic = 1;\r\n\t\telse if ($data['bp_diastolic'] > 80) $bp_diastolic = 3;\r\n\t\telse if ($data['bp_diastolic'] == 0) $bp_diastolic = 0;\r\n\t\telse $bp_diastolic = 5;\r\n\t\t\r\n\t\t$body_fat = 5;\r\n\t\tif ($this->demographics['gender'] == \"M\") {\r\n\t\t\tif ($this->demographics['age'] >= 60){\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 24.1) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 23.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 19.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif ($this->demographics['age'] >= 60) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else if ($this->demographics['age'] >= 40) {\r\n\t\t\t\tif ($data['body_fat'] > 31.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 30.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\r\n\t\t\t}else{\r\n\t\t\t\tif ($data['body_fat'] > 30.5) $body_fat = 1;\r\n\t\t\t\tif ($data['body_fat'] > 23.4) $body_fat = 3;\r\n\t\t\t\telse if ($data['body_fat'] == 0) $body_fat = 0;\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\r\n\t\t$waist = 5;\r\n\t\tif ($this->demographics['gender'] == 'M') {\r\n\t\t\tif ($data['waist'] > 40) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['waist'] > 35) {\r\n\t\t\t\t$waist = 1;\r\n\t\t\t}\r\n\t\t\telse if ($data['waist'] == 0) {\r\n\t\t\t\t$waist = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$bmi = 3;\r\n\t\tif ($data['bmi'] > 30) $bmi = 1;\r\n\t\telse if ($data['bmi'] > 25) $bmi = 3;\r\n\t\telse if ($data['bmi'] > 18) $bmi = 5;\r\n\t\telse if ($data['bmi'] == 0) $bmi = 0;\r\n\t\t$data['bmi'] = sprintf(\"%.1f\", $data['bmi']);\r\n\r\n\t\t$blood_glucose = 5;\r\n\t\tif ($data['blood_glucose'] > 200) $blood_glucose = 1;\r\n\t\telse if ($data['blood_glucose'] > 129) $blood_glucose = 3;\t\t\t\r\n\t\telse if ($data['blood_glucose'] == 0) $blood_glucose = 0;\r\n\t\t\r\n\t\t$cholesterol = 5;\r\n\t\tif ($data['cholesterol'] > 239) $cholesterol = 1;\r\n\t\telse if ($data['cholesterol'] > 199) $cholesterol = 3;\t\t\t\r\n\t\telse if ($data['cholesterol'] == 0) $cholesterol = 0;\r\n\t\t\t\t\t\r\n\t\t$triglycerides = 5;\r\n\t\tif ($data['triglycerides'] > 200) $triglycerides = 1;\r\n\t\telse if ($data['triglycerides'] > 149) $triglycerides = 3;\t\t\t\r\n\t\telse if ($data['triglycerides'] == 0) $triglycerides = 0;\r\n\t\t\t\t\t\r\n\t\t$hdl = 1;\r\n\t\tif ($this->demographics['gender'] == 'F') {\r\n\t\t\tif ($data['hdl'] > 40) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 30) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($data['hdl'] > 50) $hdl = 5;\r\n\t\t\telse if ($data['hdl'] > 35) $hdl = 3;\r\n\t\t\telse if ($data['hdl'] == 0) $hdl = 0;\r\n\t\t}\r\n\r\n//\t\tif($data['hdl']>59) $hdl=5;\r\n//\t\telse if($data['hdl']>40) $hdl=3;\r\n//\t\telse if($data['hdl']==0) $hdl=0;\r\n\r\n\t\t$ldl = 5;\r\n\t\tif ($data['ldl'] > 140) $ldl = 1;\r\n\t\telse if ($data['ldl'] > 100) $ldl = 3;\r\n\t\telse if ($data['ldl'] == 0) $ldl = 0;\r\n\r\n\t\tif($data['hdl'] > 0 && $data['cholesterol'] > 0)\r\n\t\t\t$ratio = $data['cholesterol'] / $data['hdl'];\r\n\t\telse\r\n\t\t\t$ratio = 0;\r\n\t\t\r\n\t\t$ratio = sprintf(\"%.1f\", $ratio);\r\n\r\n\t\t$tc_hdl = 5;\r\n\t\tif ($ratio > 4.5) $tc_hdl = 1;\r\n\t\telse if ($ratio == 0) $tc_hdl = 0;\r\n\r\n\r\n\t\t$hemoglobin = 5;\r\n\t\tif ($data['hemoglobin'] == 0)\r\n\t\t\t$hemoglobin = 0;\r\n\t\telse if (($data['hemoglobin'] < 4.0) || ($data['hemoglobin'] > 6.0)) {\r\n\t\t\t$hemoglobin = 1;\r\n\t\t}\r\n\r\n\t\t$cotinine = 5;\r\n\t\tif ($data['cotinine'] > 0) {\r\n\t\t\t$cotinine = 1;\r\n\t\t}\r\n\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = 0;\r\n\t\t$ob->data = array('bp_systolic' => array($bp_systolic,.0625, 0.0, $data['bp_systolic']),\r\n\t\t\t\t\t\t'bp_diastolic' => array($bp_diastolic,.0625, 0.0, $data['bp_diastolic']),\r\n\t\t\t\t\t\t'body_fat' => array($body_fat,.125, 0.0, $data['body_fat']),\r\n\t\t\t\t\t\t'bmi' => array($bmi,.0625, 0.0, $data['bmi']),\r\n\t\t\t\t\t\t'waist' => array($waist, .0625, 0.0, $data['waist']),\r\n\t\t\t\t\t\t'blood_glucose' => array($blood_glucose,.0417, 0.0, $data['blood_glucose']),\r\n\t\t\t\t\t\t'hemoglobin' => array($hemoglobin,.0417, 0.0, $data['hemoglobin']),\r\n\t\t\t\t\t\t'cotinine' => array($cotinine,.0416, 0.0, $data['cotinine']),\r\n\t\t\t\t\t\t'cholesterol' => array($cholesterol,.1, 0.0, $data['cholesterol']),\r\n\t\t\t\t\t\t'triglycerides' => array($triglycerides,.1, 0.0, $data['triglycerides']),\r\n\t\t\t\t\t\t'hdl' => array($hdl,.1, 0.0, $data['hdl']),\r\n\t\t\t\t\t\t'ldl' => array($ldl,.1, 0.0, $data['ldl']),\r\n\t\t\t\t\t\t'tc_hdl' => array($tc_hdl,.1, 0.0, $ratio));\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2] = $rec[0] * $rec[1];\r\n\t\t\t$ob->total += $rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "function getParamsArray($_query,$_objectSup1){\n\tswitch ($_query) {\n\t\tcase \"addAdherent\":\n\t\t\t$_numlicence = date('Y').str_pad(checkParam('club'),3,'0',STR_PAD_LEFT).str_pad(getAdherentsAI(),5,'0',STR_PAD_LEFT);\n\t\t\t$_datenaissance = explode('/',checkParam('datenaissance'));\n\t\t\t$__datenaissance = $_datenaissance[2].'-'.$_datenaissance[1].'-'.$_datenaissance[0];\n\t\t\treturn array(\n\t\t\t\t'numlicence'=>$_numlicence,\n\t\t\t\t'nom'=>checkParam('nomadh'),\n\t\t\t\t'prenom'=>checkParam('prenom'),\n\t\t\t\t'datenaissance'=>$__datenaissance,\n\t\t\t\t'adrvoie'=>checkParam('adrvoie'),\n\t\t\t\t'adrcp'=>checkParam('adrcp'),\n\t\t\t\t'adrville'=>checkParam('adrville'),\n\t\t\t\t'mail'=>checkParam('mailadh'),\n\t\t\t\t'telfixe'=>checkParam('telfixe'),\n\t\t\t\t'telport'=>checkParam('telport'),\n\t\t\t\t'grade'=>checkParam('grade'),\n\t\t\t\t'categorie'=>checkParam('categorie'));\n\t\t\tbreak;\n\t\tcase \"addStatut\":\n\t\t\treturn array(\n\t\t\t\t'adherent'=>checkParam('adherent'),\n\t\t\t\t'club'=>checkParam('club'),\n\t\t\t\t'statut'=>checkParam('statut')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"addStatutSaison\":\n\t\t\treturn array(\n\t\t\t\t'adherent'=>checkParam('adherent'),\n\t\t\t\t'club'=>checkParam('club'),\n\t\t\t\t'statut'=>checkParam('statut'),\n\t\t\t\t'saison'=>checkParam('saison')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"addSaison\":\n\t\t\t$_debut = explode('/',checkParam('debut'));\n\t\t\t$__debut = $_debut[2].'-'.$_debut[1].'-'.$_debut[0];\n\t\t\t$_fin = explode('/',checkParam('fin'));\n\t\t\t$__fin = $_fin[2].'-'.$_fin[1].'-'.$_fin[0];\n\t\t\treturn array(\n\t\t\t\t'nom'=>checkParam('nom'),\n\t\t\t\t'debut'=>$__debut,\n\t\t\t\t'fin'=>$__fin);\t\t\t\t\n\t\t\tbreak;\n\t\tcase \"getSingleAdherent\":\n\t\t\treturn array(\n\t\t\t\t'idbdd'=>$_objectSup1\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getSingleAdherentByNumLicence\":\n\t\t\treturn array(\n\t\t\t\t'numlicence'=>checkParam('numlicence')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getSingleStatut\":\n\t\t\terror_log(\"getSingleStatut >>> \".$_objectSup1);\n\t\t\treturn array(\n\t\t\t\t'idstatut'=>$_objectSup1\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getSingleSaison\":\n\t\t\treturn array(\n\t\t\t\t'numsaison'=>$_objectSup1\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getAdherentsFull\":\n\t\t\treturn null;\n\t\t\tbreak;\n\t\tcase \"getAdherentsFilter\":\n\t\t\treturn array(\n\t\t\t\t'typefilter'=>checkParam('typefilter')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getAdherentsClubFull\":\n\t\t\treturn array(\n\t\t\t\t'club'=>checkParam('viewclub')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getAdherentsClubFilter\":\n\t\t\treturn array(\n\t\t\t\t'club'=>checkParam('viewclub'),\n\t\t\t\t'typefilter'=>checkParam('typefilter')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getAdherentStatuts\":\n\t\t\treturn array(\n\t\t\t\t'adherent'=>checkParam('adherent')\n\t\t\t\t);\n\t\t\tbreak;\n\t\tcase \"getAdherentGrades\":\n\t\t\treturn array(\n\t\t\t\t'adherent'=>checkParam('adherent')\n\t\t\t\t);\n\t\t\tbreak;\n\t}\n}", "function deck_calculate_stats_value(array $base, array $bond, int $user_leader_skill, int $guest_leader_skill = 0): array\r\n{\r\n\t$lsk = [$user_leader_skill, $guest_leader_skill];\r\n\t$add = [0.0, 0.0, 0.0];\r\n\t\r\n\tforeach($lsk as $skill)\r\n\t{\r\n\t\tif($skill == 0)\r\n\t\t\tcontinue;\r\n\t\t\r\n\t\tif($skill >= 1 && $skill <= 9)\r\n\t\t{\r\n\t\t\t/* Non-cross attribute */\r\n\t\t\t$i = intdiv($skill - 1, 3);\r\n\t\t\t$add[$i] += (float)$base[$i] * 0.03 * ((($skill - 1) % 3) + 1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tswitch($skill)\r\n\t\t\t{\r\n\t\t\t\tcase 31:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Smile Angel */\r\n\t\t\t\t\t$add[0] += (float)$base[1] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 32:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Smile Empress */\r\n\t\t\t\t\t$add[0] += (float)$base[2] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 33:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Pure Princess */\r\n\t\t\t\t\t$add[1] += (float)$base[0] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 34:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Pure Empress */\r\n\t\t\t\t\t$add[1] += (float)$base[2] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 35:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Cool Princess */\r\n\t\t\t\t\t$add[2] += (float)$base[0] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase 36:\r\n\t\t\t\t{\r\n\t\t\t\t\t/* Cool Angel */\r\n\t\t\t\t\t$add[2] += (float)$base[1] * 0.12;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tdefault:\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t$out = [];\r\n\t\r\n\tfor($i = 0; $i < 3; $i++)\r\n\t\t$out[$i] = $base[$i] + $bond[$i] + (int)round($add[$i]);\r\n\t\r\n\treturn $out;\r\n}", "function prepare_pdb($query, $maxatoms, &$result)\n{\n# + preg_match_all( \"/^HETATM.*/m\", $query, $out2);\n\n# $lines = implode(\"\\n\", $out1[0]);//array_merge($out1[0], $out2[0]));\n\n $lines = explode(\"\\n\", $query);\n $na = 0;\n $nh = 0;\n foreach ($lines as $line) {\n if (stripos($line, \"ATOM \") === 0) {\n $na += 1;\n\t $atoms[] = $line;\n } else if (stripos($line, \"HETATM\") === 0) {\n $nh += 1;\n\t $atoms[] = $line;\n }\n }\n\n $qsize = $na + $nh;\n\n if ($qsize > $maxatoms) {\n\t$result = sprintf(\"Too many atoms. Limit is %d atoms.\", $maxatoms);\n\treturn 0;\n } \n if ($qsize < 3) {\n\t$result = sprintf(\"At least 3 atoms are required, %d atoms provided (%d).\", $qsize, strlen($query));\n\treturn 0;\n }\n\n $result = implode(\"\\n\", $atoms);\n return 1;\n}", "function get_numpage($nb_actualites, $nbapp){\r\n //definition d'une valeur par defaut\r\n $numpage = 0;\r\n if(isset($_GET['numpage'])){//si une valeur est specifiee\r\n //adaptation de la valeur\r\n $numpage = (int) $_GET['numpage'];\r\n if($nb_actualites <= $numpage * $nbapp){\r\n $numpage = 0;\r\n }\r\n }\r\n return $numpage;\r\n}", "function getUVFloodCost (&$rawCost, $totalSheets) {\n\tif ($_POST[\"uvFlood\"] == \"uvFlood\") {\n\t\t$itemUVFlood = 1;\n\t\t$uvFloodCost = UVFLOODSETUP;\n\t\t$uvFloodCost += ($totalSheets * UVFLOODCOST);\n\t}\nelse {\n\t$uvFloodCost = 0;\n\t}\n\n$rawCost += $uvFloodCost;\n}", "public function temperatureScore();" ]
[ "0.61645085", "0.51042414", "0.51036465", "0.50581944", "0.49472237", "0.4887124", "0.48491582", "0.4835526", "0.48137143", "0.48050368", "0.47986183", "0.4618553", "0.46162587", "0.45589066", "0.45555937", "0.45544058", "0.4539949", "0.4525036", "0.4499143", "0.44935155", "0.44894746", "0.44879255", "0.44796902", "0.4429223", "0.44064167", "0.44040242", "0.44030076", "0.44011477", "0.4393333", "0.43918028", "0.43851247", "0.4380126", "0.43764603", "0.43663147", "0.4366115", "0.4362775", "0.43619454", "0.43559486", "0.43529168", "0.43501037", "0.43409288", "0.4335423", "0.43284547", "0.43278036", "0.4321721", "0.43105045", "0.4310425", "0.43009633", "0.4298118", "0.42927173", "0.4291015", "0.4285675", "0.42754447", "0.42746788", "0.42740723", "0.4271377", "0.42670992", "0.4259836", "0.4256265", "0.42444313", "0.42384833", "0.42382455", "0.42348313", "0.4233775", "0.42277935", "0.422454", "0.42094487", "0.4207886", "0.4204485", "0.4199416", "0.41974148", "0.41900522", "0.4189549", "0.41743422", "0.4173297", "0.41653955", "0.41565943", "0.4154072", "0.41528565", "0.4149323", "0.4147551", "0.4147423", "0.41468394", "0.41406104", "0.41328627", "0.4123807", "0.41180006", "0.4115725", "0.41072455", "0.41057605", "0.40994218", "0.40985453", "0.40978354", "0.40950018", "0.4092324", "0.40883806", "0.40864182", "0.40847367", "0.40821418", "0.40787855" ]
0.71615887
0
Active navbar buttons,see layouts/master.blade.php /var $nav_act = [ 'main_class'=>'', 'about_class'=>'', 'prod_class'=>'', 'case_class'=>'', 'cont_class'=>'', ];
public function RootRequest() { return redirect('/main'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function active_nav_class($classes, $item){\n\tif (in_array('current-menu-item', $classes)) {\n\t\t$classes[] = 'active';\n\t}\n\treturn $classes;\n}", "function uk_active_nav_class( $class, $item ) {\n if (in_array( 'current-menu-item', $class )) {\n $class[] = 'uk-active';\n }\n return $class;\n}", "function set_active_nav_class ($classes, $item) {\n if (in_array('current-menu-item', $classes) ){\n $classes[] = 'activemenu ';\n }\n return $classes;\n}", "function rwbs_add_active_class_to_nav_menu($classes) {\n if (in_array('current-menu-item', $classes, true) || in_array('current_page_item', $classes, true)) {\n $classes = array_diff($classes, array('current-menu-item', 'current_page_item', 'active'));\n $classes[] = 'active';\n }\n return $classes;\n}", "protected function active(array $nav)\n {\n // check if each item is active\n foreach ($nav as $key => $value) {\n // check if it is local\n if (isset($value['slug'])) {\n // if the request starts with the slug\n if ($this->request->is($value['slug']) || $this->request->is($value['slug'].'/*')) {\n // then the navigation item is active, or selected\n $nav[$key]['active'] = true;\n } else {\n // then the navigation item is not active or selected\n $nav[$key]['active'] = false;\n }\n } else {\n // then the navigation item is not active or selected\n $nav[$key]['active'] = false;\n }\n }\n\n // spit out the nav bar array at the end\n return $nav;\n }", "function simple_bootstrap_add_active_class($classes, $item) {\n if( in_array('current-menu-item', $classes) ) {\n $classes[] = \"active\";\n }\n \n return $classes;\n}", "function special_nav_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "function trucking_filter_active_class_menu( $classes){\n if(in_array('current-menu-item', $classes)) {\n $classes[] = 'active';\n }\n return $classes;\n}", "function greenfields_add_active_class($classes, $item)\n{\n if (in_array('current-menu-item', $classes)) {\n $classes[] = \"active\";\n }\n\n return $classes;\n}", "function foundation_active_class($classes, $item){\n if( in_array('current-menu-item', $classes) ){\n $classes[] = 'active ';\n }\n return $classes;\n}", "public function render_navbar($items, $active = NULL) {\n $this->config['type_class'] = 'navbar-nav';\n return $this->render($items, $active); \n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function get_active_menu (string $page, string $page_active, string $class_active = \"active\") {\n return $page == $page_active ? $class_active : \"\";\n }", "function isActive($path, $active = 'active nav-active nav-expanded'){\n return call_user_func_array('Request::is', (array)$path) ? $active : '';\n}", "function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'about2' => 'about',\n\t\t\t'credits' => 'crédits',\n\t\t\t'bio' => 'bio',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}", "function c12_page_nav( $active ) {\n\t\t\n\t\t$c12_page_nav = '';\n\t\t\n\t\t$items = array(\n\t\t\t'about' => 'à propos',\n\t\t\t'audio' => 'audio',\n\t\t\t'bio' => 'bio',\n\t\t\t'credits' => 'crédits',\n\t\t\t// 'presse' => 'presse',\n\t\t\t'order' => 'commander'\n\t\t);\n\t\t\n\t\t$c12_page_nav = c12_page_nav_global( $items, $active );\n\t\t\n\t\treturn $c12_page_nav;\n\t\t\n\t}", "function makeLinks($nav){\n \n $myReturn = '';\n foreach($nav as $key => $value){\n \n if(THIS_PAGE == $key)\n {//current page add active class \n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link active\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n \n }else{//add formatting\n $myReturn .= '\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"' . $key . '\">' . $value . '</a>\n </li>';\n \n }\n \n }\n \n return $myReturn;\n \n}", "function active_menu()\n{\n $CI =& get_instance();\n\n $class = '';\n if($CI->router->fetch_class() == 'blog') {\n $class = 'class=\"navbar-item-active\"';\n }\n return $class;\n}", "function set_active($patterns, array $classes = [], $active = 'active')\n {\n if (Request::is($patterns)) {\n $classes[] = $active;\n }\n $class = e(implode(' ', $classes));\n return empty($classes) ? '' : \"class=\\\"{$class}\\\"\";\n }", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\"' class='nav-link $cl'>$text</a>\"; \n}", "function setActiveNavTab($path)\n{\n return Request::is($path) ? 'nav-link active' : 'nav-link';\n}", "function current_to_active($text)\n{\n $replace = array(\n //List of menu item classes that should be changed to \"active\"\n 'current-menu-item' => 'active',\n 'current_page_parent' => 'active',\n 'current_page_ancestor' => 'active',\n 'current_page_item' => 'active',\n );\n $text = str_replace(array_keys($replace), $replace, $text);\n return $text;\n}", "function makeLinks($nav)\r\n{\r\n$myReturn='';\r\n foreach($nav as $key => $value){\r\n if(THIS_PAGE == $key){//current page add active class\r\n \r\n $myReturn .='\r\n <li class=\"nav-item \">\r\n <a class=\"nav-link active\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; \r\n \r\n \r\n }else{//add no formatting\r\n \r\n\r\n \r\n $myReturn .='\r\n <li class=\"nav-item\">\r\n <a class=\"nav-link\" href=\"' . $key . ' \">' . $value . ' </a>\r\n </li>'; }\r\n \r\n \r\n \r\n }\r\n \r\n \r\n return $myReturn;\r\n\r\n\r\n\r\n}", "function nav_menu_css_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$post_type = get_query_var('post_type');\n\t$blog_id = get_option('page_for_posts');\n\t$is_404 = is_404();\n\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'is-active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t$classes[] = 'nav__item';\n\t$classes[] = 'nav__item--' . $slug;\n\t$classes = array_unique($classes);\n\n\t// Add active class if item has \"cases-cpt\" class\n\tif ( $post_type === 'cases') {\n\t\tif ( in_array('cases-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// Add active class if item has \"job-cpt\" class\n\tif ( $post_type === 'job') {\n\t\tif ( in_array('job-cpt', $classes) ) {\n\t\t\t$classes[] = 'is-active';\n\t\t}\n\t}\n\n\t// If \"blog\" has active class, and current page is either tax or cpt, remove active class\n\tif ( $item->object_id === $blog_id && in_array('is-active', $classes)) {\n\t\tif ( $post_type === 'cases' || $post_type === 'job' || $is_404 ) {\n\t\t\t$key = array_search('is-active', $classes); \n\t\t\tif ($key !== false) unset($classes[$key]);\n\t\t}\n\t}\n\n\treturn array_filter($classes, 'is_element_empty');\n}", "function ActiveMenu($requestUri)\n{\n $current_file_name = basename($_SERVER['REQUEST_URI'], \".php\");\n\n if ($current_file_name == $requestUri)\n echo 'class=\"active\"';\n}", "function nav_accordion_item_class( $classes, $item, $args ) {\n\tif ( 'nav-primary' === $args->theme_location ) {\n\t\t$classes[] = 'NavAccordion_Item';\n\t\tif ( array_intersect( $classes, [ 'current-menu-item' ] ) ) {\n\t\t\t$classes[] = 'NavAccordion_Item-Active';\n\t\t}\n\t}\n\treturn $classes;\n}", "function active_link($active)\n {\n return $active ? 'active' : '';\n }", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "function add_current_nav_class($classes, $item) {\n\t\tglobal $post;\n\t\t\n\t\t// Getting the post type of the current post\n\t\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t\t$current_post_type_slug = $current_post_type->rewrite[slug];\n\t\t\t\n\t\t// Getting the URL of the menu item\n\t\t$menu_slug = strtolower(trim($item->url));\n\t\t\n\t\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\t\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t\n\t\t $classes[] = 'current-menu-item';\n\t\t\n\t\t}\n\t\t\n\t\t// Return the corrected set of classes to be added to the menu item\n\t\treturn $classes;\n\t\n\t}", "protected function _markActive($menu){\n $controllerName = Zend_Registry::get('controllerName');\n $actionName = Zend_Registry::get('actionName');\n\n foreach($menu as $tabKey => $tab){\n if ($controllerName === $tab['main']['controller'] && $actionName === $tab['main']['action']){\n $menu[$tabKey]['main']['active'] = TRUE;\n }\n\n if(isset($tab['pages'])){\n foreach($tab['pages'] as $pagekey => $page) {\n if($controllerName === $page['controller'] && ($actionName === $page['action'] || (array_key_exists('scope', $page) && $page['scope'] == '*'))){\n $menu[$tabKey]['pages'][$pagekey]['active'] = TRUE;\n $menu[$tabKey]['main']['active'] = TRUE;\n break;\n }\n }\n }\n }\n\n return $menu;\n }", "protected function controlActiveElements() {}", "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 add_current_nav_class($classes, $item) {\n\tglobal $post;\n\t// Getting the post type of the current post\n\t$current_post_type = get_post_type_object(get_post_type($post->ID));\n\t$current_post_type_slug = $current_post_type->rewrite['slug'];\n\t// Getting the URL of the menu item\n\t$menu_slug = strtolower(trim($item->url));\n\t// If the menu item URL contains the current post types slug add the current-menu-item class\n\tif (strpos($menu_slug,$current_post_type_slug) !== false) {\n\t\t$classes[] = 'current-menu-item';\n\t}\n\t// Return the corrected set of classes to be added to the menu item\n\treturn $classes;\n}", "public static function initToolbar($dir, $active, $sticky){\n $auth = Session::getAuth();\n?>\n <nav class=\"navbar navbar-expand-md navbar-dark bg-dark <?php if($sticky)echo 'sticky-top'; ?>\">\n <a class=\"navbar-brand\" href=\"<?php Nav::echoHome($dir); ?>\">\n <img src=\"<?php Asset::embedIcon($dir, 'primary.svg'); ?>\" width=\"30\" height=\"30\" class=\"d-inline-block align-top\" alt=\"\">\n </a>\n\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarSupportedContent\" aria-controls=\"navbarSupportedContent\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n\n <div class=\"collapse navbar-collapse\" id=\"navbarSupportedContent\">\n <ul class=\"navbar-nav mr-auto\">\n <li class=\"nav-item <?php self::printActive($active, 'Home'); ?>\">\n <a class=\"nav-link\" href=\"<?php Nav::echoHome($dir); ?>\">Home<span class=\"sr-only\">(current)</span></a>\n </li>\n <li class=\"nav-item <?php self::printActive($active, 'Docs'); ?>\">\n <a class=\"nav-link\" href=\"https://www.trialation.com/proto-framework-docs/\" target=\"_blank\">Docs</a>\n </li>\n <li class=\"nav-item dropdown <?php self::printActive($active, 'Examples'); ?>\">\n <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n Samples\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">\n <a class=\"dropdown-item\" href=\"<?php Nav::echoPage($dir, \"examples/ex-api.php\") ?>\">Proto API Project</a>\n <a class=\"dropdown-item\" href=\"<?php Nav::echoPage($dir, \"examples/ex-off-db.php\") ?>\">Proto DB Project</a>\n </div>\n </li>\n <li class=\"nav-item dropdown <?php self::printActive($active, 'More'); ?>\">\n <a class=\"nav-link dropdown-toggle\" href=\"#\" id=\"navbarDropdown\" role=\"button\" data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n More\n </a>\n <div class=\"dropdown-menu\" aria-labelledby=\"navbarDropdown\">\n <a class=\"dropdown-item\" href=\"https://www.trialation.com/proto-framework-docs/making-apis/\" target=\"_blank\">Proto API Docs</a>\n <a class=\"dropdown-item\" href=\"https://www.trialation.com/proto-framework-docs/proto-db/\" target=\"_blank\">Proto DB Docs</a>\n <div class=\"dropdown-divider\"></div>\n <a class=\"dropdown-item\" target=\"_blank\" href=\"https://github.com/TummanoonW/Proto-Framework\">GitHub</a>\n <a class=\"dropdown-item\" href=\"<?php Nav::echoURL($dir, 'feedback.php'); ?>\">Send a feedback</a>\n <a class=\"dropdown-item\" href=\"<?php Nav::echoURL($dir, 'about.php'); ?>\">About</a>\n </div>\n </li>\n </ul>\n\n <!-- Right Side Bar -->\n <div class=\"inline\">\n <ul class=\"navbar-nav mr-auto\">\n <?php if(Session::checkUserExisted()){ ?>\n <li class=\"nav-item <?php self::printActive($active, 'Profile'); ?>\">\n <a class=\"nav-link\" href=\"<?php Nav::echoURL($dir, 'profile.php'); ?>\">\n <i class=\"far fa-user\"></i>\n <?php echo $auth->username ?> \n </a>\n </li>\n <?php }else{ ?>\n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"<?php Nav::echoURL($dir, 'register.php'); ?>\">\n Register\n </a>\n </li> \n <li class=\"nav-item\">\n <a class=\"nav-link\" href=\"<?php Nav::echoURL($dir, 'login.php'); ?>\">\n Log In\n </a> \n </li> \n <?php } ?>\n </ul>\n </div>\n </div>\n </nav>\n<?php\n }", "function activate_menu($controller) {\n $CI = get_instance();\n // Getting router class to active.\n $class = $CI->router->fetch_class();\n return ($class == $controller) ? 'active' : '';\n }", "function bounce_tab_innertabs($current = 'connection') {\n $tabs = array(\n 'connection' => __('Settings', WYSIJA),\n 'actions' => __('Actions & Notifications', WYSIJA)\n );\n $html_content = '<h3 id=\"wysija-innertabs\" class=\"nav-tab-wrapper\">';\n foreach ($tabs as $tab => $name) {\n $class = ( $tab == $current ) ? ' nav-tab-active' : '';\n $html_content.= \"<a class='nav-tab$class' href='#$tab'>$name</a>\";\n }\n $html_content.='</h2>';\n return $html_content;\n }", "protected function activePage( $pages )\n\t{\n\t\t$pages = explode(',', $pages);\n\t\treturn ( in_array($this->controller->route, $pages) ? 'active' : '' );\n\t}", "function activatePage($activePage, $currentPage){\n\techo (strcmp($currentPage, $activePage) === 0)? 'active' : '';\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}", "public function ActiveCSS() {\r\n\t\t$url = $_SERVER [\"REQUEST_URI\"];\r\n\t\t$url = htmlspecialchars ( $url );\r\n\t\t$class = str_replace ( '/', '-', $url );\r\n\t\t$class = substr ( $class, 1 );\r\n\t\t\r\n\t\t$vowels = array (\"@\", \"?\" );\r\n\t\t$pieces['request'] = str_replace ( $vowels, \"\", $class );\r\n\t\tif (empty($pieces['request'])) {\r\n\t\t\t$pieces['request'] = 'home';\r\n\t\t}\r\n\t\t\r\n\t\t$pieces['version'] = 'v1';\r\n\t\t$activecss = implode (' ', $pieces );\r\n\t\techo $activecss;\r\n\t}", "function renderMenuToHTML($currentPageId,$currentlang) {\n $mymenu = array(\n // idPage titre\n 'accueil' => array( 'Accueil' ),\n 'cv' => array( 'Cv' ),\n 'projets' => array('Mes Projets'),\n 'contact' => array('Contact')\n );\n \n // ...\n echo \"<nav class=\\\"navbar navbar-expand-lg bg-secondary text-uppercase fixed-top\\\" id=\\\"mainNav\\\">\";\n if($currentlang=='en'){\n echo \"<div class=\\\"boutonlangue\\\">\";\n echo \"<a class=\\\"btn selected\\\" href=\\\"index.php?page=\".$currentPageId.\"&lang=en\\\"> EN </a>\";\n echo \"<a class=\\\"btn \\\" href=\\\"index.php?page=\".$currentPageId.\"&lang=fr\\\"> FR </a>\";\n echo \"</div>\";\n }\n elseif($currentlang=='fr'){\n echo \"<div class=\\\"boutonlangue\\\">\";\n echo \"<a class=\\\"btn \\\" href=\\\"index.php?page=\".$currentPageId.\"&lang=en\\\"> EN</a>\";\n echo \"<a class=\\\" btn selected\\\" href=\\\"index.php?page=\".$currentPageId.\"&lang=fr\\\"> FR </a>\";\n echo \"</div>\";\n }\n echo \"<div class=\\\"container\\\">\";\n echo \"<a class=\\\"navbar-brand js-scroll-trigger\\\" href=\\\"index.php\\\">Mon Site</a>\";\n echo \"<button class=\\\"navbar-toggler navbar-toggler-right text-uppercase font-weight-bold bg-primary text-white rounded\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbarResponsive\\\" aria-controls=\\\"navbarResponsive\\\" aria-expanded=\\\"false\\\" aria-label=\\\"Toggle navigation\\\">\";\n echo \"Menu\";\n echo \"<i class=\\\"fas fa-bars\\\"></i>\";\n echo \"</button>\";\n echo \"<div class=\\\"collapse navbar-collapse\\\" id=\\\"navbarResponsive\\\">\";\n echo \"<ul class=\\\"navbar-nav ml-auto\\\">\";\n foreach($mymenu as $pageId => $pageParameters) {\n echo \"<li class=\\\"nav-item mx-0 mx-lg-1\\\">\";\n echo \"<a\";\n echo \" class=\\\"\";\n if($pageId === $currentPageId)\n echo \"selected \" ;\n echo \"nav-link py-3 px-0 px-lg-3 rounded js-scroll-trigger\\\"\";\n echo \"href=\\\"index.php?page=\".$pageId.\"&lang=\".$currentlang.\"\\\"'>$pageParameters[0]</a>\";\n echo \"</li>\";\n }\n echo \"</ul></div></div></nav>\";\n }", "function launchpad_modify_nav_class($classes, $item) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\t\n\t$classes[] = 'menu-' . $slug;\n\t\n\t$link_url = preg_replace('|^https?://' . $_SERVER['HTTP_HOST'] . '/|', '/', $item->url);\n\t$current_url = $_SERVER['REQUEST_URI'];\n\t\n\tif($link_url != '/' && $current_url !== $link_url && stristr($current_url, $link_url) !== false) {\n\t\t$classes[] = 'current-hierarchy-ancestor';\n\t} else if($current_url === $link_url) {\n\t\t$classes[] = 'current-hierarchy-page';\t\t\n\t}\n\t\n\t$classes = array_unique($classes);\n\t\n\t// Apply filters to allow the developer to change it.\n\t$classes = apply_filters('launchpad_nav_class', $classes);\n\t\n\treturn array_filter(\n\t\t$classes, \n\t\tfunction($el) {\n\t\t\t$el = trim($el);\n\t\t\treturn empty($el) ? false : true;\n\t\t}\n\t);\n}", "function activation($in) {\n $directoryURI = $_SERVER['PHP_SELF'];\n $path = parse_url($directoryURI, PHP_URL_PATH);\n $components = explode('/', $path);\n $first_part = $components[1];\n\n if($first_part == $in) {\n echo 'class=\"active\"';\n }\n}", "function ntp_blogpost_nav_class($classes, $item) {\n if ( is_single() && get_post_type() !== 'ntp_project' && $item->title == \"Blog\" ) {\n $classes[] = 'current_page_item';\n }\n return $classes;\n}", "function list_nav($base, $cur, $items, $num=1)\n{\n\t$nav = '';\n\t$tab = '';\n\n\tfor($i=1; $i<=$num; $i+=1)\n\t{\n\t\t$tab .= \"\\t\";\n\t}\n\n\tforeach($items as $key=>$value)\n\t{\n\t\t$ref = base_url().$base.$key;\n\t\tswitch($cur)\n\t\t{\n\t\t\tcase ltrim($key,'/'):$active = ' class=\"active\"';break;\n\t\t\tdefault:$active = '';\n\t\t}\n\t\t$nav .= $tab.'<li><a'.$active.' href=\"'.$ref.'\">'.$value.\"</a></li>\\n\";\n\t}\n\treturn $nav;\n}", "function getClass($strUrl) {\n\n echo $strUrl == $_SERVER['REQUEST_URI'] ? 'active' : '';\n}", "function activeLink($name=null,$tree=false)\n {\n\n\n\n if ( $tree and $name == 'setup' )\n {\n\n $setupArray = ['client-types','resources','teams','costs'];\n\n if ( in_array(request()->segment(1) ,$setupArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( $tree and $name == 'reports' )\n {\n $reportArray = ['opportunity-report','activity-report','proposal-report','invoice-report'];\n\n if ( in_array(request()->segment(1) ,$reportArray) )\n {\n return 'active selected';\n }\n return '';\n\n\n }\n\n if ( !is_null($name) and request()->segment(1) == $name )\n {\n if ( $tree )\n {\n return 'current-page';\n }\n\n return 'active selected';\n }\n\n\n }", "function content_nav() {\n\t\t$current_individual_nav_items = 0;\n\t\t$max_individual_nav_items = 4;\n\t\t\n\t\tforeach($this->data['content_actions'] as $key => $item) :\n\t\t\tif ( $current_individual_nav_items == $max_individual_nav_items ) { ?>\n\t\t\t\t<?\n\t\t\t}\n\t\t\t\n\t\t\techo $this->makeListItem( $key, $item );\n\t\t\t$current_individual_nav_items++;\n\t\tendforeach;\n\t\t\n\t\t?></ul></li><?\n\t}", "function echoActiveClassIfRequestMatches($requestUri=array())\n{\n $routing_uri = $_SERVER['REQUEST_URI'];\n foreach($requestUri as $ruri) {\n if (strpos($routing_uri, $ruri) !== FALSE)\n echo ' class=\"active\"';\n }\n}", "function showMenu()\n {\n $menu = config('app.menu') ;\n\n $text = '' ;\n \n\n foreach ($menu as $name => $item)\n {\n $active = false ;\n \n if(isset($item['dropdown']))\n {\n $text .= '<li class=\"dropdown menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> '. PHP_EOL;\n }\n else \n {\n $text .= '<li class=\"menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($item['action']) ? route($item['action']) : '' ).'\">' . PHP_EOL;\n }\n\n $text .= '<i class=\"'. $item['icon'] .'\"></i>'. PHP_EOL;\n $text .= '<span>'. $item['title'] .'</span>'. PHP_EOL;\n \n if(isset($item['dropdown']))\n {\n $text .= '<b class=\"caret\"></b>';\n $text .= '</a>'. PHP_EOL;\n $text .= '<ul class=\"dropdown-menu\">' ;\n foreach ($item['dropdown'] as $subName => $subItem) \n {\n $text .= '<li>' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($subItem['action']) ? route($subItem['action']) : '' ).'\">' . PHP_EOL;\n $text .= '<span>'. $subItem['title'] .'</span>'. PHP_EOL;\n $text .= '</a>'. PHP_EOL; \n $text .= '</li>'. PHP_EOL;\n\n $active = (!$active && isset($subItem['action'])) \n ? $subItem['action'] == Request::route()->getName() : $active ; \n }\n $text .= '</ul>' ;\n }\n else \n {\n $text .= '</a>'. PHP_EOL;\n $active = (!$active && isset($item['action'])) \n ? $item['action'] == Request::route()->getName() : $active ;\n }\n\n $text .= '</li>'. PHP_EOL;\n\n if($active)\n {\n $text = str_replace('menu-'. $name , 'active', $text);\n }\n }\n\n return $text ;\n }", "function icon_imagenavigation($links, $activ) {\n\n\t\t// GET NAVIGATION ICON PATH\n\t\t$iconpath = (defined('USER_ADMIN'))?\n\t\t\t\t\t\tADMIN_IMAGES\n\t\t\t\t\t\t:\n\t\t\t\t\t\t'skins/'. $this->activeskin .'/images/';\n\n\t\t// SET NAVIGATION NAMES\n\t\t$navigation = array ('first' => 'nav_first',\n\t\t\t\t\t\t\t\t\t'prev' => 'nav_prev',\n\t\t\t\t\t\t\t\t\t'next' => 'nav_next',\n\t\t\t\t\t\t\t\t\t'last' => 'nav_last'\n\t\t\t\t\t\t\t\t );\n\n\t\t// BUILT NVIGATION ITEMS\n\t\tforeach ($navigation as $key=>$item) {\n\t\t\t// NAVIGATION ITEM INACTIV\n\t\t\tif ($activ[$key]) {\n\t\t\t\t$icon = $iconpath . $key .'_activ.gif';\n\t\t\t\t$size\t = (is_readable($icon))? getimagesize($icon):'';\n\t\t\t\t$image = sprintf('<img class=\"icon\" src=\"%s\" %s alt=\"%$3s\" title=\"%$3s\" />',\n\t\t\t\t\t\t\t\t$icon,\n\t\t\t\t\t\t\t\t$size[3],\n\t\t\t\t\t\t\t\t$this->lang[$key]\n\t\t\t\t\t\t\t);\n\t\t\t\t$this->$item = sprintf($links[$key], $image);\n\t\t\t}\n\t\t\t// NAVIGATION ITEM INACTIV OR NOT EXIST\n\t\t\telse {\n\t\t\t\t$icon = $iconpath . $key .'_inactiv.gif';\n\t\t\t\t$size = (is_readable($icon))? getimagesize($icon):'';\n\t\t\t\t$image = sprintf('<img class=\"icon\" src=\"%s\" %s alt=\"\" />',\n\t\t\t\t\t\t\t\t$icon,\n\t\t\t\t\t\t\t\t$size[3]\n\t\t\t\t\t\t\t);\n\t\t\t\t$this->$item = $image;\n\t\t\t}\n\t\t}\n\t}", "public function define_navbar_nav_button_activate($p_state)\r\n\t\t{\r\n\t\t\t$this->c_navbar_nav_button_activate = $p_state;\r\n\t\t}", "function get_active_nav($value)\n{\n\treturn ($value === TRUE) ? 'active' : '';\n}", "private function cssAut()\n {\n $this->active_class = explode(' ',$this->active_class);\n $this->active_class = $this->active_class[0];\n }", "function add_nav_menu_classes($classes, $item){\n if( is_post_type_archive('program') && ($item->title == \"Programs\") ){\n $classes[] = 'current-menu-item';\n }\n\n return $classes;\n }", "function revo_nav_menu_css_class( $classes, $item ) {\n\t$slug = sanitize_title($item->title);\n\t$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);\n\t$classes = preg_replace('/^((menu|page)[-_\\w+]+)+/', '', $classes);\n\n\t$classes[] = 'menu-' . $slug;\n\n\t$classes = array_unique($classes);\n\n\treturn array_filter($classes, 'revo_element_empty');\n}", "function isActivate($params, $id)\n{\t\n\tif( isset($params['named']['Search.category_id'])\n\t\t\t&&\n\t\t($params['named']['Search.category_id'] == $id)\n\t){\n\t\treturn 'class=\"active\"';\n\t}\t\n\t\n\treturn '';\n}", "public function current_to_active( $nav_menu, $args ){\n\t\t$replace = array(\n\t\t\t//List of menu item classes that should be changed to \"active\"\n\t\t\t'current_page_item' \t=> 'active',\n\t\t\t'current_page_parent' \t=> 'active',\n\t\t\t'current_page_ancestor' => 'active',\n\t\t\t'current-menu-item' \t=> 'active',\n\t\t\t'current-menu-parent' \t=> 'active',\n\t\t\t'current-menu-ancestor' => 'active',\n\t\t);\n\t\t$nav_menu = str_replace(array_keys($replace), $replace, $nav_menu);\n\n\t\treturn $nav_menu;\n\t}", "public function getLiActiveClass(): string;", "public function navbarNav(array $items, $currentPath = null, array $option = [])\n {\n $option = array_replace_recursive([\n // ul class\n 'class' => 'nav navbar-nav',\n // append ul class\n 'appendClass' => '',\n // ul > li attr\n 'parentAttr' => [\n 'class' => 'dropdown',\n ],\n // ul > li > a attr\n 'parentItemAttr' => [\n 'class' => 'dropdown-toggle',\n 'data-toggle' => 'dropdown',\n 'role' => 'button',\n 'aria-haspopup' => 'true',\n 'aria-expanded' => 'false',\n ],\n // ul > li > ul attr\n 'childGroupAttr' => [\n 'class' => 'dropdown-menu',\n ],\n // ul > li > ul > li\n 'childAttr' => [\n ],\n // ul > li > ul > li > a\n 'childItemAttr' => [\n ],\n 'useCaret'=>true,\n ], $option);\n\n $app = App::instance();\n $role = $app->service(User::class)->get('role');\n $str = '';\n foreach ($items as $item) {\n $item += [\n 'path' => null,\n 'label' => null,\n 'items' => [],\n 'roles' => [],\n ];\n if ($item['roles'] && !in_array($role, $item['roles'])) {\n continue;\n }\n $list = '';\n $strChild = '';\n $active = $currentPath === $item['path'];\n $parentAttr = [];\n $parentItemAttr = [];\n $childGroupAttr = $option['childGroupAttr'];\n $childAttr = $option['childAttr'];\n $childItemAttr = $option['childItemAttr'];\n $childCounter = 0;\n\n if (count($item['items'])) {\n $activeFromChild = false;\n foreach ($item['items'] as $child) {\n $child += [\n 'path' => null,\n 'label' => null,\n 'roles' => [],\n ];\n\n if ($child['roles'] && !in_array($role, $child['roles'])) {\n continue;\n }\n\n $childCounter++;\n $childActive = $currentPath === $child['path'];\n if (!$activeFromChild) {\n $activeFromChild = $childActive;\n $active = $activeFromChild;\n }\n $url = '#'===$child['path']?'#':$app->url($child['path']);\n $strChild .= '<li'\n . $this->renderAttributes($childAttr, ['class'=>$childActive?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$childItemAttr)\n . '>'\n . $child['label']\n . '</a>'\n . '</li>';\n }\n if ($childCounter) {\n $parentAttr += $option['parentAttr'];\n $parentItemAttr += $option['parentItemAttr'];\n $strChild = '<ul'\n . $this->renderAttributes($childGroupAttr)\n . '>'\n . $strChild\n . '</ul>';\n if ($option['useCaret']) {\n $item['label'] .= ' <span class=\"caret\"></span>';\n }\n } else {\n $strChild = '';\n }\n }\n\n if (count($item['items']) && 0 === $childCounter) {\n continue;\n }\n $url = '#'===$item['path']?'#':$app->url($item['path']);\n $str .= '<li'\n . $this->renderAttributes($parentAttr, ['class'=>$active?'active':''])\n . '>'\n . '<a'\n . $this->renderAttributes(['href'=>$url]+$parentItemAttr)\n . '>'\n . $item['label']\n . '</a>'\n . $strChild\n . '</li>';\n }\n $str = '<ul'\n . $this->renderAttributes(['class'=>$option['class']], ['class'=>$option['appendClass']])\n . '>'\n . $str\n . '</ul>';\n\n return $str;\n }", "public function active()\n {\n $offres = offre::all();\n //$offres = DB::table('offres')->join('type_biens', 'offres.IdtypeBien', '=', 'type_biens.id')->where('Publier', '=', 1)->get();\n $typebien = typebien::all();\n return view('Admin/active', compact('offres', 'typebien'));\n }", "function atg_menu_classes($classes, $item, $args) {\n if($args->theme_location == 'header') {\n $classes[] = 'nav-item';\n }\n return $classes;\n}", "function barony_base_process_page(&$variables) {\n $variables['navbar_classes'] = implode(' ', $variables['navbar_classes_array']);\n}", "public function getActive($action) {\n if (($action == $this->action) || (empty($this->action) && 'index' == $action) || ('show' == $this->action && 'index' == $action)) {\n return ' class=\"active\" ';\n }\n return NULL;\n }", "function text_imagenavigation($links, $activ) {\n\t\t// FIRST IMAGE\n\t\t$this->nav_first = ($activ['first'])?\n\t\t\t\t\t\t\t\t sprintf($links['first'], $this->lang['first'])\n\t\t\t\t\t\t\t\t :\n\t\t\t\t\t\t\t\t $this->lang['first'];\n\n\t\t// PREV IMAGE\n\t\t$this->nav_prev = ($activ['prev'])?\n\t\t\t\t\t\t\t\tsprintf($links['prev'], $this->lang['prev'])\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t$this->lang['prev'];\n\n\t\t// NEXT IMAGE\n\t\t$this->nav_next = ($activ['next'])?\n\t\t\t\t\t\t\t\tsprintf($links['next'], $this->lang['next'])\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t$this->lang['next'];\n\n\t\t// LAST IMAGE\n\t\t$this->nav_last = ($activ['last'])?\n\t\t\t\t\t\t\t\tsprintf($links['last'], $this->lang['last'])\n\t\t\t\t\t\t\t\t:\n\t\t\t\t\t\t\t\t$this->lang['last'];\n\t}", "public function changeActiveStatus($appName, $active);", "public static function getMenusActive()\n {\n return [\n static::$menuHeader,\n static::$menuFooter\n ];\n }", "function class_active($url) {\r\n $page = strrchr($_SERVER['PHP_SELF'], '/');\r\n if($page == $url) {\r\n return ' active ';\r\n }\r\n}", "function NavTracker($NavName){ // active page tracker\n echo'\n <script>\n var element = document.getElementById(\"'.$NavName.'\");\n element.classList.add(\"expanded\");\n </script>'; // Display javascript to activate the (expanded) property\n\n }", "public function setLiActiveClass(string $liActiveClass);", "private function _getNavigation()\r\n\t{\r\n\t\tglobal $action, $whmcs;\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVar( 'task' );\r\n\t\t$uri->delVar( 'submit' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action ) {\r\n\t\t\t\tif ( array_key_exists( 'task', $whmcs->input ) ) {\r\n\t\t\t\t\tif ( $whmcs->input['task'] != 'edittheme' ) {\r\n\t\t\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}", "function cmdeals_nav_menu_item_classes( $menu_items, $args ) {\n\t\n\tif (!is_cmdeals()) return $menu_items;\n\t\n\t$store_page \t\t= (int) get_option('cmdeals_store_page_id');\n\t$page_for_posts = (int) get_option( 'page_for_posts' );\n\n\tforeach ( (array) $menu_items as $key => $menu_item ) :\n\n\t\t$classes = (array) $menu_item->classes;\n\n\t\t// Unset active class for blog page\n\t\tif ( $page_for_posts == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = false;\n\t\t\tunset( $classes[ array_search('current_page_parent', $classes) ] );\n\t\t\tunset( $classes[ array_search('current-menu-item', $classes) ] );\n\n\t\t// Set active state if this is the store page link\n\t\telseif ( is_store() && $store_page == $menu_item->object_id ) :\n\t\t\t$menu_items[$key]->current = true;\n\t\t\t$classes[] = 'current-menu-item';\n\t\t\t$classes[] = 'current_page_item';\n\t\t\n\t\tendif;\n\n\t\t$menu_items[$key]->classes = array_unique( $classes );\n\t\n\tendforeach;\n\n\treturn $menu_items;\n}", "public static function get_active($tab) {\n\t\t\tif (isset($_GET['tab'])) {\n\t\t\t\techo $_GET['tab'] == $tab ? 'nav-tab-active' : '';\n\t\t\t} elseif ($tab == 'create-deal') {\n\t\t\techo 'nav-tab-active';\n\t\t}\n\t}", "function isActive($route, $className = 'active') {\n if (is_array($route)) {\n return in_array(Route::currentRouteName(), $route) ? $className : '';\n }\n if (Route::currentRouteName() == $route) {\n return $className;\n }\n if (strpos(URL::current(), $route)) {\n return $className;\n }\n }", "function montheme_li_class($classes)\n{\n $classes = [];\n $classes[] = 'nav-item';\n\n return $classes;\n}", "function setActive() ;", "public function controlNav()\n\t\t{\n\t\t\tif(isset($_SESSION['validar']))\n\t\t\t{\n\t\t\t\t\n\n\t\t\t\techo '<li class=\"nav-item\">\n\t \t\t<a href=\"index.php?action=dashboard\" class=\"nav-link\">\n\t \t\t\t<i class=\"nav-icon fa fa-dashboard\"></i>\n\t \t\t\t<p>Dashboard</p>\n\t \t\t</a>\n\t \t\t </li>\n\t \t\t <li class=\"nav-item\">\n\t \t\t<a href=\"index.php?action=alumnas\" class=\"nav-link\">\n\t \t\t\t<i class=\"nav-icon fa fa-user-plus\"></i>\n\t \t\t\t<p>Alumnas</p>\n\t \t\t</a>\n\t \t\t </li>\n\t \t\t <li class=\"nav-item\">\n\t \t\t<a href=\"index.php?action=grupos\" class=\"nav-link\">\n\t \t\t\t<i class=\"nav-icon fa fa-users\"></i>\n\t \t\t\t<p>Grupos</p>\n\t \t\t</a>\n\t \t\t </li>\n\t \t\t <li class=\"nav-item\">\n\t \t\t<a href=\"index.php?action=lugares_admin\" class=\"nav-link\">\n\t \t\t\t<i class=\"nav-icon fa fa-ticket\"></i>\n\t \t\t\t<p>Lugares</p>\n\t \t\t</a>\n\t \t\t </li>\n\n\t \t\t <li class=\"nav-item\">\n\t\t\t\t <a onclick=\"confirmarSesion();\" href=\"index.php\" class=\"nav-link\">\n\t\t\t\t <i class=\"nav-icon fa fa-sign-out\"></i>\n\t\t\t\t \t<p>Logout</p>\n\t\t\t\t </a>\n\t\t\t\t </li>';\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t}", "function add_nav_class( $classes, $item ) {\n if ( is_page('past-events') AND $item->post_title === 'Events') {\n // Notice you can change the conditional from is_single() and $item->title\n $classes[] = \"current-menu-item\";\n }\n return $classes;\n}", "function activeLink($page){\n\n\t\t/* Compare $page to $_GET */\n\t\tswitch($page){\n\t\tcase 'home':\n\t\t\tif(empty($_GET) || isset($_GET['home'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'about';\n\t\t\tif(isset($_GET['about'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'recent';\n\t\t\tif(isset($_GET['recent'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "function BootstrapBlocks_preprocess_menu_link(&$vars) {\n if ($vars['element']['#href'] == $_GET['q'] || (drupal_is_front_page() && $vars['element']['#href'] === '<front>')) {\n $vars['element']['#attributes']['class'][] = 'active';\n }\n}", "function custom_nav_class($classes, $item)\n{\n if(array_search(\"menu-item-has-children\", $classes) && !$item->menu_item_parent)\n {\n $classes[] = \"dropdown\";\n }\n\n return $classes;\n}", "function is_sidebar_menu_active($current)\n{\n $CI =& get_instance();\n if ($CI->uri->segment(1) == $current) {\n return 'active';\n }\n return '';\n}", "function mro_menu_top_item_classes( $classes, $item, $args ) {\n\n\tif( 'primary' !== $args->theme_location )\n\t\treturn $classes;\n\n\tif( is_front_page() && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'active';\n\n\tif( is_singular( 'mro-team' ) && ( 'Clases de Yoga' == $item->title || 'Clases de yoga' == $item->title || 'Clases' == $item->title ) )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_singular( 'mro-event' ) && 'Actividades' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\tif( is_page_template( 'page-templates/template-thai.php' ) && 'Masaje tai' == $item->title )\n\t\t$classes[] = 'current-menu-item active';\n\n\t// if( ( is_singular( 'code' ) || is_tax( 'code-tag' ) ) && 'Talleres' == $item->title )\n\t\t// $classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Entrenamiento' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Masaje Tai' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Yoga' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Nosotros' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\tif( mandir_is_tree(18) && 'Tienda' == $item->title )\n\t\t$classes[] = 'current-menu-item';\n\n\t// if( is_singular( 'projects' ) && 'Contáctenos' == $item->title )\n\t// \t$classes[] = 'current-menu-item';\n\n\treturn array_unique( $classes );\n}", "public function renderNav() {\n if($this->renderNav['onoff']) {\n \n if(isset($this->renderNav['html']) && $this->renderNav['html']) {\n $content = $this->renderNav['html'];\n unset($this->renderNav['html']);\n } else {\n $ct['btnAddNav'] = $this->btnAddNav;\n $ct['btnAddMultiNav'] = $this->btnAddMultiNav;\n $ct['btnDeleteNav'] = $this->btnDeleteNav;\n $ct['btnCopyNav'] = $this->btnCopyNav;\n $result = '';\n $get = r()->get();\n foreach($ct as $key => $item) {\n if($item && isset($item['onoff']) && $item['onoff']) {\n unset($item['onoff']);\n if(isset($item['href'])) {\n $href = $item['href'];\n unset($item['href']);\n } else {\n $params = isset($get['SettingsGridSearch']['table_id']) ? $get : [];\n $params['menu_admin_id'] = $this->menu_admin_id;\n $href = UtilityUrl::createUrl($item['link_children'],$params);\n }\n $html = $item['icon'].$item['html'];unset($item['html']);unset($item['icon']);unset($item['link_children']);\n $result .= Html::a($html, $href, $item).' ';\n }\n }\n $content = '<div class=\"fr\">'.$result.'</div>';\n }\n unset($this->renderNav['onoff']);\n $html = Html::tag('div',$content.$this->renderNavLeft, $this->renderNav);\n return $html;\n } else {\n return '';\n }\n }", "function gymfitness_li_class($classes,$item,$args) {\n \n $classes[] = 'nav-item';\n \n return $classes;\n\n}", "Public function Anavbar(){\n\t\n\t}", "public function setActive() {}", "public function buildNavigation()\r\n\t{\r\n\t\t$uri\t=\tDunUri :: getInstance( 'SERVER', true );\r\n\t\t$uri->delVars();\r\n\t\t$uri->setVar( 'module', 'intouch' );\r\n\t\t\r\n\t\t$data\t\t=\t'<ul class=\"nav nav-pills\">';\r\n\t\t$actions\t=\tarray( 'default', 'syscheck', 'groups', 'configure', 'updates', 'license' );\r\n\t\t\r\n\t\tforeach( $actions as $item ) {\r\n\t\t\tif ( $item == $this->action && in_array( $this->task, array( 'default', 'save' ) ) ) {\r\n\t\t\t\t$data .= '<li class=\"active\"><a href=\"#\">' . t( 'intouch.admin.navbar.' . $item ) . '</a></li>';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t\t$data .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'intouch.admin.navbar.' . $item ) . '</a></li>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data\t.= '</ul>';\r\n\t\treturn $data;\r\n\t}", "function roots_cpt_active_menu($menu) {\n if ('base_service' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-services', 'menu-services active', $menu);\n }\n if ('base_portfolio' === get_post_type()) {\n $menu = str_replace('active', '', $menu);\n $menu = str_replace('menu-portfolio', 'menu-portfolio active', $menu);\n }\n return $menu;\n}", "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}", "function isNavActive($routeArray)\n{\n\n # 0 : Get current route name\n $requestRoute = Request::route()->getName();\n\n # 1 : Loop route and check if got wildcard\n foreach ($routeArray as $route) {\n if (strpos($route, \"*\") !== false) {\n $checkRoute = explode('.*', $route);\n if (strpos($requestRoute, $checkRoute[0]) !== false)\n return true;\n }\n }\n\n # 2 : Check if in array \n return in_array($requestRoute, $routeArray);\n}", "function makeNavigation($nameCat, $tocs, $type) {\r\n\t\r\n\t$nameCat = fileNameTrans($nameCat);\r\n\t\r\n\t$result = '<ul class=\"nav navbar-nav\">';\r\n\tforeach($tocs as $field => $toc) {\r\n\t\t$classLiTop = 'download';\r\n\t\tif($field == $type) {\r\n\t\t\t$classLiTop = 'active';\r\n\t\t}\r\n\t\t$listItems = makeULContent($toc, $nameCat, $field);\r\n\t\t$fieldGer = translateFieldNames($field);\r\n\t\t$result .= '\r\n\t\t\t\t\t<li class=\"'.$classLiTop.'\">\r\n\t\t\t\t\t\t<a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"'.$nameCat.'-'.$field.'.html\">nach '.$fieldGer.'<span class=\"caret\"></span></a>\r\n\t\t\t\t\t\t<ul class=\"dropdown-menu\">\r\n\t\t\t\t\t\t\t<li><a href=\"'.$nameCat.'-'.$field.'.html\">Seitenanfang</a></li>\r\n\t\t\t\t\t\t\t'.$listItems.'\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t</li>';\r\n\t}\r\n\t$result .= '</ul>';\r\n\treturn($result);\r\n}", "public function isActive($routes = array())\n {\n\n //validate first if this route exist\n //then validates if that route matches the current action\n //AND\n //the current action is one of the subActions\n if (in_array(Yii::$app->controller->action->id,$routes) || (in_array(Yii::$app->session->get('lastAction'),$routes)) && in_array(Yii::$app->controller->action->id,$this->subActions)){\n return \"activeTop\";\n }\n \n }", "function theme_task_list($items, $active = NULL) {\n $done = isset($items[$active]) || $active == NULL;\n $output = '<ol class=\"task-list\">';\n foreach ($items as $k => $item) {\n if ($active == $k) {\n $class = 'active';\n $done = false;\n }\n else {\n $class = $done ? 'done' : '';\n }\n $output .= '<li class=\"'. $class .'\">'. $item .'</li>';\n }\n $output .= '</ol>';\n return $output;\n}", "public function getToolbar($active) {\n $toolbar_array = array(\n 'contact_list' => array(\n 'name' => 'contact_list',\n 'text' => $this->app['translator']->trans('Contact list'),\n 'hint' => $this->app['translator']->trans('List of all available contacts'),\n 'link' => FRAMEWORK_URL.'/admin/contact/list',\n 'active' => ($active == 'contact_list')\n ),\n 'contact_edit' => array(\n 'name' => 'contact_edit',\n 'text' => ($active === 'contact_edit') ? $this->app['translator']->trans('Edit contact') : $this->app['translator']->trans('Create contact'),\n 'hint' => $this->app['translator']->trans('Create or edit a contact record'),\n 'link' => FRAMEWORK_URL.'/admin/contact/select',\n 'active' => ($active == 'contact_edit')\n ),\n 'categories' => array(\n 'name' => 'categories',\n 'text' => $this->app['translator']->trans('Categories'),\n 'hint' => $this->app['translator']->trans('List of available categories'),\n 'link' => FRAMEWORK_URL.'/admin/contact/category/list',\n 'active' => ($active == 'categories')\n ),\n 'tags' => array(\n 'name' => 'tags',\n 'text' => $this->app['translator']->trans('Tags'),\n 'hint' => $this->app['translator']->trans('List of available tags'),\n 'link' => FRAMEWORK_URL.'/admin/contact/tag/list',\n 'active' => ($active == 'tags')\n ),\n 'extra_fields' => array(\n 'name' => 'extra_fields',\n 'text' => $this->app['translator']->trans('Extra fields'),\n 'hint' => $this->app['translator']->trans('List of available extra fields'),\n 'link' => FRAMEWORK_URL.'/admin/contact/extra/list',\n 'active' => ($active == 'extra_fields')\n ),\n 'about' => array(\n 'name' => 'about',\n 'text' => $this->app['translator']->trans('About'),\n 'hint' => $this->app['translator']->trans('Information about the Contact extension'),\n 'link' => FRAMEWORK_URL.'/admin/contact/about',\n 'active' => ($active == 'about')\n ),\n );\n return $toolbar_array;\n }", "function ninja_forms_add_class($classes) {\n\t$classes .= ' nav-menus-php';\n\t// return the $classes array\n\treturn $classes;\n}", "function set_current_menu_class($classes) {\n\tglobal $post;\n\t\n\t/*\n\tif( _s_is_page_template_name( 'find-an-agent' ) || is_post_type_archive( 'agent' ) || is_singular( 'agent' ) ) {\n\t\t\n\t\t$classes = array_filter($classes, \"remove_parent_classes\");\n\t\t\n\t\tif ( in_array('menu-item-206', $classes ) )\n\t\t\t$classes[] = 'current-menu-item';\n\t}\n\t*/\n\t\t\t\n\treturn $classes;\n}", "private function _getNavigation()\r\n\t{\r\n\t\t$input\t= dunloader( 'input', true );\r\n\t\t$action\t= $input->getVar( 'action', 'themes' );\r\n\t\t$task\t= $input->getVar( 'task', null );\r\n\t\t\r\n\t\t$uri\t= DunUri :: getInstance('SERVER', true );\r\n\t\t$uri->delVars();\r\n\t\t$uri->setVar( 'module', 'themer' );\r\n\t\t\r\n\t\t$html\t= '<ul class=\"nav nav-pills\">';\r\n\t\t\r\n\t\tforeach( array( 'themes', 'config', 'license' ) as $item ) {\r\n\t\t\t\r\n\t\t\tif ( $item == $action && $task != 'edittheme' ) {\r\n\t\t\t\t$html .= '<li class=\"active\"><a href=\"#\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$uri->setVar( 'action', $item );\r\n\t\t\t$html .= '<li><a href=\"' . $uri->toString() . '\">' . t( 'themer.admin.module.navbar.' . $item ) . '</a></li>';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t.= '</ul>';\r\n\t\treturn $html;\r\n\t}", "function yz_is_wild_navbar_active() {\n // Add Vertical Wild Navbar.\n if ( 'yz-vertical-layout' == yz_get_profile_layout() && 'wild-navbar' == yz_option( 'yz_vertical_layout_navbar_type', 'wild-navbar' ) ) {\n return true;\n }\n\n return false;\n}", "public function activeAction()\n {\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n \n $this->theme->setTitle(\"Users that are active\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are active\",\n ]);\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}" ]
[ "0.6887104", "0.6791222", "0.67568517", "0.67440087", "0.6740277", "0.67091876", "0.6649607", "0.64601547", "0.63809305", "0.6322316", "0.62942463", "0.6153068", "0.6153068", "0.61060697", "0.6086877", "0.60507697", "0.60342175", "0.5997324", "0.59595984", "0.5950728", "0.59497344", "0.58473134", "0.5844088", "0.5832806", "0.57695436", "0.5756158", "0.5729201", "0.571812", "0.5713117", "0.5688238", "0.56770885", "0.5675763", "0.56686044", "0.56554925", "0.56321764", "0.560569", "0.5580608", "0.55478454", "0.55435836", "0.5539586", "0.5509766", "0.5508152", "0.54950356", "0.5494681", "0.54760796", "0.54586744", "0.54433626", "0.54279566", "0.5422551", "0.5417971", "0.53975487", "0.5394303", "0.5391402", "0.5385376", "0.53840524", "0.5382812", "0.53755575", "0.53657204", "0.5362532", "0.53452843", "0.53409445", "0.5334752", "0.53247064", "0.5322678", "0.53172493", "0.5295516", "0.52825046", "0.527983", "0.52754575", "0.52660114", "0.5246522", "0.5242407", "0.52228636", "0.5220142", "0.52198464", "0.52183723", "0.521583", "0.52030975", "0.5201201", "0.51891977", "0.51843476", "0.5175615", "0.514945", "0.5144992", "0.5135251", "0.5132426", "0.513148", "0.51204175", "0.5116618", "0.5115624", "0.51128536", "0.51102746", "0.5107927", "0.5085451", "0.50820595", "0.50812846", "0.5072677", "0.5052553", "0.5045026", "0.5039959", "0.5035092" ]
0.0
-1
Display a listing of the resource.
public function index() { $products = Product::all(); $status = $products->count() ? true : false; return response()->json([ 'data' => $products, 'status' => $status, ], 201); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function 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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\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 _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
0.0
-1
Store a newly created resource in storage.
public function store(StoreProductRequest $request) { $attributes = ['front_image', 'back_image', 'left_image', 'right_image']; $product = Product::create(array_merge( $request->validated(), ['slug' => Str::slug($request->validated()['product_name'])], (new SaveImageService) ->saveImage($request, $attributes, $request->validated()['sku'], 'images/products/') ->get() )); $status = $product ? true : false; return response()->json([ 'data' => $product, 'status' => $status, 'message' => 'Product Added Successfully.', ], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Update the specified resource in storage.
public function update(UpdateProductRequest $request, Product $product) { $attributes = ['front_image', 'back_image', 'left_image', 'right_image']; $status = $product->update(array_merge( $request->validated(), ['slug' => Str::slug($request->validated()['product_name'])], (new SaveImageService) ->saveImage($request, $attributes, $request->validated()['sku'], 'images/products/') ->get() )); $status = $product ? true : false; return response()->json([ 'status' => $status, 'message' => 'Product Updated Successfully.', ], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
/cargar la variables de configuracion del sistema
public function get_bpm_config($VARIABLE){ $this->db->select('*'); $this->db->from('bpm_config'); $this->db->where('VARIABLE',$VARIABLE); $query = $this->db->get(); $variables = $query->result_array(); return $variables[0]['VALOR']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "static function set_config() {\n\t\tif ( file_exists( self::childpath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'config/wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'config/wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::childpath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::childpath() . 'wpgrade-config' . EXT;\n\t\t} elseif ( file_exists( self::themepath() . 'wpgrade-config' . EXT ) ) {\n\t\t\tself::$configuration = include self::themepath() . 'wpgrade-config' . EXT;\n\t\t}\n\t}", "private function readConfig(){\n\n\t\t$this->_ini_array = parse_ini_file(CONFIG.'system.ini');\n\n\t\t$this->_host =\t$this->_ini_array['db_host'];\n\t\t$this->_username = $this->_ini_array['db_username'];\n\t\t$this->_password = $this->_ini_array['db_password'];\n\t\t$this->_database = $this->_ini_array['db_database'];\n\t\n\t\t$this->_log_enabled=$this->_ini_array['log_enabled'];\n\t\t$this->_log_level=$this->_ini_array['log_level'];\n\t\t$this->_log_file_path=$this->_ini_array['log_path'];\n\t\n\n\t\t$this->_lang_default=$this->_ini_array['lang_default'];\n\n\t}", "public function initConfig() {\r\n\t$config = array();\r\n\tinclude($this->name . '/config.php');\r\n\t\\app::$config = array_merge(\\app::$config, $config);\r\n }", "private function load_settings() {\n\t\t\n\t}", "protected function loadConfig() {\n $json = new JSON();\n $viewConfig = $json->readFile(__SITE_PATH . \"\\\\config\\\\view.json\");\n $this->meta_info = $viewConfig['meta'];\n $this->js_files = $viewConfig['javascript'];\n $this->css_files = $viewConfig['css'];\n }", "public function load_config() {\n if (!isset($this->config)) {\n $name = $this->get_name();\n $this->config = get_config(\"local_$name\");\n }\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\r\n //print_r($arraycfg['aduserinv']);\r\n return $arraycfg;\r\n }", "private function init_config() {\n set_config('siteadmins', '');\n set_config('siteguest', '');\n set_config('defaultuserroleid', '');\n set_config('defaultfrontpageroleid', '');\n }", "static function loadConfig() {\n\t\t$config = self::file($_SERVER[\"DOCUMENT_ROOT\"] . \"/../config.json\");\n\t\tif (!is_null($config))\n\t\t\tself::$config = json_decode($config);\n\t}", "function load_config() {\n $config_file = \"scripts/i-erp.conf\";\n $comment = \"#\";\n // open the config file\n $fp = fopen($config_file, \"r\");\n if (!$fp) {\n echo(\"Failed to open file\");\n return 0;\n }\n // loop through the file lines and pull out variables\n while (!feof($fp)) {\n $line = trim(fgets($fp));\n if ($line && $line[0] != $comment) {\n $pieces = explode(\"=\", $line);\n $option = trim($pieces[0]);\n $value = trim($pieces[1]);\n $config_values[$option] = $value;\n }\n }\n fclose($fp);\n $_SESSION['install_lib'] = $config_values['install_lib'];\n $_SESSION['server'] = $config_values['server'];\n $_SESSION['timeout'] = $config_values['timeout'];\n $_SESSION['appname'] = $config_values['appname'];\n $_SESSION['h_logo'] = $config_values['h_logo'];\n $_SESSION['si_logo'] = $config_values['si_logo'];\n $_SESSION['copyr'] = $config_values['copyr'];\n return 1;\n}", "abstract protected function loadConfig();", "abstract public function getConfig();", "abstract protected function getConfig();", "public function getBasicSettingsValues()\n\t{\n\t\t$values = array();\n\n\t\t$values[\"webspace_dir\"] = getcwd().\"/data\";\n\t\t$values[\"data_dir\"] = $this->setup->ini->readVariable(\"clients\",\"datadir\");\n\t\t$values[\"convert_path\"] = $this->setup->ini->readVariable(\"tools\",\"convert\");\n\t\t$values[\"zip_path\"] = $this->setup->ini->readVariable(\"tools\",\"zip\");\n\t\t$values[\"unzip_path\"] = $this->setup->ini->readVariable(\"tools\",\"unzip\");\n\t\t$values[\"ghostscript_path\"] = $this->setup->ini->readVariable(\"tools\",\"ghostscript\");\n\t\t$values[\"java_path\"] = $this->setup->ini->readVariable(\"tools\",\"java\");\n\t\t$values[\"htmldoc_path\"] = $this->setup->ini->readVariable(\"tools\",\"htmldoc\");\n\t\t//$values[\"mkisofs_path\"] = $this->setup->ini->readVariable(\"tools\",\"mkisofs\");\n\t\t$values[\"ffmpeg_path\"] = $this->setup->ini->readVariable(\"tools\",\"ffmpeg\");\n\t\t$values[\"latex_url\"] = $this->setup->ini->readVariable(\"tools\",\"latex\");\n\t\t$values[\"fop_path\"] = $this->setup->ini->readVariable(\"tools\",\"fop\");\n\t\t$values[\"vscanner_type\"] = $this->setup->ini->readVariable(\"tools\", \"vscantype\");\n\t\t$values[\"scan_command\"] = $this->setup->ini->readVariable(\"tools\", \"scancommand\");\n\t\t$values[\"clean_command\"] = $this->setup->ini->readVariable(\"tools\", \"cleancommand\");\n\t\t$values[\"log_path\"] = $this->setup->ini->readVariable(\"log\",\"path\").\"/\".\n\t\t\t$this->setup->ini->readVariable(\"log\",\"file\");\n\t\t$values[\"chk_log_status\"] = !$this->setup->ini->readVariable(\"log\",\"enabled\");\n\t\t$values[\"time_zone\"] = $this->setup->ini->readVariable(\"server\", \"timezone\");\n\t\t\n\t\t// https settings\n\t\t$values[\"auto_https_detect_enabled\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_enabled\");\n\t\t$values[\"auto_https_detect_header_name\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_name\");\n\t\t$values[\"auto_https_detect_header_value\"] = $this->setup->ini->readVariable(\"https\", \"auto_https_detect_header_value\");\n\n\t\t$this->form->setValuesByArray($values);\n\t}", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMeta('category', 'array');\n //$this->loadMetaCategory();\n $this->loadInitScript();\n }", "public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}", "public function testconfig_vars()\n\t{\n\t\t$vars = array ('sys_name',\n\t\t\t 'sys_user_reg_restricted',\n\t\t\t 'sys_require_accept_conditions',\n\t\t\t 'sys_project_reg_restricted',\n\t\t\t 'sys_use_private_project',\n\t\t\t 'sys_default_domain',\n\t\t\t 'sys_scm_tarballs_path',\n\t\t\t 'sys_scm_snapshots_path',\n\t\t\t 'sys_theme',\n\t\t\t 'sys_lang',\n\t\t\t 'sys_default_timezone',\n\t\t\t 'sys_default_country_code',\n\t\t\t 'sys_use_scm',\n\t\t\t 'sys_use_tracker',\n\t\t\t 'sys_use_forum',\n\t\t\t 'sys_use_pm',\n\t\t\t 'sys_use_docman',\n\t\t\t 'sys_use_diary',\n\t\t\t 'sys_use_news',\n\t\t\t 'sys_use_mail',\n\t\t\t 'sys_use_survey',\n\t\t\t 'sys_use_frs',\n\t\t\t 'sys_use_project_tags',\n\t\t\t 'sys_use_project_full_list',\n\t\t\t 'sys_use_fti',\n\t\t\t 'sys_use_ftp',\n\t\t\t 'sys_use_trove',\n\t\t\t 'sys_use_snippet',\n\t\t\t 'sys_use_ssl',\n\t\t\t 'sys_use_people',\n\t\t\t 'sys_use_shell',\n\t\t\t 'sys_use_ratings',\n\t\t\t 'sys_use_ftpuploads',\n\t\t\t 'sys_use_manual_uploads',\n\t\t\t 'sys_use_gateways',\n\t\t\t 'sys_use_project_vhost',\n\t\t\t 'sys_use_project_database',\n\t\t\t 'sys_use_project_multimedia',\n\t\t\t 'sys_download_host',\n\t\t\t 'sys_shell_host',\n\t\t\t 'sys_users_host',\n\t\t\t 'sys_lists_host',\n\t\t\t 'sys_scm_host',\n\t\t\t 'sys_forum_return_domain',\n\t\t\t 'sys_chroot',\n\t\t\t 'sys_upload_dir',\n\t\t\t 'sys_ftp_upload_dir',\n\t\t\t 'sys_ftp_upload_host',\n\t\t\t 'sys_apache_user',\n\t\t\t 'sys_apache_group',\n\t\t\t 'sys_require_unique_email',\n\t\t\t 'sys_bcc_all_email_address',\n\t\t\t 'sys_themeroot',\n\t\t\t 'sys_force_login',\n\t\t\t 'sys_custom_path',\n\t\t\t 'sys_plugins_path',\n\t\t\t 'sys_use_jabber',\n\t\t\t 'sys_jabber_user',\n\t\t\t 'sys_jabber_server',\n\t\t\t 'sys_jabber_port',\n\t\t\t 'sys_jabber_pass',\n\t\t\t 'sys_ldap_host',\n\t\t\t 'sys_ldap_port',\n\t\t\t 'sys_ldap_version',\n\t\t\t 'sys_ldap_base_dn',\n\t\t\t 'sys_ldap_bind_dn',\n\t\t\t 'sys_ldap_admin_dn',\n\t\t\t 'sys_ldap_passwd',\n\t\t\t 'sys_news_group',\n\t\t\t 'sys_stats_group',\n\t\t\t 'sys_peer_rating_group',\n\t\t\t 'sys_template_group',\n\t\t\t 'sys_sendmail_path',\n\t\t\t 'sys_path_to_mailman',\n\t\t\t 'sys_path_to_jpgraph',\n\t\t\t 'sys_account_manager_type',\n\t\t\t 'unix_cipher',\n\t\t\t 'homedir_prefix',\n\t\t\t 'groupdir_prefix',\n\t\t\t 'sys_urlroot',\n\t\t\t 'sys_urlprefix',\n\t\t\t 'sys_images_url',\n\t\t\t 'sys_images_secure_url',\n\t\t\t 'sys_admin_email',\n\t\t\t 'sys_session_key',\n\t\t\t 'sys_session_expire',\n\t\t\t 'sys_show_source',\n\t\t\t 'default_trove_cat',\n\t\t\t 'sys_dbhost',\n\t\t\t 'sys_dbport',\n\t\t\t 'sys_dbname',\n\t\t\t 'sys_dbuser',\n\t\t\t 'sys_dbpasswd',\n\t\t\t 'sys_share_path',\n\t\t\t 'sys_var_path',\n\t\t\t 'sys_etc_path',\n\t\t\t) ;\n\n\t\t$pattern = implode ('|', $vars) ;\n\t\t\n\t\t$root = dirname(dirname(dirname(dirname(__FILE__))));\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\$($pattern)\\b(?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$var for var in ($pattern):\");\n\n\t\t$output = `cd $root ; find src tests -name '*.php' -type f | xargs pcregrep -n '\\\\\\$GLOBALS\\\\[.?($pattern).?\\\\](?! *=[^=])' \\\n\t\t\t\t\t | grep -v ^src/common/include/config-vars.php`;\n\t\t$this->assertEquals('', $output, \"Found deprecated \\$GLOBALS['\\$var'] for var in ($pattern):\");\n\t}", "private function load_site_settings() {\n\t\t\n\t\t$this->helper->load_editor_settings();\n\t\t$this->settings = array_merge($this->settings,$this->EE->session->cache['eeck']['eeck_settings']);\n\t}", "private function _loadGlobalSettings(){\r\n\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.'global_settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->globalSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $globalSettings = new stdClass();\r\n $globalSettings->website_name = '';\r\n $globalSettings->global_script = '';\r\n file_put_contents($settings, json_encode($globalSettings));\r\n }\r\n\r\n }", "private static function getConfig() {\n\n\t\t$pathRoot = $_SERVER['DOCUMENT_ROOT'].substr($_SERVER['PHP_SELF'],0, strpos($_SERVER['PHP_SELF'],\"/\",1)).\"/config/\";\n\n\t\t$jsonConfig = file_get_contents($pathRoot.'config.json');\n\t\tself::$arrayConfig = json_decode($jsonConfig);\n\t}", "public static function config();", "private function write_config_data()\n\t{\n\t\t$captcha_url = '{base_url}images/captchas/';\n\n\t\tforeach (array('avatar_path', 'photo_path', 'signature_img_path', 'pm_path', 'captcha_path', 'theme_folder_path') as $path)\n\t\t{\n\t\t\t$prefix = ($path != 'theme_folder_path') ? $this->root_theme_path : '';\n\t\t\t$this->userdata[$path] = rtrim(realpath($prefix.$this->userdata[$path]), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;\n\t\t\t$this->userdata[$path] = str_replace($this->base_path, '{base_path}', $this->userdata[$path]);\n\t\t}\n\n\t\t$config = array(\n\t\t\t'db_port' => $this->userdata['db_port'],\n\t\t\t'db_hostname' => $this->userdata['db_hostname'],\n\t\t\t'db_username' => $this->userdata['db_username'],\n\t\t\t'db_password' => $this->userdata['db_password'],\n\t\t\t'db_database' => $this->userdata['db_name'],\n\t\t\t'db_dbprefix' => $this->getDbPrefix(),\n\t\t\t'db_char_set' => $this->userdata['db_char_set'],\n\t\t\t'db_collat' => $this->userdata['db_collat'],\n\t\t\t'app_version' => $this->userdata['app_version'],\n\t\t\t'debug' => '1',\n\t\t\t'site_index' => $this->userdata['site_index'],\n\t\t\t'site_label' => $this->userdata['site_label'],\n\t\t\t'base_path' => $this->base_path,\n\t\t\t'base_url' => $this->userdata['site_url'],\n\t\t\t'cp_url' => str_replace($this->userdata['site_url'], '{base_url}', $this->userdata['cp_url']),\n\t\t\t'site_url' => '{base_url}',\n\t\t\t'theme_folder_url' => '{base_url}themes/',\n\t\t\t'webmaster_email' => $this->userdata['email_address'],\n\t\t\t'webmaster_name' => '',\n\t\t\t'channel_nomenclature' => 'channel',\n\t\t\t'max_caches' => '150',\n\t\t\t'cache_driver' => 'file',\n\t\t\t'captcha_url' => $captcha_url,\n\t\t\t'captcha_path' => $this->userdata['captcha_path'],\n\t\t\t'captcha_font' => 'y',\n\t\t\t'captcha_rand' => 'y',\n\t\t\t'captcha_require_members' => 'n',\n\t\t\t'require_captcha' => 'n',\n\t\t\t'enable_sql_caching' => 'n',\n\t\t\t'force_query_string' => 'n',\n\t\t\t'show_profiler' => 'n',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'cookie_domain' => '',\n\t\t\t'cookie_path' => '/',\n\t\t\t'cookie_prefix' => '',\n\t\t\t'website_session_type' => 'c',\n\t\t\t'cp_session_type' => 'c',\n\t\t\t'cookie_httponly' => 'y',\n\t\t\t'allow_username_change' => 'y',\n\t\t\t'allow_multi_logins' => 'y',\n\t\t\t'password_lockout' => 'y',\n\t\t\t'password_lockout_interval' => '1',\n\t\t\t'require_ip_for_login' => 'y',\n\t\t\t'require_ip_for_posting' => 'y',\n\t\t\t'require_secure_passwords' => 'n',\n\t\t\t'allow_dictionary_pw' => 'y',\n\t\t\t'name_of_dictionary_file' => '',\n\t\t\t'xss_clean_uploads' => 'y',\n\t\t\t'redirect_method' => $this->userdata['redirect_method'],\n\t\t\t'deft_lang' => $this->userdata['deft_lang'],\n\t\t\t'xml_lang' => 'en',\n\t\t\t'send_headers' => 'y',\n\t\t\t'gzip_output' => 'n',\n\t\t\t'is_system_on' => 'y',\n\t\t\t'allow_extensions' => 'y',\n\t\t\t'date_format' => '%n/%j/%Y',\n\t\t\t'time_format' => '12',\n\t\t\t'include_seconds' => 'n',\n\t\t\t'server_offset' => '',\n\t\t\t'default_site_timezone' => date_default_timezone_get(),\n\t\t\t'mail_protocol' => 'mail',\n\t\t\t'email_newline' => '\\n', // single-quoted for portability\n\t\t\t'smtp_server' => '',\n\t\t\t'smtp_username' => '',\n\t\t\t'smtp_password' => '',\n\t\t\t'email_smtp_crypto' => 'ssl',\n\t\t\t'email_debug' => 'n',\n\t\t\t'email_charset' => 'utf-8',\n\t\t\t'email_batchmode' => 'n',\n\t\t\t'email_batch_size' => '',\n\t\t\t'mail_format' => 'plain',\n\t\t\t'word_wrap' => 'y',\n\t\t\t'email_console_timelock' => '5',\n\t\t\t'log_email_console_msgs' => 'y',\n\t\t\t'log_search_terms' => 'y',\n\t\t\t'un_min_len' => '4',\n\t\t\t'pw_min_len' => '5',\n\t\t\t'allow_member_registration' => 'n',\n\t\t\t'allow_member_localization' => 'y',\n\t\t\t'req_mbr_activation' => 'email',\n\t\t\t'new_member_notification' => 'n',\n\t\t\t'mbr_notification_emails' => '',\n\t\t\t'require_terms_of_service' => 'y',\n\t\t\t'default_member_group' => '5',\n\t\t\t'profile_trigger' => 'member',\n\t\t\t'member_theme' => 'default',\n\t\t\t'enable_avatars' => 'y',\n\t\t\t'allow_avatar_uploads' => 'n',\n\t\t\t'avatar_url' => '{base_url}'.$this->userdata['avatar_url'],\n\t\t\t'avatar_path' => $this->userdata['avatar_path'],\n\t\t\t'avatar_max_width' => '100',\n\t\t\t'avatar_max_height' => '100',\n\t\t\t'avatar_max_kb' => '50',\n\t\t\t'enable_photos' => 'n',\n\t\t\t'photo_url' => '{base_url}'.$this->userdata['photo_url'],\n\t\t\t'photo_path' => $this->userdata['photo_path'],\n\t\t\t'photo_max_width' => '100',\n\t\t\t'photo_max_height' => '100',\n\t\t\t'photo_max_kb' => '50',\n\t\t\t'allow_signatures' => 'y',\n\t\t\t'sig_maxlength' => '500',\n\t\t\t'sig_allow_img_hotlink' => 'n',\n\t\t\t'sig_allow_img_upload' => 'n',\n\t\t\t'sig_img_url' => '{base_url}'.$this->userdata['signature_img_url'],\n\t\t\t'sig_img_path' => $this->userdata['signature_img_path'],\n\t\t\t'sig_img_max_width' => '480',\n\t\t\t'sig_img_max_height' => '80',\n\t\t\t'sig_img_max_kb' => '30',\n\t\t\t'prv_msg_enabled' => 'y',\n\t\t\t'prv_msg_allow_attachments' => 'y',\n\t\t\t'prv_msg_upload_path' => $this->userdata['pm_path'],\n\t\t\t'prv_msg_max_attachments' => '3',\n\t\t\t'prv_msg_attach_maxsize' => '250',\n\t\t\t'prv_msg_attach_total' => '100',\n\t\t\t'prv_msg_html_format' => 'safe',\n\t\t\t'prv_msg_auto_links' => 'y',\n\t\t\t'prv_msg_max_chars' => '6000',\n\t\t\t'enable_template_routes' => 'y',\n\t\t\t'strict_urls' => 'y',\n\t\t\t'site_404' => '',\n\t\t\t'save_tmpl_revisions' => 'n',\n\t\t\t'max_tmpl_revisions' => '5',\n\t\t\t'save_tmpl_files' => 'y',\n\t\t\t'deny_duplicate_data' => 'y',\n\t\t\t'redirect_submitted_links' => 'n',\n\t\t\t'enable_censoring' => 'n',\n\t\t\t'censored_words' => '',\n\t\t\t'censor_replacement' => '',\n\t\t\t'banned_ips' => '',\n\t\t\t'banned_emails' => '',\n\t\t\t'banned_usernames' => '',\n\t\t\t'banned_screen_names' => '',\n\t\t\t'ban_action' => 'restrict',\n\t\t\t'ban_message' => 'This site is currently unavailable',\n\t\t\t'ban_destination' => 'http://www.yahoo.com/',\n\t\t\t'enable_emoticons' => 'y',\n\t\t\t'emoticon_url' => '{base_url}'.'images/smileys/',\n\t\t\t'recount_batch_total' => '1000',\n\t\t\t'image_resize_protocol' => 'gd2',\n\t\t\t'image_library_path' => '',\n\t\t\t'thumbnail_prefix' => 'thumb',\n\t\t\t'word_separator' => 'dash',\n\t\t\t'use_category_name' => 'n',\n\t\t\t'reserved_category_word' => 'category',\n\t\t\t'auto_convert_high_ascii' => 'n',\n\t\t\t'new_posts_clear_caches' => 'y',\n\t\t\t'auto_assign_cat_parents' => 'y',\n\t\t\t'new_version_check' => 'y',\n\t\t\t'enable_throttling' => 'n',\n\t\t\t'banish_masked_ips' => 'y',\n\t\t\t'max_page_loads' => '10',\n\t\t\t'time_interval' => '8',\n\t\t\t'lockout_time' => '30',\n\t\t\t'banishment_type' => 'message',\n\t\t\t'banishment_url' => '',\n\t\t\t'banishment_message' => 'You have exceeded the allowed page load frequency.',\n\t\t\t'enable_search_log' => 'y',\n\t\t\t'max_logged_searches' => '500',\n\t\t\t'memberlist_order_by' => \"member_id\",\n\t\t\t'memberlist_sort_order' => \"desc\",\n\t\t\t'memberlist_row_limit' => \"20\",\n\t\t\t'is_site_on' => 'y',\n\t\t\t'theme_folder_path' => $this->userdata['theme_folder_path'],\n\t\t);\n\n\t\t// Default Administration Prefs\n\t\t$admin_default = array(\n\t\t\t'site_index',\n\t\t\t'base_url',\n\t\t\t'base_path',\n\t\t\t'cp_url',\n\t\t\t'site_url',\n\t\t\t'theme_folder_url',\n\t\t\t'webmaster_email',\n\t\t\t'webmaster_name',\n\t\t\t'channel_nomenclature',\n\t\t\t'max_caches',\n\t\t\t'captcha_url',\n\t\t\t'captcha_path',\n\t\t\t'captcha_font',\n\t\t\t'captcha_rand',\n\t\t\t'captcha_require_members',\n\t\t\t'require_captcha',\n\t\t\t'enable_sql_caching',\n\t\t\t'force_query_string',\n\t\t\t'show_profiler',\n\t\t\t'include_seconds',\n\t\t\t'cookie_domain',\n\t\t\t'cookie_path',\n\t\t\t'website_session_type',\n\t\t\t'cp_session_type',\n\t\t\t'allow_username_change',\n\t\t\t'allow_multi_logins',\n\t\t\t'password_lockout',\n\t\t\t'password_lockout_interval',\n\t\t\t'require_ip_for_login',\n\t\t\t'require_ip_for_posting',\n\t\t\t'require_secure_passwords',\n\t\t\t'allow_dictionary_pw',\n\t\t\t'name_of_dictionary_file',\n\t\t\t'xss_clean_uploads',\n\t\t\t'redirect_method',\n\t\t\t'deft_lang',\n\t\t\t'xml_lang',\n\t\t\t'send_headers',\n\t\t\t'gzip_output',\n\t\t\t'date_format',\n\t\t\t'time_format',\n\t\t\t'include_seconds',\n\t\t\t'server_offset',\n\t\t\t'default_site_timezone',\n\t\t\t'mail_protocol',\n\t\t\t'email_newline',\n\t\t\t'smtp_server',\n\t\t\t'smtp_username',\n\t\t\t'smtp_password',\n\t\t\t'email_smtp_crypto',\n\t\t\t'email_debug',\n\t\t\t'email_charset',\n\t\t\t'email_batchmode',\n\t\t\t'email_batch_size',\n\t\t\t'mail_format',\n\t\t\t'word_wrap',\n\t\t\t'email_console_timelock',\n\t\t\t'log_email_console_msgs',\n\t\t\t'log_search_terms',\n\t\t\t'deny_duplicate_data',\n\t\t\t'redirect_submitted_links',\n\t\t\t'enable_censoring',\n\t\t\t'censored_words',\n\t\t\t'censor_replacement',\n\t\t\t'banned_ips',\n\t\t\t'banned_emails',\n\t\t\t'banned_usernames',\n\t\t\t'banned_screen_names',\n\t\t\t'ban_action',\n\t\t\t'ban_message',\n\t\t\t'ban_destination',\n\t\t\t'enable_emoticons',\n\t\t\t'emoticon_url',\n\t\t\t'recount_batch_total',\n\t\t\t'new_version_check',\n\t\t\t'enable_throttling',\n\t\t\t'banish_masked_ips',\n\t\t\t'max_page_loads',\n\t\t\t'time_interval',\n\t\t\t'lockout_time',\n\t\t\t'banishment_type',\n\t\t\t'banishment_url',\n\t\t\t'banishment_message',\n\t\t\t'enable_search_log',\n\t\t\t'max_logged_searches',\n\t\t\t'theme_folder_path',\n\t\t\t'is_site_on'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($admin_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_system_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Members Prefs\n\t\t$member_default = array(\n\t\t\t'un_min_len',\n\t\t\t'pw_min_len',\n\t\t\t'allow_member_registration',\n\t\t\t'allow_member_localization',\n\t\t\t'req_mbr_activation',\n\t\t\t'new_member_notification',\n\t\t\t'mbr_notification_emails',\n\t\t\t'require_terms_of_service',\n\t\t\t'default_member_group',\n\t\t\t'profile_trigger',\n\t\t\t'member_theme',\n\t\t\t'enable_avatars',\n\t\t\t'allow_avatar_uploads',\n\t\t\t'avatar_url',\n\t\t\t'avatar_path',\n\t\t\t'avatar_max_width',\n\t\t\t'avatar_max_height',\n\t\t\t'avatar_max_kb',\n\t\t\t'enable_photos',\n\t\t\t'photo_url',\n\t\t\t'photo_path',\n\t\t\t'photo_max_width',\n\t\t\t'photo_max_height',\n\t\t\t'photo_max_kb',\n\t\t\t'allow_signatures',\n\t\t\t'sig_maxlength',\n\t\t\t'sig_allow_img_hotlink',\n\t\t\t'sig_allow_img_upload',\n\t\t\t'sig_img_url',\n\t\t\t'sig_img_path',\n\t\t\t'sig_img_max_width',\n\t\t\t'sig_img_max_height',\n\t\t\t'sig_img_max_kb',\n\t\t\t'prv_msg_enabled',\n\t\t\t'prv_msg_allow_attachments',\n\t\t\t'prv_msg_upload_path',\n\t\t\t'prv_msg_max_attachments',\n\t\t\t'prv_msg_attach_maxsize',\n\t\t\t'prv_msg_attach_total',\n\t\t\t'prv_msg_html_format',\n\t\t\t'prv_msg_auto_links',\n\t\t\t'prv_msg_max_chars',\n\t\t\t'memberlist_order_by',\n\t\t\t'memberlist_sort_order',\n\t\t\t'memberlist_row_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($member_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_member_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Templates Prefs\n\t\t$template_default = array(\n\t\t\t'enable_template_routes',\n\t\t\t'strict_urls',\n\t\t\t'site_404',\n\t\t\t'save_tmpl_revisions',\n\t\t\t'max_tmpl_revisions',\n\t\t);\n\t\t$site_prefs = array();\n\n\t\tforeach($template_default as $value)\n\t\t{\n\t\t\t$site_prefs[$value] = $config[$value];\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_template_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Default Channels Prefs\n\t\t$channel_default = array(\n\t\t\t'image_resize_protocol',\n\t\t\t'image_library_path',\n\t\t\t'thumbnail_prefix',\n\t\t\t'word_separator',\n\t\t\t'use_category_name',\n\t\t\t'reserved_category_word',\n\t\t\t'auto_convert_high_ascii',\n\t\t\t'new_posts_clear_caches',\n\t\t\t'auto_assign_cat_parents',\n\t\t\t'enable_comments',\n\t\t\t'comment_word_censoring',\n\t\t\t'comment_moderation_override',\n\t\t\t'comment_edit_time_limit'\n\t\t);\n\n\t\t$site_prefs = array();\n\n\t\tforeach($channel_default as $value)\n\t\t{\n\t\t\tif (isset($config[$value]))\n\t\t\t{\n\t\t\t\t$site_prefs[$value] = $config[$value];\n\t\t\t}\n\t\t}\n\n\t\tee()->db->where('site_id', 1);\n\t\tee()->db->update('sites', array('site_channel_preferences' => base64_encode(serialize($site_prefs))));\n\n\t\t// Remove Site Prefs from Config\n\t\tforeach(array_merge($admin_default, $member_default, $template_default, $channel_default) as $value)\n\t\t{\n\t\t\tunset($config[$value]);\n\t\t}\n\n\t\t// Write the config file data\n\t\t$this->write_config_from_template($config);\n\n\t\treturn TRUE;\n\t}", "public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }", "protected function loadSettings() {}", "protected function loadSettings() {}", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "protected function loadSettings() {}", "public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }", "private static function readConfig()\n {\n $handler = self::getHandler();\n if (null == $handler->arrConfigGlobal && null == $handler->arrConfigLocal && null == $handler->arrConfigSecure) {\n include dirname(__FILE__) . '/../../config/default.php';\n\n $handler->arrConfigLocal = $APPCONFIG;\n\n $db = Base_Database::getConnection();\n try {\n // This is just for things like API keys, password salts etc.\n // If we have, at a later point, a function to export the database\n // en masse, then we can encrypt all the output from the secureconfig\n // table. It shouldn't overide the global or local config settings\n $sql = \"SELECT * FROM secureconfig\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigSecure = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n\n // This is just the regular global configuration settings.\n $sql = \"SELECT * FROM config\";\n $query = $db->prepare($sql);\n $query->execute();\n $handler->arrConfigGlobal = $query->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP);\n foreach ($handler->arrConfigGlobal as $key => $value) {\n $handler->arrConfig[$key] = array('isLocal' => false, 'isOverriden' => false, 'value' => $value[0]);\n }\n \n // This is the configuration settings local to this individual machine.\n foreach ($handler->arrConfigLocal as $key => $value) {\n if (isset($handler->arrConfig[$key])) {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => true, 'value' => $value);\n } else {\n $handler->arrConfig[$key] = array('isLocal' => true, 'isOverriden' => false, 'value' => $value);\n }\n }\n } catch(Exception $e) {\n error_log($e);\n die();\n }\n }\n }", "function load_config() {\n\t\t$conf_file = @file_get_contents( LDAP_LOGIN_PATH.'data.dat' );\n\t\tif ($conf_file!==false)\n\t\t{\n\t\t\t$this->config = unserialize($conf_file);\n\t\t}\n\t}", "private function loadConfig() {\n\n //get pachage and configuration\n $pkg = Package::getByHandle(\"c5authy\");\n Loader::library('authy', $pkg);\n\n $co = new Config();\n $co->setPackageObject($pkg);\n\n $production = ( $co->get('authy_server_production') == \"1\" ? true : false );\n\n //set the values\n $this->api_key = $co->get('authy_api_key');\n $this->server = $production ? self::LIVE_SERVER : self::SANDBOX_SERVER;\n $this->auth_type = $co->get('authy_type');\n $this->sms_token = $co->get('authy_sms_tokens');\n }", "private function _retrievePagSeguroConfiguration(){\n \n // retrieving configurated default charset\n PagSeguroConfig::setApplicationCharset(Configuration::get('PAGSEGURO_CHARSET'));\n \n // retrieving configurated default log info\n $log_active = Configuration::get('PAGSEGURO_LOG_ACTIVE');\n if ($log_active)\n PagSeguroConfig::activeLog(_PS_ROOT_DIR_.Configuration::get('PAGSEGURO_LOG_FILELOCATION'));\n\n }", "function loadConfig(){\n $file = file_get_contents($this->config_dir, FILE_USE_INCLUDE_PATH);\n $urls = json_decode($file,TRUE);\n //not the best way but error handling\n if ($file == NULL || $urls == NUll ){\n print(\"Error reading the config file or it it is empty\");\n }\n else{\n $this->config_data = $urls;\n\n }\n }", "public function getConfig() {\r\n\r\n\t}", "private function initConfig() {\n\t\t$configLoader = new ConfigLoader($this->_env);\n\n /** set config to Di container */\n $this->_di->set('config', $configLoader, TRUE);\n $this->_config = $configLoader;\n\t}", "protected function load_config() {\n $this->config = Kohana::$config->load('imagecache');\n $this->config_patterns = Kohana::$config->load('imagecache_patterns');\n }", "function __loadConfig() {\n\t\t$area = $this->__determineArea();\n\t\tConfigure::write('Area', $area);\n\t\t$user = $this->User->findById($this->Session->read('Auth.User.id'));\n\t\tConfigure::write('User', $user['User']);\n\t}", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "private function read_config() {\n\t\t$sections = parse_ini_file($this->config['conf'], true);\n\t\tforeach ($sections as $sectionk => $sectionv) {\n\t\t\tforeach ($sectionv as $key => $var)\n\t\t\t\t$this->config[$sectionk . '.' . $key] = $var;\n\t\t}\n\t}", "abstract protected function loadSettings();", "function getConfiguration() ;", "function load_config()\n\t{\n\t\t$sql = \"SELECT * FROM config\";\n\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\tforeach ($dbdata->fetchAll(PDO::FETCH_OBJ) as $conf) {\n\t\t\tif ($conf->value == 'true') {\n\t\t\t\t$conf->value = true;\n\t\t\t} elseif ($conf->value == 'false') {\n\t\t\t\t$conf->value = false;\n\t\t\t}\n\n\t\t\t$this->config->set($conf->param, $conf->value);\n\t\t}\n\t}", "private function load_config() {\n $this->config = new Config();\n }", "public function localConfig();", "protected function _load_config()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $config_file = new Configuration_File(self::FILE_CONFIG);\n $rawdata = $config_file->load();\n } catch (File_Not_Found_Exception $e) {\n // Not fatal, set defaults below\n } catch (Engine_Exception $e) {\n throw new Engine_Exception($e->get_message(), CLEAROS_WARNING);\n }\n\n if (isset($rawdata['allow_shell']) && preg_match(\"/(true|1)/i\", $rawdata['allow_shell']))\n $this->config['allow_shell'] = TRUE;\n else\n $this->config['allow_shell'] = FALSE;\n\n if (isset($rawdata['theme_mode']) && !empty($rawdata['theme_mode']))\n $this->config['theme_mode'] = $rawdata['theme_mode'];\n else\n $this->config['theme_mode'] = 'normal';\n\n if (isset($rawdata['theme']) && !empty($rawdata['theme']))\n $this->config['theme'] = $rawdata['theme'];\n else\n $this->config['theme'] = 'default';\n\n $this->is_loaded = TRUE;\n }", "public function config_vars()\n\t{\n\t\tglobal $txt;\n\n\t\t$return_data = array();\n\n\t\t$core_features = $this->settings();\n\n\t\t// Convert this to a format that admin search will understand\n\t\tforeach ($core_features as $id => $data)\n\t\t{\n\t\t\t$return_data[] = array('switch', $data['title'] ?? $txt['core_settings_item_' . $id]);\n\t\t}\n\n\t\treturn $return_data;\n\t}", "public function loadConfigs()\n {\n self::$country_configs = self::getCountryConfigs();\n $configs = new parent();\n self::$categories = $configs->getCategories();\n self::$site_data = self::get_site_data();\n self::$payments_name = self::setPaymentGateway();\n }", "private function getConfig() {\n // call the GetConfig API\n $args = array('hostname' => $this->hostname);\n $api = new \\xmlAPI('GetConfig', $this->_default_key, 'xml', $args);\n $api->server_url = $this->_default_server;\n $api->send();\n\n // change hostname if found by custom_name\n $this->hostname = $api->hostname;\n \n // save fields in metadata\n $this->key = $api->api_key ? $api->api_key : $this->_default_key;\n $this->server = $api->api_server ? $api->api_server : $this->_default_server;\n $this->controller_path = $api->controller_path;\n $this->controller = $api->controller;\n $this->error_page = $api->error_page ? $api->error_page : '404';\n $this->mode = $api->mode ? $api->mode : 'test';\n $this->site_path = $api->site_path ? $api->site_path : $this->hostname;\n $this->default_site_path = $api->default_site_path;\n $this->secure_domain = $api->secure_domain;\n \n // set the list of controllers this site can use\n $this->setRights($api->row);\n }", "public static function getConfig()\n {\n }", "public function configuracion()\n {\n $usuarioDato = new UsuarioDatoEntity();\n $usuarioDato->buscarPorPk($this->_userdata->idUser());\n\n $tarifa = new TarifasModel();\n\n $this->_view->_tarifas = $tarifa->getAll();\n\n $this->_view->_social = $usuarioDato;\n $this->_view->paneltitle = \"Configura tu cuenta\";\n $this->_view->titulo = $this->_view->getConfigure()->title;\n $this->_view->meta_descripcion = \"Sistema Perreras\";\n $this->_view->titulo_page = \"Panel principal\";\n $this->_view->renderizar(\"configuracion\", 'index');\n }", "function DBConfiguraion()\n\t{\n\t\tglobal $dbhost,$dbmain,$dbuser,$dbpwd;//these variables comes from \"mainconfig.php\" which is in www folder\n\t\t//print\"$dbmain,$dbuser,$dbpwd\";\n\t\t//initialize the database_server\n\t\t$this->database_server = $dbhost;\n\t\t//initialize the database_password \n\t\t$this->database_password = $dbpwd;\n\t\t//initialize the database_user \n\t\t$this->database_user = $dbuser;\n\t\t//initialize the database_name \n\t\t$this->database_name = $dbmain;\n\t}", "private function loadConfig()\n {\n\n $this->config = include(__DIR__ . '/../../config/config.php');\n\n }", "private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}", "public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}", "public static function load()\n {\n if(!self::$loaded)\n {\n $GLOBALS['_EZMVC_SYS_CONFIG'] = require __DIR__ . '/system.config.php'; //Load config file\n $GLOBALS['_EZMVC_SYS_CONFIG'] = is_array($GLOBALS['_EZMVC_SYS_CONFIG']) ? $GLOBALS['_EZMVC_SYS_CONFIG'] : []; //Make sure its an array\n\n $GLOBALS['_EZMVC_APP_CONFIG'] = require dirname(__DIR__) . '/app/config/app.config.php';\n $GLOBALS['_EZMVC_APP_CONFIG'] = is_array($GLOBALS['_EZMVC_APP_CONFIG']) ? $GLOBALS['_EZMVC_APP_CONFIG'] : [];\n }\n }", "private function loadConstants()\n {\n // config.ini globale\n $configurationFileName = (!empty($_SERVER['DOCUMENT_ROOT']) ? dirname($_SERVER['DOCUMENT_ROOT']) : getcwd()) . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.ini';\n if(!file_exists($configurationFileName))\n {\n throw new \\Exception(sprintf('File di configurazione \"%s\" non trovato', $configurationFileName));\n }\n Config::add(parse_ini_file($configurationFileName, true));\n \n Config::set('application.dir', $this->getRootDir());\n \n if(!Config::get('MAIN/document_root'))\n {\n Config::set('MAIN/document_root', $this->getRootDir() . DIRECTORY_SEPARATOR . 'public');\n }\n \n if(!Config::get('MAIN/cache_path'))\n {\n Config::set('MAIN/cache_path', $this->getRootDir() . DIRECTORY_SEPARATOR . 'cache');\n }\n\n $coreDir = $this->getCoreDir();\n }", "public function getConfig() {}", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "function conf(){\n $this->s__perfil = toba::manejador_sesiones()->get_perfiles_funcionales();\n // print_r($this->s__perfil); \n \n $p = array_search('autoridad_mesa', $this->s__perfil);\n if($p !== false){//Es autoridad de mesa\n //Cargar datos del usuario especifico\n //obtengo el nombre de usuario logueado\n $usr = toba::manejador_sesiones()->get_id_usuario_instancia();\n \n $id_mesa = $this->dep('datos')->tabla('mesa')->get_de_usr($usr);\n if(sizeof($id_mesa)>0){\n $this->s__id_mesa = $id_mesa[0]['id_mesa'];\n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \n if($this->s__mesa['estado'] >= 2){//Ya fue validado por la secretaria\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else//No se encuentra mesa asociada al usuario logueado\n toba::notificacion()->agregar(\"No se encuentra el usuario ingresado\",\"info\");\n }\n else{\n $this->s__id_mesa = toba::memoria()->get_parametro('c');//el parametro c tiene el id mesa\n \n $this->s__retorno = toba::memoria()->get_parametro('k');//el parametro k tiene la dir de retorno\n $this->s__retorno_estado = toba::memoria()->get_parametro('f');\n \n \n $datos['id_mesa'] = $this->s__id_mesa;\n $this->dep('datos')->tabla('mesa')->cargar($datos);\n $this->s__mesa = $this->dep('datos')->tabla('mesa')->get();\n \t\n $p = array_search('junta_electoral', $this->s__perfil);\n if($p !== false){//Es junta electoral\n $this->controlador()->evento('procesar')->set_etiqueta('Confirmar');\n $this->controlador()->evento('enviar')->ocultar();\n\n if($this->s__mesa['estado'] > 3){//Ya fue validado por la secretaria\n// $this->dep('form_ml_directivo')->set_solo_lectura('votos');\n// $this->dep('form_ml_superior')->set_solo_lectura('votos');\n// $this->dep('form_ml_extra')->set_solo_lectura('votos');\n $this->controlador()->evento('procesar')->ocultar();\n $this->controlador()->evento('enviar')->ocultar();\n }\n }\n else{\n $p = array_search('secretaria', $this->s__perfil);//print_r(isset($p)?'no es false':'es false');\n if($p !== false){//Es secretaria\n $this->controlador()->evento('procesar')->set_etiqueta('Validar');\n $this->controlador()->evento('enviar')->ocultar();\n\n }\n \n }\n }\n \n if(isset($this->s__id_mesa)){//Si el pedido viene de la operacion Confirmar/Cargar// \n $this->s__claustro = $this->s__mesa['id_claustro'];\n $this->s__id_nro_ue = $this->dep('datos')->tabla('sede')->get_unidad($this->s__mesa['id_sede']);\n $this->s__id_sede = $this->s__mesa['id_sede'];\n }\n }", "private function initialize() {\n $CI = get_instance();\n $CI->config->load('dwootemplate', TRUE);\n $config = $CI->config->item('dwootemplate');\n foreach ($config as $key => $val) {\n $this->$key = $val;\n }\n }", "public function configs() {\n\n\t\t// Recommend plugins\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tgm-plugin-activation-config.php' );\n\n\t\t// Post Series\n\t\tif ( get_theme_mod( 'post_series_enable', true ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'post-series/post-series-config.php' );\n\t\t}\n\n\t\t// Portfolio config\n\t\tif ( WPEX_PORTFOLIO_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'portfolio/portfolio-config.php' );\n\t\t}\n\n\t\t// Staff config\n\t\tif ( WPEX_STAFF_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'staff/staff-config.php' );\n\t\t}\n\n\t\t// Testimonials config\n\t\tif ( WPEX_TESTIMONIALS_IS_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'testimonials/testimonials-config.php' );\n\t\t}\n\n\t\t// WooCommerce config\n\t\tif ( WPEX_WOOCOMMERCE_ACTIVE ) {\n\n\t\t\t// WooCommerce core tweaks\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'woocommerce/woocommerce-config.php' );\n\n\t\t}\n\n\t\t// Visual composer config\n\t\tif ( WPEX_VC_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'visual-composer/visual-composer-config.php' );\n\t\t}\n\n\t\t// Tribe events config\n\t\tif ( WPEX_TRIBE_EVENTS_CALENDAR_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/tribe-events-config.php' );\n\t\t}\n\n\t\t// Revolution slider config\n\t\tif ( WPEX_REV_SLIDER_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/revslider-config.php' );\n\t\t}\n\n\t\t// WPML Config\n\t\tif ( WPEX_WPML_ACTIVE ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/wpml-config.php' );\n\t\t}\n\n\t\t// Polylang Config\n\t\tif ( class_exists( 'Polylang' ) ) {\n\t\t\trequire_once( WPEX_FRAMEWORK_DIR .'config/polylang-config.php' );\n\t\t}\n\n\t}", "protected function Init() \n {\n // Load the APP config.php and add the defined vars\n $this->load($this->files['app']['file_path'], 'app');\n \n // Load the core.config.php and add the defined vars\n $this->load($this->files['core']['file_path'], 'core', 'config');\n \n // Load the database.config.php and add the defined vars\n $this->load($this->files['db']['file_path'], 'db', 'DB_configs');\n }", "public function setup_constants() {\n\t\tself::$DIR = plugin_dir_path( __FILE__ );\n\t\tself::$URL = plugins_url( '/', __FILE__ );\n\t\tself::$FILE = __FILE__;\n\t}", "private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unserialize($infos[\"value\"]);\r\n }\r\n\r\n }", "private static function initCfg() {\r\n\t\tif (!self::$cfg)\r\n\t\t\tself::$cfg = new config(factory::loadCfg(__CLASS__));\r\n\t}", "protected abstract static function getConfig(): array;", "public static function load()\n {\n $entries = Configuration::get();\n \n foreach ($entries as $entry) {\n self::$config[$entry->id] = unserialize($entry->value);\n }\n }", "public function readConfig() {\n if ( file_exists( $this->path . '/config/config.php' ) ) {\n require_once $this->path . '/config/config.php';\n }\n }", "function getConfigurationValues() ;", "abstract protected function define_my_settings();", "public function options_load();", "private function loadConfig(){\n $DB = DB::pass();\n $conf = $DB->loadConfig();\n if ( count($conf) > 0 ){\n foreach($conf as $c){\n $this->config->set($c['cluster'] . \".\" . $c['name'],$c['value']);\n }\n } else {\n throw new SystemException(\"No database configuration\");\n }\n }", "function LoadConfiguration()\r\n\t{\r\n\t\t$cinfFilePath = Site::GetConfigFilePath ();\r\n\t\t$config = simplexml_load_file ( $cinfFilePath );\r\n\t\t\r\n\t\t// load languages\r\n\t\tif (isset ( $config->languages ))\r\n\t\t{\r\n\t\t\t$langs = ( array ) $config->languages;\r\n\t\t\t$langsA = $langs ['language'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$linkID = ( string ) $langsA->linkID;\r\n\t\t\t\t$linkName = ( string ) $langsA->linkName;\r\n\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$linkID = ( string ) $lang->linkID;\r\n\t\t\t\t\t$linkName = ( string ) $lang->linkName;\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->m_languages [$linkID] = $linkName;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$langKes = array_keys ( $this->m_languages );\r\n\t\t\t$this->m_languageDefault = $langKes [0];\r\n\t\t}\r\n\t\t\r\n\t\t// load templates\r\n\t\tif (isset ( $config->templates ))\r\n\t\t{\r\n\t\t\t$templates = ( array ) $config->templates;\r\n\t\t\t$langsA = $templates ['template'];\r\n\t\t\t\r\n\t\t\tif (! is_array ( $langsA ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_templates = array ();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $langsA as $lang )\r\n\t\t\t\t{\r\n\t\t\t\t\t$fileName = ( string ) $lang;\r\n\t\t\t\t\tarray_push ( $this->m_templates, $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->url ))\r\n\t\t{\r\n\t\t\t$this->m_URL = ( string ) $config->url;\r\n\t\t\t$this->m_URL = trim ( $this->m_URL );\r\n\t\t}\r\n\t\t\r\n\t\t// load siteURL\r\n\t\tif (isset ( $config->maxImageWidth ))\r\n\t\t{\r\n\t\t\t$this->m_maxImageWidth = ( int ) $config->maxImageWidth;\r\n\t\t}\r\n\t\t\r\n\t\t// secuirity-file root\r\n\t\tif (isset ( $config->securFolder ))\r\n\t\t{\r\n\t\t\t$this->m_sfRoot = ( string ) $config->securFolder;\r\n\t\t\t$this->m_sfRoot = trim ( $this->m_sfRoot );\r\n\t\t}\r\n\t\t\r\n\t\t// boxes\r\n\t\tif (isset ( $config->boxes ))\r\n\t\t{\r\n\t\t\t$boxes = ( array ) $config->boxes;\r\n\t\t\t$boxes = $boxes ['box'];\r\n\t\t\tif (! is_array ( $boxes ))\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = array ($boxes );\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->m_boxes = $boxes;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->productImageRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->productImageRoot;\r\n\t\t\t$this->m_prodImagRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\t// product image root\r\n\t\tif (isset ( $config->galleryRoot ))\r\n\t\t{\r\n\t\t\t$str = ( string ) $config->galleryRoot;\r\n\t\t\t$this->m_galleryImageRoot = trim ( $str );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private function _config()\n\t{\n\t\t// Get the base path for the smarty base directory\n\t\t$basePath\t= $this->getBasePath();\n\t\t$configFile\t= $this->getConfigFile();\n\t\t\n\t\tif (null === $basePath){\n\t\t\tthrow new Exception('No view base path specified');\n\t\t}\n\t\t\n\t\tif (null === $configFile){\n\t\t\tthrow new Exception('No config file specified');\n\t\t}\n\t\t\n\t\t// Generate the path to the view xml config file\n\t\tif ( file_exists(Package::buildPath( $basePath , $configFile)) ) {\n\t\t\t$viewBuildFile = Package::buildPath( $basePath , $configFile);\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to find config file: \" . $configFile);\n\t\t}\n\t\t \n\t\t// Load the config file\n\t\tif (! $viewXml = Zend_Registry::get('site_config_cache')->load('view_config') ) {\n\t\t\ttry {\n\t\t\t\t$xmlSection = (defined('BUILD_ENVIRONMENT')) ? BUILD_ENVIRONMENT : strtolower($_SERVER['SERVER_NAME']);\n\t\t\t\t$viewXml = new Zend_Config_Xml($viewBuildFile, $xmlSection);\n\t\t\t\tZend_Registry::get('site_config_cache')->save($viewXml, 'view_config');\n\t\t\t} catch (Zend_Exception $e) {\n\t\t\t\tthrow new Exception( 'There was a problem caching the config file: ' . $e->getMessage() );\n\t\t\t}\n\t\t}\n\t\tunset($viewBuildFile, $xmlSection);\n\t\t\n\t\t\n\t\t// Alias' replacements\n\t\t$replacements = array(\n ':baseDir' => $basePath\n ); \n\t\t\n $params = str_replace(array_keys($replacements), array_values($replacements), $viewXml->smarty->params->toArray());\n\n\t\t// Set the base smarty parameters\n\t\t$this->setParams($params);\n\t\t\n\t\t// Register plugins\n\t\t/*\n\t\tif (isset($viewXml->smarty->plugins)){\n\t\t\t$plugins\t= $viewXml->smarty->plugins->toArray();\n\t\t\t\n\t\t\t// Loop each plugin entry\n\t\t\tforeach($plugins as $key => $plugin)\n\t\t\t{\n\t\t\t\t// Check if a plugin type has been specified\n\t\t\t\tif (isset($plugin['type'])){\n\t\t\t\t\tswitch($plugin['type'])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'resource':\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t$methodArgs\t= array(\n\t\t\t\t\t\t\t\t\t$key . '_get_source',\n\t\t\t\t\t\t\t\t\t$key . '_get_timestamp',\n\t\t\t\t\t\t\t\t\t$key . '_get_secure',\n\t\t\t\t\t\t\t\t\t$key . '_get_trusted'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$methodArgs\t= (is_array($plugin['parameters'])) ? $plugin['parameters'] : array();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t//$methodName\t= 'register_' . $plugin['type'];\n\t\t\t\t\t//$this->_setSmartyMethod($methodName, array($key, $methodArgs));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t}", "protected function _initSetConstants() {\n // Them file cau hinh cac hang so su dung trong project\n $config = parse_ini_file(APPLICATION_PATH . '/configs/constant.ini');\n foreach($config as $key=>$value){\n // neu chua dinh nghia thi moi dinh nghia lai\n if(!defined($key)){\n define($key, $value);\n }\n }\n }", "public function configure()\n\t{\n\t\tglobal $langs;\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'name' => $langs->trans('SyslogFilename'),\n\t\t\t\t'constant' => 'SYSLOG_FILE',\n\t\t\t\t'default' => 'DOL_DATA_ROOT/brs.log',\n\t\t\t\t'attr' => 'size=\"60\"'\n\t\t\t)\n\t\t);\n\t}", "function getSupportingConfigVars()\n {\n return array();\n }", "private function initConfig()\n {\n return $this->config = [\n 'api' => 'https://api.gfycat.com/v1',\n ];\n }", "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }", "public function __construct()\n\t{\n\n\t\tparent::__construct();\n\n\t\t/** \n\t\t * Using the fields from baseSettings, assign a new entry\n\t\t * to each variable.\n\t\t *\n\t\t * @param Each array has the new setting plus a description of each entry\n\t\t */ \n\n\t\t$this->newSettings = array(\n\t \t'webRoot'\t\t=> \tarray($this->webRoot,\t'Specify the folder your websites will reside'),\n\t \t'hostsFile'\t\t=> \tarray($this->hostsFile,\t'Specify your hosts file location'),\n\t \t'vhostsFile'\t=> \tarray($this->vhostsFile,\t'Specify your vhosts.conf location'),\n\t \t'rootHttpd'\t\t=> \tarray($this->rootHttpd,\t'Where do you put your websites?')\n\t \t);\n\n\t\tvar_dump($this->newSettings);\n\n\t \t/** \n\t\t * Get a list of the variables in the scope before including the file\n\t\t *\n\t\t * @var stores current variables\n\t\t */\n\n\t\t$this->oldVar = get_defined_vars();\n\n\t\t/** \n\t\t * Include the config file and get it's values\n\t\t *\n\t\t * @var stores variables of current config (before update)\n\t\t */\n\n\n\t\tif (is_file($this->filePath))\n\t\t{\n\t\t require_once($this->filePath);\n\t\t header(\"settingsSaved: 1\");\n\t\t} else {\n\t\t\theader(\"settingsSaved: Error: unable to load config\");\n\t\t}\n\t\t/** \n\t\t * Get a list of the variables in the scope after including the file\n\t\t *\n\t\t * @var stores variables of current config (after update)\n\t\t */\n\n\t\t$this->newVar = get_defined_vars();\n\n\t\t/** \n\t\t * Find the difference - after this, $fileSettings \n\t\t * contains only the variables declared in the file\n\t\t *\n\t\t * @var stores contains new variables.\n\t\t */\n\n\t\t$this->fileSettings = array_diff($this->newVar, $this->oldVar);\n\n\t\t/** \n\t\t * Update $fileSettings with any new values \n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\t// \n\t\t$this->fileSettings = array_merge($this->fileSettings, $this->newSettings);\n\n\t}", "function load_config($conf) {\n $this->conf = $conf; // Store configuration\n\n $this->pi_setPiVarDefaults(); // Set default piVars from TS\n $this->pi_initPIflexForm(); // Init FlexForm configuration for plugin\n\n // Read extension configuration\n $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);\n\n if (is_array($extConf)) {\n $conf = t3lib_div::array_merge($extConf, $conf);\n\n }\n\n // Read TYPO3_CONF_VARS configuration\n $varsConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey];\n\n if (is_array($varsConf)) {\n\n $conf = t3lib_div::array_merge($varsConf, $conf);\n\n }\n\n // Read FlexForm configuration\n if ($this->cObj->data['pi_flexform']['data']) {\n\n foreach ($this->cObj->data['pi_flexform']['data'] as $sheetName => $sheet) {\n\n foreach ($sheet as $langName => $lang) {\n foreach(array_keys($lang) as $key) {\n\n $flexFormConf[$key] = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], \n $key, $sheetName, $langName);\n\n if (!$flexFormConf[$key]) {\n unset($flexFormConf[$key]);\n\n }\n }\n }\n }\n }\n\n if (is_array($flexFormConf)) {\n\n $conf = t3lib_div::array_merge($conf, $flexFormConf);\n }\n\n $this->conf = $conf;\n\n }", "private function readXML() {\n $xmlFile = __DIR__ .\"\\configuracion.xml\";\n if (file_exists($xmlFile)) {\n $xml = simplexml_load_file($xmlFile);\n } else {\n exit('Fallo al abrier el archivo configuraciones.xml');\n }\n $this->host = $xml->mysql[0]->host;\n $this->database = $xml->mysql[0]->database;\n $this->user = $xml->mysql[0]->user;\n $this->password = $xml->mysql[0]->password;\n }", "function Settings_API($load_settings=true)\n\t{\n\t\t$this->ConfigFile = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.php';\n\t\t$this->WhiteLabelCache = IEM_InterspireStash::getInstance();\n\n\t\tif ($load_settings) {\n\t\t\t$db = $this->GetDb();\n\t\t\t$this->LoadSettings();\n\t\t}\n\t}", "private function setup_variables() {\n\t\t$this->file = __FILE__;\n\t\t$this->basename = plugin_basename( $this->file );\n\t\t$this->plugin_dir = plugin_dir_path( $this->file );\n\t\t$this->plugin_url = plugin_dir_url( $this->file );\n\t\t$this->cron_frequency = 'twicedaily';\n\t}", "function settings()\n\t{\n\t\t$settings = array();\n\t\t$settings['script_folder_path'] = \"\";\n\t\treturn $settings;\n\t}", "private function _setCompanyConfig(){\n\t\t/* Loading the company configuration file */\n\t\t$this->config->load('company'.DIRECTORY_SEPARATOR.$this->getCompanyCode().DIRECTORY_SEPARATOR.'config');\n\t}", "function load_settings(){\n $ret = array();\n $c = $this->_files->readfile($this->_settings_file);\n if( $c !== false ){\n $c = explode( \"\\n\", eol($c));\n foreach( $c as $line ){\n //ignore a lot of stuff - quick hack for now\n if(substr($line, 0, 1) != '#'\n && trim($line) != ''\n && substr($line, 0, 4) != 'LANG'\n && substr($line, 0, 1) != '#'\n && substr($line, 0, 11) != 'export LANG'\n && substr($line, 0, 4) != 'bold'\n && substr($line, 0, 6) != 'normal' ){\n $set = explode('=', $line);\n $ret[$set[0]] = trim($set[1], '\"\\''); //this should now be one setting per key with setting name as key\n }\n }\n\n if( count($ret) > 0 ){\n $_SESSION['settings.conf'] = $ret;\n return $_SESSION['settings.conf'];\n }\n }else{\n unset($_SESSION['settings.conf']);\n return false;\n }\n }", "function setConfig() {\n\n\t\t\t// Mapping array for PI flexform\n\t\t\t$flex2conf = array(\n\t\t\t\t'news' => 'sDEF:news',\n\t\t\t\t'days' => 'sDEF:days',\n\t\t\t\t'darkdesign' => 'sDEF:dark',\n\t\t\t\t'show_last' => 'sDEF:show_last',\n\t\t\t\t'order_by' => 'sDEF:listOrderBy',\n\t\t\t\t'asc_desc' => 'sDEF:ascDesc',\n\t\t\t\t'category_mode' => 'sDEF:categoryMode',\n\t\t\t\t'category' => 'sDEF:categorySelection',\n\t\t\t\t'sideTop' => 'sSIDE:blog',\n\t\t\t\t'sideTopTitle' => 'sSIDE:blogTitle',\n\t\t\t\t'sideTopText' => 'sSIDE:blogText',\n\t\t\t\t'sideTopImage' => 'sSIDE:blogImage',\n\t\t\t\t'sideMiddle' => 'sSIDE:reader',\n\t\t\t\t'sideMiddleTitle' => 'sSIDE:readerTitle',\n\t\t\t\t'sideMiddleText' => 'sSIDE:readerText',\n\t\t\t\t'sideMiddleImage' => 'sSIDE:readerImage',\n\t\t\t\t'sideBottom' => 'sSIDE:bottom',\n\t\t\t\t'sideBottomTitle' => 'sSIDE:bottomTitle',\n\t\t\t\t'swfParams.' => array(\n\t\t\t\t\t'loop' => 'sFLASH:loop',\n\t\t\t\t\t'menu' => 'sFLASH:menu',\n\t\t\t\t\t'quality' => 'sFLASH:quality',\n\t\t\t\t\t'scale' => 'sFLASH:scale',\n\t\t\t\t\t'bgcolor' => 'sFLASH:bgcolor',\n\t\t\t\t\t'swliveconnect' => 'sFLASH:swliveconnect',\n\t\t\t\t),\n\t\t\t\t'playerParams.' => array(\n\t\t\t\t\t'timer' => 'sPLAYER:timer',\n\t\t\t\t\t'transition' => 'sPLAYER:transition',\n\t\t\t\t\t'random' => 'sPLAYER:random',\n\t\t\t\t\t'navigation' => 'sPLAYER:navigation',\n\t\t\t\t),\n\t\t\t\t'width' => 'sFLASH:width',\n\t\t\t\t'height' => 'sFLASH:height',\n\t\t\t\t'version' => 'sFLASH:version',\n\t\t\t);\n\n\t\t\t// Ovverride TS setup with flexform\n\t\t\t$this->conf = $this->api->fe_mergeTSconfFlex($flex2conf,$this->conf,$this->piFlexForm);\n\n\t\t\t$this->conf['swfParams.']['width'] = $this->conf['width'];\n\t\t\t$this->conf['swfParams.']['height'] = $this->conf['height'];\n\t\t\t$this->conf['swfParams.']['wmode'] = $this->conf['wmode'];\n \t\t//$this->conf['width'] = 512;\n\t\t\t//$this->conf['height'] = 265;\n\t\t\t//$this->conf['wmode'] = 'opaque';\n\t\t\t// DEBUG ONLY - Output configuration array\n\t\t\t#$this->api->debug($this->conf,'MP3 Player: configuration array');\n\t\t}", "public function _initConfig() {\r\n $this->config = Yaf\\Application::app()->getConfig();\r\n Yaf\\Registry::set(\"config\", $this->config);\r\n\r\n //申明, 凡是以Foo和Local开头的类, 都是本地类\r\n $this->loader = Yaf\\Loader::getInstance();\r\n $this->loader->registerLocalNamespace([\"fly\"]);\r\n }", "abstract public function get_settings();", "private function LoadConstants()\r\n\t{\r\n\t\t$data_config = $this->LoadData('application/data/appconfig.xml','config');\r\n\t\t\r\n\t\tif(!defined(\"NEW_LINE\"))\r\n\t\t\tdefine(\"NEW_LINE\",\"\\n\");\r\n\t\t\t\r\n\t\tforeach ($data_config AS $elem)\r\n\t\t{\r\n\t\t\tif(!defined(strtoupper('sitename')))\r\n\t\t\t\tdefine(strtoupper('sitename'),$elem->getElementsByTagName('sitename')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('tagline')))\r\n\t\t\t\tdefine(strtoupper('tagline'),$elem->getElementsByTagName('tagline')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('ownername')))\t\r\n\t\t\t\tdefine(strtoupper('ownername'),$elem->getElementsByTagName('ownername')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('owneremail')))\t\r\n\t\t\t\tdefine(strtoupper('owneremail'),$elem->getElementsByTagName('owneremail')->item(0)->nodeValue);\r\n\t\t\t\t\r\n\t\t\tif(!defined(strtoupper('appversion')))\r\n\t\t\t\tdefine(strtoupper('appversion'),$elem->getElementsByTagName('appversion')->item(0)->nodeValue);\r\n\t\t\t\r\n\t\t\t$path = $elem->getElementsByTagName('paths');\r\n\t\t\tif($path->length > 0)\r\n\t\t\t{\r\n\t\t\t\tforeach ($path AS $nested)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!defined(strtoupper('application')))\r\n\t\t\t\t\t\tdefine(strtoupper('application'),$nested->getElementsByTagName('application')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('controls')))\r\n\t\t\t\t\t\tdefine(strtoupper('controls'),$nested->getElementsByTagName('controls')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('data')))\r\n\t\t\t\t\t\tdefine(strtoupper('data'),$nested->getElementsByTagName('data')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('templates')))\r\n\t\t\t\t\t\tdefine(strtoupper('templates'),$nested->getElementsByTagName('templates')->item(0)->nodeValue);\r\n\r\n\t\t\t\t\tif(!defined(strtoupper('navigation')))\n\t\t\t\t\t\tdefine(strtoupper('navigation'),$nested->getElementsByTagName('navigation')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('navigationdata')))\n\t\t\t\t\t\tdefine(strtoupper('navigationdata'),$nested->getElementsByTagName('navigationdata')->item(0)->nodeValue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('modules')))\r\n\t\t\t\t\t\tdefine(strtoupper('modules'),$nested->getElementsByTagName('modules')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('pages')))\r\n\t\t\t\t\t\tdefine(strtoupper('pages'),$nested->getElementsByTagName('pages')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('public')))\r\n\t\t\t\t\t\tdefine(strtoupper('public'),$nested->getElementsByTagName('public')->item(0)->nodeValue);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(!defined(strtoupper('logs')))\r\n\t\t\t\t\t\tdefine(strtoupper('logs'),$nested->getElementsByTagName('logs')->item(0)->nodeValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tunset($data_config);\r\n\t}", "function conf($path){\n\t$path=trim($path,'.');\n\tif(strlen($path)==0){\n\t\tthrow new exception(\"Illage config para\");\n\t}\n\tstatic $allconfig=array();\n\t$arrpath=explode('.',$path);\n\t//get config file name($cfn)\n\t$cfn=array_shift($arrpath);\n\n\tif(!array_key_exists($cfn,$allconfig)){\n\t\t//it seems that this config file has not been loaded\n\t\t$conffilepath='application/config/'.$cfn.'.php';\n\t\tif(is_readable($conffilepath)){\n\t\t\t//get include file\n\t\t\t$allconfig[$cfn]=include $conffilepath;\n\t\t\t$arrret=$allconfig[$cfn];\n\t\t}\n\t\telse{\n\t\t\tthrow new exception('config file include error');\n\t\t}\n\t}\n\telse{\n\t\t//it looks that this config file has been loaded already\n\t\t$arrret=$allconfig[$cfn];\n\t}\n\t//step into to get config array\n\tforeach($arrpath as $k => $v)\n\t{\n\t\tif(array_key_exists($v,$arrret)){\n\t\t\t$arrret=$arrret[$v];\n\t\t}\n\t\telse{\n\t\t\tthrow new exception('key '.$v.' doesnot exist ');\n\t\t}\n\t}\n\n\treturn $arrret;\n\n}", "public function ccpa_banner_configuration() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\techo esc_html( 'You do not have sufficient permissions to access this page.' );\n\t\t\treturn;\n\t\t}\n\n\t\t$this->save_banner_settings();\n\t\t$this->save_banner_behavior_settings();\n\t\t$this->save_settings();\n\t\t$this->cookiepro_ccpc_button_floatings = get_option( 'CookieProCCPAButtonFloatings' );\n\t\t$this->banner_settings_constant = array(\n\t\t\t'constant' => $this->get_constant_data_array(),\n\t\t\t'field' => $this->get_banner_setting_data_as_array(),\n\t\t\t'behavior' => $this->get_banner_behaviors_setting_data_as_array(),\n\t\t\t'Floating' => $this->cookiepro_ccpc_button_floatings,\n\t\t\t'publishstatus' => $this->display_status(),\n\t\t);\n\t\tinclude_once WP_PLUGIN_DIR . '/' . $this->plugin->name . '/views/settings.php';\n\t}" ]
[ "0.70113826", "0.6953043", "0.68566203", "0.68135315", "0.6785161", "0.6718433", "0.66201925", "0.65927285", "0.65632623", "0.6561061", "0.65418196", "0.65415996", "0.6540942", "0.65401965", "0.6534063", "0.65203375", "0.6510997", "0.65079504", "0.6471675", "0.6403806", "0.6403101", "0.63941437", "0.6386775", "0.6380746", "0.6348714", "0.6348714", "0.6347914", "0.6347914", "0.6347914", "0.6347914", "0.6347914", "0.6347914", "0.6347914", "0.6347914", "0.63475025", "0.6346366", "0.6339324", "0.6337364", "0.63303834", "0.6317019", "0.63037235", "0.62917644", "0.628424", "0.62782675", "0.6267239", "0.62641025", "0.6258055", "0.625526", "0.6251003", "0.6248292", "0.62465423", "0.62439054", "0.6238639", "0.62338656", "0.6231041", "0.6218727", "0.6200934", "0.61862713", "0.6186115", "0.6184904", "0.61672187", "0.6157236", "0.61366385", "0.61319506", "0.6126575", "0.611126", "0.6102493", "0.6099957", "0.60907066", "0.60903835", "0.60729134", "0.6064581", "0.6062685", "0.6056661", "0.60495853", "0.60383976", "0.6032147", "0.60275537", "0.6025553", "0.60167074", "0.6013064", "0.60094917", "0.6009258", "0.60092497", "0.60018367", "0.5999903", "0.5994271", "0.5989072", "0.5987726", "0.5984661", "0.5983607", "0.59831864", "0.59828687", "0.59781134", "0.59757984", "0.59663117", "0.5962211", "0.5958847", "0.595695", "0.59534705", "0.59526074" ]
0.0
-1
debemos elimnar todo lo modulos de estre isiairo para el modulo escogido
public function updateUserSubModulo($data,$id_modulo,$userUID,$ID_PERFIL){ $sql ="DELETE FROM user_menu_modulos where `id_modulo` = '".$id_modulo."' and `id_user` ='".$userUID."'"; $query = $this->db->query($sql); if(count($data)>0){ if($query){ //Carafar los modulo nuevos $i =0; foreach ($data as $key => $value) { $new["id_sud_modulo"] = $key; $new["id_user"] = $userUID; $new["id_modulo"] = $id_modulo; $new["fecha"] = date("Y-m-d H:i:s"); $new["estado"] = 1; $new["id_perfil"] = $ID_PERFIL; $this->db->insert('user_menu_modulos',$new); $i++; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl_reconhecimentocontabil() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"reconhecimentocontabil\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function getLinhaModulo($modulo, $limite) {\n $linha = ($modulo == 0) ? $limite : $modulo;\n return $linha;\n}", "function maquetador_carga_modulos() {\n global $aEstado;\n if ( is_array( $aEstado[\"modulos\"]) ){\n\t foreach ( $aEstado[\"modulos\"] as $cModulo=>$nombreReal ) {\n\t if ( $nombreReal ) {\t \n\t include_once ( $nombreReal ); //se puede cargar sin if ya que es include_once\n\t $aEstado[\"modulos\"][$cModulo] = false;\n\t }\t \n\t }\t \n\t return true;\n\t } \n\t return false; \n\n}", "function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function fmodulo(){\n\t\t$this->sentencia=\"SELECT modulo_id,modulo_nombre FROM modulo ORDER BY modulo_orden ASC\";\n\t\t$this->fsentencia();\n\t\t$this->modulo=$this->resultado;\n\t}", "public function traerModulos()\n {\n $modeloPermisos = new \\App\\Models\\ModeloPermisos();\n $permisos = $modeloPermisos->traerDePerfil($_SESSION[\"id_perfil\"], $_SESSION[\"id_cliente\"]);\n\n // Modulos a lo que tiene acceso el usuario\n $modeloModulos = new \\App\\Models\\ModeloModulos();\n $i = 0;\n $modulos = []; // Modulos en general al que tiene acceso\n $hijos = []; // SubModulos de '$modulos' al que tiene acceso\n foreach ($permisos as $permiso)\n {\n // Obtenemos un modulo padre\n $modulosHijos = $modeloModulos->traerHijos($permiso[\"id_modulo\"], $permiso[\"id_cliente\"]);\n $j = 0;\n // Obtenemos los hijos del modulo padre\n foreach ($modulosHijos as $nhijos)\n {\n // Guardamos hijos\n $hijos[$j++] = [\"modulo\" => $nhijos[\"modulo\"], \"url\" => $nhijos[\"url\"]];\n }\n // Guardamos padres\n $modulos[$i++] = [\"modulo\" => $permiso[\"modulo\"], \"hijos\" => $hijos];\n $j = 0;\n $hijos = [];\n }\n // Limpiar aquellos modulos sin hijos\n $nmodulos = []; // Datos para el menu\n $i = 0;\n foreach ($modulos as $modulo)\n {\n if (empty($modulo[\"hijos\"]))\n continue;\n $nmodulos[$i++] = [\"modulo\" => $modulo[\"modulo\"], \"hijos\" => $modulo[\"hijos\"]];\n }\n\n return $nmodulos;\n }", "function cl_inicialnumpre() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"inicialnumpre\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rechumanorelacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumanorelacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "private function metodo_privado() {\n }", "function cl_sau_prochabilitacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_prochabilitacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function pasaje_abonado();", "function cl_cemiteriorural() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cemiteriorural\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_pesdiver() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pesdiver\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhestagio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhestagio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_liccomissao() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liccomissao\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_tfd_bpamagnetico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_bpamagnetico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_escolabase() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escolabase\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"].\"?ed77_i_escola=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_escola\"].\"&ed18_c_nome=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed18_c_nome\"].\"&ed31_c_descr=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed31_c_descr\"].\"&ed77_i_base=\".@$GLOBALS[\"HTTP_POST_VARS\"][\"ed77_i_base\"]);\n }", "function cl_ossoario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ossoario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhfolhapagamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhfolhapagamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function fantacalcio_calcola_modificatori($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . '&ordf; giornata'));\n \n if (\n variable_get('fantacalcio_modificatore_portiere', '0') \n || variable_get('fantacalcio_modificatore_difesa', '0') \n || variable_get('fantacalcio_modificatore_centrocampo', '0')\n || variable_get('fantacalcio_modificatore_attacco', '0')\n ) {\n\n $out = \"\";\n\n //$vote_round = get_last_votes();\n $teams = get_teams();\n $votes = get_votes($vote_round);\n $competitions = get_competitions();\n\n $matches = get_matches_vote_round($vote_round);\n \n foreach ($matches as $m_id => $match) {\n $t1_id = $match->t1_id;\n $t2_id = $match->t2_id;\n $competition_round = $match->round;\n $c_id = get_cid_by_gid($match->g_id);\n \n if (variable_get('fantacalcio_modificatore_portiere', '0')) {\n $mod_portiere_1 = fantacalcio_calcola_modificatori_portiere($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_portiere_2 = fantacalcio_calcola_modificatori_portiere($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_portiere_1 = 0;\n $mod_portiere_2 = 0;\n }\n\n if (variable_get('fantacalcio_modificatore_difesa', '0')) {\n $mod_difesa_1 = fantacalcio_calcola_modificatori_difesa($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_difesa_2 = fantacalcio_calcola_modificatori_difesa($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_difesa_1 = 0;\n $mod_difesa_2 = 0;\n }\n \n if (variable_get('fantacalcio_modificatore_centrocampo', '0')) {\n $mod_centrocampo = fantacalcio_calcola_modificatori_centrocampo($t1_id, $t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_centrocampo_1 = $mod_centrocampo[1];\n $mod_centrocampo_2 = $mod_centrocampo[2];\n }\n else {\n $mod_centrocampo_1 = 0;\n $mod_centrocampo_2 = 0;\n }\n \n if (variable_get('fantacalcio_modificatore_attacco', '0')) {\n $mod_attacco_1 = fantacalcio_calcola_modificatori_attacco($t1_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n $mod_attacco_2 = fantacalcio_calcola_modificatori_attacco($t2_id, $c_id, $vote_round, $competition_round, variable_get(\"fantacalcio_votes_provider\", 1));\n }\n else {\n $mod_attacco_1 = 0;\n $mod_attacco_2 = 0;\n }\n\n $sql = \"UPDATE {fanta_matches} SET \n mod_por_1 = '%f',\n mod_por_2 = '%f',\n mod_dif_1 = '%f',\n mod_dif_2 = '%f',\n mod_centr_1 = '%f',\n mod_centr_2 = '%f',\n mod_att_1 = '%f',\n mod_att_2 = '%f'\n WHERE m_id = '%d'\";\n $result = db_query($sql, $mod_portiere_1, $mod_portiere_2, $mod_difesa_1, $mod_difesa_2, $mod_centrocampo_1, $mod_centrocampo_2, $mod_attacco_1, $mod_attacco_2, $match->m_id);\n \n }\n\n $sqlx = \"SELECT * FROM {fanta_rounds_competitions} WHERE round = '%d'\";\n $resultx = db_query($sqlx, $vote_round);\n while ($rowx = db_fetch_array($resultx)) {\n $c_id = $rowx['c_id'];\n $competition_round = $rowx['competition_round'];\n\n $sql = \"SELECT * FROM {fanta_matches} \" .\n \"WHERE g_id IN (SELECT g_id FROM {fanta_groups} WHERE c_id = '%d') \" .\n \"AND round = '%d' \";\n $result = db_query($sql, $c_id, $competition_round);\n $out .= \"<h3>\" . check_plain($competitions[$c_id]->name) . \"</h3>\";\n\n $header = array(\"Squadra\", \"Portiere\", \"Difesa\", \"Centrocampo\", \"Attacco\");\n $rows = array();\n\n while ($row = db_fetch_array($result)) {\n $rows[$row['m_id'] . \"_1\"][] = $teams[$row['t1_id']]->name;\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_por_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_dif_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_centr_1'];\n $rows[$row['m_id'] . \"_1\"][] = $row['mod_att_1'];\n $rows[$row['m_id'] . \"_2\"][] = $teams[$row['t2_id']]->name;//squadra 2\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_por_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_dif_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_centr_2'];\n $rows[$row['m_id'] . \"_2\"][] = $row['mod_att_2'];\n \n $rows[$row['m_id'] . \"_3\"][] = array(\"data\" => \"<hr>\", \"colspan\" => 5);//separatore\n }\n\n $out .= theme_table($header, $rows);\n\n }\n }\n else $out = \"No modificatori\";\n \n return $out;\n\n}", "function constroe_seguidor_usuario($dados, $modo){\n\n// separa dados\n$idusuario = $dados['idusuario'];\n$idamigo = $dados['idamigo'];\n$data = $dados['data'];\n\n// valida idamigo\nif($idusuario == null or $idamigo == null){\n\n// retorno nulo\nreturn null;\n\n};\n\n// valida modo\nif($modo == 2){\n\n$idamigo = $idusuario;\n\n};\n\n// url de perfil de usuario\n$url_perfil_usuario = retorne_url_perfil_usuario($idamigo);\n\n// imagem de usuario\n$imagem_usuario = constroe_imagem_perfil($idamigo, false);\n\n// nome do usuario\n$nome_usuario = retorne_nome_usuario($idamigo);\n$nome_usuario = \"<a href='$url_perfil_usuario' title='$nome_usuario'>$nome_usuario</a>\";\n\n// campo seguir\n$campo_seguir = campo_seguir_usuario($idamigo);\n\n// codigo html\n$codigo_html = \"\n<div class='classe_div_seguidor_usuario'>\n\n<div class='classe_div_seguidor_usuario_imagem'>\n$imagem_usuario\n</div>\n\n<div class='classe_div_seguidor_usuario_nome'>\n$nome_usuario\n</div>\n\n<div class='classe_div_seguidor_usuario_botao'>\n$campo_seguir\n</div>\n\n</div>\n\";\n\n// retorno\nreturn $codigo_html;\n\n}", "function cl_criterioavaliacaodisciplina() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"criterioavaliacaodisciplina\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function modulos($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"perfil ORDER BY nombreperfil\"));\t\t\n\treturn seguridadPerfil($acceso);\n}", "function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_empagemovslips() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemovslips\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_aguacalc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacalc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_escrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function AggiornaPrezzi(){\n\t}", "function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function constroe_campo_administrar(){\n\n// globals\nglobal $idioma;\nglobal $pagina_href;\n\n// valida usuario administrador\nif(retorne_usuario_administrador() == false){\n\n// retorno nulo\nreturn null;\n\t\n};\n\n// titulo\n$titulo = $idioma[18];\n\n// links de administrador\n$links[] = \"<a href='$pagina_href[3]'>$idioma[19]</a>\";\n$links[] = \"<a href='$pagina_href[4]'>$idioma[47]</a>\";\n$links[] = \"<a href='$pagina_href[6]'>$idioma[22]</a>\";\n$links[] = \"<a href='$pagina_href[7]'>$idioma[23]</a>\";\n$links[] = \"<a href='$pagina_href[9]'>$idioma[25]</a>\";\n$links[] = \"<a href='$pagina_href[10]'>$idioma[26]</a>\";\n$links[] = \"<a href='$pagina_href[11]'>$idioma[27]</a>\";\n$links[] = \"<a href='$pagina_href[12]'>$idioma[28]</a>\";\n$links[] = \"<a href='$pagina_href[14]'>$idioma[30]</a>\";\n\n// conteudo\n$conteudo = constroe_links_menu_vertical($links);\n\n// codigo html\n$codigo_html = constroe_menu_navegacao_vertical($titulo, $conteudo);\n\n// retorno\nreturn $codigo_html;\n\n}", "function index($ar=NULL) {\n $p=new XParam($ar,array());\n $tplentry=$p->get(\"tplentry\");\n $r=array();\n $datedef=new XDateDef();\n $datedef->compulsory=false;\n $mods=&self::modlist($ar);\n list($acl_user,$acl_grp)=XUser::getUsersAndGroups();\n XShell::toScreen1('users',$acl_user);\n XShell::toScreen1('grps',$acl_grp);\n $module=$p->get('module');\n $user=$p->get('user');\n $ym=$p->get('ym');\n if(!empty($ym)){\n $begin=date('Y-m-d',strtotime($ym.'-01'));\n $end=date('Y-m-t',strtotime($begin));\n }else{\n $begin=$p->get('begin');\n $end=$p->get('end');\n }\n $foo=$datedef->post_edit($begin);\n $begin=($foo->raw!=TZR_DATE_EMPTY?$foo->raw:'');\n $foo=$datedef->post_edit($end);\n $end=($foo->raw!=TZR_DATE_EMPTY?$foo->raw:'');\n if(!empty($user)) {\n $xuser=new XUser(array('UID'=>$user));\n XShell::toScreen2('br','user',$xuser);\n }\n // Prepare les filtres sql sur le module et l'utilisateur/groupe\n if(empty($user)) {\n $ucond='1';\n }elseif(Kernel::getTable($user)=='GRP'){\n $users=XModGroup::users(array($user));\n $ucond='SGRP IN (\"'.implode('\",\"',$users).'\")';\n }else{\n $ucond='SGRP = \"'.$user.'\"';\n }\n if(empty($module)) $module=\"%\";\n \n if(!empty($begin) && !empty($end)) {\n // Stats sur les jours d'un intervalle donné\n if(!is_numeric($module) && $module!='%'){\n\t$r1=selectQueryGetAll('SELECT SUM(CNT) F1,TS FROM _STATS WHERE TS BETWEEN \"'.$begin.'\" AND \"'.$end.'\" AND SFUNCTION=\"'.$module.'\" AND '.$ucond.' '.\n\t\t\t 'GROUP BY TS ORDER BY TS');\n }else{\n\t$r1=selectQueryGetAll('SELECT SUM(CNT) F1,TS FROM _STATS WHERE TS BETWEEN \"'.$begin.'\" AND \"'.$end.'\" AND SMOID LIKE \"'.$module.'\" AND '.$ucond.' '.\n\t\t\t 'GROUP BY TS ORDER BY TS');\n }\n // Stats du mois du module selectionné\n if($module!='%' && empty($user)) {\n\t$r3=$this->cntUsers($module,$begin,$end);\n\tXShell::toScreen2('cnt','days',$r3[2]);\n\tXShell::toScreen2('cnt','details',$r3[1]);\n\tXShell::toScreen2('cnt','users',$r3[0]);\n }\n // Stats du mois de l'utilisateur selectionné\n if(($module=='%') && !empty($user)) {\n\t$r3=$this->cntModules($user,$begin,$end);\n\tXShell::toScreen2('cnt','days',$r3[2]);\n\tXShell::toScreen2('cnt','details2',$r3[1]);\n }\n }else{\n // Stats sur les 31 derniers jours\n if(!is_numeric($module) && $module!='%') $r1=selectQueryGetAll('SELECT SUM(CNT) F1,TS FROM _STATS WHERE SFUNCTION=\"'.$module.'\" AND '.$ucond.' GROUP BY TS ORDER BY TS DESC LIMIT 0,31');\n else $r1=selectQueryGetAll('SELECT SUM(CNT) F1,TS FROM _STATS WHERE SMOID LIKE \"'.$module.'\" AND '.$ucond.' GROUP BY TS ORDER BY TS DESC LIMIT 0,31');\n }\n XShell::toScreen2('cnt','daily',$r1);\n\n // Stats sur les 24 derniers mois\n $first=strtotime('-24 month');\n $foo=array('','','','','','','','','','','','');\n for($i=date('Y',$first);$i<=date('Y');$i++) $r2[$i]=$foo;\n $first=date('Y-m-01',$first);\n if(!is_numeric($module) && $module!='%'){\n $rs=selectQuery('SELECT SUM(CNT) F1,YEAR(TS) F3,MONTH(TS) F2 FROM _STATS WHERE SFUNCTION=\"'.$module.'\" AND '.$ucond.' AND TS>=\"'.$first.'\" GROUP BY YEAR(TS),MONTH(TS)');\n }else{\n $rs=selectQuery('SELECT SUM(CNT) F1,YEAR(TS) F3,MONTH(TS) F2 FROM _STATS WHERE SMOID LIKE \"'.$module.'\" AND '.$ucond.' AND TS>=\"'.$first.'\" GROUP BY YEAR(TS),MONTH(TS)');\n }\n while($ors=$rs->fetch()){\n $r2[$ors['F3']][(int)$ors['F2']-1]=$ors['F1'];\n }\n XShell::toScreen2('cnt','monthly',$r2);\n // Champs date pour le filtre\n XShell::toScreen2('param','begin',$datedef->edit($begin,$o=array('fieldname'=>'begin')));\n XShell::toScreen2('param','end',$datedef->edit($end,$o=array('fieldname'=>'end')));\n \n return XShell::toScreen1($tplentry,$mods);\n }", "function modulo( $value, $modulus ){\n return ( $value % $modulus + $modulus ) % $modulus;\n}", "function cl_condicionante() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"condicionante\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_histmpsdiscfora() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"histmpsdiscfora\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function maquetador_genera($plantilla, $controladorDefecto=false, $accionDefecto=false) {\n global $aEstado ;\n \n $pendientes = false;\n\n\t // precarga de modulos\n\t if ( !is_array($aEstado) ){ \n\t maquetador_evaluar_estado($controladorDefecto, $accionDefecto);\t \n\t }\n\t \n\t if ( !isset($aEstado[\"modulos\"]) ){\n\t maquetador_precarga_modulos();\n\t }\n\n // leer la plantilla\n if ( !file_exists($plantilla) ) {\n echo t(\"No exista la plantilla: [$plantilla]\");\n return false; \n }\n $html = maquetador_insertar_include ( $plantilla ); \n $aGenerar = maquetador_extraer_marcas ( $html );\n\n foreach ( $aGenerar as $marca=>$contenido ) {\n $aDatos = maquetador_extrae_modulo ( $marca );\n\n // averiguar el modulo\n if ( $aDatos[\"modulo\"] == \"contenido\") {\n $modulo = $aEstado[\"controlador\"];\n $aDatos[\"accion\"]= ( $aDatos[\"accion\"]=='' ? $aEstado[\"accion\"] : $aDatos['accion']);\n $aDatos[\"id\"] = ( $aDatos[\"id\"] =='' ? $aEstado[\"id\"] : $aDatos['id']);\n } elseif ($aDatos[\"modulo\"]==\"maquetador\") {\n $pendientes[$marca] = $aDatos[\"accion\"];\n continue;\n } else {\n $modulo = $aDatos[\"modulo\"];\n }\n\n // comprobamos que el modulo es correcto\n if ( $modulo == \"t\") {\n $aGenerar[$marca] = t($aDatos[\"accion\"]);\n } else {\n // ver si es un modulo\n if ( $modulo!=\"PUT\" and $modulo!=\"PHP\" and !isset( $aEstado[\"modulos\"][$modulo]) ) {\n $aGenerar[$marca] = \"controlador desconocido: $modulo\";\n } else {\n // si inserta el modulo si cumple la condición\n if ( $aDatos['condicional']==\"\" or maquetador_evalua ( $aDatos['condicional'])) {\n // hay que mostrar el modulo\n switch ( $modulo ) {\n case \"PUT\":\n $aGenerar[$marca] = $aDatos[\"accion\"];\n break;\n case \"PHP\":\n $aGenerar[$marca] = eval(\"return \" . $aDatos[\"accion\"]. \";\" ) ;\n break;\n\n default:\n if ( $aEstado[\"modulos\"][$modulo]) {\n include_once $aEstado[\"modulos\"][$modulo];\n $aEstado[\"modulos\"][$modulo]= false;\n }\n $aGenerar[$marca] = $modulo( $aDatos[\"accion\"], $aDatos[\"id\"] ) ;\n }\n }\n }\n } // else T\n } // for\n\n if ( $pendientes ) {\n foreach ( $pendientes as $k=>$accion) {\n $aGenerar[$k] = maquetador_script(\"genera\", $accion );\n }\n }\n \n // ahorita solo queda calcular e imprimir el resultado \n echo strtr ( $html, $aGenerar );\n\n}", "function cl_bomov() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bomov\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_issarqsimplesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issarqsimplesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_clientesmodulosproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientesmodulosproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_pcorcamfornelic() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamfornelic\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_sau_agendaexames() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function get_modules(){\n\trequire_once($_SERVER['DOCUMENT_ROOT'].\"/libs/database.php\");\n\t// consulta obtener los modulos con acceso\n\t$sql=\"select m.nombre from modulos m,permiso_modulo mp where mp.id_modulo=m.id_modulo and mp.id_permiso=(select id_permiso from personal where id_personal=?)\";\n\n\t// toma la pk del usuario y obtiene los datos\n\t$params = array($_SESSION[\"id_personal\"]);\n\t$data = Database::getRows($sql, $params);\n\t// inicia todos los modulos en false\n\t$_modules = array();\n\t// recorre los modulos a los que tiene acceso\n\tforeach($data as $row)\n\t{\n\t\t// cambia a true el elemento de array que le corresponde al modulo\n\t\t$_modules[$row[\"nombre\"]] = true;\t\n\t}\n\treturn $_modules;\n}", "function cl_conplanoconplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoconplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function _validate_uso_controladorModulos($idModulo, $idPermiso = null, $rolSessName) {\n $CI =& get_instance();\n if(!isset($_COOKIE[$CI->config->item('sess_cookie_name')])) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $idPersona = $CI->session->userdata('nid_persona');\n $idRol = $CI->session->userdata($rolSessName);\n if($idPersona == null || $idRol == null) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n $CI->load->model('../m_utils', 'utiles');\n //VALIDAR QUE EL ROL TENGA EL PERMISO\n if($idPermiso != null) {\n if($CI->utiles->checkIfRolHasPermiso($idRol, $idModulo, $idPermiso) == false) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }\n //VALIDAR QUE EL USUARIO TENGA EL ROL\n if($CI->utiles->checkIfUserHasRol($idPersona, $idRol) == false && $idRol != ID_ROL_FAMILIA) {\n $CI->session->sess_destroy();\n redirect('','refresh');\n }\n }", "function cl_conplanoorcamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoorcamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhdirfgeracao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhdirfgeracao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_sau_agendaexames() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "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}", "function NaviModule() {\n $dir = BASE_DIR . \"/modules/\";\n $modules = array();\n\n $sql = $GLOBALS['db']->Query(\"SELECT ModulName,ModulPfad FROM \" . PREFIX . \"_module WHERE Status = '1' ORDER BY ModulName ASC\");\n while($row = $sql->fetchrow()) {\n $modul['AdminEdit'] = 0;\n if(!include($dir . $row->ModulPfad . \"/modul.php\")) {\n echo \"Ошибка доступа к файлам модуля \" . $row->ModulPfad . \"<br />\";\n } elseif (($modul['AdminEdit'] == 1) && cp_perm('mod_' . $row->ModulPfad)) {\n array_push($modules, $row);\n }\n }\n $GLOBALS['tmpl']->assign('modules', $modules);\n}", "function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function Respiro($inteiro){\n\t\tif($inteiro >= 90){\n\t\t\tsleep(2);\n\t\t\t$this->contador = 0;\n\t\t}\n\t}", "function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function nbr_auteurs_enligne() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n// nombre d_auteurs depuis 15 mn ()\r\n# inc/auth.php update-set en_ligne => NOW() : \"moment\" de session !\r\n# voir ecrire/action:logout.php\r\n# spip update-set 'en_ligne' datetime -15 mn au logout de session !!??!!\r\n# aff' nbr corresp aux auteurs affiches par spip en bandeau sup !\r\n\r\n\t$q = sql_select(\"COUNT(DISTINCT id_auteur) AS nb, statut \" .\r\n\t\t\"FROM spip_auteurs \" .\r\n\t\t\"WHERE en_ligne > DATE_SUB( NOW(), INTERVAL 15 MINUTE) \" .\r\n\t\t\"AND statut IN ('0minirezo', '1comite', '6forum') \" . // limite statuts spip (autres!)\r\n\t\t\"AND id_auteur != $connect_id_auteur \" .\r\n\t\t\"GROUP BY statut\"\r\n\t);\r\n\r\n\tif (sql_count($q)) {\r\n\t\t$aff .= _T(\"actijour:auteurs_en_ligne\") . \"<br />\\n\";\r\n\t\tWhile ($r = sql_fetch($q)) {\r\n\t\t\tif ($r['statut'] == '0minirezo') {\r\n\t\t\t\t$stat = _T('actijour:abrv_administrateur');\r\n\t\t\t} elseif ($r['statut'] == '1comite') {\r\n\t\t\t\t$stat = _T('actijour:abrv_redacteur');\r\n\t\t\t} elseif ($r['statut'] == '6forum') {\r\n\t\t\t\t$stat = _T('actijour:abrv_visiteur');\r\n\t\t\t}\r\n\t\t\t$aff .= $r['nb'] . \" $stat<br />\\n\";\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t$aff .= _T(\"actijour:aucun_auteur_en_ligne\") . \"\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}", "function evt__form_integrante_i__modificacion($datos)\r\n {\r\n $perfil = toba::usuario()->get_perfil_datos();\r\n if ($perfil == null) {//es usuario de SCyT\r\n if($this->chequeo_formato_norma($datos['rescd_bm'])){ \r\n $datos2['rescd_bm']=$datos['rescd_bm'];\r\n $datos2['resaval']=$datos['resaval'];\r\n $datos2['cat_investigador']=$datos['cat_investigador'];\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos2);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar('Guardado. Solo modifica ResCD baja/modif, Res Aval, Cat Investigador', 'info');\r\n }\r\n }else{//es usuario de la UA\r\n $pi=$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n $int=$this->dep('datos')->tabla('integrante_interno_pi')->get(); \r\n if($datos['desde']<$pi['fec_desde'] or $datos['hasta']>$pi['fec_hasta']){//no puede ir fuera del periodo del proyecto\r\n //toba::notificacion()->agregar('Revise las fechas. Fuera del periodo del proyecto!', 'error'); \r\n throw new toba_error(\"Revise las fechas. Fuera del periodo del proyecto!\");\r\n }else{ \r\n //Pendiente verificar que la modificacion no haga que se superpongan las fechas\r\n $haysuperposicion=false;//no es igual al del alta porque no tengo que considerar el registro vigente$this->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->superposicion_modif($pi['id_pinv'],$datos['id_docente'],$datos['desde'],$datos['hasta'],$registro['id_designacion'],$registro['desde']);\r\n if(!$haysuperposicion){\r\n $band=false;\r\n if($pi['estado']=='A'){\r\n $band=$this->dep('datos')->tabla('logs_integrante_interno_pi')->fue_chequeado($int['id_designacion'],$int['pinvest'],$int['desde']);\r\n } \r\n $regenorma = '/^[0-9]{4}\\/[0-9]{4}$/';\r\n if ( !preg_match($regenorma, $datos['rescd'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if (isset($datos['rescd_bm']) && !preg_match($regenorma, $datos['rescd_bm'], $matchFecha) ) {\r\n throw new toba_error('Nro Resolucion CD Baja/Modif invalida. Debe ingresar en formato XXXX/YYYY');\r\n }else{\r\n if($band){//si alguna vez fue chequeado por SCyT entonces solo puede modificar fecha_hasta y nada mas (se supone que lo demas ya es correcto) \r\n //fecha_hasta porque puede ocurrir que haya una baja del participante o la modificacion de funcion o carga horaria\r\n unset($datos['funcion_p']);\r\n unset($datos['cat_investigador']);\r\n unset($datos['identificador_personal']);\r\n unset($datos['carga_horaria']);\r\n unset($datos['desde']);\r\n unset($datos['rescd']);\r\n unset($datos['cat_invest_conicet']);\r\n unset($datos['resaval']);\r\n unset($datos['hs_finan_otrafuente']);\r\n //Solo si cambia hasta y resol bm pierde el check\r\n if( $int['hasta']<>$datos['hasta'] or $int['rescd_bm']<>$datos['rescd_bm'] ){\r\n $datos['check_inv']=0;//pierde el check si es que lo tuviera. Solo cuando cambia algo\r\n }\r\n $mensaje='Ha sido chequeado por SCyT, solo puede modificar fecha hasta y resCD baja/modif';\r\n }else{//band false significa que puede modificar cualquier cosa\r\n //esto lo hago porque el set de toba no modifica la fecha desde por ser parte de la clave \r\n $this->dep('datos')->tabla('integrante_interno_pi')->modificar_fecha_desde($int['id_designacion'],$int['pinvest'],$int['desde'],$datos['desde']);\r\n $mensaje=\"Los datos se han guardado correctamente\";\r\n }\r\n $this->dep('datos')->tabla('integrante_interno_pi')->set($datos);\r\n $this->dep('datos')->tabla('integrante_interno_pi')->sincronizar();\r\n toba::notificacion()->agregar($mensaje, 'info'); \r\n }\r\n }\r\n }else{\r\n //toba::notificacion()->agregar('Hay superposicion de fechas', 'error'); \r\n throw new toba_error(\"Hay superposicion de fechas\");\r\n }\r\n }\r\n }\r\n //nuevo Lo coloco para que el formulario se oculte al finalizar\r\n $this->dep('datos')->tabla('integrante_interno_pi')->resetear();\r\n $this->s__mostrar_i=0;\r\n }", "function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cariPosisi($batas){\nif(empty($_GET['halaman'])){\n\t$posisi=0;\n\t$_GET['halaman']=1;\n}\nelse{\n\t$posisi = ($_GET['halaman']-1) * $batas;\n}\nreturn $posisi;\n}", "function cl_itinerarioescolaproc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"itinerarioescolaproc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}", "public function DAOModulosxRol() {\n }", "function saludo(){\n echo \"<hr>\";\n echo \"Buenas tardes aprendices, bienvenidos a las clases de PHP\";\n echo \"<hr>\";\n }", "function cl_aguacoletorexporta() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacoletorexporta\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_rhbasesreg() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhbasesreg\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_diario() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"diario\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function defiva($subt,$saldoi,$pago){\n $pagoiva;\n $resto = $saldoi -$subt;\n if($resto >0){\n // queda iva por aplicar\n if($resto>$pago){$pagoiva=$pago;}else{$pagoiva=$resto;}\n }else{\n //todo a capital\n $pagoiva = 0;\n }\n return $pagoiva;\n}", "public static function metodo_estatico () {\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->r60_anousu = ($this->r60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_anousu\"]:$this->r60_anousu);\n $this->r60_mesusu = ($this->r60_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_mesusu\"]:$this->r60_mesusu);\n $this->r60_numcgm = ($this->r60_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_numcgm\"]:$this->r60_numcgm);\n $this->r60_tbprev = ($this->r60_tbprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_tbprev\"]:$this->r60_tbprev);\n $this->r60_rubric = ($this->r60_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_rubric\"]:$this->r60_rubric);\n $this->r60_regist = ($this->r60_regist == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_regist\"]:$this->r60_regist);\n $this->r60_folha = ($this->r60_folha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_folha\"]:$this->r60_folha);\n $this->r60_base = ($this->r60_base == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_base\"]:$this->r60_base);\n $this->r60_dprev = ($this->r60_dprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_dprev\"]:$this->r60_dprev);\n $this->r60_pdesc = ($this->r60_pdesc == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_pdesc\"]:$this->r60_pdesc);\n $this->r60_novod = ($this->r60_novod == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_novod\"]:$this->r60_novod);\n $this->r60_novop = ($this->r60_novop == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_novop\"]:$this->r60_novop);\n $this->r60_altera = ($this->r60_altera == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_altera\"]:$this->r60_altera);\n $this->r60_ajuste = ($this->r60_ajuste == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_ajuste\"]:$this->r60_ajuste);\n $this->r60_basef = ($this->r60_basef == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_basef\"]:$this->r60_basef);\n }else{\n $this->r60_anousu = ($this->r60_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_anousu\"]:$this->r60_anousu);\n $this->r60_mesusu = ($this->r60_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_mesusu\"]:$this->r60_mesusu);\n $this->r60_numcgm = ($this->r60_numcgm == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_numcgm\"]:$this->r60_numcgm);\n $this->r60_tbprev = ($this->r60_tbprev == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_tbprev\"]:$this->r60_tbprev);\n $this->r60_rubric = ($this->r60_rubric == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"r60_rubric\"]:$this->r60_rubric);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->h50_sequencial = ($this->h50_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_sequencial\"]:$this->h50_sequencial);\n $this->h50_lei = ($this->h50_lei == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_lei\"]:$this->h50_lei);\n $this->h50_descr = ($this->h50_descr == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_descr\"]:$this->h50_descr);\n $this->h50_obs = ($this->h50_obs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_obs\"]:$this->h50_obs);\n $this->h50_confobs = ($this->h50_confobs == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_confobs\"]:$this->h50_confobs);\n $this->h50_minimopontos = ($this->h50_minimopontos == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_minimopontos\"]:$this->h50_minimopontos);\n $this->h50_assentaaprova = ($this->h50_assentaaprova == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_assentaaprova\"]:$this->h50_assentaaprova);\n $this->h50_assentareprova = ($this->h50_assentareprova == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_assentareprova\"]:$this->h50_assentareprova);\n $this->h50_duracaoestagio = ($this->h50_duracaoestagio == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_duracaoestagio\"]:$this->h50_duracaoestagio);\n $this->h50_instit = ($this->h50_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_instit\"]:$this->h50_instit);\n }else{\n $this->h50_sequencial = ($this->h50_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"h50_sequencial\"]:$this->h50_sequencial);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->ed100_i_codigo = ($this->ed100_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_codigo\"]:$this->ed100_i_codigo);\n $this->ed100_i_historicompsfora = ($this->ed100_i_historicompsfora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_historicompsfora\"]:$this->ed100_i_historicompsfora);\n $this->ed100_i_disciplina = ($this->ed100_i_disciplina == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_disciplina\"]:$this->ed100_i_disciplina);\n $this->ed100_i_justificativa = ($this->ed100_i_justificativa == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_justificativa\"]:$this->ed100_i_justificativa);\n $this->ed100_i_qtdch = ($this->ed100_i_qtdch == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_qtdch\"]:$this->ed100_i_qtdch);\n $this->ed100_c_resultadofinal = ($this->ed100_c_resultadofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_resultadofinal\"]:$this->ed100_c_resultadofinal);\n $this->ed100_t_resultobtido = ($this->ed100_t_resultobtido == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_t_resultobtido\"]:$this->ed100_t_resultobtido);\n $this->ed100_c_situacao = ($this->ed100_c_situacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_situacao\"]:$this->ed100_c_situacao);\n $this->ed100_c_tiporesultado = ($this->ed100_c_tiporesultado == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_tiporesultado\"]:$this->ed100_c_tiporesultado);\n $this->ed100_i_ordenacao = ($this->ed100_i_ordenacao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_ordenacao\"]:$this->ed100_i_ordenacao);\n $this->ed100_c_termofinal = ($this->ed100_c_termofinal == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_c_termofinal\"]:$this->ed100_c_termofinal);\n $this->ed100_opcional = ($this->ed100_opcional == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_opcional\"]:$this->ed100_opcional);\n $this->ed100_basecomum = ($this->ed100_basecomum == \"f\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_basecomum\"]:$this->ed100_basecomum);\n }else{\n $this->ed100_i_codigo = ($this->ed100_i_codigo == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"ed100_i_codigo\"]:$this->ed100_i_codigo);\n }\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n $this->rh95_sequencial = ($this->rh95_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_sequencial\"]:$this->rh95_sequencial);\n $this->rh95_id_usuario = ($this->rh95_id_usuario == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_id_usuario\"]:$this->rh95_id_usuario);\n $this->rh95_ano = ($this->rh95_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_ano\"]:$this->rh95_ano);\n if($this->rh95_datageracao == \"\"){\n $this->rh95_datageracao_dia = ($this->rh95_datageracao_dia == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_dia\"]:$this->rh95_datageracao_dia);\n $this->rh95_datageracao_mes = ($this->rh95_datageracao_mes == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_mes\"]:$this->rh95_datageracao_mes);\n $this->rh95_datageracao_ano = ($this->rh95_datageracao_ano == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_datageracao_ano\"]:$this->rh95_datageracao_ano);\n if($this->rh95_datageracao_dia != \"\"){\n $this->rh95_datageracao = $this->rh95_datageracao_ano.\"-\".$this->rh95_datageracao_mes.\"-\".$this->rh95_datageracao_dia;\n }\n }\n $this->rh95_fontepagadora = ($this->rh95_fontepagadora == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_fontepagadora\"]:$this->rh95_fontepagadora);\n }else{\n $this->rh95_sequencial = ($this->rh95_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh95_sequencial\"]:$this->rh95_sequencial);\n }\n }", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "function cl_conplanosis() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanosis\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function distribuir(){\r\n\t\t$fPesq = new fachada_pesquisador();\r\n\t\t$fAtend = new fachada_atendimento();\r\n\t\t$fSelecao = new fachada_selecao();\r\n\t\t$fOferta = new fachada_oferta();\r\n\t\t$fMax = new fachada_maxbolsa();\r\n\t\t$ano = $_SESSION['sAno'];\r\n\t\t$tpSelecao = $_SESSION['sEdital'];\r\n\t\t// retorna um vetor com as bolsas ofertadas em um edital em determinado ano. (cod,codTipoEdital,codTipoBolsa,ano,prioridade,qtd)\r\n\t\t$vetOfertaBolsas = $fOferta->getOfertasAnoEdital($ano,$tpSelecao);\r\n\t\t$ofertaBolsasGeral = array();\r\n\t\t$qtdOfertaBolsasCapital = 0;\r\n\t\t$qtdOfertaBolsasAF = 0;\r\n\t\t$qtdOfertaBolsasInterior = 0;\r\n\t\t$qtdOfertaBolsasPIBITI = 0;\r\n\t\t\r\n\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 1 - CNPq, 2 - UFPA e 3- FAPESPA e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 1) OR ($vetOfertaBolsas[$i]->getPrioridade() == 2) OR ($vetOfertaBolsas[$i]->getPrioridade() == 3) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Capital\r\n\t\t\t\t$qtdOfertaBolsasCapital += $vetOfertaBolsas[$i]->getQtd();\r\n\t\t\t}\r\n\t\t\t// Soma as quantidades de bolsas ofertadas do 4 - CNPq AF e 5 - UFPA AF e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 4) OR ($vetOfertaBolsas[$i]->getPrioridade() == 5) ){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital AF\r\n\t\t\t\t$qtdOfertaBolsasAF += $vetOfertaBolsas[$i]->getQtd();\t\t\r\n\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 6 - Interior e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 6)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasInterior += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\r\n\t\t\t// Soma a quantidade de bolsas ofertadas do 7 - PIBITI e atribui ao vetor $ofertaBolsasGeral\r\n\t\t\tif( ($vetOfertaBolsas[$i]->getPrioridade() == 7)){\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][codTipoBolsa] = $vetOfertaBolsas[$i]->getCodTipoBolsa();\r\n\t\t\t\t$ofertaBolsasGeral[$vetOfertaBolsas[$i]->getCodTipoBolsa()][qtdBolsaOfertada] = $vetOfertaBolsas[$i]->getQtd();\t\t\t\t\t\r\n\t\t\t\t//Soma a quantidade de cada bolsa e agrupa no total do subedital Interior\r\n\t\t\t\t$qtdOfertaBolsasPIBITI += $vetOfertaBolsas[$i]->getQtd();\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t} //Fim do FOR\r\n\t\t\r\n\t\t// retorna um vetor com a quantidade m�xima que um pesquisador pode receber de acordo com a pontua��o m�nima. (cod,ponto,qtd,tpselecao,ano)\r\n\t\t$vetMax = $fMax->getMaxbolsaSelecao(); \r\n\r\n\t\t$oferta\t = 0;\r\n\t\t$vetAtend = array();\r\n\t\tif($vetMax and $vetOfertaBolsas ){\r\n\t\t\t$maxqtd = $vetMax[0]->getQtd();\r\n\t\t\tfor($i=0;$i<count($vetOfertaBolsas);$i++){\r\n\t\t\t\t$oferta \t= $oferta + $vetOfertaBolsas[$i]->getQtd(); //Soma das quantidades de bolsas ofertadas em um edital\r\n\t\t\t}\r\n\t\t\t$fSelecao->zeraNumBolsaAtend(); //zera o numero de bolsas atendidas,caso esteja redistribuindo\r\n\t\t\t$fAtend->deletaTodosAt();\t\t //deleta os atendimentos,caso esteja redistribuindo\r\n\t\t\tif($tpSelecao==1){\t\t//problema: considera q os pedidos s�o menores q o disponivel\r\n\t\t\t\t$vetProd = $fPesq->getClassificadosProd(); // retorna os pesquisadores de produtividade inscritos e ativos(nome,id,numBolsa,numBolsaAtend,unidade)\r\n\t\t\t\t\r\n\t\t\t\twhile($l = array_shift($vetProd )){ \r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoConjBolsasSolic,qtdBolsaTipoSolic\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\t\t\t\t\t$max = $maxqtd; // quantidade m�xima que um pesquisador poder� receber\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($l[numBolsa]>$max){ // se o n�mero de bolsas solicitadas for maior que o n�mero m�ximo de bolsas permitido a um pesquisador\r\n\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($max,$l[id]); // seta no banco de dados o numero de bolsas atendidas igual ao n�mero m�ximo de bolsas permitidas\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa],$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$l[numBolsa]){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas UFPA AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital INTERIOR if($qtdOfertaBolsasINTERIOR >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$l[numBolsa]){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$l[numBolsa]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $l[numBolsa];\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($l[numBolsa]+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$l[numBolsa]--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t\t\t} // Fim do else ($l[numBolsa]>$max)\r\n\t\t\t\t}//FIM DO WHILE DE ARRAY DE PESQUISADORES DE PRODUTIVIDADE\r\n\t\t\t}// fim do if $tpSelecao==1\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$vetPesqPontos = $fPesq->getClassificadosPonto(); //retorna a rela��o de pesquisadores por ordem de pontua��o.\r\n\t\t\t\r\n\t\t\t// INICIO DA ORDENA��O DO VETOR DE PONTUA��O\r\n\t\t\t\r\n\t\t\tforeach($vetPesqPontos as &$vetor){\r\n \t\t\t$anoNota = $_SESSION['sAno']-1;\r\n\t\t\t\t\r\n\t\t\t\tif ($this->getSelecaoNotaPesq($vetor[id],$anoNota)){\r\n\t\t\t\t\t$notaPesquisador = $this->getSelecaoNotaPesq($vetor[id],$anoNota);\r\n\t\t\t\t}\r\n\t\t\t\telse $notaPesquisador = 0;\r\n\t\t\t\t$vetor[ponto] = $vetor[ponto] + ($notaPesquisador*0.025*$vetor[ponto]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tforeach ($vetPesqPontos as $chave => $linha) { \r\n\t\t\t\t$nome[$chave] = $linha['nome']; \r\n\t\t\t\t$id[$chave] = $linha['id']; \r\n\t\t\t\t$numBolsa[$chave] = $linha['numBolsa']; \r\n\t\t\t\t$unidade[$chave] = $linha['unidade']; \r\n\t\t\t\t$ponto[$chave] = $linha['ponto']; \r\n\t\t\t} \r\n\r\n\t\t\tarray_multisort($ponto, SORT_DESC, $nome, SORT_ASC, $vetPesqPontos);\r\n\t\t\t// FIM DA ORDENA��O DO VETOR DE PONTUA��O\r\n\r\n\t\t\t//foreach ($vetPesqPontos as $vetor) { \r\n\t\t\t//\techo \"O nome do pesquisadador (ID: \".$vetor[id].\") � \".$vetor[nome].\", sua pontua��o � \".$vetor[ponto].\"<br>\";\r\n\t\t\t//}\r\n\r\n\t\t\twhile($l = array_shift($vetPesqPontos)){\r\n\t\t\t\t$valorAtendido = 0;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//verifica se ainda h� bolsa para distribuir\r\n\t\t\t\tif (($qtdOfertaBolsasCapital > 0) || ($qtdOfertaBolsasAF > 0) || ($qtdOfertaBolsasInterior > 0) || ($qtdOfertaBolsasPIBITI > 0)){\r\n\t\r\n\t\t\t\t\t$vBolsasAtivasPesq = $this->getBolsaAtivaPesqAno($l[id],2014); //verifica se determinado pesquisador possui bolsa em vigor\r\n\t\t\t\t\tif($vBolsasAtivasPesq){\r\n\t\t\t\t\t\t$numbolAtivas = count($vBolsasAtivasPesq); // quantidade de bolsas ativas de um pesquisador\r\n\t\t\t\t\t} else $numbolAtivas = 0;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ponto = $l[ponto]; // pontua��o do pesquisador\r\n\t\t\t\t\t$maxBolsaPorPontuacao = 0;\r\n\t\t\t\t\t// verfica a quantidade m�xima que o pesquisador poder� receber comparando as pontua��es m�nima e m�xima. \r\n\t\t\t\t\t//Por exemplo, pontua��o > 300 pontos -> $max=2; pontua��o > 0 pontos -> $max=1;\r\n\t\t\t\t\tfor ($i=0;$i<count($vetMax);$i++){\r\n\t\t\t\t\t\tif($ponto >= $vetMax[$i]->getPonto()){\r\n\t\t\t\t\t\t\t$maxBolsaPorPontuacao = $vetMax[$i]->getQtd();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Caso a soma da quantidade m�xima de bolsas permitidas com o n�mero de bolsas ativas de um pesquisador exceda 2\r\n\t\t\t\t\t$BolsasPesqPodeReceber = $maxBolsaPorPontuacao;\r\n\t\t\t\t\twhile(($BolsasPesqPodeReceber+$numbolAtivas)>2){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Quantidade de bolsas que o pesquisador pode receber\t\t\t\t\r\n\t\t\t\t\tif($BolsasPesqPodeReceber>$l[numBolsa]){\r\n\t\t\t\t\t\t$BolsasPesqPodeReceber = $l[numBolsa];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Retorna um vetor com o(s) tipo(s) de bolsas e quantidade solicitadas pelo pesquisador: tipoSubEdital,qtdBolsa\r\n\t\t\t\t\t$vTipoBolsasSolicitadas = $fSelecao->getTipoBolsasSolicitadasAno($l[id]);\r\n\r\n\t\t\t\t\t\t// Caso o pesquisador tenha solicitado um tipo de bolsa\r\n\t\t\t\t\t\t\tif (count($vTipoBolsasSolicitadas)==1){\r\n\t\t\t\t\t\t\t\t$vEditalBolsaSolicitada = array_shift($vTipoBolsasSolicitadas);\r\n\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile ($flagProximaBolsa==1){\r\n\r\n\t\t\t\t\t\t\t\t\tswitch($vEditalBolsaSolicitada[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber,$l[id]);\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital if($qtdOfertaBolsasCapital >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim CNPq AF\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolas CNPq AF � suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim UFPA AF\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF if($qtdOfertaBolsasAF >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas Interior suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior if($qtdOfertaBolsasInterior >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// Verifica se o n�mero de bolsas PIBITI suficiente para atender a quantidade solicitada pelo pesq\r\n\t\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>=$BolsasPesqPodeReceber){\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$BolsasPesqPodeReceber);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $BolsasPesqPodeReceber;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($BolsasPesqPodeReceber+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada] -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI -= $qtdBolsasSolic;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$BolsasPesqPodeReceber--;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=1;\r\n\t\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI if($qtdOfertaBolsasPIBITI >0)\r\n\t\t\t\t\t\t\t\t\t// Caso o subedital n�o possua mais bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\telse $flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t} //Fim while ($flagProximaBolsa=1)\t\r\n\t\t\t\t\t\t\t}// Fim count($vTipoBolsasSolicitadas)==1)\r\n\t\t\t\t\t\t\telseif (count($vTipoBolsasSolicitadas)==2){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$qtdBolsasSolic = 1;\r\n\t\t\t\t\t\t\t\t// Caso o pesquisador j� tenha recebido alguma bolsa durante a distribui��o atual de bolsas\r\n\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 0;\r\n\t\t\t\t\t\t\t\twhile($bolsaSolic = array_shift($vTipoBolsasSolicitadas)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tswitch($bolsaSolic[\"tipoConjBolsasSolic\"]){\r\n\t\t\t\t\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Capital ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasCapital >0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[1][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[1][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[1][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[2][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[2][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[2][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas FAPESPA\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[4][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[4][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[4][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasCapital--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim fapespa\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Capital\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital AF ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasAF >0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas CNPq AF\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[5][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[5][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[5][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim cnpq af\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas UFPA AF\r\n\t\t\t\t\t\t\t\t\t\telseif ($ofertaBolsasGeral[6][qtdBolsaOfertada]>0){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[6][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\t\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[6][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasAF--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim ufpa af\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital AF\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital Interior ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasInterior >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas Interior\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[3][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[3][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[3][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasInterior--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim Interior\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital Interior\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\t\t\t\t// Verifica se o subedital PIBITI ainda possui bolsas dispon�veis\r\n\t\t\t\t\t\t\t\t\tif($qtdOfertaBolsasPIBITI >0){\r\n\t\t\t\t\t\t\t\t\t\t// Verifica se ainda h� bolsas PIBITI\r\n\t\t\t\t\t\t\t\t\t\tif ($ofertaBolsasGeral[8][qtdBolsaOfertada]>0){\r\n\t\t\t\t\t\t\t\t\t\t\t// instancia um objeto da classe Atendimento\r\n\t\t\t\t\t\t\t\t\t\t\t$oAtend = $fAtend->atendimento($l[id],$ano,$ofertaBolsasGeral[8][codTipoBolsa],$qtdBolsasSolic);\r\n\t\t\t\t\t\t\t\t\t\t\t$fAtend->insere($oAtend); //insere o objeto no banco de dados\r\n\t\t\t\t\t\t\t\t\t\t\t$ofertaBolsasGeral[8][qtdBolsaOfertada]--;\r\n\t\t\t\t\t\t\t\t\t\t\t$qtdOfertaBolsasPIBITI--;\r\n\t\t\t\t\t\t\t\t\t\t\t$fSelecao->updateNumBolsaAtend($qtdBolsasSolic+$algumaBolsaJaAtendida,$l[id]);\r\n\t\t\t\t\t\t\t\t\t\t\t// Zera a vari�vel para ser utilizada com o pr�ximo pesquisador\r\n\t\t\t\t\t\t\t\t\t\t\t$algumaBolsaJaAtendida = 1;\r\n\t\t\t\t\t\t\t\t\t\t} // Fim PIBITI\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t} // fim subedital PIBITI\r\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tdefault: \r\n\t\t\t\t\t\t\t\t\t\t$flagProximaBolsa=0;\r\n\t\t\t\t\t\t\t\t\t\techo \"Nenhuma das op��es.\";\r\n\t\t\t\t\t\t\t\t\t} //final switch\r\n\t\t\t\t\t\t\t\t}// while\r\n\t\t\t\t\t\t\t} // elseif (count($vTipoBolsasSolicitadas)==2)\r\n\t\t\t\t}//if (($qtdOfertaBolsasCapital) OR ($qtdOfertaBolsasAF) OR ($qtdOfertaBolsasInterior))\r\n\t\t\t}//fim while naum producao\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t} //fim if($vetMax and $vetOfertaBolsas )\r\n\t}", "public function pelicula( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_PELICULA);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n usleep(500000);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"minima\"]);\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n }\n else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(3000000);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->apagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaDVD();\n usleep(100000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n AccesoGui::$guiSistema->esperarInicioSistema();\n usleep(5000000);\n ConexionServidorCliente::$ctrlGuiProyectores->verDVDEnCentral();\n ConexionServidorCliente::$ctrlGuiDvd->onOffDVD();\n //Comentado mientras se repara la visor de opacos\n\t//ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();//apagarDoc\n usleep(100000);\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoGui::$guiEscenarios->escenarioPelicula();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n usleep(3000000);\n ConexionServidorCliente::$ctrlGuiDvd->playDVD();\n AccesoGui::$guiDispositivos->seleccionarDvd();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n }", "function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_alunos() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"alunos\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function INSTALL($e) { $s=$im='';\n\n\nif($GLOBALS['admin']) {\n\n$GLOBALS['article']['template']='blank';\n\n\nSTYLES(\"mod\",\"\n.iDIR,.iYES,.iNON,.iDEL,.iUPD,.iADD { cursor:pointer; clear:left;float:left; }\n.iNON {color: #aaa}\n.iDEL {color: red}\n.iYES,.iUPD {color: green}\n.iADD {color: rgb(0,255,0)}\n.iNON,.iSS {text-decoration:line-through}\n.iNON:before,.iNON:after,.iSS:before,.iSS:after {content:' '}\n.iYES,.iOK {text-decoration:none}\n\n.iDIR {font-weight: bold; float:left; valign:top; }\n.iT {float:left;margin-top:20pt;}\n\n.p1 { color: #3F3F3F; text-decoration: line-through; background: #DFDFDF; } /* вычеркнутый */\n.p2 { background: #FFD0C0; } /* вставленный */\n\n\");\n\n $upgrade=gglob($GLOBALS['host_module'].\"install/*.php\");\n foreach($upgrade as $l) { $xi=explode('/',$l); $m=array_pop($xi);\n\t\t$im.=\"'$m',\";\n\t\t$s.=\"<div class='mod' id='module__$m'>\".$m.\"</div>\";\n\t}\n\nSCRIPTS(\"mod\",\"\nvar install_modules_n=0;\nfunction check_mod_do() { if(typeof install_modules[install_modules_n] == 'undefined') { install_modules_n=0; return; }\n\tvar m=install_modules[install_modules_n++];\n\tzabil('module__'+m,'<img src='+www_design+'img/ajax.gif>'+vzyal('module__'+m));\n\tmajax('module.php',{mod:'INSTALL',a:'testmod',module:m});\n}\nvar install_modules=[\".trim($im,',').\"];\n\nvar timestart;\nfunction dodo(module,allwork,time,skip,aram) {\n\tif(skip) {\n\t\tvar timenow = new Date();\n\t\tvar t=timenow.getTime()-timestart.getTime();\n\t\tvar e=parseInt((t/skip)*allwork)-t;\n\t\tzabilc('timet',' &nbsp; &nbsp; &nbsp; осталось: '+pr_time(e)+' сек');\n\t} else { timestart = new Date(); }\n\tvar ara={mod:'INSTALL',a:'do',module:module,allwork:allwork,time:time,skip:skip};\n\tif(typeof(aram)=='object') for(var i in aram) ara[i]=aram[i];\n\tmajax('module.php',ara);\n}\n\nfunction pr_time(t) { var N=new Date(); N.setTime(t); var s=pr00(N.getUTCSeconds());\n\tif(N.getUTCMinutes()) s=pr00(N.getUTCMinutes())+':'+s;\n\tif(N.getUTCHours()) s=pr00(N.getUTCHours())+':'+s;\n\treturn s;\n} function pr00(n){return ((''+n).length<2?'0'+n:n)}\n\n\npage_onstart.push('check_mod_do()');\n\n\");\n\n}\n\nreturn \"<table width=100% style='border: 1px dotted red'>\n<tr valign=top>\n\t<td>\n\t\t\n\t\t<div id='mesto_module'>$s</div>\n\t</td>\n\t<td width='100%'><div id='mesto_otvet'>\".admin_login().\"</div></td>\n</tr></table>\";\n\n}", "function cl_far_listacontroladomed() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"far_listacontroladomed\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function atualizacampos($exclusao=false) {\n if($exclusao==false){\n\n $this->rh141_sequencial = ($this->rh141_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_sequencial\"]:$this->rh141_sequencial);\n $this->rh141_codigo = ($this->rh141_codigo === \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_codigo\"]:$this->rh141_codigo);\n $this->rh141_anoref = ($this->rh141_anoref == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_anoref\"]:$this->rh141_anoref);\n $this->rh141_mesref = ($this->rh141_mesref == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_mesref\"]:$this->rh141_mesref);\n $this->rh141_anousu = ($this->rh141_anousu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_anousu\"]:$this->rh141_anousu);\n $this->rh141_mesusu = ($this->rh141_mesusu == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_mesusu\"]:$this->rh141_mesusu);\n $this->rh141_instit = ($this->rh141_instit == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_instit\"]:$this->rh141_instit);\n $this->rh141_tipofolha = ($this->rh141_tipofolha == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_tipofolha\"]:$this->rh141_tipofolha);\n $this->rh141_aberto = ($this->rh141_aberto == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_aberto\"]:$this->rh141_aberto);\n $this->rh141_descricao = ($this->rh141_descricao == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_descricao\"]:$this->rh141_descricao);\n }else{\n $this->rh141_sequencial = ($this->rh141_sequencial == \"\"?@$GLOBALS[\"HTTP_POST_VARS\"][\"rh141_sequencial\"]:$this->rh141_sequencial);\n }\n }", "function cl_parametroprogressaoparcial() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parametroprogressaoparcial\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function enlacesPaginasControladores(){\r\n $enlacesControladores=$_GET[\"action\"];\r\n# esta veriable esta pidiendo que tome la clase enlaces y que se conecte a enlacespaginasModelos\r\n $respuesta=EnlacesPaginas::enlacesPaginasModelos($enlacesControladores);\r\n\r\n#aqui solo borramos el \"echo $enlacesControladores\" y los sutituimos por \"include $respuesta\" rescordemos que\r\n# el echo solo imprime textos y el include incluye formatos enteros o contenidos\r\n include $respuesta;\r\n\r\n }", "function modificarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_herrajeaccesorio','id_herrajeaccesorio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('herrajeaccesorio','herrajeaccesorio','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function load_modulo($modulo=NULL,$tela=NULL,$diretorio='painel'){\n $CI =& get_instance();\n if($modulo != null):\n return $CI->load->view(\"$diretorio/$modulo\",array('tela'=> $tela),true);\n else:\n return false;\n endif;\n}", "public function quienesSomos()\n {\n require_once \"_Vista/_Plantillas/head.php\";\n require_once \"_Vista/_Plantillas/navBar.php\";\n require_once \"_Vista/QuienesSomosVista.php\";\n }", "public function modulo_caja()\n\t\t{\n\t\t\t//condicion para la proteccion de las vistas\n\t\t\t$id_empleado = $_SESSION['id_empleado'];\n\t\t\tif ($id_empleado == null)\n\t\t\t{\n\t\t\t\tredirect(base_url() . 'index.php/header/controller_inicio/login');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->load->view(\"header/Header_caja\");\n\t\t\t\t$this->load->view(\"ventas/Modulo_caja\");\n\t\t\t}\n\t\t}", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "function cariPosisi($batas){\nif(empty($_GET['halagenda'])){\n\t$posisi=0;\n\t$_GET['halagenda']=1;\n}\nelse{\n\t$posisi = ($_GET['halagenda']-1) * $batas;\n}\nreturn $posisi;\n}", "private function modulo ($idModulo) \r\n {\r\n $modulo = new Modulo();\r\n return $modulo->getModulo($idModulo);\r\n }", "function getPorcentajes($IDItemGasto,$Periodo,$Modo){\n\t\n\t/* calculamos lo programado */\n\tswitch($Modo){\n\t\t\n\t\tcase 'MECE':\n\t\t\t$ValorProgramadoMECE = MySQL_ObtenerDato(\"select SUM(ProgramadoMECE) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$ValorComprometidoMECE = MySQL_ObtenerDato(\"select SUM(MECE) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$PorcentajeMECE = ((float)($ValorComprometidoMECE/$ValorProgramadoMECE))*100;\n\t\t\treturn $PorcentajeMECE;\n\t\t\tbreak;\n\t\t\n\t\tcase 'IES':\n\t\t\t$ValorProgramadoIES = MySQL_ObtenerDato(\"select SUM(ProgramadoIES) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$ValoComprometidoIES = MySQL_ObtenerDato(\"select SUM(IES) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$PorcentajeIES = ((float)($ValoComprometidoIES/$ValorProgramadoIES))*100;\n\t\t\treturn $PorcentajeIES;\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'TOTAL':\n\t\t\t$ValorProgramadoMECE = MySQL_ObtenerDato(\"select SUM(ProgramadoMECE) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$ValorProgramadoIES = MySQL_ObtenerDato(\"select SUM(ProgramadoIES) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t\t\t\n\t\t\t$TotalProgramado = $ValorProgramadoMECE + $ValorProgramadoIES;\n\t\t\t\n\t\t\t$ValorComprometidoMECE = MySQL_ObtenerDato(\"select SUM(MECE) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t$ValorComprometidoIES = MySQL_ObtenerDato(\"select SUM(IES) from tareas where IDItemGasto='$IDItemGasto' and Periodo='$Periodo'\");\n\t\t\t\t\t\n\t\t\t$TotalComprometido = $ValorComprometidoMECE + $ValorComprometidoIES;\n\t\t\t\t\t\n\t\t\t\t\t/* calculamos el % relacionado para los totales */\n\t\t\t$PorcentajeTotal = ((float)($TotalComprometido/$TotalProgramado))*100;\n\t\t\treturn $PorcentajeTotal;\n\t\t\tbreak;\n\t\t\n\t}\n\t\n\t\n}", "function permsplash()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$perms = array();\n\t\t$mems = array();\n\t\t$groups = array();\n\t\t$dlist = \"\";\n\t\t$content = \"\";\n\n\t\t//-----------------------------------------\n\t\t// Page title & desc\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->admin->page_title = \"Управление группами\";\n\t\t$this->ipsclass->admin->page_detail = \"Здесь вы сможете отредактировать параметры доступа для каждой группы.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=permsplash', 'Управление группами' );\n\n\t\t//-----------------------------------------\n\t\t// Get the names for the perm masks w/id\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'forum_perms', 'order' => 'perm_name ASC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$perms[ $r['perm_id'] ] = $r['perm_name'];\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get the number of members using this mask\n\t\t// as an over ride\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->cache_add_query( 'groups_permsplash', array() );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif ( strstr( $r['org_perm_id'] , \",\" ) )\n\t\t\t{\n\t\t\t\tforeach( explode( \",\", $r['org_perm_id'] ) as $pid )\n\t\t\t\t{\n\t\t\t\t\t$mems[ $pid ] = !isset($mems[ $pid ]) ? 0 : $mems[ $pid ];\n\t\t\t\t\t$mems[ $pid ] += $r['count'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$mems[ $r['org_perm_id'] ] += $r['count'];\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get the member group names and the mask\n\t\t// they use\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'g_id, g_title, g_perm_id', 'from' => 'groups' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif ( strstr( $r['g_perm_id'] , \",\" ) )\n\t\t\t{\n\t\t\t\tforeach( explode( \",\", $r['g_perm_id'] ) as $pid )\n\t\t\t\t{\n\t\t\t\t\t$groups[ $pid ][] = $r['g_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$groups[ $r['g_perm_id'] ][] = $r['g_title'];\n\t\t\t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Print the splash screen\n\t\t//-----------------------------------------\n\n\t\tforeach( $perms as $id => $name )\n\t\t{\n\t\t\t$groups_used = \"\";\n\t\t\t$mems_used = 0;\n\t\t\t$is_active = 0;\n\t\t\t$dlist .= \"<option value='$id'>$name</option>\\n\";\n\n\t\t\tif ( isset($groups[ $id ]) AND is_array( $groups[ $id ] ) )\n\t\t\t{\n\t\t\t\tforeach( $groups[ $id ] as $g_title )\n\t\t\t\t{\n\t\t\t\t\t$groups_used .= '&middot; ' . $g_title . \"<br />\";\n\t\t\t\t}\n\n\t\t\t\t$is_active = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$groups_used = \"<center>Нет</center>\";\n\t\t\t}\n\n\t\t\tif ( isset($mems[ $id ]) AND $mems[ $id ] > 0 )\n\t\t\t{\n\t\t\t\t$is_active = 1;\n\t\t\t}\n\n\t\t\t$r['id'] = $id;\n\t\t\t$r['name'] = $name;\n\t\t\t$r['isactive'] = $is_active;\n\t\t\t$r['groups'] = $groups_used;\n\t\t\t$r['mems'] = isset($mems[ $id ]) ? intval( $mems[ $id ] ) : 0;\n\n\t\t\t$content .= $this->html->groups_perm_splash_row( $r );\n\t\t}\n\n\t\t$this->ipsclass->html .= $this->html->groups_perm_splash_wrapper( $content, $dlist );\n\n\t\t$this->ipsclass->admin->output();\n\t}" ]
[ "0.62510455", "0.6197957", "0.61818475", "0.61636746", "0.6104434", "0.60628235", "0.6056498", "0.6020311", "0.59976774", "0.59912866", "0.5982571", "0.5980318", "0.5974666", "0.5971448", "0.59324664", "0.59264183", "0.5907696", "0.58939946", "0.5883602", "0.5865074", "0.58647394", "0.58641684", "0.58497816", "0.58468467", "0.58156747", "0.58053714", "0.5797202", "0.579412", "0.57786095", "0.5774115", "0.5769086", "0.5767455", "0.57611966", "0.5758491", "0.5758116", "0.57512254", "0.5748668", "0.57391876", "0.5735997", "0.5734935", "0.5732983", "0.57326555", "0.5726141", "0.5724496", "0.57233006", "0.57090473", "0.5707978", "0.5703448", "0.57001626", "0.5694357", "0.56911707", "0.56875205", "0.56771725", "0.56675655", "0.56624746", "0.56585217", "0.565603", "0.5654565", "0.56507814", "0.5641085", "0.56343186", "0.56342876", "0.5629732", "0.56236905", "0.5619086", "0.56176966", "0.5614764", "0.5609859", "0.5607684", "0.55986536", "0.55977553", "0.55903614", "0.5587626", "0.5582032", "0.5581355", "0.5579789", "0.5566284", "0.55651504", "0.55502665", "0.55423176", "0.5539428", "0.55383974", "0.5533354", "0.55281717", "0.55271703", "0.5521861", "0.55215424", "0.5516238", "0.5514694", "0.55107087", "0.55090415", "0.55085295", "0.55066246", "0.55042833", "0.5503985", "0.55011255", "0.54990995", "0.54990995", "0.54932165", "0.5486839", "0.5483789" ]
0.0
-1
check if a dir, other with do nothin
function del_dir($dir) { if(is_dir($dir)) { $dh = opendir($dir); while ($file = readdir($dh)) { # code... if($file != "." && $file != "..") { $full_path = $dir."/".$file; if (is_dir($full_path)) { # code... del_dir($full_path); } else { # code... unlink($full_path); } } } closedir($dh); //delete current dir if(is_dir($dir)) rmdir($dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function dirIsValid() {\n return is_dir($this->directory);\n }", "abstract function isdir($rempath = '.');", "protected function isDirectory() {}", "function privDirCheck($p_dir, $p_is_dir = \\false)\n {\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "public function is_dir($file);", "public function hasDirectory(): bool;", "public function hasDirectory(): bool;", "public function isDirectory(){\n return is_dir($this->getPath());\n\t}", "public function isValid () {\n\treturn (is_dir($this->getPath())) ? true : false;\n }", "private function checkDir() {\n if (! is_dir ( $this->option ['templateDir'] ))\n $this->core->err ( '101', $this->option ['templateDir'] );\n \n if (! is_dir ( $this->option ['compileDir'] ))\n $this->core->err ( '101', $this->option ['compileDir'] );\n \n if (! is_dir ( $this->option ['cacheDir'] ))\n $this->core->err ( '101', $this->option ['cacheDir'] );\n }", "function isDir($path);", "public function checkIsDirectory($path);", "public function is_dir($path)\n {\n }", "public function is_dir($path)\n {\n }", "public function is_dir($path)\n {\n }", "public function is_dir($path)\n {\n }", "public function is_dir($path)\n {\n }", "function dossier_existe($dossier)\n{\n $result = false;\n \n if(file_exists($dossier) && is_dir($dossier))\n $result = true;\n \n return $result;\n}", "function IsDirExists($dir) {\n\t\tif (!is_dir($dir)) {\n\t\t\t$msg = \"There is no Directory in this path: \";\n\t\t\techo $msg = $msg . $dir; \n\t\t}else {\n\t\t\treturn $dir;\n\t\t} \n\t}", "function is_dir($filename)\n{\n}", "function checkDirectory($dir){\r\n\t\t\t\t\t\t\tif (is_dir($dir)) {\r\n\t\t\t\t\t\t\t\tif ($dh = opendir($dir)) {\r\n\t\t\t\t\t\t\t\t\twhile (($file = readdir($dh)) !== false) {\r\n\t\t\t\t\t\t\t\t\t\t if ($file == '.' || $file == '..') {\r\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t$file_path = $dir . DIRECTORY_SEPARATOR . $file;\r\n\t\t\t\t\t\t\t\t\t\tif(is_dir($file_path)){\r\n\t\t\t\t\t\t\t\t\t\t\techo \"<p class='content_title'>$file <p>\";\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\techo \"<p>$file <p>\";\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tclosedir($dh);\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}", "public function runOnDirectories(): bool;", "public function isDir() {\n\t\treturn is_dir($this->path);\n\t}", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "function is_dir_empty($diectory)\n {\n if (!is_dir($diectory)) return false;\n foreach (scandir($diectory) as $dir)\n {\n if (!in_array($dir, ['.','..','.json'])) return false;\n }\n return true;\n }", "public function is_allowed_dir($dir)\n {\n }", "abstract public function isDir($target);", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "private function dirTest($file) {\n $test_result = is_dir($file);\n return $test_result;\n }", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "function isDirEmpty($dir)\n{\n if (!is_readable($dir)) {\n return null;\n }\n\n return (count(scandir($dir)) == 2);\n}", "function isEmptyDir($dir)\n\t{\n\t\t$d = dir($dir);\n\t\twhile ($f = $d->read())\n\t\t{\n\t\t\tif ($f != '.' && $f != '..')\n\t\t\t{\n\t\t\t\t$d->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$d->close();\n\t\treturn true;\n\t}", "function is_needed_new_folder_form($directory)\n{\n\t// SEE: ternary operator.\n\treturn (is_dir($directory))?TRUE:FALSE;\n}", "function privDirCheck($p_dir, $p_is_dir=false)\n {\n $v_result = 1;\n\n\n // ----- Remove the final '/'\n if (($p_is_dir) && (substr($p_dir, -1)=='/'))\n {\n $p_dir = substr($p_dir, 0, strlen($p_dir)-1);\n }\n\n // ----- Check the directory availability\n if ((is_dir($p_dir)) || ($p_dir == \"\"))\n {\n return 1;\n }\n\n // ----- Extract parent directory\n $p_parent_dir = dirname($p_dir);\n\n // ----- Just a check\n if ($p_parent_dir != $p_dir)\n {\n // ----- Look for parent directory\n if ($p_parent_dir != \"\")\n {\n if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)\n {\n return $v_result;\n }\n }\n }\n\n // ----- Create the directory\n if (!@mkdir($p_dir, 0777))\n {\n // ----- Error log\n PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, \"Unable to create directory '$p_dir'\");\n\n // ----- Return\n return PclZip::errorCode();\n }\n\n // ----- Return\n return $v_result;\n }", "private function _is_valid_dir($path)\n\t{\n\t\treturn (is_dir($path) || (is_link($path) && is_dir(readlink($path))));\n\t}", "public function checkDirectoryExistance()\n {\n if (!file_exists($this->event->getConfig()->router->global_router)) {\n return false;\n }\n if (!is_readable($this->event->getConfig()->router->global_router)) {\n return false;\n }\n\n return true;\n }", "public function verifica_dir($dir)\n\t{\n\t\tif( ! is_dir($dir) ) {\n\t\t\t$lista_dir = explode('/', $dir);\n\t\t\t$path = '';\n\t\t\tforeach($lista_dir as $k => $v) {\n\t\t\t\t$path .= $v . '/';\n\t\t\t\tif( ! is_dir($path) ) {\n\t\t\t\t\tif( ! mkdir($path, 0777) )\n\t\t\t\t\t\treturn FALSE;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t\t\t\n\t}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "public function isdir(string $path): Promise;", "public function isDir() {\n\t\treturn self::pathIsDir($this->getPath());\n\t}", "private function check_out_dir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tthrow new \\Exception('Video worker: Directory not exist! ('.$path.')', 0);\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_dir($path)) {\n\t\t\tthrow new \\Exception('Video worker: This is not a directody! ('.$path.')', 0);\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_writable($path)) {\n\t\t\tthrow new \\Exception('Video worker: This directory is not writable! ('.$path.')', 0);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function checkDir()\n {\n if ($this->dirState !== null)\n return $this->dirState;\n\n if (self::checkParentDir() !== true) {\n $this->dirState = __('Parent directory: ') . self::$parentDirState;\n return $this->dirState;\n }\n\n $this->dirPath = self::$parentDirPath .'/'. $this->dirName;\n $this->dirState = self::checkPathState($this->dirPath);\n\n return $this->dirState;\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 getIsDir() {\n\t\t$fullName = $this->getPath();\n\t\treturn is_dir($fullName);\n\t}", "private function is_dir_empty($dir) {\n\n try {\n $handle = opendir($dir);\n while (false !== ($entry = readdir($handle))) {\n if ($entry != \".\" && $entry != \"..\") {\n return FALSE;\n }\n }\n return TRUE;\n\n } catch (\\Exception $e) {\n $this->response->setStatusCode(500, 'Internal Server Error');\n }\n }", "public function isFolder();", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "public function isAvailable(){\n\t\treturn is_dir($this->path);\n\t}", "private function _checkDir($dir) {\n if ( !is_dir($dir) || !is_writable($dir) ) {\n\n // Try to make it\n $mkdir = @mkdir( $dir, 0755, true );\n\n if ( $mkdir && is_dir($dir) && is_writable( $dir ) ) {\n return true;\n }\n\n return false;\n }\n\n return true;\n }", "function is_dir_empty($dir_path, $ignore_hidden = false) {\n if(!is_dir($dir_path)) {\n return false;\n } // if\n \n $d = dir($dir_path);\n if($d) {\n while(false !== ($entry = $d->read())) {\n if(($entry == '.') || ($entry == '..')) {\n continue;\n } // if\n \n if($ignore_hidden && ($entry{0} == '.')) {\n continue;\n } // if\n \n $d->close();\n return false;\n } // while\n } // if\n \n $d->close();\n return true;\n }", "public static function pathIsDir($item) {\n\t\treturn is_dir($item);\n\t}", "private function checkBaseDir() { \n $path = __DIR__; \n return self::checkDirRecursive($path);\n }", "function skcw_check_directory($template) {\n\tif (is_dir($template) && is_readable($template)) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function folder_exist($folder)\n {\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n}", "public function setDirs(){\n\t\tif(!is_dir(self::$rootDir)){\n\t\t\tif(Upload::makeDir(self::$rootDir)&&Upload::makeDir(self::$subDir))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse if(!is_dir(self::$subDir)){\n\t\t\tif(Upload::makeDir(self::$subDir))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse if(!is_dir(self::$tmpSubDir)){\n\t\t\tif(Upload::makeDir(self::$tmpSubDir))\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\treturn true;\n\t}", "public function folderExists(): bool\n {\n return $this->exists() || is_dir($this->getStorageFolder() ?? '');\n }", "function folder_exist($folder)\n{\n // Get canonicalized absolute pathname\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n}", "private function checkDir() {\n if(!file_exists($this->pub_path)) {\n mkdir($this->pub_path);\n } elseif(!file_exists($this->src_path . $this->img)) {\n \t$this->removeImage();\n }\n // Create tiles folder if not exist\n if(!file_exists($this->pub_path . '.tiles')) {\n mkdir($this->pub_path . '.tiles');\n }\n echo $this->tiles_path . \"\\n\";\n // Overwrite img tiles folder if incomplete (if includes some of the zoom level images)\n if(file_exists($this->tiles_path)) {\n \t$res = glob($this->tiles_path . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);\n \tif(!empty($res)) {\n \t\t$this->removeImage();\n \t\tmkdir($this->tiles_path);\n \t} elseif(count(scandir($this->tiles_path)) > 2) {\n \t\treturn false;\n \t}\n } else {\n \tmkdir($this->tiles_path);\n }\n return true;\n\t}", "public function checkDir($path)\n {\n if (is_dir($path) and is_really_writable($path))\n {\n return $this->result(true);\n }\n elseif ( ! is_dir($path))\n {\n if ( ! @mkdir($path, 0777, true))\n {\n return $this->result(false, trans('files.mkdir_error'), $path);\n }\n else\n {\n // create a catch all html file for safety\n $uph = fopen($path . 'index.html', 'w');\n fclose($uph);\n }\n }\n elseif ( ! chmod($path, 0777))\n {\n return $this->result(false, trans('files.chmod_error'));\n }\n }", "public function valid()\n \t{\n $handle = $this->getHandle(); \n while (!isset($handle->current) || $handle->current == '.' || $handle->current == '..') $handle->current = readdir($handle->resource);\n \n return $handle->current !== false;\n \t}", "public function isDir($filePath);", "public abstract function dir();", "function check_dir($dir, $entity)\n{\n // Collect files and directories in these arrays\n $directories = [];\n $files = [];\n \n // Skip old and unused functions directories (theoretically\n // it should only be in the English tree, but we are smart\n // and check for other language trees too...)\n if (preg_match(\"!/([a-z]{2}|pt_BR)/functions!\", $dir)) {\n return;\n }\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n \n // Collect directories and XML files\n if ($file != 'CVS' && $file != '.' &&\n $file != '..' && is_dir($dir.$file)) {\n $directories[] = $file;\n }\n elseif (strstr($file, \".xml\")) {\n $files[] = $file;\n }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n foreach ($files as $file) {\n check_file($dir.$file, $entity);\n }\n\n // then the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\", $entity);\n }\n}", "public function isDirectory()\n {\n return ( $this->fileStructure->type == self::IS_DIRECTORY );\n }", "public function isDirectory(string $path): bool;", "public function isDirectory(string $path): bool;", "function folder_exist($folder){\n $path = realpath($folder);\n\n // If it exist, check if it's a directory\n return ($path !== false AND is_dir($path)) ? $path : false;\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "public function is_dir($filename)\n {\n return is_dir($filename);\n }", "function check_dir() \n\t{\n @chmod($this->path_to_assets,0777);\n $this->createDir(ABSPATH.\"wp-includes/\".$this->books_dir);\n $this->createDir(ABSPATH.\"wp-includes/\".$this->images_dir);\n\t\t /// echo $this->plugin_path.$this->images_dir.\" \\n\";\n\t\t //echo $this->path_to_assets.\" \\n\";\n }", "public function hasFolder($name) { }", "public function isDirectoryOperationAllowed() {}", "public function dir_rewinddir() {\n // We could be more efficient if the user calls opendir() followed by\n // rewinddir() but you just can't help some people.\n $this->next_marker = null;\n $this->current_file_list = null;\n return true;\n }", "public function canNotOpenDirectory()\n {\n $this->assertFalse(@dir(vfsStream::url('foo')));\n }", "public function has($path) {\n $return = parent::has($path);\n // Appease file.inc's calls to is_dir()\n return ($return !== FALSE) ? $return : parent::has($path . '/');\n }", "function is_dir_empty($dirPath)\n{\n if (!is_dir($dirPath)) {\n return null;\n }\n\n $dirEmpty = true;\n // Check for any contents in the folder\n $dir = dir($dirPath);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n $dirEmpty = false;\n\tbreak;\n }\n $dir->close();\n return $dirEmpty;\n}", "function checkFolderStructure($install = false) {\n\t\t// Make sure that the base path is inside the private files dir.\n\t\t// The files dir has appropriate write permissions and is assumed\n\t\t// to be protected against information leak and symlink attacks.\n\t\t$filesDir = realpath(Config::getVar('files', 'files_dir'));\n\t\tif (is_null($this->_basePath) || strpos($this->_basePath, $filesDir) !== 0) {\n\t\t\t$this->addExecutionLogEntry(__('admin.fileLoader.wrongBasePathLocation',\n\t\t\t\t\tarray('path' => $this->_basePath)), SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check folder presence and readability.\n\t\t$pathsToCheck = array(\n\t\t\t$this->_stagePath,\n\t\t\t$this->_archivePath,\n\t\t\t$this->_rejectPath,\n\t\t\t$this->_processingPath\n\t\t);\n\t\t$fileManager = null;\n\t\tforeach($pathsToCheck as $path) {\n\t\t\tif (!(is_dir($path) && is_readable($path))) {\n\t\t\t\tif ($install) {\n\t\t\t\t\t// Try installing the folder if it is missing.\n\t\t\t\t\tif (is_null($fileManager)) {\n\t\t\t\t\t\timport('lib.pkp.classes.file.FileManager');\n\t\t\t\t\t\t$fileManager = new FileManager();\n\t\t\t\t\t}\n\t\t\t\t\t$fileManager->mkdirtree($path);\n\t\t\t\t}\n\n\t\t\t\t// Try again.\n\t\t\t\tif (!(is_dir($path) && is_readable($path))) {\n\t\t\t\t\t// Give up...\n\t\t\t\t\t$this->addExecutionLogEntry(__('admin.fileLoader.pathNotAccessible',\n\t\t\t\t\t\t\tarray('path' => $path)), SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function allowOnlyFilesFolder($dir) {\n return substr($dir, 0, 2) === '..' || explode('/', $dir)[1] != FILES_FOLDER;\n}", "function ensure_directory_writable($path, $base_path = '') {\n $result = false;\n if ($base_path != '') {\n $base_path = rtrim($base_path, '/').'/';\n $path = trim(substr($path, count($base_path) -1), '/');\n }\n if (file_exists($base_path.$path)) {\n $result = is_dir($base_path.$path) && is_writable($base_path.$path);\n } else {\n $result = true;\n $path_item = $base_path;\n foreach (explode('/', $path) as $item) {\n $path_item .= $item.'/';\n if (!file_exists($path_item)) {\n $result = mkdir($path_item);\n // if (!$result) debug('path_item', $path_item);\n } else {\n $result = is_dir($path_item);\n }\n if (!$result) {\n break;\n }\n }\n $result &= is_writable($base_path.$path);\n }\n return $result;\n}", "public function exist()\n {\n return is_dir($this->location) && file_exists($this->location);\n }", "protected function checkFilesDir() {\n\t\t$perms = @fileperms(self::FILES_DIR);\n\t\t/* create if not exist */\n\t\tif ($perms === false) {\n\t\t\tif (!mkdir(self::FILES_DIR, 0700, true)) {\n\t\t\t\tthrow new QuicksandException(\"Cannot create files dir.\");\n\t\t\t}\n\t\t}\n\t\t/* check if dir */\n\t\telse if (($perms & 0x4000) != 0x4000) {\n\t\t\tthrow new QuicksandException(\"Files dir is not actually a directory.\");\n\t\t}\n\t\t/* check permissions */\n\t\telse if (($perms & 0700) != 0700) {\n\t\t\tthrow new QuicksandException(\"Missing permissions. Make sure this script can read, write and enter the files dir.\");\n\t\t}\n\t}", "public static function isEmptyDir($dir)\n\t{\n\t\tif (!\\is_readable($dir)) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$handle = \\opendir($dir);\n\t\t$yes = true;\n\n\t\twhile (false !== ($entry = \\readdir($handle))) {\n\t\t\tif ($entry !== '.' && $entry !== '..') {\n\t\t\t\t$yes = false;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t\\closedir($handle);\n\n\t\treturn $yes;\n\t}", "public function isDirectory($key)\n {\n if($this->supportsDirectories()){\n\n }\n }", "function ensure_writable_dir($dir)\n{\n\tif (is_dir(\"./\" . $dir))\n\t{\n\t\tif (check_writeable($dir))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 2;\n\t\t}\n\t}\n\telse\n\t{\n\t\tif (@makedir($dir))\n\t\t{\n\t\t\t// dir created\n\t\t\tif (check_writeable($dir))\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// dir not creatable\n\t\t\treturn 4;\n\t\t}\n\t}\n}", "function exists($path) \n {\n return is_dir($this->_fs->path()->clean($path));\n }", "private function isDir($fileName)\n {\n return is_dir($this->currentPath . $fileName);\n }", "function is_needed_delete_dir_link($directory)\n{\n\t// SEE: ternary operator.\n\treturn (is_dir($directory) && $directory != \"../../..//uploads\" && strpos($directory,'uploads'))?TRUE:FALSE;\n}", "public function validate_directory($path) {\n if(!File::isDirectory($path)){\n if(File::makeDirectory($path, 0777, true, true)) {\n return true;\n } else {\n # Unable to create directory.\n return false;\n }\n\n } else {\n return true;\n }\n\n\n }", "private static function checkParentDir()\n {\n if (self::$parentDirState !== null)\n return self::$parentDirState; // already initialized\n\n self::$parentDirPath = WP_CONTENT_DIR .'/uploads/'. self::$parentDirName;\n self::$parentDirState = self::checkPathState(self::$parentDirPath);\n\n /**\n * check .htaccess\n * and index.html (optional)\n */\n do {\n if (self::$parentDirState !== true)\n break; // already bad state\n\n $indexPath = self::$parentDirPath .'/index.html';\n $htaccessPath = self::$parentDirPath .'/.htaccess';\n\n if (!file_exists($indexPath)) {\n // optionally create index.html to not list files in directory\n // but this does not prevent to have direct access to files for those who knows file path\n file_put_contents($indexPath, '');\n }\n\n if (file_exists($htaccessPath))\n break; // .htaccess already exists\n\n if (file_put_contents($htaccessPath, \"Order Deny,Allow\\nDeny from all\", LOCK_EX) === false) {\n // cannot create .htaccess file,. directory is not secured\n self::$parentDirState = __('Cannot create .htaccess file', 'tfuse');\n }\n } while(false);\n\n return self::$parentDirState;\n }", "protected function dirIsEmpty($dir)\n {\n if (!is_dir($dir)) {\n return;\n }\n $handle = opendir($dir);\n while (false !== ($entry = readdir($handle))) {\n if ($entry != '.' && $entry != '..') {\n return false;\n }\n }\n return true;\n }", "public function hasUpgradesDir()\n {\n return is_readable($this->getUpgradesPath());\n }", "function valid_folder($path){\r\n\t$ignore = array('.', '..', '.svn', 'CVS', 'cache', 'install', 'index.html', '.htaccess', '_images');\r\n\tif (isset($path)){\r\n\t\tif (!is_file($path) && !is_link($path) && !in_array(basename($path), $ignore)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}", "public function isDirectory(): bool\n {\n return $this->isDirectory;\n }", "private function __isWritableDir()\n\t{\n\t\tif(!$this->__getDir()->exists())\n\t\t{\n\t\t\t$this->error = 'Directory \\'' . $this->__getDir()->getPath() . '\\' does not exist';\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!$this->__getDir()->writable())\n\t\t{\n\t\t\t$this->error = 'Directory \\'' . $this->__getDir()->getPath() . '\\' is not writable';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function openDirectory(){\n if (!file_exists(\"./data\")){ # If file doesn't exist return false\n $handleDir = false;\n return $handleDir;\n }\n else{\n $handleDir = opendir(\"./data\");\n /* I'm checking if the handleDir == returns false for some other reason in connection.php. This is part of validation.php,\n which allows me to present an error message above the form (nb if opendir can't connect it returns a boolean value of false) */\n return $handleDir;\n }\n}", "private function _directoryIsValid($dirName) {\n switch ($dirName) {\n case '.':\n case '..':\n case '.DS_Store':\n case '':\n return false;\n break;\n default:\n return true;\n break;\n }\n }", "public function hasDir($dir)\n {\n return array_search($dir, $this->dirs) !== false;\n }", "public function exists()\n {\n return $this->isDir() || $this->isFile() || $this->isLink();\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function isDirectory()\n {\n $this->is_directory = false;\n\n $current = ftp_pwd($this->getConnection());\n\n try {\n if (@ftp_chdir($this->getConnection(), $this->path)) {\n $this->is_directory = true;\n } else {\n $this->is_file = false;\n }\n\n } catch (\\Exception $e) {\n\n }\n\n ftp_chdir($this->getConnection(), $current);\n\n return;\n }" ]
[ "0.78799856", "0.76821053", "0.7652945", "0.7577442", "0.7565572", "0.7478006", "0.74039155", "0.74039155", "0.73160964", "0.7303019", "0.72861546", "0.72420305", "0.71611965", "0.71299016", "0.71299016", "0.71299016", "0.71299016", "0.7128377", "0.7120598", "0.71149075", "0.7108098", "0.7098245", "0.7067253", "0.70478535", "0.6939499", "0.6938743", "0.6936109", "0.690004", "0.6888575", "0.68855184", "0.6863433", "0.6842856", "0.68275857", "0.68177754", "0.679583", "0.6773994", "0.67434055", "0.67422", "0.6733538", "0.6721077", "0.67171216", "0.67021406", "0.66281664", "0.6624498", "0.65619487", "0.65482765", "0.65466577", "0.65465975", "0.65294164", "0.6526354", "0.651747", "0.65031767", "0.6496099", "0.6476592", "0.6472944", "0.6442189", "0.6432156", "0.64317334", "0.6430913", "0.6416248", "0.6415492", "0.640925", "0.6387839", "0.6375824", "0.63594604", "0.6356295", "0.6356295", "0.63510925", "0.63504934", "0.63354826", "0.6327694", "0.62804693", "0.62798005", "0.62635", "0.6245585", "0.6218183", "0.6207274", "0.6196621", "0.6195189", "0.618335", "0.6181112", "0.61783284", "0.61662954", "0.6125818", "0.6122522", "0.61169785", "0.6114469", "0.6113672", "0.61133164", "0.6112094", "0.61108357", "0.6107251", "0.6098176", "0.60891044", "0.60703605", "0.60652804", "0.60625136", "0.60611993", "0.6025492", "0.6020081", "0.60175353" ]
0.0
-1
Run the database seeds.
public function run() { App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '978-601-8520-93-1', 'judul' => 'Janshen', 'tahun_terbit' => 2017, 'id_penulis' => 1, 'id_penerbit' => 2, 'id_kategori' => 1, 'id_lokasi' => 1, 'harga' => 80000, 'jumlah' => 100, 'barcode' => '978-601-8520-93-1' ]); App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '958-602-8121-93-3', 'judul' => 'RPUL Edisi Terbaru', 'tahun_terbit' => 2019, 'id_penulis' => 3, 'id_penerbit' => 4, 'id_kategori' => 3, 'id_lokasi' => 4, 'harga' => 30000, 'jumlah' => 100, 'barcode' => '958-602-8121-93-3' ]); App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '921-332-8519-93-3', 'judul' => 'Akutansi Entitas Manufaktur', 'tahun_terbit' => 2019, 'id_penulis' => 4, 'id_penerbit' => 1, 'id_kategori' => 3, 'id_lokasi' => 4, 'harga' => 90000, 'jumlah' => 100, 'barcode' => '921-332-8519-93-3' ]); App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '918-692-5419-32-3', 'judul' => 'Doraemon Canda', 'tahun_terbit' => 2004, 'id_penulis' => 5, 'id_penerbit' => 3, 'id_kategori' => 2, 'id_lokasi' => 3, 'harga' => 15000, 'jumlah' => 100, 'barcode' => '918-692-5419-32-3' ]); App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '998-611-8329-66-3', 'judul' => 'Rentang Kisah', 'tahun_terbit' => 2017, 'id_penulis' => 6, 'id_penerbit' => 5, 'id_kategori' => 1, 'id_lokasi' => 1, 'harga' => 85000, 'jumlah' => 100, 'barcode' => '998-611-8329-66-3' ]); App\Buku::create([ 'sampul' => 'sampul.png', 'isbn' => '933-323-8898-32-4', 'judul' => 'Danur gerbang dialog', 'tahun_terbit' => 2015, 'id_penulis' => 1, 'id_penerbit' => 2, 'id_kategori' => 1, 'id_lokasi' => 1, 'harga' => 90000, 'jumlah' => 100, 'barcode' => '933-323-8898-32-4' ]); }
{ "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(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 // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\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 // $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 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(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 \\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 // $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\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\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 // $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 //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.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
check if the user is already logged in
public function index() { //if yes redirect to the welcome page if ($this->session->userdata('logged_in')) { $this->load->view('main'); } //load the register page views $this->load->view('movimiento'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function user_already_logged() {\n echo \"Entro por user_already_logged\";\n return isset($this->session->userdata['logged_in']);\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "private function isLoggedIn()\n {\n return isset($_SESSION['user']); \n }", "static function checkForLogIn()\n {\n if (isset($_SESSION['username'])) {\n return true;\n }\n\n return false;\n }", "public function loggedIn()\n {\n if($this->di->session->get('user'))\n {\n return true;\n }\n return false;\n }", "public function isLoggedIn()\n {\n if(Session::get('user_id') != '') {\n $this->user_id=Session::get('user_id');\n $this->role_id=Session::get('role_id');\n return true;\n }else {\n return false;\n }\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "protected function isUserLoggedIn() {}", "protected function isUserLoggedIn() {}", "public function loggedIn()\n {\n if ($this->userId) {\n return true;\n } else {\n return false;\n }\n }", "private function check_login()\n {\n if (self::exists('user_id')) {\n $this->user_id = self::get('user_id');\n $this->logged_in = true;\n } else {\n unset($this->user_id);\n $this->logged_in = false;\n }\n }", "static public function isLoggedIn(){\n \treturn (self::getInstance()->getId()>1);\n }", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function loggedIn(){\r\n if (isset($_SESSION['user_session']))\r\n return true;\r\n else\r\n return false;\r\n }", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function loggedIn()\n {\n if(isset($_SESSION['user']) && !empty($_SESSION['user'])) {\n return true;\n }\n\n return false;\n }", "private function check_the_login(){\n \n if(isset($_SESSION['login_user'])){\n \n $this->login_user = $_SESSION['login_user'];\n $this->signed_in = true;\n \n }else{\n unset($this->login_user);\n $this->signed_in = false;\n }\n \n }", "public function logged_in()\n {\n if (isset($_SESSION['user_data'])) {\n return true;\n } else {\n return false;\n }\n }", "function logged_user_check() {\n if(is_user_logged())\n launch_error(\"You are already logged in.\");\n}", "protected function _isAlreadyLoggedIn(){\n debug($_SESSION);\n die();\n if ($this->Session->read('Auth.User')) {\n $role = $this->Role->read(null, $this->Auth->user('role_id'));\n CakeSession::write('Auth.User.role', $role['Role']['alias']);\n\n $url = null;\n switch ($role['Role']['alias']) {\n case 'admin':\n case 'manager':\n $this->Session->setFlash(__('If you pretend to register an other person, user \"Add Register (Consolidate)\" at Administrative Panel.'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'admin', 'admin' => true);\n break;\n case 'registered':\n $this->Session->setFlash(__('You has already registered!'), 'default', array('class' => 'notice'));\n $url = array('plugin' => false, 'controller' => 'systems', 'action' => 'dashboard', 'prefix' => 'profile', 'profile' => true);\n break;\n default:\n $url = $this->Auth->redirect();\n break;\n }\n $this->redirect($url);\n }\n return array('success' => true);\n \n }", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "function loggedIn() {\n\t\treturn isset($_SESSION['username']);\n\t}", "public function check_login(){\n\t\t\tif( isset( $_SESSION['user_id'] ) ) {\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset( $this->user_id );\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}", "public static function already_logged_in() {\n\t\tif (self::logged_in()) {\n\t\t\tSession::setFlash(\"alert-danger\", \"You have already logged in.\");\n\t\t\theader(\"Location: index.php\");\n\t\t}\n\t}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "function logged_in() {\n\t\treturn isset($_SESSION['USERID']);\n \n\t}", "function is_logged_in()\n {\n //check session\n //return logged in user_id or false\n }", "public function isLoggedIn(){\n // Apakah user_session sudah ada di session\n if(isset($_SESSION['user_session']))\n {\n return true;\n }\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public static function check()\n {\n if (!empty($_SESSION['LOGGED_IN_USER'])){\n return true;\n } else{\n return false;\n }\n }", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "function isUserLoggedin() \n {\n $stmt = self::$_db->prepare(\"SELECT count(id_user) AS c FROM user WHERE session=:sid\");\n $sid = session_id();\n $stmt->bindParam(\":sid\", $sid);\n $stmt->execute();\n $count = $stmt->fetch()[\"c\"];\n if($count == 1)\n {\n return \"true\";\n }\n else if($count < 1)\n {\n return \"false\";\n }\n else\n {\n return \"Error: More then one identical User could be logged in!\";\n }\n }", "public static function loggedIn()\n\t{\n\t\treturn isset($_SESSION['id']);\n\t}", "public function checkUserLogin()\n {\n if (isset($_SESSION[\"user_id\"])) {\n $status = true;\n } else {\n $status = false;\n }\n return $status;\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }", "public function loggedIn()\n {\n $CI = &get_instance();\n if ($CI->session->has_userdata('user_id')) {\n return true;\n } else {\n return false;\n }\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "function logged_in(){\n\t\tif((isset($_SESSION['user_id']) || isset($_SESSION['username'])) && (!empty($_SESSION['user_id']) || !empty($_SESSION['username']))){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public static function loggedIn(): bool\n {\n // Check if user is in the session\n return isset($_SESSION['user']);\n }", "public function is_logged_in() {\n\n\t}", "public function logged_in() {\n return !empty($this->session->userdata('user_id'));\n }", "public static function isLoggedIn(){\r\n\t\treturn isset($_SESSION[\"id\"]);\r\n\t}", "function isLoggedIn() {\n\treturn isset($_SESSION['user_id']);\n}", "public function logged_in ()\n\t\t{\n\t\t\tif(!isset($_SESSION))\n\t\t\t{\n\t\t\t\tsession_start();\n\t\t\t}\n\t\t\treturn isset($_SESSION['id']);\n\t\t}", "function isLoggedIn(){\r\n APP::import('Component','Auth');\r\n $auth = new AuthComponent;\r\n $auth ->Session = $this->Session;\r\n $user = $auth->user();\r\n return !empty($user);\r\n \r\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "public function userIsLoggedIn() {\n return auth()->check() ;\n }", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "function logged_in() {\r\n\t\treturn isset($_SESSION[\"admin_id\"]);\r\n\t}", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public static function isLoggedIn()\n {\n self::startSession();\n return isset($_SESSION['user']);\n }", "public function isLoggedIn()\n {\n return true;\n }", "public function is_user_logged_in(){\n\t\treturn $this->session->userdata('current_user_id') != FALSE;\n\t}", "function isLoggedIn() {\n\treturn isset($_SESSION['user']);\n}", "public function customerIsAlreadyLoggedIn()\n {\n return (bool)$this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH);\n }", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "function isUserLoggedIn()\r\n\t{\r\n\t\t\tglobal $con;\r\n\t\t\t$return = false;\r\n\t\t\tif (isset($_SESSION['USER_ID']) && ($_SESSION['USER_ID'] > 0) && ($_SESSION['USER_ID'] != ''))\r\n\t\t\t{\r\n\t\t\t\t$id = $_SESSION['USER_ID'];\r\n\t\t\t\tif ($this->chkValidUser($id))\r\n\t\t\t\t{\r\n\t\t\t\t\t$return = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $return;\r\n\t}", "public function is_loggedin(){\n if(isset($_SESSION['user_session'])){\n return true;\n }\n return false;\n }", "public static function isLoggedIn(){\n if(!self::exists('is_logged_in')&& self::get('is_logged_in')!==true){\n \n header('location:' . URL . 'user/login.php');\n exit;\n }\n }", "function logged_in() {\n\t\n\treturn isset( $_SESSION['user_id'] );\n}", "public function isLoggedIn()\n {\n // check session for user id\n if(isset($_SESSION['user']['id'])) {\n // return true;\n return $_SESSION['user']['id'];\n }\n else {\n return false;\n }\n }", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "public function check_login()\n\t{\n\t\tif(isset($_SESSION[\"user_id\"]))\n\t\t{\n\t\t $this->_user_id = $_SESSION[\"user_id\"];\n\t\t\t$this->_client = $_SESSION[\"client\"];\n\t\t\t$this->_loged_in = true;\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_loged_in = false;\n\t\t\t$this->_client = false;\n\t\t\tunset($this->_user_id);\n\t\t}\n\t}", "function is_logged_in() \n {\n return (empty($this->userID) || $this->userID == \"\") ? false : true;\n }", "public function isLoggedIn();", "public function isLoggedIn();", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "public static function loggedin()\r\n {\r\n if (Maker::get('logged_in_user') != null) {\r\n return Maker::get('logged_in_user');\r\n }\r\n\r\n $query = Mysql::query(\r\n 'SELECT u.* FROM sessions s LEFT JOIN users u ON s.userid=u.id\r\n WHERE s.sessid=%s AND s.password=u.password AND u.username=%s AND s.userid=%u AND s.ip=%b',\r\n Session::instance()->password,\r\n Session::instance()->username,\r\n Session::instance()->userid,\r\n ip()->realip\r\n );\r\n\r\n if ($query->rows == 1) {\r\n Maker::set('logged_in_user', $query->row);\r\n return true;\r\n }\r\n Maker::set('logged_in_user', null);\r\n return false;\r\n }", "private function isSingIn()\n {\n if ($this->session->isLoggon && $this->session->isAdmin) {\n return true;\n }\n redirect('logout', 'refresh');\n }", "private function checkIfLoggedIn()\n {\n if (!session()->has('user')) {\n abort(403, 'You are not logged in.');\n }\n }", "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "function loggedIn(){\r\n\tif(Session::exists('loggedIn') && Session::get('loggedIn')==1){\r\n\t\treturn TRUE;\r\n\t}\r\n\telse\r\n\t\treturn FALSE;\r\n}", "public function is_logged_in()\n {\n return isset($this->user);\n }", "public function is_logged_in()\n\t{\n\t\treturn ($this->session->userdata('iduser') != FALSE);\n\t}", "public function is_loggedin()\n {\n if (isset($_SESSION['user_session'])) {\n return true;\n }\n }", "function is_logged_in()\n\t{\n\t\treturn require_login();\n\t}", "public function isUserLoggedIn() \n {\n if (!isset($_SESSION['user_id']) || !isset($_SESSION['is_logged_in'])) {\n return false;\n } else {\n return true;\n }\n }", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function session_check(){\n if(isset($_SESSION['login_user_id'])){\n return true;\n } else {\n return false;\n }\n }", "private function isLoggedin()\n\t{\n\t\t$this->idletime = 18000;\n\n\t\tif ((time()-$_SESSION['timestamp'])>$this->idletime)\n\t\t{\n\t\t\t$message = \"You are signed out from the previous session ! Please try sign in again!\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telseif($this->logged_in() == false)\n\t\t{\n\t\t\t$message = \"Invalid session !! Please try sign in again.\";\n\t\t\t$this->logout($message);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['timestamp'] = time();\n\t\t}\n\t}", "private function checkLogin()\n {\n if ($this->verifySession()) {\n $this->userId = $this->session['id'];\n }\n if ($this->userId === 0) {\n if ($this->verifyCookie()) {\n $this->userId = $this->cookie['userid'];\n $this->createSession();\n }\n }\n }", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public function isLoggedIn()\r\n {\r\n if ($this->session->has('AUTH_NAME') AND $this->session->has('AUTH_EMAIL') AND $this->session->has('AUTH_CREATED') AND $this->session->has('AUTH_UPDATED')) {\r\n return true;\r\n }\r\n return false;\r\n }", "public function isCurrentlyLoggedIn() {}", "public static function is_logged_in()\n {\n if (isset($_SESSION['id']) and isset($_SESSION['username']) and isset($_SESSION['role_name'])){\n return true;\n }else{\n return false;\n }\n }", "public function checkLoggedIn()\n {\n if(!isset($_SESSION['user_id']))\n {\n redirect('pages/view/home');\n exit;\n }\n else\n {\n return $user_id=$_SESSION['user_id'];\n }\n }", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "function loggedIn()\n\t{\n\t\treturn $this->hasFunction(AUTH_FUNCTION_LOGGED_IN_ATTRIBUTE);\n\t}", "public function loggedIn() {\r\n //if userID is not proper then return False.\r\n if (intval($this->id) <= 0) {\r\n return False;\r\n }\r\n // if we last checked for login under a second ago then return true.\r\n if (($this->id == $_SESSION['id']) && $_SESSION['lastLoginCheckTime'] > microtime(true) - 1) {\r\n return True;\r\n } elseif (isset($_SESSION['switched_user'])) {\r\n $checkID = $_SESSION['switched_user'];\r\n } else {\r\n $checkID = $this->id;\r\n }\r\n $thisUserInfo = $this->dbConn->queryFirstRow(\"SELECT `ip` FROM `usermap` WHERE `user_id` = \".intval($checkID).\" ORDER BY `last_date` DESC LIMIT 1\");\r\n if (!$thisUserInfo || $thisUserInfo['ip'] != $_SERVER['REMOTE_ADDR']) {\r\n return False;\r\n }\r\n $_SESSION['lastLoginCheckTime'] = microtime(true);\r\n return True;\r\n }", "private function isSingIn()\n\t{\n\t\tif ($this->session->isLoggon && $this->session->isAdmin) {\n\t\t\treturn true;\n\t\t}\n\t\tredirect('service/sign-out', 'refresh');\n\t}", "public function isLogged()\n {\n return $this->getID() && $this->getID() == get_current_user_id();\n }", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "function IsLoggedIn() {\t\tif( Member::currentUserID() ) {\r\n\t\t return true;\r\n\t\t}\r\n }" ]
[ "0.81896585", "0.8014224", "0.7977815", "0.79481876", "0.7930491", "0.7918163", "0.7910052", "0.7906859", "0.7906859", "0.78501827", "0.7827693", "0.78091764", "0.78016293", "0.78012025", "0.7792358", "0.7785407", "0.77846634", "0.7774868", "0.7760254", "0.77413875", "0.7740761", "0.77348804", "0.7725385", "0.77241397", "0.77148706", "0.77114564", "0.76952314", "0.7686533", "0.7684386", "0.7683979", "0.7683979", "0.7682987", "0.7679173", "0.76597124", "0.7652596", "0.76465696", "0.7641549", "0.7640424", "0.7637879", "0.763624", "0.7630898", "0.76281357", "0.76275337", "0.7626669", "0.76227075", "0.7616406", "0.7608171", "0.7607127", "0.7601738", "0.75954825", "0.75948", "0.7590954", "0.7588508", "0.75809723", "0.75777936", "0.75713795", "0.7569242", "0.7559042", "0.7546773", "0.75460464", "0.7545012", "0.75314116", "0.7528931", "0.75056744", "0.75014496", "0.7498326", "0.7496943", "0.74918586", "0.74884284", "0.74842536", "0.74842536", "0.7483984", "0.74831074", "0.7481611", "0.74746674", "0.74717087", "0.7469587", "0.74570596", "0.74569523", "0.74477017", "0.74468523", "0.74397117", "0.74380124", "0.74357027", "0.7428753", "0.74270433", "0.7422768", "0.7420982", "0.7414843", "0.7414522", "0.7410323", "0.7396312", "0.73873967", "0.73824114", "0.7379156", "0.7377997", "0.7377147", "0.73761183", "0.7374616", "0.7372799", "0.7371557" ]
0.0
-1
Parse the given SimpleXmlElement to a Store entity.
public function parse(SimpleXMLElement $payload) { $store = (new Entities\Store()) ->setIdentifiers(new Collection([ 'ap21_id' => (integer) $payload->StoreId, 'ap21_code' => (string) $payload->Code, 'store_number' => (integer) $payload->StoreNo ])) ->setName((string) $payload->Name) ->setLine1((string) $payload->Address1) ->setLine2((string) $payload->Address2) ->setCity((string) $payload->City) ->setState((string) $payload->State) ->setPostcode((string) $payload->Postcode) ->setCountry((string) $payload->Country) ->setEmail((string) $payload->Email); return $store; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStoreId($store);", "public function parseEntity(XTemplate $xtpl, $oProduct) {\n\n }", "public function parse($model)\n\t{\n\t\t$parser = Mage::getModel($this->getParserModel(), $model);\n\t\tif ($this->getStoreId()) {\n\t\t\t$parser->setMageStoreId($this->getStoreId());\n\t\t}\n\t\t$parser->setDataSource($this->getDataSource());\n\t\tif($this->_delete) {\n\t\t\t$parser->setIsDeleted(true);\n\t\t}\n\n\t\treturn $parser->getData();\n\t}", "private function store(array $parsedXmlData){ \n\t\t$storage = new App_Rates_Storage();\n\t\tforeach($parsedXmlData as $data){ \n\t\t\t$storage->save((array)$data);\n\t\t}\n\t\t\n\t\t\n\t\tif (IS_MEMCACHE){\n\t\t\tCache::getInstance()->set('rates',$parsedXmlData,false,self::CACHE_TTL);\n\t\t}\n\t}", "public function setStoreName($storeName);", "public function getStore();", "public function getStore();", "private function store()\n {\n return empty($this->tags) ? $this->store : $this->store->tags($this->tags);\n }", "public function load(ObjectManager $manager)\n {\n $store = new StoreEntity();\n $store->setStoreLabel('My Test Store');\n $store->setSyncProducts(1);\n $store->setShopifyAccessToken('06ccecd6867cc78d4423e4bb8058a984');\n $store->setShopifyStoreUrl('erpapitest.myshopify.com');\n $store->setErpUrl('http://robots.lapineinc.com');\n $store->setErpUsername('CSGTEST');\n $store->setErpPassword('yG9uFFrLeHZ56LL4');\n $store->setShopifySecretToken('MySecretToken');\n $store->setShopifyHandlingFeeProductId(1);\n\n $manager->persist($store);\n $manager->flush();\n }", "protected function setupStore()\n\t{\n\t\t$store = new Store();\n\t\t$store->setName('Apple Store');\n\n\t\treturn $store;\n\t}", "public function setStoreId($storeId);", "public function setStoreId($storeId);", "public function get_store_info() : array {\n\t\t$store_element = $this->dom->find( '.shop-name' );\n\t\tif ( ! $store_element ) {\n\t\t\treturn [ 'store' => [] ];\n\t\t}\n\n\t\t$anchor = $store_element[0]->find( 'a' );\n\t\t$url = $anchor[0]->getAttribute( 'href' );\n\t\tif ( 0 === stripos( $url, '//' ) ) {\n\t\t\t$url = 'https:' . $url;\n\t\t}\n\n\t\treturn [\n\t\t\t'store' => [\n\t\t\t\t'name' => sanitize_text_field( $anchor[0]->text() ),\n\t\t\t\t'url' => esc_url_raw( $url ),\n\t\t\t],\n\t\t];\n\t}", "public function setStoreId($id);", "function buildObjects($sortedData) {\n $stores = array();\n foreach($sortedData as $store) {\n // values come in as SimpleXMLElement objects, hence the casting\n $newStore = new Store((string)$store[0], (string)$store[1][0], (string)$store[2][0], floatval($store[3][0][0]), floatval($store[3][1][0]));\n array_push($stores, $newStore);\n }\n return $stores;\n}", "protected function getEntityFromStorage() {\n $entity_type = $this->store->get('entity_type');\n $entity_id = $this->store->get('entity_id');\n\n /** @var \\Drupal\\Core\\Entity\\EntityInterface $entity */\n $entity = $this->entityTypeManager()->getStorage($entity_type)\n ->load($entity_id);\n\n return $entity;\n }", "public function getEntity()\n {\n if (empty($this->_data['entity'])) {\n Mage::throwException(Mage::helper('storelocator')->__('Entity is unknown'));\n }\n\n return $this->_data['entity'];\n }", "public function parse_inventory_from_web() {\n require_once BASEPATH . 'phpQuery/phpQuery.php';\n log_message('debug', 'START parse_inventory_from_web');\n\n $dayAgo = date(DOCTRINE_DATE_FORMAT, (time() - (3600 * 12)));\n $settings = ManagerHolder::get('StoreInventoryParserSetting')->getAllWhere(array('last_parse_at<' => $dayAgo, 'url<>' => ''), 'e.*,store.*', 200);\n\n foreach ($settings as $setting) {\n $webPage = $this->getWebPage($setting['url']);\n ManagerHolder::get('StoreInventoryParserSetting')->updateById($setting['id'], 'last_http_code', $webPage['header']['http_code']);\n\n $markup = $webPage['result'];\n\n if ($setting['store']['code'] == 'Magbaby') {\n if (strpos($markup, '<span class=\"b-product__state b-product__state_type_available\">В наличии</span>') !== FALSE) {\n $qty = 10;\n } else {\n $qty = 0;\n }\n if (!empty($setting['product_group_id'])) {\n $productGroup = ManagerHolder::get('ParameterGroup')->getById($setting['product_group_id'], 'bar_code');\n $barCode = $productGroup['bar_code'];\n } else {\n $product = ManagerHolder::get('Product')->getById($setting['product_id'], 'bar_code');\n $barCode = $product['bar_code'];\n }\n\n $where = array('product_id' => $setting['product_id'], 'bar_code' => $barCode, 'store_id' => $setting['store_id']);\n $exists = ManagerHolder::get('StoreInventory')->existsWhere($where);\n $entity = array();\n $entity['qty'] = $qty;\n if (!empty($setting['product_group_id'])) {\n $entity['product_group_id'] = $productGroup['id'];\n }\n $entity['update_by_admin_id'] = '';\n $entity['update_source'] = 'web';\n $entity['updated_at'] = date(DOCTRINE_DATE_FORMAT);\n if ($exists) {\n ManagerHolder::get('StoreInventory')->updateAllWhere($where, $entity);\n } else {\n $entity = array_merge($entity, $where);\n ManagerHolder::get('StoreInventory')->insert($entity);\n }\n\n ManagerHolder::get('StoreInventoryParserSetting')->updateById($setting['id'], 'last_parse_at', date(DOCTRINE_DATE_FORMAT));\n }\n\n if ($setting['store']['code'] == 'i-love-mum') {\n $markup = file_get_contents($setting['url']);\n\n $params = array();\n if (strpos($markup, '<li>Доступность: На складе</li>') !== FALSE) {\n @phpQuery::newDocumentHTML($markup);\n\n foreach(pq('h3:contains(Доступные опции)')->next('div')->find('div:first > div') as $item) {\n // print pq($item)->html();\n // print \"\\n\";\n\n $param = pq($item)->find('label')->text();\n $param = trim($param);\n $param = ManagerHolder::get('ParameterValue')->getOneWhere(array('name' => $param), 'e.*');\n\n $value = pq($item)->find('label')->attr('title');\n $value = trim($value);\n if ($value == 'нет в наличии') {\n $qty = 0;\n } else {\n preg_match(\"/в наличии ([0-9]*) шт./\", $value, $mch);\n $qty = $mch[1];\n }\n\n $params[$param['id']] = $qty;\n }\n } else {\n $productGroups = ManagerHolder::get('ParameterGroup')->getAllWhere(array('product_id' => $setting['product_id']), 'main_parameter_value_id');\n foreach ($productGroups as $pg) {\n $params[$pg['main_parameter_value_id']] = 0;\n }\n }\n\n ManagerHolder::get('StoreInventory')->updateAllWhere(array('product_id' => $setting['product_id'], 'store_id' => $setting['store_id']), array('qty' => 0));\n foreach ($params as $paramId => $qty) {\n $productGroup = ManagerHolder::get('ParameterGroup')->getOneWhere(array('product_id' => $setting['product_id'], 'main_parameter_value_id' => $paramId), 'bar_code');\n if (!$productGroup) {\n continue;\n }\n\n $where = array('product_id' => $setting['product_id'], 'bar_code' => $productGroup['bar_code'], 'store_id' => $setting['store_id']);\n $exists = ManagerHolder::get('StoreInventory')->existsWhere($where);\n $entity = array();\n $entity['qty'] = $qty;\n $entity['product_group_id'] = $productGroup['id'];\n $entity['update_by_admin_id'] = '';\n $entity['update_source'] = 'web';\n $entity['updated_at'] = date(DOCTRINE_DATE_FORMAT);\n if ($exists) {\n ManagerHolder::get('StoreInventory')->updateAllWhere($where, $entity);\n } else {\n $entity = array_merge($entity, $where);\n ManagerHolder::get('StoreInventory')->insert($entity);\n }\n\n ManagerHolder::get('StoreInventoryParserSetting')->updateById($setting['id'], 'last_parse_at', date(DOCTRINE_DATE_FORMAT));\n }\n }\n sleep(rand(1,3));\n }\n\n ManagerHolder::get('StoreInventory')->updateProductStatuses();\n log_message('debug', 'FINISH parse_inventory_from_web');\n }", "protected function parseAssignElement(\\SimpleXMLElement $node) {\n\t\t\t$attributes = $node->attributes();\n\t\t\tif (!isset($attributes['location'])) {\n\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t}\n\t\t\t$segments = explode('.', $this->__valueOf($attributes['location']));\n\t\t\tif (count($segments) > 0) {\n\t\t\t\t$value = Core\\Data\\Undefined::instance();\n\t\t\t\t$children = $node->children();\n\t\t\t\tif (count($children) > 0) {\n\t\t\t\t\tforeach ($children as $child) {\n\t\t\t\t\t\tswitch ($child->getName()) {\n\t\t\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t\t\t$value = $this->parseArrayElement($child);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'dictionary':\n\t\t\t\t\t\t\t\t$value = $this->parseDictionaryElement($child);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'expression':\n\t\t\t\t\t\t\t\t$value = $this->parseExpressionElement($child);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'null':\n\t\t\t\t\t\t\t\t$value = $this->parseNullElement($child);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'undefined':\n\t\t\t\t\t\t\t\t$value = $this->parseUndefinedElement($child);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'value':\n\t\t\t\t\t\t\t\t$value = $this->parseValueElement($child);\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\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (isset($attributes['value'])) {\n\t\t\t\t\t$value = $this->__valueOf($attributes['value']);\n\t\t\t\t\tif (isset($attributes['type'])) {\n\t\t\t\t\t\t$type = $this->__valueOf($attributes['type']);\n\t\t\t\t\t\tif (!Spring\\Data\\XML\\Syntax::isPrimitiveType($type)) {\n\t\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$value = Core\\Convert::changeType($value, $type);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t}\n\t\t\t\t$property = $this->models;\n\t\t\t\tforeach ($segments as $segment) {\n\t\t\t\t\tif (!Spring\\Data\\XML\\Syntax::isPropertyName($segment)) {\n\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t}\n\t\t\t\t\t$property = &$property->$segment;\n\t\t\t\t}\n\t\t\t\t$property = $value;\n\t\t\t}\n\t\t}", "private function getStore() {\n if (NULL === $this->obj_store) {\n $this->obj_store = new Store($this->makeSchema());\n }\n return $this->obj_store;\n }", "public function parseFromXml($strXml)\n {\n throw new OssException(\"Not implemented.\");\n }", "public function getStore() { return $this->_store; }", "public static function StoreById($entity)\n {\n if(!isset(StorageManager::$entities[$entity->Alias]))\n {\n StorageManager::$entities[$entity->Alias] = array();\n }\n\n StorageManager::$entities[$entity->Alias][$entity->IdEntite] = $entity;\n }", "public function parse()\n {\n $parserResolver = new ParserResolver();\n $parserResolver->setXMLElement(new \\SimpleXMLElement($this->xmlString));\n \n $parser = $parserResolver->getParser();\n \n return $parser->parse();\n }", "public function getStore(): Store|null;", "public function import()\n {\n //then by the element set name\n if(!$this->record) {\n $this->record = $this->db->getTable('ElementSet')->findByName($this->responseData['name']);\n }\n\n if(!$this->record) {\n $this->record = new ElementSet;\n }\n //set new value if element set exists and override is set, or if it is brand new\n if( ($this->record->exists() && get_option('omeka_api_import_override_element_set_data')) || !$this->record->exists()) {\n $this->record->description = $this->responseData['description'];\n $this->record->name = $this->responseData['name'];\n $this->record->record_type = $this->responseData['record_type'];\n }\n\n try {\n $this->record->save(true);\n $this->addOmekaApiImportRecordIdMap();\n } catch(Exception $e) {\n _log($e);\n }\n }", "public function parse($payload)\n {\n return new SimpleXMLElement($payload);\n }", "public static function importFromEndpoint () {\n\n\t\t// Get data from spaql endpoint\n\t\t$sThesaurusEndpoint = empty($_POST['thesaurusEndpoint']) ? PP_THESAURUS_ENDPOINT : $_POST['thesaurusEndpoint'];\n\t\tif (empty($sThesaurusEndpoint)) {\n\t\t\tthrow new Exception (__('No SPARQL endpoint has been indicated.', self::SLUG));\n\t\t}\n\n\t\t// Load the remote sparql endpiont\n\t\t$aConfig = array(\n\t\t\t'remote_store_endpoint'\t=> $sThesaurusEndpoint,\n\t\t\t'remote_store_timeout'\t=> 2\n\t\t);\n\t\t$oEPStore = ARC2::getRemoteStore($aConfig);\n\n\t\t// Create the tables for the triple store\n\t\t$oARCStore = ARC2::getStore(self::getStoreConfig());\n\t\t$oARCStore->setUp();\n\n\t\t// All tables are emptied\n\t\t$oARCStore->reset();\n\n\t\t// Save data into ARC store\n\t\tself::importFromEndpointLoop($oEPStore, $oARCStore);\n\t}", "public function getStore()\n {\n if (is_null($this->store)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_STORE);\n if (is_null($data)) {\n return null;\n }\n\n $this->store = StoreResourceIdentifierModel::of($data);\n }\n\n return $this->store;\n }", "protected function parseXML($xml)\n {\n if (! $xml || ! $xml->Shipment) {\n return false;\n }\n $d = $xml->Shipment;\n $this->data['ShipmentId'] = (string) $d->ShipmentId;\n $this->data['AmazonOrderId'] = (string) $d->AmazonOrderId;\n if (isset($d->SellerOrderId)) {\n $this->data['SellerOrderId'] = (string) $d->SellerOrderId;\n }\n $this->data['Status'] = (string) $d->Status;\n if (isset($d->TrackingId)) {\n $this->data['TrackingId'] = (string) $d->TrackingId;\n }\n $this->data['CreatedDate'] = (string) $d->CreatedDate;\n if (isset($d->LastUpdatedDate)) {\n $this->data['LastUpdatedDate'] = (string) $d->LastUpdatedDate;\n }\n $this->data['Weight']['Value'] = (string) $d->Weight->Value;\n $this->data['Weight']['Unit'] = (string) $d->Weight->Unit;\n $this->data['Insurance']['Amount'] = (string) $d->Insurance->Amount;\n $this->data['Insurance']['CurrencyCode'] = (string) $d->Insurance->CurrencyCode;\n if (isset($d->Label)) {\n $this->data['Label']['Dimensions']['Length'] = (string) $d->Label->Dimensions->Length;\n $this->data['Label']['Dimensions']['Width'] = (string) $d->Label->Dimensions->Width;\n $this->data['Label']['Dimensions']['Unit'] = (string) $d->Label->Dimensions->Unit;\n $this->data['Label']['FileContents']['Contents'] = (string) $d->Label->FileContents->Contents;\n $this->data['Label']['FileContents']['FileType'] = (string) $d->Label->FileContents->FileType;\n $this->data['Label']['FileContents']['Checksum'] = (string) $d->Label->FileContents->Checksum;\n if (isset($d->Label->CustomTextForLabel)) {\n $this->data['Label']['CustomTextForLabel'] = (string) $d->Label->CustomTextForLabel;\n }\n if (isset($d->Label->LabelFormat)) {\n $this->data['Label']['LabelFormat'] = (string) $d->Label->LabelFormat;\n }\n if (isset($d->Label->StandardIdForLabel)) {\n $this->data['Label']['StandardIdForLabel'] = (string) $d->Label->StandardIdForLabel;\n }\n }\n\n $this->data['ItemList'] = [];\n foreach ($d->ItemList->children() as $x) {\n $temp = [];\n $temp['OrderItemId'] = (string) $x->OrderItemId;\n $temp['Quantity'] = (string) $x->Quantity;\n $this->data['ItemList'][] = $temp;\n }\n if (isset($d->PackageDimensions->Length)) {\n $this->data['PackageDimensions']['Length'] = (string) $d->PackageDimensions->Length;\n $this->data['PackageDimensions']['Width'] = (string) $d->PackageDimensions->Width;\n $this->data['PackageDimensions']['Height'] = (string) $d->PackageDimensions->Height;\n $this->data['PackageDimensions']['Unit'] = (string) $d->PackageDimensions->Unit;\n }\n if (isset($d->PackageDimensions->PredefinedPackageDimensions)) {\n $this->data['PackageDimensions']['PredefinedPackageDimensions'] = (string) $d->PackageDimensions->PredefinedPackageDimensions;\n }\n\n //Ship From Address\n $this->data['ShipFromAddress']['Name'] = (string) $d->ShipFromAddress->Name;\n $this->data['ShipFromAddress']['AddressLine1'] = (string) $d->ShipFromAddress->AddressLine1;\n if (isset($d->ShipFromAddress->AddressLine3)) {\n $this->data['ShipFromAddress']['AddressLine2'] = (string) $d->ShipFromAddress->AddressLine2;\n }\n if (isset($d->ShipFromAddress->AddressLine3)) {\n $this->data['ShipFromAddress']['AddressLine2'] = (string) $d->ShipFromAddress->AddressLine3;\n }\n if (isset($d->ShipFromAddress->DistrictOrCounty)) {\n $this->data['ShipFromAddress']['DistrictOrCounty'] = (string) $d->ShipFromAddress->DistrictOrCounty;\n }\n $this->data['ShipFromAddress']['Email'] = (string) $d->ShipFromAddress->Email;\n $this->data['ShipFromAddress']['City'] = (string) $d->ShipFromAddress->City;\n if (isset($d->ShipFromAddress->StateOrProvinceCode)) {\n $this->data['ShipFromAddress']['StateOrProvinceCode'] = (string) $d->ShipFromAddress->StateOrProvinceCode;\n }\n $this->data['ShipFromAddress']['PostalCode'] = (string) $d->ShipFromAddress->PostalCode;\n $this->data['ShipFromAddress']['CountryCode'] = (string) $d->ShipFromAddress->CountryCode;\n $this->data['ShipFromAddress']['Phone'] = (string) $d->ShipFromAddress->Phone;\n\n //Ship To Address\n $this->data['ShipToAddress']['Name'] = (string) $d->ShipToAddress->Name;\n $this->data['ShipToAddress']['AddressLine1'] = (string) $d->ShipToAddress->AddressLine1;\n if (isset($d->ShipToAddress->AddressLine3)) {\n $this->data['ShipToAddress']['AddressLine2'] = (string) $d->ShipToAddress->AddressLine2;\n }\n if (isset($d->ShipToAddress->AddressLine3)) {\n $this->data['ShipToAddress']['AddressLine2'] = (string) $d->ShipToAddress->AddressLine3;\n }\n if (isset($d->ShipToAddress->DistrictOrCounty)) {\n $this->data['ShipToAddress']['DistrictOrCounty'] = (string) $d->ShipToAddress->DistrictOrCounty;\n }\n $this->data['ShipToAddress']['Email'] = (string) $d->ShipToAddress->Email;\n $this->data['ShipToAddress']['City'] = (string) $d->ShipToAddress->City;\n if (isset($d->ShipToAddress->StateOrProvinceCode)) {\n $this->data['ShipToAddress']['StateOrProvinceCode'] = (string) $d->ShipToAddress->StateOrProvinceCode;\n }\n $this->data['ShipToAddress']['PostalCode'] = (string) $d->ShipToAddress->PostalCode;\n $this->data['ShipToAddress']['CountryCode'] = (string) $d->ShipToAddress->CountryCode;\n $this->data['ShipToAddress']['Phone'] = (string) $d->ShipToAddress->Phone;\n\n //Service\n $this->data['ShippingService']['ShippingServiceName'] = (string) $d->ShippingService->ShippingServiceName;\n $this->data['ShippingService']['CarrierName'] = (string) $d->ShippingService->CarrierName;\n $this->data['ShippingService']['ShippingServiceId'] = (string) $d->ShippingService->ShippingServiceId;\n $this->data['ShippingService']['ShippingServiceOfferId'] = (string) $d->ShippingService->ShippingServiceOfferId;\n $this->data['ShippingService']['ShipDate'] = (string) $d->ShippingService->ShipDate;\n if (isset($d->ShippingService->EarliestEstimatedDeliveryDate)) {\n $this->data['ShippingService']['EarliestEstimatedDeliveryDate'] = (string) $d->ShippingService->EarliestEstimatedDeliveryDate;\n }\n if (isset($d->ShippingService->LatestEstimatedDeliveryDate)) {\n $this->data['ShippingService']['LatestEstimatedDeliveryDate'] = (string) $d->ShippingService->LatestEstimatedDeliveryDate;\n }\n $this->data['ShippingService']['Rate']['Amount'] = (string) $d->ShippingService->Rate->Amount;\n $this->data['ShippingService']['Rate']['CurrencyCode'] = (string) $d->ShippingService->Rate->CurrencyCode;\n $this->data['ShippingService']['DeliveryExperience'] = (string) $d->ShippingService->ShippingServiceOptions->DeliveryExperience;\n $this->data['ShippingService']['CarrierWillPickUp'] = (string) $d->ShippingService->ShippingServiceOptions->CarrierWillPickUp;\n if (isset($d->ShippingService->ShippingServiceOptions->DeclaredValue)) {\n $this->data['ShippingService']['DeclaredValue']['Amount'] = (string) $d->ShippingService->ShippingServiceOptions->DeclaredValue->Amount;\n $this->data['ShippingService']['DeclaredValue']['CurrencyCode'] = (string) $d->ShippingService->ShippingServiceOptions->DeclaredValue->CurrencyCode;\n }\n }", "public static function get_store($store_name)\n {\n }", "public static function get_store($store_name = 'default')\n {\n }", "public function store()\n\t{\n\t\t$xml = Input::get('xml');\n\t\t$this->importer->storeXML($xml);\n\t\t$this->importer->import($xml);\n\t\treturn redirect()->route('admin.index');\n\t}", "public function getStore(): Store {\n return $this->store;\n }", "protected function configureStore()\n {\n /** @var $storeConfigurator Ess_M2ePro_Model_Magento_Quote_Store_Configurator */\n $storeConfigurator = Mage::getModel('M2ePro/Magento_Quote_Store_Configurator');\n $storeConfigurator->init($this->_quote, $this->_proxyOrder);\n\n $this->_originalStoreConfig = $storeConfigurator->getOriginalStoreConfig();\n\n $storeConfigurator->prepareStoreConfigForOrder();\n }", "abstract public function store(Entity $oMappedEntity);", "protected function selectStore(PurchasableEntityInterface $entity) {\n $stores = $entity->getStores();\n if (count($stores) === 1) {\n $store = reset($stores);\n }\n elseif (count($stores) === 0) {\n // Malformed entity.\n throw new \\Exception('The given entity is not assigned to any store.');\n }\n else {\n $store = $this->currentStore->getStore();\n if (!in_array($store, $stores)) {\n // Indicates that the site listings are not filtered properly.\n throw new \\Exception(\"The given entity can't be purchased from the current store.\");\n }\n }\n\n return $store;\n }", "public function testEditStore() {\n $store = $this->createStore('Test');\n $this->drupalGet($store->toUrl('edit-form'));\n $edit = [\n 'name[0][value]' => 'Test!',\n ];\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextContains(\"Saved the Test! store.\");\n\n $store = $this->reloadEntity($store);\n $this->assertEquals('Test!', $store->label());\n }", "private function setStore(Store $store) {\n $this->store = $store;\n }", "public function store() {\n\t\t# One-to-many relationship between stores and users:\n\t\treturn $this->belongsTo('Store');\n\n\t}", "public function convertStorageToEntity($in);", "public function __construct(Store $store)\n {\n $this->store = $store;\n }", "public function __construct(Store $store)\n {\n $this->store = $store;\n }", "public function store()\n {\n $this->makeSitemap();\n\n return $this->sitemap->store('xml', 'sitemap');\n }", "private function parsePerson( $element, DOMElement $xml, $type )\n {\n foreach ( $xml->childNodes as $itemChild )\n {\n if ( $itemChild->nodeType === XML_ELEMENT_NODE )\n {\n $tagName = $itemChild->tagName;\n\n switch ( $tagName )\n {\n case 'name':\n case 'email':\n case 'uri':\n $element->$tagName = $itemChild->textContent;\n break;\n }\n }\n }\n }", "function parse_into_struct($xml, $case = FALSE)\n\t{\n\t\t// use an empty string to trick PHP into doing what it's supposed to do and auto-detect the encoding\n\t\t$parser = ($this->encoding == '') ? xml_parser_create('') : xml_parser_create($this->encoding);\n\t\tif ($case === FALSE)\n\t\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n\n\t\t$entities = $this->fetch_entity_definitions($xml);\n\t\t$xml = ($entities === FALSE) ? $xml : $this->replace_entities($xml, $entities);\n\n\t\tif (xml_parse_into_struct($parser, $xml, $this->tagdata, $this->index) === 0)\n\t\t{\n\t\t\txml_parser_free($parser);\n\t\t\treturn FALSE;\n\t\t}\n\n\t\txml_parser_free($parser);\n\t\treturn TRUE;\n\t}", "public function store(Store $store, Request $request)\n {\n $data = $this->validate($request, $this->validateRules());\n $store->articles()->create($data);\n\n return redirect()->route('stores.show', $store);\n }", "public function storeXML()\n {\n $service = new ExpressionService();\n\n foreach ($service->processFile($_FILES[\"expressions_xml\"]) as $expression) {\n $service->addToDatabase('expressions', $expression);\n }\n\n return redirect('api/expressions');\n }", "protected function fromXml(DOMElement $node)\n {\n $this->name = $node->getAttribute('name');\n $this->isAbstract = Helper::getBoolAttribute($node, 'isAbstract');\n $this->isMixin = Helper::getBoolAttribute($node, 'isMixin');\n $this->isQueryable = Helper::getBoolAttribute($node, 'isQueryable');\n $this->hasOrderableChildNodes = Helper::getBoolAttribute($node, 'hasOrderableChildNodes');\n\n $this->primaryItemName = $node->getAttribute('primaryItemName');\n if (empty($this->primaryItemName)) {\n $this->primaryItemName = null;\n }\n\n $this->declaredSuperTypeNames = array();\n $xp = new DOMXPath($node->ownerDocument);\n $supertypes = $xp->query('supertypes/supertype', $node);\n foreach ($supertypes as $supertype) {\n $this->declaredSuperTypeNames[] = $supertype->nodeValue;\n }\n\n $this->declaredPropertyDefinitions = new ArrayObject();\n $properties = $xp->query('propertyDefinition', $node);\n foreach ($properties as $property) {\n $this->declaredPropertyDefinitions[] = $this->factory->get(\n 'NodeType\\PropertyDefinition',\n array($property, $this->nodeTypeManager)\n );\n }\n\n $this->declaredNodeDefinitions = new ArrayObject();\n $declaredNodeDefinitions = $xp->query('childNodeDefinition', $node);\n foreach ($declaredNodeDefinitions as $nodeDefinition) {\n $this->declaredNodeDefinitions[] = $this->factory->get(\n 'NodeType\\NodeDefinition',\n array($nodeDefinition, $this->nodeTypeManager)\n );\n }\n }", "public function getStore () {\n\t\treturn $this->oStore;\n\t}", "public function setStore($store)\n {\n $this->setData('store', $store);\n $this->setData('store_id', $store->getId());\n return $this;\n }", "public function add_store($store)\n {\n }", "private function _populateCompanyFromXmlElement(\n SimpleXMLElement $xmlElement,\n Kohana_Company $company = null\n )\n {\n if (null === $company) {\n $company = new Kohana_Company();\n }\n $company\n ->setId($xmlElement->id)\n ->setFirstName($xmlElement->first_name)\n ->setLastName($xmlElement->last_name)\n ->setTitle($xmlElement->title)\n ->setCompany($xmlElement->company)\n ->setNotes($xmlElement->notes) \n ;\n\n\n $locations = array(); \n $tags = array(); \n\n \n\n foreach( $xmlElement->tags->tag as $xmlTag ) { \n $tag = new Kohana_Tag();\n $tag->setName( $xmlTag['name'] )\n ; \n\n array_push( $tags,$tag); \n } \n \n foreach( $xmlElement->locations->location as $xmlLocation ) {\n \n\n $location = new Kohana_Location();\n $location\n ->setId( $xmlLocation->id )\n ->setLabel( $xmlLocation->label )\n ->setEmail( $xmlLocation->email )\n ->setWebsite( $xmlLocation->website )\n ->setPhone( $xmlLocation->phone )\n ->setCell( $xmlLocation->cell )\n ->setFax( $xmlLocation->fax )\n ->setStreet1( $xmlLocation->street_1 )\n ->setStreet2( $xmlLocation->street_2 )\n ->setCity( $xmlLocation->city )\n ->setState( $xmlLocation->state )\n ->setPostalCode( $xmlLocation->postal_code )\n ->setCountry( $xmlLocation->country )\n ; \n\n array_push( $locations,$location); \n } \n \n $company->setLocations( $locations ); \n $company->setTags( $tags ); \n\n return $company;\n }", "function parseXml($inXml){\n\t$tidy = tidy_parse_string($inXml, array(\"output-xml\" => true,\"input-xml\" => true));\n\t$tidy->cleanRepair();\n\t\n\t//create simpleXML object from data\n\t$result = new SimpleXMLElement($tidy);\n\treturn $result;\n}", "public function parse(DOMElement $node);", "abstract function getStore(string $storeKey);", "public function store()\n {\n return $this->belongsTo('App\\Store');\n }", "public function execute($entity, $arguments = [])\n {\n if ($entity->getCategoryId()) {\n $entity->setData('store_ids', $this->lookupStoreIds((int)$entity->getCategoryId()));\n }\n\n return $entity;\n }", "public function testStore()\n {\n $model = (new SubscriptionModel())->setProjectId(1);\n\n $service = new StoreSubscriptionService($this->subscriptionRepository, $this->projectService, $this->subscriptionHistory);\n $result = $service->store($model);\n\n $this->assertInstanceOf(SubscriptionModel::class, $result);\n }", "public function getStore()\n\t{\n\t\t//\n\t}", "private function parseProducts($xml){\n $catalogue = $xml->shop->offers;\n $productData = array();\n foreach ($catalogue as $offers) {\n foreach ($offers as $product) {\n foreach ($product->attributes() as $key => $value) {\n if ($key == 'id') $productData['id_prom'] = $value;\n }\n $productData['model'] = $product->vendorCode;\n $productData['id_group_prom'] = $product->categoryId;\n $this->addProduct($productData);\n }\n }\n }", "public function store()\n {\n return $this->belongsTo('Store');\n }", "public function store()\n {\n return $this->belongsTo('Store');\n }", "public function convertEntityToStorage($in);", "private function load(){\n\n $xml = simplexml_load_string($this->response);\n if($xml){\n if(!$this->isResponseSuccessFull($xml)) {\n\n $item = $xml->Items->Item;\n\n $this->data['title'] = $item->ItemAttributes->Title->__toString();\n $this->data['ean'] = $item->ItemAttributes->EAN->__toString();\n $this->data['brand'] = $item->ItemAttributes->Brand->__toString();\n $this->data['picture'] = $item->SmallImage->URL->__toString();\n $this->data['asin'] = $item->ASIN->__toString();\n $this->data['price'] = round(((int)$item->ItemAttributes->ListPrice->Amount->__toString()) / 100,2);\n }\n }else{\n $this->errorMessage[] = 'can not load xml.';\n }\n }", "public function getMagentoStores();", "public function getStore(): Interfaces\\Store\n {\n return $this->store;\n }", "public function parseStringForCmsElementInfo($string);", "public function store() {\n return $this->belongsTo('store');\n }", "public function getByUuid(string $storeUuid): StoreIntegrationInterface;", "public function setStore(StoreInterface $store)\n {\n $this->store = $store;\n return $this;\n }", "public function getStore()\n {\n if (is_null($this->_store)) {\n $this->setStore(Mage::app()->getStore());\n }\n return $this->_store;\n }", "public function parseEntity($entityUri)\n {\n $entity = new Entity($entityUri);\n $modelArray = $this->model->toRdfPhp();\n \n $entityProperties = $modelArray[$entityUri];\n foreach ($entityProperties as $property => $arrayValues) {\n foreach ($arrayValues as $propertyArrayValue) {\n /*\n * $propertyArrayValue is in the form of:\n * array(\n * 'type' => uri|literal,\n * 'value' => THE_VALUE,\n * 'lang' => LANGUAGE (optional),\n * 'datatype' => DATATYPE (optional)\n * );\n *\n */\n $lang = isset($propertyArrayValue['lang']) ? $propertyArrayValue['lang'] : null;\n $entity->addPropertyValue($property, $propertyArrayValue['value'], $lang);\n }\n }\n\n return $entity;\n }", "public function addToAllStore()\n\t{\n\t\t$store = new Store();\n\t\t$store->setId(0);\n\t\t$this->addInfo(ProductInfoType::get(ProductInfoType::ID_STORE), $store, 0, true);\n\t\treturn $this;\n\t}", "public function testParseProcessSimpleTypeElement(): void\n {\n $sch = $this->sut->parse($this->getXs('simpletype_0002.xsd'));\n \n self::assertElementNamespaceDeclarations(\n [\n 'xs' => 'http://www.w3.org/2001/XMLSchema', \n ], \n $sch\n );\n self::assertSchemaElementHasNoAttribute($sch);\n self::assertCount(1, $sch->getElements());\n \n $attr = $sch->getAttributeElements()[0];\n self::assertElementNamespaceDeclarations([], $attr);\n self::assertAttributeElementHasNoAttribute($attr);\n self::assertCount(1, $attr->getElements());\n \n $st = $attr->getSimpleTypeElement();\n self::assertElementNamespaceDeclarations([], $st);\n self::assertSimpleTypeElementHasNoAttribute($st);\n self::assertCount(1, $st->getElements());\n \n $res = $st->getDerivationElement();\n self::assertElementNamespaceDeclarations([], $res);\n self::assertSimpleTypeRestrictionElementHasNoAttribute($res);\n self::assertSame([], $res->getElements());\n }", "public function testCreateStore() {\n $this->drupalGet('admin/commerce/config/stores');\n $this->getSession()->getPage()->clickLink('Add store');\n\n // Check the integrity of the form.\n $this->assertSession()->fieldExists('name[0][value]');\n $this->assertSession()->fieldExists('mail[0][value]');\n $this->assertSession()->fieldExists('address[0][address][country_code]');\n $this->assertSession()->fieldExists('billing_countries[]');\n $this->assertSession()->fieldExists('is_default[value]');\n\n $this->getSession()->getPage()->fillField('address[0][address][country_code]', 'US');\n $this->getSession()->wait(4000, 'jQuery(\\'select[name=\"address[0][address][administrative_area]\"]\\').length > 0 && jQuery.active == 0;');\n\n $name = $this->randomMachineName(8);\n $edit = [\n 'name[0][value]' => $name,\n 'mail[0][value]' => \\Drupal::currentUser()->getEmail(),\n 'default_currency' => 'USD',\n 'timezone' => 'UTC',\n ];\n $address = [\n 'address_line1' => '1098 Alta Ave',\n 'locality' => 'Mountain View',\n 'administrative_area' => 'CA',\n 'postal_code' => '94043',\n ];\n foreach ($address as $property => $value) {\n $path = 'address[0][address][' . $property . ']';\n $edit[$path] = $value;\n }\n $this->submitForm($edit, t('Save'));\n $this->assertSession()->pageTextContains(\"Saved the $name store.\");\n }", "public function testDuplicateStore() {\n $store = $this->createStore('Test');\n $this->drupalGet($store->toUrl('duplicate-form'));\n $edit = [\n 'name[0][value]' => 'Test2',\n ];\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextContains('Saved the Test2 store.');\n\n // Confirm that the original store is unchanged.\n $store = $this->reloadEntity($store);\n $this->assertEquals('Test', $store->label());\n\n // Confirm that the new store type has the expected data.\n $store = Store::load($store->id() + 1);\n $this->assertNotEmpty($store);\n $this->assertEquals('Test2', $store->label());\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "public function getStoreId()\n {\n return $this->store_id;\n }", "function Parse()\n {\n //Create the parser resource\n $this->parser = xml_parser_create(\"UTF-8\");\n \n //Set the handlers\n xml_set_object($this->parser, $this);\n xml_set_element_handler($this->parser, 'StartElement', 'EndElement');\n xml_set_character_data_handler($this->parser, 'CharacterData');\n\n //Error handling\n if (!xml_parse($this->parser, $this->xml))\n $this->HandleError(xml_get_error_code($this->parser), xml_get_current_line_number($this->parser), xml_get_current_column_number($this->parser));\n\n //Free the parser\n xml_parser_free($this->parser);\n }", "protected function convertToEntity($product) {\n if ($product instanceof Meal) {\n $product = [\n 'id' => $product->id,\n 'name' => $product->meal,\n 'img' => $product->mealThumb,\n ];\n }\n elseif ($product instanceof Beer) {\n $product = [\n 'id' => $product->id,\n 'name' => $product->name,\n 'img' => $product->image_url,\n ];\n }\n elseif ($product instanceof NodeInterface) {\n $product = [\n 'id' => $product->id(),\n 'name' => $product->get('field_name')->getValue()[0]['value'],\n 'img' => '',\n ];\n }\n\n $entity = Product::create($product);\n\n return $entity;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function getStore()\n {\n return $this->store;\n }", "public function persistAndFlush($element)\n {\n $this->manager->getManager()->persist($element);\n $this->manager->getManager()->flush();\n }", "public function loadData(Mage_Core_Model_Store $store)\n {\n /* @var Nosto_Tagging_Helper_Data $helper */\n $helper = Mage::helper('nosto_tagging');\n /* @var Nosto_Tagging_Helper_Url $helperUrl */\n $helperUrl = Mage::helper('nosto_tagging/url');\n $this->_title = $helper->cleanUpAccountTitle(\n $store->getWebsite()->getName()\n . ' - '\n . $store->getGroup()->getName()\n . ' - '\n . $store->getName()\n );\n $this->_name = substr(sha1(rand()), 0, 8);\n $this->_frontPageUrl = $helperUrl->getFrontPageUrl($store);\n $this->_currencyCode = $store->getBaseCurrencyCode();\n $this->_languageCode = substr(\n $store->getConfig('general/locale/code'), 0, 2\n );\n $this->_ownerLanguageCode = substr(\n Mage::app()->getLocale()->getLocaleCode(), 0, 2\n );\n\n /** @var Nosto_Tagging_Model_Meta_Account_Owner $owner */\n $owner = Mage::getModel('nosto_tagging/meta_account_owner');\n $owner->loadData();\n $this->_owner = $owner;\n\n /** @var Nosto_Tagging_Model_Meta_Account_Billing $billing */\n $billing = Mage::getModel('nosto_tagging/meta_account_billing');\n $billing->loadData($store);\n $this->_billing = $billing;\n\n $this->_useCurrencyExchangeRates = !$helper->multiCurrencyDisabled($store);\n if (!$helper->multiCurrencyDisabled($store)) {\n $this->_defaultPriceVariationId = $store->getBaseCurrencyCode();\n } else {\n $this->_defaultPriceVariationId = \"\";\n }\n\n $storeLocale = $store->getConfig('general/locale/code');\n $currencyCodes = $store->getAvailableCurrencyCodes(true);\n if (is_array($currencyCodes) && count($currencyCodes) > 0) {\n /** @var Nosto_Tagging_Helper_Currency $currencyHelper */\n $currencyHelper = Mage::helper('nosto_tagging/currency');\n foreach ($currencyCodes as $currencyCode) {\n $this->_currencies[$currencyCode] = $currencyHelper\n ->getCurrencyObject($storeLocale, $currencyCode);\n }\n }\n }", "public function employ(Store $store){\n $this->setStore($store);\n $connection = new Connection();\n $link = $connection->connect();\n $result = $link->query(\"SELECT * FROM staff WHERE user_id = '$this->id'\");\n if(!$record = $result->fetch()){\n $link->exec(\"INSERT INTO staff (user_id, store_id) VALUES ('$this->id','\" . $this->getStore()->getId() . \"')\");\n $this->setStaffId($link->lastInsertId());\n }\n else{\n $this->setStaffId($record['id']);\n $link->exec(\"UPDATE staff SET store_id = '\" . $this->getStore()->getId() . \"' WHERE id = '$this->staffId'\");\n }\n $connection = null;\n }", "public function getStore()\r\n {\r\n return $this;\r\n }", "protected function _getStore() {\r\n $storeId = (int) $this->getRequest()->getParam('store', 0);\r\n return Mage::app()->getStore($storeId);\r\n }", "public function store();", "public function store();", "public function store();", "protected function getStoreById($id)\n {\n $store = null;\n $stores = $this->getStores();\n foreach ($stores as $_store) { \n if ($id == $_store->getId()) { \n $store = $_store; \n break; \n } \n }\n return $store;\n }", "private function parseXML($string)\r\n {\r\n $object = simplexml_load_string($string);\r\n return $object;\r\n }", "function getStoreIDs($xmlObj) {\n $storeIDs = $xmlObj->xpath('//*[@id=\"main_container\"]/div[4]/div/div[2]/span[2]/text()');\n $cleanIDs = array_map(function($x) {return trim($x);}, $storeIDs);\n return $cleanIDs;\n}", "public function storeRecord(&$record)\n {\n $atkstoretype = '';\n $sessionmanager = SessionManager::getInstance();\n if ($sessionmanager) {\n $atkstoretype = $sessionmanager->stackVar('atkstore');\n }\n switch ($atkstoretype) {\n case 'session':\n return $this->storeRecordInSession($record);\n default:\n return $this->storeRecordInDb($record);\n }\n }", "private function parseXml()\n\t{\n\t\t$this->raw = new SimpleXMLElement( $this->content, LIBXML_NOCDATA );\n\t\treturn $this;\n\t}" ]
[ "0.46587682", "0.46546042", "0.46254456", "0.46002588", "0.45970342", "0.4570146", "0.4570146", "0.45219913", "0.45195553", "0.4502184", "0.44990957", "0.44990957", "0.4487101", "0.44703007", "0.4409867", "0.43909898", "0.4382788", "0.43656608", "0.43631285", "0.43587038", "0.43043265", "0.43012637", "0.42878193", "0.42835695", "0.4282105", "0.42755276", "0.4263847", "0.4263734", "0.42502657", "0.4218551", "0.42175895", "0.42161503", "0.42115366", "0.4204978", "0.419982", "0.41817352", "0.4178594", "0.417777", "0.41758096", "0.4165535", "0.41585764", "0.4150642", "0.4150642", "0.41446567", "0.41385782", "0.4126609", "0.41117403", "0.4104037", "0.41025883", "0.40985772", "0.40945172", "0.40914747", "0.4090599", "0.40860128", "0.40768903", "0.40761888", "0.40685442", "0.40679267", "0.40605688", "0.40592617", "0.40512577", "0.40464702", "0.40464702", "0.40411198", "0.40402478", "0.40377614", "0.40224707", "0.4022213", "0.4022195", "0.40043488", "0.40014327", "0.40012258", "0.39968404", "0.39966816", "0.39957047", "0.39924896", "0.3990401", "0.39857823", "0.39857823", "0.39857823", "0.39857823", "0.39836627", "0.39827013", "0.39793402", "0.39793402", "0.39793402", "0.39793402", "0.39727584", "0.39702445", "0.39683786", "0.39665288", "0.39645895", "0.39643213", "0.39643213", "0.39643213", "0.39557725", "0.39557096", "0.3940979", "0.3939642", "0.3939598" ]
0.72746474
0
Handle front end hooks
public function my_front_end_stuff() { add_action('wp_enqueue_scripts', array($this, 'myScripts')); // Don't load the filters if the display option is toggled to NONE! if(get_option('grimage_display_options') != "none") { //add_filter('the_content', array($this, 'replaceImagesWithGrimages')); add_filter('the_content', array($this, 'replaceImagesWithGrimagesTwo')); add_action('wp_head', array($this, 'hook_js')); add_action('wp_head', array($this, 'hook_css')); add_action('wp_footer', array($this, 'grimage_modal')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hook();", "private function public_hooks()\n\t{\n\t}", "public function hook() {\n\t\t// the WPML API is not included by default\n\t\trequire_once ICL_PLUGIN_PATH . '/inc/wpml-api.php';\n\n\t\t$this->hook_actions();\n\t\t$this->hook_filters();\n\t}", "private function hooks(): void {\n\t\t// Steps loader hooks.\n\n\t\tadd_filter(\n\t\t\t'learndash_breezy_localize_script_data',\n\t\t\t$this->container->callback( Steps\\Loader::class, 'add_scripts_data' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t\tadd_action(\n\t\t\t'wp_ajax_nopriv_' . Steps\\Loader::$sub_steps_ajax_action_name,\n\t\t\t$this->container->callback( Steps\\Loader::class, 'handle_sub_steps_ajax_request' )\n\t\t);\n\t}", "public function hooks() {\n\t\tif ( Helper::get_settings( 'general.beta_optin' ) ) {\n\t\t\t$beta_optin = new Beta_Optin();\n\t\t\t$beta_optin->hooks();\n\t\t}\n\n\t\tif (\n\t\t\tHelper::is_advanced_mode() && (\n\t\t\t\t! Helper::is_plugin_active_for_network() ||\n\t\t\t\tcurrent_user_can( 'setup_network' )\n\t\t\t)\n\t\t) {\n\t\t\t$this->filter( 'rank_math/tools/pages', 'add_status_page' );\n\t\t\t$this->filter( 'rank_math/tools/default_tab', 'change_default_tab' );\n\t\t}\n\n\t\t$this->filter( 'rank_math/admin/dashboard_view', 'network_admin_view', 10, 2 );\n\t\t$this->filter( 'rank_math/admin/dashboard_nav_links', 'network_admin_dashboard_tabs' );\n\t\t$this->action( 'admin_enqueue_scripts', 'enqueue', 20 );\n\n\t\tif ( $this->should_add_json() ) {\n\t\t\t/* translators: Placeholder is version number. */\n\t\t\tHelper::add_json( 'rollbackConfirm', esc_html__( 'Are you sure you want to install version %s?', 'rank-math' ) );\n\t\t}\n\t}", "public function preStartPageHook() {}", "public function preStartPageHook() {}", "public function add_hooks()\n {\n }", "public function add_hooks()\n {\n }", "private function hooks() {\n\t\t$this->include_tabs();\n\t\t$this->include_tabs_server();\n\n\t\t// Enable the REST API if the settings allow for it.\n\t\tif ( true === (bool) wpcd_get_early_option( 'wordpress_app_rest_api_enable' ) ) {\n\t\t\t$this->include_rest_api();\n\t\t}\n\n\t\t// Make sure WordPress loads up our css and js scripts.\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'wpapp_enqueue_scripts' ), 10, 1 );\n\n\t\t// Show any admin notices related to upgrades.\n\t\tadd_action( 'admin_notices', array( $this, 'wpapp_upgrades_admin_notice' ) );\n\n\t\t// Actions send from the front-end when installing servers and sites.\n\t\tadd_action( \"wpcd_server_{$this->get_app_name()}_action\", array( &$this, 'do_instance_action' ), 10, 3 );\n\t\tadd_action( \"wpcd_app_{$this->get_app_name()}_action\", array( &$this, 'do_app_action' ), 10, 3 );\n\n\t\tadd_filter( \"wpcd_command_{$this->get_app_name()}_logs_done\", array( &$this, 'get_logs_done' ), 10, 4 );\n\t\tadd_filter( \"wpcd_command_{$this->get_app_name()}_logs_intermed\", array( &$this, 'get_logs_intermed' ), 10, 4 );\n\t\tadd_action( \"wpcd_command_{$this->get_app_name()}_completed\", array( &$this, 'command_completed' ), 10, 2 );\n\t\tadd_filter( 'wpcd_server_script_args', array( $this, 'add_script_args_server' ), 10, 2 );\n\t\tadd_filter( 'wpcd_app_script_args', array( $this, 'add_script_args_app' ), 10, 2 );\n\t\tadd_filter( 'wpcd_actions', array( $this, 'add_post_actions' ), 10, 2 );\n\t\tadd_filter( \"wpcd_script_placeholders_{$this->get_app_name()}\", array( $this, 'script_placeholders' ), 10, 6 );\n\t\tadd_filter( 'wpcd_app_server_admin_list_local_status_column', array( &$this, 'app_server_admin_list_local_status_column' ), 10, 2 ); // Show the server status.\n\t\tadd_filter( 'wpcd_app_server_admin_list_local_status_column', array( &$this, 'app_server_admin_list_upgrade_status' ), 11, 2 ); // Show the upgrade status in the local status column - function located in trait file upgrade.php.\n\t\tadd_filter( 'wpcd_app_admin_list_summary_column', array( &$this, 'app_admin_list_upgrade_status' ), 11, 2 ); // Show the upgrade status in the TITLE column of the app list - function located in trait file upgrade.php.\n\n\t\t// Push commands and callbacks from servers.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_status_completed\", array( &$this, 'push_command_server_status_completed' ), 10, 4 ); // When a server sends us it's daily status report, part 1 - see bash script #24.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_sites_status_completed\", array( &$this, 'push_command_sites_status_completed' ), 10, 4 ); // When a server sends us it's daily status report, part 2 - see bash script #24.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_maldet_scan_completed\", array( &$this, 'push_command_maldet_scan_completed' ), 10, 4 ); // When a server sends us a report of maldet scan results - see bash script #26.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_restart_completed\", array( &$this, 'push_command_server_restart_completed' ), 10, 4 ); // When a server sends us a report of restart or shutdown.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_monit_log_completed\", array( &$this, 'push_command_monit_log_completed' ), 10, 4 ); // When a server sends us a monit alert or report.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_start_domain_backup_completed\", array( &$this, 'push_command_domain_backup_v1_started' ), 10, 4 ); // When a server sends us a notification telling us a scheduled backup was started for a domain.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_end_domain_backup_completed\", array( &$this, 'push_command_domain_backup_v1_completed' ), 10, 4 ); // When a server sends us a notification telling us a scheduled backup was completed for a domain.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_server_config_backup_completed\", array( &$this, 'push_command_server_config_backup' ), 10, 4 ); // When a server sends us a notification telling us a backup of the server configuration has started or ended.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_test_rest_api_completed\", array( &$this, 'push_command_test_rest_api_completed' ), 10, 4 ); // When a server sends us a test notification (initiated from the TOOLS tab on a server screen).\n\n\t\t// Push commands and callbacks from sites.\n\t\tadd_action( \"wpcd_{$this->get_app_name()}_command_schedule_site_sync_completed\", array( &$this, 'push_command_schedule_site_sync' ), 10, 4 ); // When a scheduled site sync has started or ended.\n\n\t\t// After server prepare action hooks.\n\t\t$this->wpcd_after_server_prepare_action_hooks();\n\n\t\t// When we're querying to find out the status of a server.\n\t\tadd_filter( 'wpcd_is_server_available_for_commands', array( &$this, 'wpcd_is_server_available_for_commands' ), 10, 2 );\n\n\t\t// When an app cleanup script is being run.\n\t\tadd_action( 'wpcd_cleanup_app_after', array( $this, 'wpcd_cleanup_app_after' ), 10, 1 );\n\n\t\t// When a server cleanup script is being run.\n\t\tadd_action( 'wpcd_cleanup_server_after', array( $this, 'wpcd_cleanup_server_after' ), 10, 1 );\n\n\t\t// When WP has been installed, add temp domain to DNS if configured.\n\t\tadd_action( 'wpcd_command_wordpress-app_completed_after_cleanup', array( $this, 'wpcd_wpapp_install_complete' ), 10, 4 );\n\n\t\t// Ajax Hooks.\n\t\tadd_action( \"wp_ajax_wpcd_{$this->get_app_name()}\", array( &$this, 'ajax_server' ) ); // For ajax calls dealing with servers in wp-admin.\n\t\tadd_action( \"wp_ajax_wpcd_app_{$this->get_app_name()}\", array( &$this, 'ajax_app' ) ); // for ajax calls dealing with apps in wp-admin.\n\t\tif ( wpcd_is_woocommerce_activated() ) {\n\t\t\tadd_action( 'wp_ajax_wpcd_wpapp_frontend', array( &$this, 'ajax_wpapp_frontend' ) ); // for ajax calls from the front-end - code in trait files.\n\t\t}\n\n\t\t// Add welcome message to the settings screen.\n\t\tadd_filter( 'wpcd_general_settings_after_welcome_message', array( $this, 'welcome_message_settings' ), 10, 1 );\n\n\t\t// Add some additional instructions to the \"no application servers found\" message.\n\t\tadd_filter( 'wpcd_no_app_servers_found_msg', array( $this, 'no_app_servers_found_msg' ), 10, 1 );\n\n\t\t// Add a state called \"WordPress\" to the app when its shown on the app list.\n\t\tadd_filter( 'display_post_states', array( $this, 'display_post_states' ), 20, 2 );\n\n\t\t// Background actions for SERVER.\n\t\tadd_action( 'wpcd_wordpress_deferred_actions_for_server', array( $this, 'do_deferred_actions_for_server' ), 10 );\n\n\t\t// Background actions for APPS.\n\t\tadd_action( 'wpcd_wordpress_deferred_actions_for_apps', array( $this, 'do_deferred_actions_for_app' ), 10 );\n\n\t\t// Delete temp log files.\n\t\tadd_action( 'wpcd_wordpress_file_watcher', array( $this, 'file_watcher_delete_temp_files' ) );\n\n\t\t/* Do not allow WooCommerce to redirect to their account page */\n\t\tadd_filter( 'woocommerce_prevent_admin_access', array( $this, 'wc_subscriber_admin_access' ), 20, 1 );\n\n\t\t/*********************************************\n\t\t* Hooks and filters for screens in wp-admin\n\t\t*/\n\n\t\t// Filter hook to add new columns to the APP list.\n\t\tadd_filter( 'manage_wpcd_app_posts_columns', array( $this, 'app_posts_app_table_head' ), 10, 1 );\n\n\t\t// Action hook to add values in new columns in the APP list.\n\t\tadd_action( 'manage_wpcd_app_posts_custom_column', array( $this, 'app_posts_app_table_content' ), 10, 2 );\n\n\t\t// Filter hook to add new columns to the SERVER list.\n\t\tadd_filter( 'manage_wpcd_app_server_posts_columns', array( $this, 'app_server_table_head' ), 10, 1 );\n\n\t\t// Show some app details in the wp-admin list of apps.\n\t\tadd_filter( 'wpcd_app_admin_list_summary_column', array( &$this, 'app_admin_list_summary_column' ), 10, 2 );\n\n\t\t// Add the INSTALL WordPress button to the server list.\n\t\tadd_filter( 'wpcd_app_server_table_content', array( &$this, 'app_server_table_content' ), 10, 3 );\n\n\t\t// Filter hook to add a REMOVE SITE link to the hover action on an app.\n\t\tadd_filter( 'post_row_actions', array( $this, 'post_row_actions' ), 10, 2 );\n\n\t\t// Meta box display callback.\n\t\tadd_action( 'add_meta_boxes_wpcd_app', array( $this, 'app_admin_add_meta_boxes' ) );\n\n\t\t// Save Meta Values.\n\t\tadd_action( 'save_post', array( $this, 'app_admin_save_meta_values' ), 10, 2 );\n\n\t\t// Add Metabox.IO metaboxes for the WordPress app into the APP details CPT screen.\n\t\tadd_filter( \"wpcd_app_{$this->get_app_name()}_metaboxes\", array( $this, 'add_meta_boxes' ), 10, 1 );\n\n\t\t// Add Metabox.IO metaboxes for the SERVER CPT into the server details CPT screen.\n\t\tadd_filter( 'rwmb_meta_boxes', array( $this, 'register_server_metaboxes' ), 10, 1 ); // Register application metabox stub with filter. Note that this is a METABOX.IO filter, not a core WP filter.\n\t\tadd_filter( \"wpcd_server_{$this->get_app_name()}_metaboxes\", array( $this, 'add_meta_boxes_server' ), 10, 1 );\n\n\t\t// Action hook to fire on new site created on WP Multisite.\n\t\tadd_action( 'wp_initialize_site', array( $this, 'wpapp_schedule_events_for_new_site' ), 10, 2 );\n\n\t\t// Action hook to set transient if directory is readable and .txt files are accessible.\n\t\tadd_action( 'admin_init', array( $this, 'wpapp_admin_init' ) );\n\n\t\t// Action hook to handle ajax request to set transient if user closed the readable notice check.\n\t\tadd_action( 'wp_ajax_set_readable_check', array( $this, 'set_readable_check' ) );\n\n\t\t// Action hook to handle ajax request to set transient if user clicked the \"check again\" option in the \"readable check\" notice.\n\t\tadd_action( 'wp_ajax_readable_check_again', array( $this, 'readable_check_again' ) );\n\n\t\t// Action hook to extend admin filter options.\n\t\tadd_action( 'restrict_manage_posts', array( $this, 'wpapp_wpcd_app_table_filtering' ) );\n\n\t\t// Filter hook to filter app listing on custom meta data.\n\t\tadd_filter( 'parse_query', array( $this, 'wpapp_wpcd_app_parse_query' ), 10, 1 );\n\n\t\t// Action hook to handle ajax request to set transient if user closed the notice for cron check.\n\t\tadd_action( 'wp_ajax_set_cron_check', array( $this, 'set_cron_check' ) );\n\t}", "public function hooks() {\n $service = new Service($this->license_base);\n add_action('admin_menu', array($this, 'register_license_page'));\n add_action('admin_enqueue_scripts', array($this, 'admin_scripts'), 10);\n // Validate service\n add_action('wp_ajax_validate_service', array($service, 'validate_service'), 10);\n }", "protected function executePreRenderHook() {}", "public function hooks() {\n\t\tadd_action( 'wp_ajax_wp_sc_form_process_'. $this->button_slug, array( $this, 'process_form' ) );\n\n\t\t// If we have a conditional callback and the return of the callback is false\n\t\tif ( $this->args['conditional_callback'] && is_callable( $this->args['conditional_callback'] ) && ! call_user_func( $this->args['conditional_callback'], $this ) ) {\n\t\t\t// Then that means we should bail\n\t\t\treturn;\n\t\t}\n\n\t\tadd_action( 'admin_init', array( $this, 'button_init' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'register_quicktag_button_script' ) );\n\t\tadd_action( 'admin_footer', array( $this, 'add_quicktag_button_script' ) );\n\t\tadd_action( 'admin_footer', array( $this, 'add_modal_form' ) );\n\t}", "public function hook() {\n\t\tadd_action( 'admin_print_scripts', [ $this, 'admin_scripts' ] );\n\t\t// Elementor support.\n\t\tadd_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t// UGH! Beaver Builder hack.\n\t\tif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore\n\t\t\tadd_action( 'wp_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t}\n\n\t\tadd_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/navigation-menu/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t}", "private function process_frontend_actions() {\n\t\t\n\t\tif(is_admin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($this->is_working() && is_object($this->extras)) {\n\t\t\t$this->extras->page_load_actions();\n\t\t}\n\n\t\n\t}", "private function hooks() {\n\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// Add template folder\n\t\t\tadd_filter( 'affwp_template_paths', array( $this, 'template' ) );\n\n\t\t}", "private function _add_hooks () {\n\t\tif (!is_admin()) return false;\n\t\tif (defined('DOING_AJAX') && DOING_AJAX) return false;\n\n\t\tadd_action('admin_notices', array($this, 'dispatch_notices'));\n\t\tadd_action('upfront-admin-general_settings-versions', array($this, 'version_info'));\n\n\t\tadd_action('admin_menu', array($this, \"add_menu_item\"), 99);\n\n\t\tadd_filter('upfront-admin-admin_notices', array($this, 'process_core_notices'));\n\n\t\tadd_action('admin_init', array($this, 'initialize_dashboard'));\n\t}", "private function hooks() {\n\t\t// Register rewrite tags.\n\t\tadd_action( 'wct_add_rewrite_tags', array( $this, 'add_rewrite_tags' ) );\n\n\t\t// Register the rewrite rules\n\t\tadd_action( 'wct_add_rewrite_rules', array( $this, 'add_rewrite_rules' ) );\n\n\t\t// Register the permastructs\n\t\tadd_action( 'wct_add_permastructs', array( $this, 'add_permastructs' ) );\n\t}", "private function hooks() {\n\t\t\t// check for EDD when plugin is activated\n\t\t\tadd_action( 'admin_init', array( $this, 'activation' ), 1 );\n\t\t\t\n\t\t\t// plugin meta\n\t\t\tadd_filter( 'plugin_row_meta', array( $this, 'plugin_meta' ), null, 2 );\n\n\t\t\t// settings link on plugin page\n\t\t\tadd_filter( 'plugin_action_links_' . $this->basename, array( $this, 'settings_link' ), 10, 2 );\n\t\t\t\n\t\t\t// insert actions\n\t\t\tdo_action( 'edd_sd_setup_actions' );\n\t\t}", "public function init_hooks() {\n\t}", "private function init_hooks() {\n \n if ( $this->is_request( 'admin' ) ) {\n add_filter( 'super_settings_after_custom_js_filter', array( $this, 'add_settings' ), 10, 2 );\n }\n \n if ( $this->is_request( 'ajax' ) ) {\n add_action( 'super_before_email_success_msg_action', array( $this, 'zapier_static_web_hook' ), 5 , 1 );\n }\n \n }", "public function before_render() {}", "public function actions() {\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/hooks.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/actions.php' );\n\t\trequire_once( WPEX_FRAMEWORK_DIR .'hooks/partials.php' );\n\t}", "public function front_action() {\n\n\t\tif ( $this->is_request_to_forget() ) {\n\t\t\t$this->process_request_to_forget();\n\t\t}\n\n\t\tif ( $this->is_request_confirmation() ) {\n\t\t\t$this->process_confirm_request();\n\t\t}\n\t}", "public function register_hooks() {\n\t\t\\add_filter( 'pre_handle_404', [ $this, 'handle_404' ] );\n\t}", "public function hook()\n {\n // Add the settings tab\n// $this->on('!wprss_options_tabs', array($this, 'addTab'), null, 100);\n // Register the settings option, sections and fields\n// $this->on('!wprss_admin_init', array($this, 'register'));\n\n parent::hook();\n }", "private function hooks() {\n\n\t\t$plugin_admin = shortbuild_bu_hooks();\n add_filter( 'advanced_import_demo_lists', array( $plugin_admin, 'add_demo_lists' ), 10, 1 );\n add_filter( 'admin_menu', array( $plugin_admin, 'import_menu' ), 10, 1 );\n add_filter( 'wp_ajax_shortbuild_bu_getting_started', array( $plugin_admin, 'install_advanced_import' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_scripts' ), 10, 1 );\n\n /*Replace terms and post ids*/\n add_action( 'advanced_import_replace_term_ids', array( $plugin_admin, 'replace_term_ids' ), 20 );\n }", "private function admin_hooks() {\n\t\t\n\t\t// Actions\n\t\t// Load Nav injection\n\t\t$this->add_action ('admin_menu', $this->nav, 'plugin_menu' );\n\t\t\n\t\t// Load Dashboard widget\n\t\t$this->add_action ('wp_dashboard_setup', $this->admin, 'dashboard');\n\t\t\n\t\t// Load Edit Post additions\n\t\t// $this->add_action ('add_meta_boxes', $this->admin, 'post_edit' );\n\n\t\t// Load social toggles on submitbox, if the setting is available\n\t\t// if (get_option('smmp_view_submitbox'))\n\t\t//\t$this->add_action ('post_submitbox_misc_actions', $this->admin, 'admin_post_submitbox' );\n\t\t\n\t\t// On post update/save\n\t\t// $this->add_action ('save_post', $this->admin, 'admin_post_submitbox_submit');\n\t\t\n\t\t\n\t\t// Load Expired Account notice\n\t\t/*try {$this->admin->validate_accounts (); }\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->add_action ('admin_notices', $this->admin, 'notice_accounts' );\n\t\t}*/\n\t\t\n\t\t// Filters\n\t\t// Prevent inner links for flow-drive images\n\t\t$this->add_action ('image_downsize', $this->admin, 'filter_image_downsize', 10, 3);\n\t}", "public function hook() {\n add_filter('pre_get_document_title', [$this, 'getTitle'], 10);\n add_filter('wp_head', [$this, 'outputMetaDescription'], 1);\n add_filter('wp_head', [$this, 'ogTags'], 2 );\n }", "public function register_hooks() {\n\t\tadd_filter( 'pre_handle_404', array( $this, 'handle_404' ) );\n\t}", "public function set_hooks() {\n\t\tadd_action( 'wp_head', array( $this, 'do_meta_tags' ), 0 );\n\t\t\tadd_filter( 'document_title_parts', array( $this, 'filter__the_title_parts' ), 1, 4 );\n\t}", "public function pre_action()\n\t{\n\t\tparent::pre_action();\n\t}", "private function checkHooks()\n {\n $this->registerHook('actionFrontControllerAfterInit');\n $this->registerHook('header');\n $this->registerHook('actionAdminControllerSetMedia');\n $this->registerHook('displayHome');\n $this->registerHook('displayLeftColumn');\n $this->registerHook('displayRightColumn');\n $this->registerHook('displayFooterProduct');\n $this->registerHook('displayFooter');\n $this->registerHook('displayCustomerAccount');\n $this->registerHook('moduleRoutes');\n $this->registerHook('displayBackOfficeHeader');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionAdminMetaAfterWriteRobotsFile');\n $this->registerHook('displayAdminAfterHeader');\n $this->registerHook('actionAdminMetaAfterWriteRobotsFile');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionOutputHTMLBefore');\n return true;\n }", "private function define_hooks() {\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'hook_add_meta_boxes' ), 10, 1 );\n\n\t\tadd_action( 'save_post', array( $this, 'hook_save_post' ), 10, 1 );\n\n\t\treturn;\n\t}", "private function hooks() {\n\n\t\t\t/** Actions *******************************************************************/\n\n\t\t\t// Build the submenus.\n\t\t\tadd_action( 'admin_menu', array( $this, 'admin_menus' ), 10 );\n\n\t\t\t// Loading the talks edit screen\n\t\t\tadd_action( 'load-edit.php', array( $this, 'load_edit_talk' ) );\n\n\t\t\t// Make sure Editing a plugin's taxonomy highlights the plugin's nav\n\t\t\tadd_action( 'load-edit-tags.php', array( $this, 'taxonomy_highlight' ) );\n\n\t\t\t// Add metaboxes for the post type\n\t\t\tadd_action( \"add_meta_boxes_{$this->post_type}\", array( $this, 'add_metaboxes' ), 10, 1 );\n\t\t\t// Save metabox inputs\n\t\t\tadd_action( \"save_post_{$this->post_type}\", array( $this, 'save_metaboxes' ), 10, 3 );\n\n\t\t\t// Display upgrade notices\n\t\t\tadd_action( 'admin_notices', array( $this, 'admin_notices' ) );\n\n\t\t\t// Register the settings\n\t\t\tadd_action( 'admin_init', array( $this, 'register_admin_settings' ) );\n\n\t\t\tadd_action( 'load-settings_page_wc_talks', array( $this, 'settings_load' ) );\n\n\t\t\t// Talks columns (in post row)\n\t\t\tadd_action( \"manage_{$this->post_type}_posts_custom_column\", array( $this, 'column_data' ), 10, 2 );\n\n\t\t\t// Maybe neutralize quick edit\n\t\t\tadd_action( 'post_row_actions', array( $this, 'talk_row_actions' ), 10, 2 );\n\n\t\t\t// Do some global stuff here (custom css rule)\n\t\t\tadd_action( 'admin_head', array( $this, 'admin_head' ), 10 );\n\n\t\t\t/** Filters *******************************************************************/\n\n\t\t\t// Updated message\n\t\t\tadd_filter( 'post_updated_messages', array( $this, 'talks_updated_messages' ), 10, 1 );\n\t\t\tadd_filter( 'bulk_post_updated_messages', array( $this, 'talks_updated_bulk_messages' ), 10, 2 );\n\n\t\t\t// Redirect\n\t\t\tadd_filter( 'redirect_post_location', array( $this, 'redirect_talk_location' ), 10, 2 );\n\n\t\t\t// Filter the WP_List_Table views to include custom views.\n\t\t\tadd_filter( \"views_edit-{$this->post_type}\", array( $this, 'talk_views' ), 10, 1 );\n\n\t\t\t// temporarly remove bulk edit\n\t\t\tadd_filter( \"bulk_actions-edit-{$this->post_type}\", array( $this, 'talk_bulk_actions' ), 10, 1 );\n\n\t\t\t// Talks column headers.\n\t\t\tadd_filter( \"manage_{$this->post_type}_posts_columns\", array( $this, 'column_headers' ) );\n\n\t\t\t// Add a link to About & settings page in plugins list\n\t\t\tadd_filter( 'plugin_action_links', array( $this, 'modify_plugin_action_links' ), 10, 2 );\n\n\t\t\t/** Specific case: ratings ****************************************************/\n\n\t\t\t// Only sort by rates & display people who voted if ratings is not disabled.\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\tadd_action( \"manage_edit-{$this->post_type}_sortable_columns\", array( $this, 'sortable_columns' ), 10, 1 );\n\n\t\t\t\t// Manage votes\n\t\t\t\tadd_filter( 'wct_admin_get_meta_boxes', array( $this, 'ratings_metabox' ), 9, 1 );\n\t\t\t\tadd_action( 'load-post.php', array( $this, 'maybe_delete_rate' ) );\n\n\t\t\t\t// Custom feedback\n\t\t\t\tadd_filter( 'wct_admin_updated_messages', array( $this, 'ratings_updated' ), 10, 1 );\n\n\t\t\t\t// Help tabs\n\t\t\t\tadd_filter( 'wct_get_help_tabs', array( $this, 'rates_help_tabs' ), 11, 1 );\n\t\t\t}\n\t\t}", "public function hookHeader()\n {\n // $this->context->controller->addJS('http://code.jquery.com/jquery-2.1.4.min.js');\n // $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js');\n $this->context->controller->addJS($this->_path.'views/js/front.js');\n $this->context->controller->addCSS($this->_path.'views/css/front.css');\n\n $this->context->controller->addJS($this->_path.'views/js/responsiveslides.js');\n $this->context->controller->addCSS($this->_path.'views/css/responsiveslides.css');\n $this->context->controller->addCSS($this->_path.'views/css/themes.css');\n }", "private static function init_hooks() {\n\t\tself::$initiated = true;\n\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'theme_styles' ) );\n\t\tadd_action( 'wp_enqueue_scripts', array('mptheme_functions', 'mptheme_enqueue') );\n\n\t\t// If a Google Analytics ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_google_analytics_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_google_analytics_code' ) );\n\t\t}\n\n\t\t// If a Facebook Pixel ID is defined, add the code to the head\n\t\tif ( get_option( 'mptheme_facebook_pixel_id' ) ){\n\t\t\tadd_action( 'wp_head', array( 'mptheme_functions', 'mptheme_facebook_pixel_code' ) );\n\t\t}\n\n\t}", "private function define_admin_hooks()\n {\n $this->loader->add_action('init',$this,'load_options');\n $this->loader->add_action('plugins_loaded','WordPress_Reactro_Admin', 'load_framework');\n }", "protected function callRenderHook() {}", "public function hookHeader()\n\t{\n\t\t$this->context->controller->addJS($this->_path.'/views/js/front.js');\n\t\t$this->context->controller->addCSS($this->_path.'/views/css/front.css');\n\t}", "public function hooks() {\n\t\t\\add_filter( 'the_generator', '__return_false' );\n\t\t\\remove_action('wp_head', 'wp_generator');\n\t}", "private function add_hooks(){\n\t\n\t\tadd_action( 'plugin_action_links_' . UCLACOMPONENTSWP_PLUGIN_BASE, array( $this, 'add_plugin_action_link' ), 20 );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_backend_scripts_and_styles' ), 20 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_scripts_and_styles' ), 20 );\n\t\n\t}", "static function hooks() {\n\t\tadd_action( 'after_setup_theme', __CLASS__ . '::custom_header' );\n\n\t\t// Setup the Theme Customizer settings and controls...\n\t\tadd_action( 'customize_register', __CLASS__ . '::register' );\n\n\t\t// Output custom CSS to live site\n\t\tadd_action( 'wp_head', __CLASS__ . '::header_output' );\n\t}", "public static function initHooks() {\n\t\t$m = self::pw('modules')->get('DpagesMar');\n\n\t\t$m->addHook('Page(pw_template=arproc)::subfunctionUrl', function($event) {\n\t\t\t$event->return = self::subfunctionUrl($event->arguments(0));\n\t\t});\n\n\t\t$m->addHook('Page(pw_template=arproc)::arprocUrl', function($event) {\n\t\t\t$event->return = self::arprocUrl($event->arguments(0));\n\t\t});\n\n\t\t$m->addHook('Page(pw_template=arproc)::glmainUrl', function($event) {\n\t\t\t$event->return = self::glmainUrl($event->arguments(0));\n\t\t});\n\t}", "protected function wp_hooks() {\n\t\tadd_action( 'category_add_form_fields', array( &$this, 'setup_add_category_form_view' ), 10 );\n\n\t\t// Display populated custom form fields while editing a category\n\t\tadd_action( 'category_edit_form_fields', array( &$this, 'setup_edit_category_form_view' ), 10, 2 );\n\n\t\t// Save custom form field data when category is created\n\t\tadd_action( 'created_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Save custom form field data when category is edited\n\t\tadd_action( 'edited_category', array( &$this, 'save_category_form' ), 10, 2 );\n\n\t\t// Delete custom form field data when a category is deleted\n\t\tadd_action( 'delete_category', array( &$this, 'delete_category_form_data' ) );\n\n\t}", "public function register_hooks() {\n\t\tadd_filter( 'acf/pre_render_fields', array( $this, 'fields_on_translated_options_page' ), 10, 2 );\n\t\tadd_filter( 'acf/update_value', array( $this, 'overwrite_option_value' ), 10, 4 );\n\t\tadd_filter( 'acf/validate_post_id', [ $this, 'append_language_code_for_option_pages' ] );\n\t}", "public function init_hooks() {\n\t\tadd_action( 'vc_after_mapping', array( $this, 'vc_after_mapping' ) );\n\t}", "function onRequest(){\n\n\t// check if we need to reload the application\n\tcheckApplicationState();\n\n\t// initialize the ViewSate for every request\n\tsetViewState( getFactory()->getBean( 'ViewState' ) );\n\n\t// decide what to do, the front controller\n\thandleAction();\n\n\t// render the application\n\trenderApplication();\n}", "public function preDispatch();", "public function hook()\n {\n \\add_action(\n $this->tag,\n $this->callback,\n $this->priority,\n $this->acceptedParams\n );\n }", "private function hooks() {\n\n\t\t// Filter hook to add custom meta box.\n\t\tadd_filter( 'rwmb_meta_boxes', array( $this, 'wpcd_team_register_meta_boxes' ), 10, 1 );\n\n\t\t// Load up css and js scripts used for managing this cpt data screens.\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 10, 1 );\n\n\t\t// Filter to force post status to private.\n\t\tadd_filter( 'wp_insert_post_data', array( $this, 'wpcd_team_force_type_private' ), 10, 1 );\n\n\t\t// Action hook on save post.\n\t\tadd_action( 'save_post', array( $this, 'wpcd_team_save_post' ), 10, 1 );\n\n\t\t// Filter hook to filter team listing.\n\t\tadd_filter( 'parse_query', array( $this, 'wpcd_team_parse_query' ), 10, 1 );\n\n\t\t// Action hook to check if user has permission to edit teams.\n\t\tadd_action( 'load-post.php', array( $this, 'wpcd_team_load_post' ) );\n\n\t\t// Filter hook to change post count on team listing screen based on logged in users permissions.\n\t\tadd_filter( 'views_edit-wpcd_team', array( $this, 'wpcd_team_custom_view_count' ), 10, 1 );\n\n\t\t// Action hook to check if user has capability to access team listing or add new team page.\n\t\tadd_action( 'load-edit.php', array( $this, 'wpcd_team_load_edit_post_new' ) );\n\t\tadd_action( 'load-post-new.php', array( $this, 'wpcd_team_load_edit_post_new' ) );\n\n\t\t// Action hook to add custom back to list button.\n\t\tadd_action( 'admin_footer-post.php', array( $this, 'wpcd_team_backtolist_btn' ) );\n\t\tadd_action( 'admin_footer-post-new.php', array( $this, 'wpcd_team_backtolist_btn' ) );\n\n\t\t// Action hook to register custom meta box for team.\n\t\tadd_action( 'add_meta_boxes', array( $this, 'meta_boxes' ) );\n\n\t\t// Filter hook to add new columns.\n\t\tadd_filter( 'manage_wpcd_team_posts_columns', array( $this, 'wpcd_team_table_head' ), 10, 1 );\n\n\t\t// Action hook to add values in new columns.\n\t\tadd_action( 'manage_wpcd_team_posts_custom_column', array( $this, 'wpcd_team_table_content' ), 10, 2 );\n\n\t\t// Filter hook to change Publish button text.\n\t\tadd_filter( 'gettext', array( $this, 'wpcd_team_text_filter' ), 20, 3 );\n\n\t\t// Action hook to remove team permissions from custom table.\n\t\tadd_action( 'wp_trash_post', array( $this, 'wpcd_team_delete_post' ), 10, 1 );\n\n\t\t// Action hook to restore team permissions to custom table.\n\t\tadd_action( 'untrashed_post', array( $this, 'wpcd_team_untrashed_post' ), 10, 1 );\n\n\t\t// Action hook to show custom section on user profile screen.\n\t\tadd_action( 'show_user_profile', array( $this, 'wpcd_team_user_profile_section' ), 10, 1 );\n\t\tadd_action( 'edit_user_profile', array( $this, 'wpcd_team_user_profile_section' ), 10, 1 );\n\n\t\t// Action hook to check the rules before saving the post.\n\t\tadd_action( 'rwmb_wpcd_team_permissions_before_save_post', array( $this, 'wpcd_team_permissions_before_save_post' ), 10, 1 );\n\n\t}", "public function registerHooks() {\n\t\t// Nothing to do here right now\n\t\t// Others might want to know about this and get a chance to do their own work (like messing with our's :) )\n\t\tdo_action( 'pixelgrade_portfolio_registered_hooks' );\n\t}", "public function _before_render() {\n $this->before_render();\n App::Module('Hook')->getHandler('Callback', 'before_render');\n if (App::AdminManager()->isLoggedIn()) {\n $this->before_adminpanel_render();\n App::Module('Hook')->getHandler('Callback', 'before_adminpanel_render');\n }\n }", "public function pre_dispatch()\n\t{\n\t\tloadTemplate('PortalArticles');\n\t\trequire_once(SUBSDIR . '/PortalArticle.subs.php');\n\t}", "public function hooks()\n {\n foreach ($this->getActions() as $key => $action) {\n switch (true) {\n case $action instanceof HooksAdminInterface:\n if (is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksFrontInterface:\n if (!is_admin()) {\n $action->hooks();\n }\n break;\n case $action instanceof HooksInterface:\n $action->hooks();\n break;\n }\n }\n }", "static public function setup_hooks() {\n\n\t\tif ( ! class_exists( 'FLBuilder' ) ) {\n\t\t\treturn;\t\n\t\t}\n\n\t\tif(\n\t\t\tisset($_GET) && isset($_GET['fl_builder'])\t// phpcs:ignore\n\t\t) {\n\n\t\t\t// Disable debug\n\t\t\tadd_filter('wsf_debug_enabled', function($debug_render) { return false; }, 10, 1);\n\n\t\t\t// Enqueue all WS Form scripts\n\t\t\tadd_action('wp_enqueue_scripts', function() { do_action('wsf_enqueue_core'); });\n\t\t}\n\t\t\n\t\t// Load custom modules.\n\t\tadd_action( 'init', __CLASS__ . '::load_modules' );\n\t}", "public function replace_3rd_party_pugins_hooks(){\n }", "public function boot()\r\n\t{\r\n RC_Hook::add_action('handle_404_error', function ($msg, $url = null) {\r\n ErrorDisplay::http_error(404, $msg);\r\n });\r\n\r\n RC_Hook::add_action('handle_500_error', function ($msg, $url = null) {\r\n ErrorDisplay::http_error(500, $msg);\r\n });\r\n\t}", "function hooks()\r\n {\r\n // Add a settings link next to the \"Deactivate\" link on the plugin listing page\r\n add_filter( 'plugin_action_links_cart-converter/cart-converter.php', array( &$this, 'plugin_action_links' ) );\r\n \t\r\n // woo order status changed\r\n \tadd_action( 'woocommerce_order_status_failed', array( &$this->cartController, 'add_abandon_cart' ) );\r\n add_action( 'woocommerce_order_status_changed', array( &$this->cartController, 'order_status_changed' ), 10, 3);\r\n\t\t\r\n // place order when create new from cart_id\r\n add_action( 'woocommerce_checkout_order_processed', array( &$this->cartController, 'convert_place_order' ), 10, 3);\r\n\r\n // restore cart from email\r\n add_action( 'plugins_loaded', array( &$this, 'plugins_loaded' ) );\r\n\r\n do_action( 'cart_converter_main_hooks_action' );\r\n }", "public static function add_hooks_action() {\n\t\t\tif ( self::$options_page_id !== optionsframework_get_cur_page_id() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Setup custom dependencies.\n\t\t\tadd_filter( 'of_localized_vars', array( __CLASS__, 'of_localized_vars_filter' ) );\n\n\t\t\tadd_filter( 'of_get_default_values', array( __CLASS__, 'override_options_filter' ) );\n\t\t\tadd_filter( 'optionsframework_get_validated_options', array(\n\t\t\t\t__CLASS__,\n\t\t\t\t'optionsframework_get_validated_options_filter',\n\t\t\t), 10, 2 );\n\n\t\t\tif ( self::wizard_start_from_scratch() ) {\n\t\t\t\tadd_filter( 'optionsframework_fields_saved_settings-' . self::$options_page_id, array(\n\t\t\t\t\t__CLASS__,\n\t\t\t\t\t'optionsframework_fields_saved_settings_filter',\n\t\t\t\t) );\n\t\t\t\tadd_action( 'optionsframework_after_options', array( __CLASS__, 'wizard_mode_hidden_fields_action' ) );\n\t\t\t\tadd_action( 'optionsframework_before', array( __CLASS__, 'optionsframework_before_action' ) );\n\t\t\t} else {\n\t\t\t\tadd_action( 'optionsframework_after', array( __CLASS__, 'print_wizard_mode_selector_action' ) );\n\t\t\t\tadd_action( 'admin_enqueue_scripts', array( __CLASS__, 'admin_enqueue_scripts_action' ) );\n\t\t\t}\n\t\t}", "public function load_hooks($category) {\n\n // Load the component's language files\n $this->CI->lang->load( 'frontend', $this->CI->config->item('language'), FALSE, TRUE, MIDRUB_BASE_ADMIN_FRONTEND);\n\n // Load hooks by category\n switch ($category) {\n\n case 'auth_init':\n case 'frontend_init':\n\n \n break;\n case 'admin_init':\n\n // Require the contents_categories functions file\n require_once MIDRUB_BASE_PATH . 'inc/contents/contents_categories.php';\n\n // Require the frontend_pages functions file\n require_once MIDRUB_BASE_PATH . 'inc/pages/frontend_pages.php';\n\n // Verify if user has opened the frontend component\n if ( md_the_component_variable('component') === 'frontend' ) {\n\n // Require the contents_categories file\n require_once MIDRUB_BASE_ADMIN_FRONTEND . 'inc/contents_categories.php';\n\n // Require the frontend_pages file\n require_once MIDRUB_BASE_ADMIN_FRONTEND . 'inc/frontend_pages.php';\n\n }\n\n break;\n\n }\n\n }", "public function addHooks() {\n\t\tadd_action( 'after_setup_theme', array( $this, 'bufferStart' ) );\n\t\tadd_action( 'wp_shutdown', array( $this, 'bufferEnd' ) );\n\t}", "public function add_hooks_and_filters() {\n\t\t\t$this->debugMP('msg',__FUNCTION__ . ' started JdB');\n\t\t parent::add_hooks_and_filters();\n\n\t\t\t/**\n\t\t\t * Simplify the Gravity Forms action and filters\n\t\t\t *\n\t\t\t */\n//\t\t\tadd_filter( 'gform_entry_info', array( $this, 'slp_gfl_gform_entry_info' ), 10, 2 );\n\n//\t\t\tadd_action( 'gform_entry_post_save', array( $this, 'slp_gfl_gform_entry_post_save' ), 10, 2 );\n\t\t}", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/front.js');\n $this->context->controller->addCSS($this->_path.'/views/css/front.css');\n }", "public function set_hooks()\n\t{\n\t\tadd_action('init', 'register_shortcodes');\n\t}", "public function preDispatch() { }", "private function define_public_hooks()\n {\n \n $this->loader->add_action('wp_enqueue_scripts','WordPress_Reactro_Public','enqueue_styles');\n $this->loader->add_action('wp_enqueue_scripts','WordPress_Reactro_Public','enqueue_scripts');\n $this->loader->add_action('admin_enqueue_scripts','WordPress_Reactro_Public','enqueue_scripts');\n $this->loader->add_action('admin_enqueue_scripts','WordPress_Reactro_Public','enqueue_styles');\n $this->loader->add_action('wp_footer','WordPress_Reactro_Public','add_popup');\n $this->loader->add_action('admin_footer','WordPress_Reactro_Public','add_popup');\n }", "private function hooks() {\n // stripe non3ds refund\n add_action( 'dokan_refund_request_created', [ $this, 'process_refund' ] );\n add_filter( 'dokan_refund_approve_vendor_refund_amount', [ $this, 'vendor_refund_amount_non_3ds' ], 10, 3 );\n add_action( 'dokan_refund_approve_before_insert', [ $this, 'add_vendor_withdraw_entry_non_3ds' ], 10, 3 );\n\n // process 3ds refund\n add_action( 'dokan_refund_request_created', [ $this, 'process_3ds_refund' ] );\n add_filter( 'dokan_refund_approve_vendor_refund_amount', [ $this, 'vendor_refund_amount_3ds' ], 10, 3 );\n add_action( 'dokan_refund_approve_before_insert', [ $this, 'add_vendor_withdraw_entry_3ds' ], 10, 3 );\n }", "private function dld_define_admin_hooks()\n {\n\n $this->dld_admin_settings();\n }", "abstract function HookEvents();", "private function init_hooks() {\n\t\tadd_action( 'plugins_loaded', array( $this, 'localization' ) );\n\t\tadd_action( 'plugins_loaded', array( $this, 'includes' ) );\n\t\tadd_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );\n\t\t\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'load_custom_scripts'));\n\n\t}", "public function init_hooks() {\r\n add_action('wp_ajax_labb_admin_ajax', array($this, 'labb_admin_ajax'));\r\n // Load admin ajax js script\r\n add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));\r\n\r\n }", "protected function _post_render() {\n\t\n\t\t// Silence is golden\n\t\n\t}", "public function preDispatch() {\n\t\t\n\t\t}", "private function define_admin_hooks() {\n\n add_action('init', array($this, 'image_sizes'), 10, 0);\n add_action('admin_init', array($this, 'get_to_demo_data'), 10);\n\n add_action('admin_enqueue_scripts', array($this, 'admin_style_scripts'));\n add_action('wp_enqueue_scripts', array($this, 'front_style_scripts'), 95);\n\n add_action('add_meta_boxes', 'careerfy_page_header_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_subheader_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_view_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_title_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_page_layout_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_post_layout_meta_boxes');\n add_action('add_meta_boxes', 'careerfy_post_settings_meta_boxes');\n }", "protected function set_hooks() {\n\t\tparent::set_hooks();\n\n\t\t// Dashboard reports\n\t\tadd_action('woocommerce_dashboard_status_widget_sales_query', array($this, 'woocommerce_dashboard_status_widget_sales_query'), 10, 1);\n\t}", "function sherpa_backend_scripts() {\r\n\t\r\n\tsherpa_front_and_backend_scripts();\r\n}", "private function init_hooks() {\n\t\t\tadd_action( 'init', array( $this, 'init' ), 0 );\n\t\t}", "public function add_hooks() {\n\t\tadd_filter( 'theme_root_uri', array( $this, 'rewrite' ), 99, 1 );\n\t\tadd_filter( 'plugins_url', array( $this, 'rewrite' ), 99, 1 );\n\n\t\t// add rewrite filters for misc scripts and styles\n\t\tadd_filter( 'script_loader_src', array( $this, 'rewrite' ), 99, 1 );\n\t\tadd_filter( 'style_loader_src', array( $this, 'rewrite' ), 99, 1 );\n\t\treturn true;\n\t}", "protected function setup_hooks() {\n\t\tadd_action( 'wp_ajax_nopriv_load_more', [ $this, 'ajax_script_post_load_more' ] );\n\t\tadd_action( 'wp_ajax_load_more', [ $this, 'ajax_script_post_load_more' ] );\n\n\t\t/**\n\t\t * Create a short code.\n\t\t *\n\t\t * Usage echo do_shortcode('[post_listings]');\n\t\t */\n\t\tadd_shortcode( 'post_listings', [ $this, 'post_script_load_more' ] );\n\t}", "public function installHooks()\n {\n if (\\current_user_can('edit_posts') || $this->isWpCLI()) {\n \\add_action('future_to_publish', [$this, 'handleFutureToPublish']);\n\n foreach ($this->getConfig()->allowedPostTypes() as $postType) {\n \\add_action(\"rest_after_insert_{$postType}\", [$this, 'handleRestUpdatePost']);\n }\n\n \\add_action('save_post', [$this, 'handleSavePost'], 99, 1);\n\n \\add_action('transition_post_status', [$this, 'handleTransitionPostStatus'], 99, 3);\n \\add_action('trashed_post', [$this, 'handleTrashedPost']);\n\n\n \\add_action('swiftype_batch_post_index', [$this, 'handlePostBatchIndex']);\n \\add_action('swiftype_batch_post_delete', [$this, 'handlePostBatchDelete']);\n }\n }", "public function preDispatch()\n {\n if (!in_array($this->Request()->getActionName(), ['index', 'load'])) {\n $this->Front()->Plugins()->Json()->setRenderer(true);\n }\n }", "function udesign_blog_entry_before() {\r\n do_action('udesign_blog_entry_before');\r\n}", "public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}", "function udesign_entry_before() {\r\n do_action('udesign_entry_before');\r\n}", "public function load_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'addons_page_init' ] );\n\n\t\t$this->add_settings_tabs();\n\t}", "abstract protected function register_hook_callbacks();", "protected function add_hooks() {\n\t\t// hooks always active for the gateway\n\t\tadd_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );\n\n\t\tif ( 'no' === $this->enabled ) {\n\t\t\treturn;\n\t\t}\n\t\t// hooks only active when the gateway is enabled\n\t\tadd_filter( 'woocommerce_credit_card_form_fields', array( $this, 'woocommerce_credit_card_form_fields' ) );\n\n\t\tif ( is_add_payment_method_page() ) {\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'tokenization_script' ) );\n\t\t}\n\t}", "public function hookBackOfficeHeader()\n\t{\n\t\tif (Tools::getValue('module_name') == $this->name) {\n\t\t\t$this->context->controller->addJS($this->_path.'views/js/back.js');\n\t\t\t$this->context->controller->addCSS($this->_path.'views/css/back.css');\n\t\t}\n\t}", "public static function initHooks() {\n\t\t$m = self::pw('modules')->get('WarehouseManagement');\n\n\t\t$m->addHook('Page(pw_template=whse-find-item)::printableUrl', function($event) {\n\t\t\t$event->return = self::printableUrl($event->arguments(0));\n\t\t});\n\t}", "protected function hook1(): void { }", "public function init_hooks() {\n add_action( 'dokan_settings_form_bottom', [ $this, 'dokan_live_chat_seller_settings' ], 15, 2 );\n add_action( 'dokan_store_profile_saved', [ $this, 'dokan_live_chat_save_seller_settings' ], 15 );\n }", "public function hookBackOfficeHeader()\n {\n if (Tools::getValue('module_name') == $this->name) {\n $this->context->addJS($this->_path.'views/js/back.js');\n $this->context->addCSS($this->_path.'views/css/back.css');\n $this->context->addJS($this->_path.'views/fonts/back.js');\n $this->context->controller->addCSS($this->_path.'views/css/jquery.dataTables.css');\n }\n }", "public static function hooks() {\n add_filter( 'inbound_menu_debug' , array (__CLASS__ , 'load_debug_links') , 10 , 2);\n }", "public function actions() {\n\t\tadd_action( 'wp_loaded', array( $this, 'generate_data' ) );\n\t\tadd_action( 'wp_loaded', array( $this, 'update_storage_site' ) );\n\t\tadd_action( 'wp_loaded', array( $this, 'update_storage_network' ) );\n\t}", "function registerHooks()\n{\n add_action('after_setup_theme', 'setupTheme');\n add_action('rest_api_init', 'registerEndpoints');\n}", "public function attach_hooks() {\n\t\t$this->define_hooks();\n\t}", "public function preAction()\n {\n // Nothing to do\n }", "public function hookHeader()\n {\n $this->context->controller->addJS($this->_path.'/views/js/owl.carousel.min.js');\n $this->context->controller->addCSS($this->_path.'/views/css/owl.carousel.min.css');\n\n $this->context->controller->addJS($this->_path.'/views/js/mf.custom.js');\n $this->context->controller->addCSS($this->_path.'/views/css/mf.theme.default.css');\n\n }" ]
[ "0.73553926", "0.7351351", "0.7144857", "0.7142881", "0.6959278", "0.6947165", "0.6947165", "0.6907112", "0.6907112", "0.6906859", "0.6787915", "0.6769804", "0.6647995", "0.6636283", "0.6614996", "0.66040915", "0.65965945", "0.6595412", "0.6583879", "0.65798604", "0.6573805", "0.6573366", "0.65615916", "0.65528476", "0.6514155", "0.64996284", "0.64926803", "0.64723945", "0.6439324", "0.6426243", "0.64219576", "0.6420157", "0.6417403", "0.6395302", "0.6382797", "0.63714176", "0.637122", "0.63688016", "0.6368328", "0.63596827", "0.6354114", "0.6354061", "0.6343897", "0.63254094", "0.63056034", "0.6296005", "0.6293845", "0.62905794", "0.62872", "0.6283013", "0.6273684", "0.6259787", "0.6255728", "0.6249067", "0.62341285", "0.62298673", "0.6220544", "0.6218334", "0.62099993", "0.6197672", "0.61949176", "0.6192673", "0.6188712", "0.61837435", "0.61837435", "0.61837435", "0.61758935", "0.61706865", "0.6157588", "0.6142035", "0.6138668", "0.6131363", "0.6123721", "0.61200386", "0.6118918", "0.6116132", "0.61124533", "0.61073744", "0.61024886", "0.6100457", "0.60954636", "0.60954624", "0.609382", "0.6089575", "0.60814595", "0.6066697", "0.60663605", "0.6064501", "0.60631907", "0.6061451", "0.6055051", "0.6054308", "0.6053679", "0.60515654", "0.6049668", "0.6029128", "0.60281825", "0.6027666", "0.6021028", "0.6019296", "0.6017602" ]
0.0
-1
Enques my scripts (css and js).
public function myScripts() { //wp_register_script('angularjs',plugins_url('bower_components/angular/angular.min.js', __FILE__)); wp_enqueue_style('grimagecss', plugins_url('style.css', __FILE__)); //wp_enqueue_script('grimagescripts',plugins_url('/app.js',__FILE__)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function frontEndStyleScripts(): void\n {\n wp_enqueue_style('users-data-bootstrap', plugin_dir_url(dirname(__FILE__)) . 'assets/css/bootstrap.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-fontawsome', plugin_dir_url(dirname(__FILE__)) . 'assets/css/font-awesome.min.css', [], UsersListing::getVersion());\n wp_enqueue_style('users-data-styles', plugin_dir_url(dirname(__FILE__)) . 'assets/css/users-data.css', [], UsersListing::getVersion());\n //\n wp_enqueue_script('jquery-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/jquery.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('jquery-popper', plugin_dir_url(dirname(__FILE__)) . 'assets/js/popper.min.js', ['jquery'], UsersListing::getVersion(), false);\n wp_enqueue_script('bootstrap-min', plugin_dir_url(dirname(__FILE__)) . 'assets/js/bootstrap.min.js', ['jquery'], UsersListing::getVersion(), false);\n }", "static function enqueue_scripts(){\n\t\tself::include_css();\n\t\tself::include_js();\n\t}", "private function __register_scripts() {\n\t\t// Load all the registered scripts\n\t\t$assets_loader = new SwpmvcAssetsLoader();\n\t\t$assets = $assets_loader->fn_load_scripts();\n\n\t\t//Extract CSS Assets and put them into Registered CSS Container\n\t\t$this->registered_css = $assets[ 'css' ];\n\n\t\t//Extract JS Assets and put them into Registered JS Container\n\t\t$this->registered_js = $assets[ 'js' ];\n\n\t\t//Some cleanup\n\t\tunset($assets_loader);\n\t\tunset($assets);\n\n\t\t//Load all the common CSS and JS which will be required for all the pages.\n\t\t$this->fn_load_scripts();\n\t}", "function register_scripts() {\n\t\t\t$id = get_the_ID();\n\t\t\t// Only continue if current page is home\n\t\t\tif ( !is_home() ) return;\n\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'kevinw-sf-react', plugins_url( 'assets/react.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\twp_enqueue_script( 'kevinw-sf-react-app', plugins_url( 'assets/scripts.min.js', KEVINW_SF_FILE ), array(), false, true );\n\t\t\n\t\t\t$this->register_scripts_css();\n\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}", "public function add_scripts_and_styles()\n {\n // Estilos css \n wp_register_style( 'wiAjustesStyles', WI_PLUGIN_URL . '/style.css', null, WI_VERSION );\n wp_enqueue_style( 'wiAjustesStyles' );\n\n // Scripts de javascript\n wp_enqueue_script('wiAjustesStylesJs', WI_PLUGIN_URL . '/script.js' , array('jquery'));\n }", "public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_style( 'elementor-editor-style', plugins_url( '/assets/editor.css', __FILE__ ) ); // Editor Style\n\t\t\n\t}", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/[email protected]/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool additive_script_debug\n\t */\n\t$debug = apply_filters( 'additive_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'additive',\n\t\tADDITIVE_TEMPLATE_URL . \"/assets/js/additive{$min}.js\",\n\t\tarray(),\n\t\tADDITIVE_VERSION,\n\t\ttrue\n\t);\n}", "function mandiberg_scripts() {\n\n\t\t//include bootstrap:\n\t\twp_register_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css' );\n\t\twp_enqueue_style( 'bootstrap-style');\n\n\n\n\t\t// Register the style like this for a theme:\n\t wp_register_style( 'mandiberg-style', get_template_directory_uri() . '/style.css', array(), '20120208', 'all' );\n\t\twp_enqueue_style( 'mandiberg-style');\n\n\t\t//barba js for transitions\n\n\t\t wp_register_script('barba', get_template_directory_uri() . '/build/barba.min.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('barba');\n\n\t\t//js\n\t\twp_register_script('js-file', get_template_directory_uri() . '/build/script.js', array ( 'jquery' ),'1.1', true);\n\t\t wp_enqueue_script('js-file');\n\n\t}", "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function includeAssets()\n {\n $this->Html->script('CkTools.vendor/tinymce/jquery.tinymce.min.js', ['block' => true]);\n $this->Html->script('CkTools.vendor/moxiemanager/js/moxman.loader.min.js', ['block' => true]);\n }", "public function add_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'heweb17',\n\t\t\tplugins_url( '/js/heweb17.js', __FILE__ ),\n\t\t\tarray( 'jquery' ) );\t}", "public function scripts()\n\t\t{\n\t\t}", "public function scripts() {\n\t\tif ( get_post_type() == 'agenda' && ! is_single() ) {\n\t\t\twp_enqueue_script( 'jquery' );\n\t\t\twp_enqueue_script( 'events-calendar', plugins_url( 'assets/js/calendar.js', plugin_dir_path( __FILE__ ) ), array( 'jquery' ), '', true );\n\t\t\twp_enqueue_style( 'events-calendar-styles', plugins_url( 'assets/css/calendar.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t\t}\n\n\t\twp_enqueue_style( 'timeline-styles', plugins_url( 'assets/css/timeline.css', plugin_dir_path( __FILE__ ) ), array(), '' );\n\t}", "private function fn_load_scripts() {\n\n\t\t/**\n\t\t * Load Common CSS and JS for a blank Page\n\t\t */\n\n\t\t$fixed_version = $this->fixed_version;\n\t\t$common_css_version = '0.3';\n\t\t$common_js_version = '0.1';\n\t\t$custom_css_version = '0.4';\n\t\t$custom_js_version = '0.4';\n\n\t\t$registered_styles = $this->registered_css;\n\t\t$registered_scripts = $this->registered_js;\n\n\t\t/**\n\t\t * Load CSS--------------------------------------------------------------\n\t\t */\n\n /** Load Google Fonts */\n\t\t$this->google_fonts['google_opensans'] = $registered_styles['google_opensans'];\n\n\t\t/** Load CSS Assets @todo Move the components in their containers */\n\t\t\n\t\t$this->css_assets['bootstrap'] = $registered_styles['bootstrap'].\"?ver=\".$fixed_version;\n\t\t$this->css_assets['fontawesome'] = $registered_styles['fontawesome'].\"?ver=\".$fixed_version;\n\t\t\n\t\t/**\n\t\t * Load JS--------------------------------------------------------------\n\t\t */\n\t\t\n\t\t/** Load footer js **/\n\t\t$this->footer_js['jquery'] = $registered_scripts['jquery'].\"?ver=\".$fixed_version;\t\t\n\t\t$this->footer_js['jquery-ui'] = $registered_scripts['jquery-ui'].\"?ver=\".$fixed_version;\n\n\t\t$this->footer_js['bootstrap'] = $registered_scripts['bootstrap'].\"?ver=\".$fixed_version;\n\t\t/**let other controllers load their own css/js files **/\n\t}", "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/scripts.min.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}", "function hugomitoire_scripts() {\n wp_enqueue_style( 'appStyles', get_template_directory_uri() . '/dist/css/style.min.css' );\n wp_enqueue_script( 'Js', get_template_directory_uri() . '/dist/js/all.js', array(), '1.0.0', true );\n wp_enqueue_script( 'Swiper', get_template_directory_uri() . '/dis/js/all.js', array(), '4.4.2', true);\n}", "public function frontendScripts() {\r\n global $Tema;\r\n \r\n // Adiciona os scripts\r\n wp_enqueue_script('startr-slider-js', $Tema->URL('modules/slider/assets/idangerous.swiper.min.js'));\r\n \r\n // Adicionamos o CSS também\r\n wp_enqueue_style('startr-slider-css', $Tema->URL('modules/slider/assets/idangerous.swiper.css'));\r\n }", "function scripts(){\n\n\t\t// this handy function checks a post or page to see if your component exists beore enqueueing assets\n\t\tif ( function_exists('aesop_component_exists') && aesop_component_exists('reveal') ) {\n\n\t\t\twp_enqueue_style('reveal-style', \t\tAESOP_REVEAL_URL.'/css/twentytwenty.css', AESOP_REVEAL_VERSION );\n\t\t\twp_enqueue_script('reveal-script', \t\tAESOP_REVEAL_URL.'/js/jquery.event.move.js', array('jquery'), AESOP_REVEAL_VERSION, true);\n\t\t\twp_enqueue_script('reveal-script-more', AESOP_REVEAL_URL.'/js/jquery.twentytwenty.js', array('jquery'), AESOP_REVEAL_VERSION, true);\n\n\t\t}\n\n\t}", "public function registerScripts()\r\n\t{\r\n\t\twp_register_style('social-shares', plugins_url('assets/social-shares.css', __FILE__));\r\n\t\twp_register_script('social-shares', plugins_url('assets/social-shares.js', __FILE__), array('jquery'), false, true);\r\n\t}", "public function register_scripts()\n {\n wp_register_style(\n 'fau-oembed-style',\n plugins_url('assets/css/fau-oembed.css', plugin()->getBasename()),\n [],\n plugin()->getVersion()\n ); \n }", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "public function enqueueScripts(){}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-hello-world', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );\n\t}", "function nameless_sheep_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'nameless_sheep-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n\n\t\twp_enqueue_script( 'jquery' );\n\t}", "public function wcufd_load_styles_scripts() {\n //main script file of the plugin\n wp_register_script( 'wcufd-front-end-js', plugins_url( 'js/wcufd-script.js',__FILE__ ), array('jquery'), '', true );\n wp_localize_script( 'wcufd-front-end-js', 'wcufd_vars', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'current_user_can' => current_user_can('administrator')\n )\n );\n wp_register_style( 'wcufd-front-end-style', plugins_url( 'css/wcufd-style.css',__FILE__ ) );\n }", "function alpha_scripts() {\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\t// Register scripts\n\t\twp_register_script( 'bootstrap-js', 'http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js', array( 'jquery' ), false, true );\n\t\twp_register_script( 'alpha-custom', SCRIPTS . '/scripts.js', array( 'jquery' ), false, true );\n\n\t\t// Load the custom scripts\n\t\twp_enqueue_script( 'bootstrap-js' );\n\t\twp_enqueue_script( 'alpha-custom' );\n\n\t\t// Load the stylesheets\n\t\twp_enqueue_style( 'font-awesome', THEMEROOT . '/css/font-awesome.min.css' );\n\t\twp_enqueue_style( 'alpha-master', THEMEROOT . '/css/master.css' );\n\t}", "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "public function enqueue_scripts() {\n\t\twp_add_inline_style( 'at-main', $this->inline_css() );\n\t}", "function scripts() {\n\n\twp_enqueue_script(\n\t\t'frontend',\n\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/js/frontend.js',\n\t\t[],\n\t\tERI_SCAFFOLD_VERSION,\n\t\ttrue\n\t);\n\n\tif ( is_page_template( 'templates/page-styleguide.php' ) ) {\n\t\twp_enqueue_script(\n\t\t\t'styleguide',\n\t\t\tERI_SCAFFOLD_TEMPLATE_URL . '/dist/js/styleguide.js',\n\t\t\t[],\n\t\t\tERI_SCAFFOLD_VERSION,\n\t\t\ttrue\n\t\t);\n\t}\n\n}", "public function set_script_styling(){\r\n /**\r\n * enqueue css styling here\r\n */\r\n wp_enqueue_style('before-after-comparison-styling', plugin_dir_url( __FILE__ ) . 'css/before-after.css', array(), '1.0');\r\n\r\n /**\r\n * enqueue custom js / javascript library here\r\n */\r\n wp_enqueue_script('before-after-comparison-javascript', plugin_dir_url( __FILE__ ) . 'js/before-after.js', array('jquery'), '1.0' , false);\r\n\r\n \r\n }", "public function scripts()\n {\n $scripts = array(\n array(\n 'handler' => 'yatri-google-fonts',\n 'style' => esc_url('//fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700|Rubik:400,500,700,900'),\n 'absolute' => true\n ),\n\n array(\n 'handler' => 'yatri-style',\n 'style' => get_stylesheet_uri(),\n 'absolute' => true,\n ), array(\n 'handler' => 'yatri-main',\n 'style' => get_theme_file_uri('/assets/css/yatri.css'),\n 'absolute' => true,\n 'version' => YATRI_THEME_VERSION\n ),\n array(\n 'handler' => 'yatri-script',\n 'script' => get_theme_file_uri('/assets/js/yatri.js'),\n 'absolute' => true,\n 'prefix' => '',\n 'dependency' => array('jquery')\n )\n );\n\n\n Mantrabrain_Theme_Helper_Typo::render_fonts();\n\n $this->yatri_enqueue(apply_filters('yatri_scripts_styles', $scripts));\n\n $locale = apply_filters('yatri_localize_var', array(\n\n 'is_admin_bar' => is_admin_bar_showing() ? true : false,\n\n ));\n\n wp_localize_script('yatri-script', 'yatri_obj', $locale);\n\n if (is_singular() && comments_open()) {\n wp_enqueue_script('comment-reply');\n }\n }", "public function scripts(){\n\t\t//wp_register_script('component-header_fixed', $this->directory_uri . '/assets/dist/js/headerFixed.js', ['jquery'], false, true);\n\n\t\t/*wp_localize_script('component-header_fixed', 'wbHeaderFixed', array(\n\t\t\t'company_name' => $company,\n\t\t\t'address' => $address,\n\t\t\t'mail' => $mail,\n\t\t\t'tel' => $tel,\n\t\t) );\n\t\twp_enqueue_script('component-header_fixed');*/\n\t}", "function bfc_add_scripts() {\n\twp_register_script('principal', get_template_directory_uri() . '/js/vendor/jquery.js', array(), 'null', true);\n\twp_enqueue_script('principal');\n\twp_register_script('foundation', get_template_directory_uri() . '/js/vendor/foundation.js', array(), 'null', true);\n\twp_enqueue_script('foundation');\n\twp_register_script('modernizr', get_template_directory_uri() . '/js/modernizr.js', array(), 'null', true);\n\twp_enqueue_script('modernizr');\n\twp_register_script('app', get_template_directory_uri() . '/js/app.js', array(), 'null', true);\n\twp_enqueue_script('app');\n\twp_register_script('slick', get_template_directory_uri() . '/js/slick.js', array(), 'null', true);\n\twp_enqueue_script('slick');\n}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "function oursavior_scripts() {\n\twp_enqueue_style( 'oursavior-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'oursavior-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );\n\n\twp_enqueue_script( 'oursavior-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "public function includeAssets(): void\n {\n $this->Html->script('CkTools.vendor/tinymce/jquery.tinymce.min.js', ['block' => true]);\n }", "function scripts() {\n\t/**\n\t * Flag whether to enable loading uncompressed/debugging assets. Default false.\n\t *\n\t * @param bool project_script_debug\n\t */\n\t$debug = apply_filters( 'project_script_debug', false );\n\t$min = ( $debug || defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\n\twp_enqueue_script(\n\t\t'modernizr-custom',\n\t\tProject_TEMPLATE_URL . '/assets/js/vendor/modernizr-custom.min.js',\n\t\tfalse, '2.7.2'\n\t);\n\twp_enqueue_script(\n\t\t'project',\n\t\tProject_TEMPLATE_URL . \"/assets/js/project-theme{$min}.js\",\n\t\tarray(),\n\t\tProject_VERSION,\n\t\ttrue\n\t);\n}", "function mocca_script_files() {\n\n wp_deregister_script('jquery'); // Remove Registeration Old JQuery\n wp_register_script('jquery', includes_url('/js/jquery/jquery.js'), false, '', true); // Register a New JQuery in Footer\n wp_enqueue_script('jquery'); // Enqueue New JQuery\n wp_enqueue_script('popper-js', get_template_directory_uri() . '/js/popper.min.js', array(), false, true);\n wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), false, true);\n }", "public function registerScripts() {\n $this->scripts['bootstrap.min'] = 'assets/js/bootstrap.min.js';\n $this->scripts['jquery.nouislider.min'] = 'assets/js/mkdf-ui/jquery.nouislider.min.js';\n $this->scripts['mkdf-ui-admin'] = 'assets/js/mkdf-ui/mkdf-ui.js';\n $this->scripts['mkdf-bootstrap-select'] = 'assets/js/mkdf-ui/mkdf-bootstrap-select.min.js';\n\n foreach ($this->scripts as $scriptHandle => $scriptPath) {\n sienna_mikado_register_skin_script($scriptHandle, $scriptPath);\n }\n }", "function front_scripts() {\n FWP()->display->assets['future-past-front.js'] = plugins_url( '', __FILE__ ) . '/assets/js/front.js';\n }", "public function enqueue_front_end_scripts() {}", "function aitEnqueueScriptsAndStyles(){\r\n\tif(!is_admin()){\r\n\t\t// just shortcuts\r\n\t\t$s = THEME_CSS_URL;\r\n\t\t$j = THEME_JS_URL;\r\n\r\n\t\taitAddStyles(array(\r\n\t\t\t'ait-colorbox' => array('file' => \"$s/libs/colorbox.css\"),\r\n\t\t\t'ait-fancybox' => array('file' => \"$s/libs/fancybox.css\"),\r\n\t\t\t'jquery-ui' \t => array('file' => \"$s/libs/jquery-ui.css\"),\r\n\t\t\t'prettysociable' => array('file' => \"$s/libs/prettySociable.css\"),\r\n\t\t\t'hoverzoom' \t => array('file' => \"$s/libs/hoverZoom.css\"),\r\n\t\t));\r\n\r\n\t\taitAddScripts(array(\r\n\t\t\t'jquery-ui-tabs' \t\t\t=> true,\r\n\t\t\t'jquery-ui-accordion' \t\t\t=> true,\r\n\t\t\t'jquery-infieldlabel' \t\t\t=> array('file' => \"$j/libs/jquery-infieldlabel.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-iconmenu' \t\t\t\t=> array('file' => \"$j/libs/jquery-iconmenu.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'jquery-plugins'\t \t\t\t=> array('file' => \"$j/libs/jquery-plugins.js\", 'deps' => array('jquery')),\r\n\t\t\t'modernizr'\t\t\t\t\t\t=> array('file' => \"$j/libs/modernizr-2.6.1-custom.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\r\n\t\t\t'ait-gridgallery' \t\t\t=> array('file' => \"$j/gridgallery.js\", 'deps' => array('jquery', 'jquery-plugins'), 'inFooter' => true),\r\n\t\t\t'ait-testimonials' \t\t\t=> array('file' => \"$j/testimonials.js\", 'deps' => array('jquery'), 'inFooter' => true),\r\n\t\t\t'ait-script' \t\t\t=> array('file' => \"$j/script.js\", 'deps' => array('jquery', 'jquery-infieldlabel', 'jquery-iconmenu', 'jquery-plugins', 'modernizr'), 'inFooter' => true),\r\n\t\t));\r\n\t}\r\n}", "function ineedmyjava() {\n\tif (!is_admin()) {\n \n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, '1.11.0', true);\n\t\twp_enqueue_script('jquery');\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'custom',\n\t\t\tget_bloginfo('template_directory') . '/js/custom.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('custom');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'isotope',\n\t\t\tget_bloginfo('template_directory') . '/js/isotope.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('isotope');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'images',\n\t\t\tget_bloginfo('template_directory') . '/js/images-loaded.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('images');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'bootstrap',\n\t\t\tget_bloginfo('template_directory') . '/js/bootstrap.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('bootstrap');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'colorbox',\n\t\t\tget_bloginfo('template_directory') . '/js/colorbox.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('colorbox');\n\t\t\n\t\t\n\t\t\n\t}\n}", "function jehaann_scripts(){\n\n\n wp_register_script('scripts',RutaTema.'/js/scripts.js','','1.0','True');\n wp_enqueue_script('scripts');\n\n\n}", "function autodidact_script_enqueue() {\n wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/auto.css', array(), '1.0.0', 'all');\n wp_enqueue_script('customjs', get_template_directory_uri() . '/js/auto.js', array(), '1.0.0', true);\n}", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-addons', plugins_url( '/assets/js/frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-content-filter', plugins_url( '/assets/js/content-filter.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-custom-frontend', plugins_url( '/assets/js/custom-frontend.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-bloodhound', plugins_url( '/assets/js/typeahead/typeahead.bundle.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t\twp_register_script( 'elementor-addons-masonry', plugins_url( '/assets/js/masonry.pkgd.min.js', __FILE__ ), [ 'jquery' ], ELEMENT_ADDON_VER, true );\n\t}", "function achilles_scripts() {\n\t\n\t//main stylesheet for now\n\twp_enqueue_style('achilles_style', get_template_directory_uri() . '/style.css', false, '1.0');\n\t\n\t//Foundations stylesheet\n\twp_register_style( 'achilles_main', get_template_directory_uri(). '/css/app.css', false, '1.0');\n\t\n\t\n\twp_enqueue_style( 'achilles_main' );\n\t\n\t//Load built in jQuery from WordPress \n\t// @TODO: Load jQuery from CDN or Google\n\twp_enqueue_script( 'jquery' );\n}", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "function theme_scripts() {\n wp_enqueue_style('main', CSS . '/main.css');\n wp_enqueue_style('my', CSS . '/my.css');\n wp_enqueue_script('scripts', JS . '/main.js', array('jquery'), null, true);\n }", "function estilos_scripts() { \n wp_enqueue_style('googlefonts', '//fonts.googleapis.com/css?family=PT+Sans:400,400i,700,700i|Yanone+Kaffeesatz:400,700', array(), '' , 'screen', false);\n wp_enqueue_style('fontawesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), '' , 'screen', false);\n wp_enqueue_style('layout', get_template_directory_uri() . '/css/layout.css', array(), '', 'all', null);\n\n wp_enqueue_script( 'canvas', get_template_directory_uri() . '/js/canvas.js', array('jquery'), '', true);\n wp_enqueue_script( 'bx', get_template_directory_uri() . '/js/bx.js', array('jquery'), '', true);\n wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array('bx'), '', true);\n}", "function cs_style_and_scripts() {\n \n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/vendor.css' );\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() .'/public/css/app.css' );\n wp_enqueue_style( 'main-css', get_stylesheet_uri() );\n\n /*wp_enqueue_script( 'myscripts', get_stylesheet_directory_uri() . '/assets/js/app.js', '', '1.0.0', true );\n wp_localize_script('myscripts', 'cs_obj', array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n ));*/\n\n }", "private function register_scripts()\n\t{\n\t\tif (is_admin()) {\n\t\t\t// Load our main stylesheet.\n\t\t\twp_enqueue_style('kd-letters', plugin_dir_url( __FILE__ ) . '/templates/style/kd-letters.css');\n\t\t}\n\t}", "public function scripts()\n {\n foreach ($this->controller->scripts as $value)\n echo \"\\t<script src='\" . DOMAIN . $value . \"' ></script>\\n\";\n echo \"</body>\\n</html>\";\n }", "function scripts() {\n\twp_register_script(\n\t\t'bootstrap',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/bootstrap/dist/js/bootstrap.min.js\",\n\t\tarray( 'jquery' ),\n\t\tVINCENTRAGOSTA_COM_VERSION,\n\t\ttrue\n\t);\n\n\twp_enqueue_script(\n\t\t'vincentragosta_com',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/js/vincentragosta---twenty-seventeen.js\",\n\t\tarray( 'jquery', 'bootstrap' ),\n\t\tVINCENTRAGOSTA_COM_VERSION,\n\t\ttrue\n\t);\n\n\twp_localize_script( 'vincentragosta_com', 'themeUrl', VINCENTRAGOSTA_COM_TEMPLATE_URL );\n}", "function accvent_scripts() {\n\t wp_enqueue_style( 'main', get_stylesheet_uri() );\n\t wp_enqueue_script( 'bundle', get_template_directory_uri() . '/js/build.min.js', array(), '1.0.0', true );\n\t}", "function _s_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image() ) {\n\t\twp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n}", "public function enqueue_scripts() {\n wp_enqueue_script(\n 'moment',\n plugins_url('includes/moment.min.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'minidaemon',\n plugins_url('includes/mdn-minidaemon.js', __FILE__),\n array(),\n VSPI_VERSION,\n false\n );\n wp_enqueue_script(\n 'vspi-admin',\n plugins_url('includes/vspi-admin.js', __FILE__),\n array('jquery'),\n VSPI_VERSION,\n false\n );\n }", "function as_on_add_scripts() {\n // enqueue backbonejs, underscore\n add_existed_script('backbone');\n add_existed_script('underscore');\n if (as_option('as_option_smooth_scroll', '1')) {\n // Smoothscroll JS\n add_script('smoothscroll', TEMPLATEURL . '/js/smoothscroll.js', array(\n 'jquery'));\n }\n // Modernize JS\n add_script('modernizr', TEMPLATEURL . '/js/libs/modernizr.custom.js', array(\n 'jquery'));\n if (as_option('as_option_retina_img', '1')) {\n add_script('retina', TEMPLATEURL . '/js/libs/retina.min.js', array(\n 'jquery'));\n }\n add_script('front', TEMPLATEURL . '/js/front.js', array(\n 'jquery',\n 'backbone',\n 'underscore'));\n add_script('js-appear', TEMPLATEURL . '/js/libs/main.js', array(\n 'jquery',\n 'jquery'));\n //add js easing when plugin not active\n if (!(function_exists('dslc_register_modules'))) {\n //add js easing\n add_script('js-easing', TEMPLATEURL . '/js/libs/jquery.easing.js', array(\n 'jquery',\n 'jquery'));\n }\n wp_localize_script('front', 'as_globals', array(\n 'ajaxURL' => admin_url('admin-ajax.php'),\n 'imgURL' => get_template_directory_uri() . '/img/'\n ));\n // Custom\n add_script('main', TEMPLATEURL . '/js/main.js', array(\n 'jquery'));\n // add style demo\n if (file_exists(TEMPLATE_DIR . '/demo/js/custom_panel.js')) {\n add_script('custom_panel', TEMPLATEURL . '/demo/js/custom_panel.js', array(\n 'jquery'));\n }\n}", "public function registerScripts() {\n $this->registerScriptsCommon();\n \n if(is_admin()) {\n $this->registerScriptsAdmin();\n } else {\n $this->registerScriptsFrontend();\n }\n }", "function scripts() {\n\n\t\t// Foundation core\n\t\twp_register_style( 'maera_zf', MAERA_FOUNDATION_SHELL_URL . '/assets/css/foundation.css' );\n\t\twp_enqueue_style( 'maera_zf' );\n\n\t\t// Foundation icons\n\t\twp_register_style( 'maera_foundation_icons', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation-icons/foundation-icons.css' );\n\t\twp_enqueue_style( 'maera_foundation_icons' );\n\n\t\t// Add Foundation required scripts\n\t\twp_enqueue_script( 'fastclick', MAERA_FOUNDATION_SHELL_URL . '/assets/vendor/fastclick.js', false );\n\t\twp_enqueue_script( 'foundation', MAERA_FOUNDATION_SHELL_URL . '/assets/foundation.min.js', 'jquery' );\n\n\t\t// Add our custom styles\n\t\twp_register_style( 'maera_foundation_custom', MAERA_FOUNDATION_SHELL_URL . '/assets/css/style.css' );\n\t\twp_enqueue_style( 'maera_foundation_custom' );\n\n\t}", "function _s_scripts() {\n\twp_enqueue_style( 'main.css', get_stylesheet_directory_uri() . '/dist/src/style.css', false, '6.9' );\n\twp_enqueue_script( 'main.js', get_stylesheet_directory_uri() . '/dist/main.js', false, false, true );\n}", "function beaver_extender_fe_style_editor_load_scripts() {\n\n\twp_enqueue_style( 'dashicons' );\n\twp_enqueue_style( 'beaver_extender_fe_style_editor_styles' );\n\twp_enqueue_style( 'beaver_extender_jquery_ui_css', '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css', false, BBEXT_VERSION, false );\n\twp_enqueue_script( 'jquery-ui-resizable' );\n\twp_enqueue_script( 'beaver_extender_fe_style_editor' );\n\twp_enqueue_script( 'beaver_extender_ace' );\n\twp_enqueue_script( 'beaver_extender_ace_autocomplete' );\n\t\t\n}", "public function setup_scripts_and_styles() {\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_css' ), 50 );\n\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'enqueue_discogs_js' ), 10 );\n\t}", "public function register_scripts()\r\n\t{\r\n\t\twp_register_style('poll', plugins_url('assets/poll.css', __DIR__));\r\n\t\twp_register_script('vue', 'https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js', array('jquery'), null, true);\r\n\t\twp_register_script('poll', plugins_url('assets/poll.js', __DIR__), array('vue'), null, true);\r\n\t}", "function _ext_scripts()\n\t{\n\t\t$str = '';\n\n\t\t/* -------------------------------------------\n\t\t/* 'cp_js_end' hook.\n\t\t/* - Add Javascript into a file call at the end of the control panel\n\t\t/* - Added 2.1.2\n\t\t*/\n\t\t\t$str = $this->extensions->call('cp_js_end');\n\t\t/*\n\t\t/* -------------------------------------------*/\n\n\t\t$this->output->out_type = 'cp_asset';\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\");\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\n\t\t$this->output->set_output($str);\n\t}", "public function registerScripts() {\r\n\t\t$baseUrl = Yii::app()->assetManager->publish(dirname(__FILE__).\"/assets/\".__CLASS__);\r\n\t\tYii::app()->clientScript->registerScriptFile($baseUrl.\"/AFileBrowser.js\");\r\n\t\t\r\n\t}", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "function elegance_scripts()\n {\n /**\n * Stylesheet Enqueue\n * @version 1.0.0\n */\n wp_enqueue_style( 'elegance-style', get_stylesheet_uri() );\n wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/assets/dist/css/bootstrap.min.css', array(), '4.3.1', 'all');\n wp_enqueue_style( 'font-awesome-css', get_template_directory_uri() . '/assets/dist/fonts/font-awesome.min.css', array(), '4.0.0', 'all');\n\n /**\n * Scripts Enqueue\n * @version 1.0.0\n */\n wp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/assets/dist/js/bootstrap.min.js', array( 'jquery' ), '4.3.1', true );\n\n /**\n * Woocommerce Stylesheet\n * @version 1.0.0\n */\n wp_enqueue_style( 'woocommerce-css', get_template_directory_uri() . '/assets/dist/css/woocommerce.css', array(), '1.0.0', 'all');\n \n }", "function chocorocco_options_override_add_scripts() {\n\t\t$screen = function_exists('get_current_screen') ? get_current_screen() : false;\n\t\tif (is_object($screen) && chocorocco_options_allow_override(!empty($screen->post_type) ? $screen->post_type : $screen->id)) {\n\t\t\twp_enqueue_style( 'chocorocco-fontello', chocorocco_get_file_url('css/fontello/fontello-embedded.css') );\n\t\t\twp_enqueue_script('jquery-ui-tabs', false, array('jquery', 'jquery-ui'), null, true);\n\t\t\twp_enqueue_script( 'chocorocco-meta-box', chocorocco_get_file_url('theme-options/theme.override.js'), array('jquery'), null, true );\n\t\t\twp_localize_script( 'chocorocco-meta-box', 'chocorocco_dependencies', chocorocco_get_theme_dependencies() );\n\t\t}\n\t}", "public function editor_scripts() {\n\t\tadd_filter( 'script_loader_tag', [ $this, 'editor_scripts_as_a_module' ], 10, 2 );\n\n\t\twp_enqueue_script(\n\t\t\t'elementor-addons-editor',\n\t\t\tplugins_url( '/assets/js/editor/editor.js', __FILE__ ),\n\t\t\t[\n\t\t\t\t'elementor-editor',\n\t\t\t],\n\t\t\t'1.2.1',\n\t\t\ttrue\n\t\t);\n\t}", "function addScriptsStyles(){\n\t\twp_enqueue_script( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/js/dashicons-picker.js' ), array( 'jquery' ) );\n\t\twp_enqueue_style( 'dashicons-picker', plugins_url( 'post_icon/vendor/dashicons-picker/css/dashicons-picker.css' ), array( 'dashicons' ) );\n\t\twp_enqueue_script( 'post_icon_script', plugins_url( 'post_icon/js/post_icon.js' ), array( 'jquery' ) );\n\t}", "public function enqueue_scripts() {\r\n\r\n\t\t}", "public function embed_scripts()\n {\n }", "function cbusdscss_header_scripts() {\n\tif( $GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n\t\twp_register_script('conditionizr', get_template_directory_uri() . '/js/lib/conditionizr-4.3.0.min.js', array(), '4.3.0'); // Conditionizr\n wp_enqueue_script('conditionizr'); // Enqueue it!\n\n wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-2.7.1.min.js', array(), '2.7.1'); // Modernizr\n wp_enqueue_script('modernizr'); // Enqueue it!\n\n\t\twp_register_script('jquery-marquee', get_template_directory_uri() . '/js/jquery.marquee.min.js', array('jquery') ,''); // Conditionizr\n wp_enqueue_script('jquery-marquee'); // Enqueue it!\n\n wp_register_script('cbusdsscripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '1.0.0'); // Custom scripts\n wp_enqueue_script('cbusdsscripts'); // Enqueue it!\n\n wp_localize_script( 'cbusdsscripts', 'cbusds_ajax', array('ajaxurl' => admin_url( 'admin-ajax.php'), 'security' => wp_create_nonce('cbusds-special-string')));\n\n\t}\n}", "function ka_enqueue_scripts() {\n\n /* Adiciona o script principal do tema */\n wp_enqueue_script( 'main', get_bundle_file( 'assets/js/dist/', 'index.*.js' ) , null, null, true );\n }", "function innelyz_scripts() {\n wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '3.3.7', false);\n wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), false, 'all' );\n wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Lora|Pacifico|Roboto');\n wp_enqueue_style( 'innelyz-style', get_stylesheet_uri() );\n }", "public function default_scripts()\n {\n if( ! is_array(self::$scripts))\n {\n self::$scripts = array();\n }\n self::$scripts[]= 'modules/xview/vendor/jqueryui/js/jquery-1.4.2.min.js';\n self::$scripts[]= 'modules/xview/vendor/jqueryui/js/jquery-ui-1.8.4.custom.min.js';\n self::$scripts[]= 'modules/xview/vendor/superfish/js/hoverIntent.js';\n self::$scripts[]= 'modules/xview/vendor/superfish/js/superfish.js';\n self::$scripts[]= 'modules/xview/media/xhtml.js';\n }", "public function enqueueScripts() {\n wp_register_style('rrze-faq-style', plugins_url('assets/css/rrze-faq.css', plugin_basename($this->pluginFile)));\n wp_enqueue_style('rrze-faq-style');\n }", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "function add_js() {\n // È possibile aggiungere un file js presente nella cartella del tema\n wp_register_script('main_js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);\n wp_enqueue_script('main_js');\n\n // È possibile aggiungere un url remoto (es. CDN)\n // wp_register_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js', array('jquery'), null, true);\n // wp_enqueue_script('select2');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_script('home_js', get_template_directory_uri() . '/js/home.js', array('jquery'), null, true);\n // wp_enqueue_script('home_js');\n // }\n}", "function kesha_theme_scripts() {\n\n // Register Custom CSS\n wp_register_style( 'theme', get_template_directory_uri() . '/dist/css/built.min.css', array(), rand(111,9999), 'all' );\n\n // Enqueue Styles\n wp_enqueue_style( 'theme' );\n\n // Register JS.\n wp_register_script( 'scripts', get_template_directory_uri() . '/dist/js/built.min.js', array( 'jquery' ), rand(111,9999), TRUE );\n\n // Enqueue JS\n wp_enqueue_script( 'scripts' );\n}", "function add_scripts(){\n\t// Load jQuery\n\tif ( !is_admin() ) {\n\t wp_enqueue_script('jquery');\n\n\t\t// Your Scripts\n\n\t\twp_register_script('site_js', get_stylesheet_directory_uri().'/js/site.js', array('jquery'/* ,'metaquery' */));\n\t\twp_enqueue_script('site_js');\n\t\t/*\n\t\twp_register_script('match_media', get_stylesheet_directory_uri().'/js/matchMedia.js', array('jquery'));\n\t\twp_enqueue_script('match_media');\n\t\twp_register_script('metaquery', get_stylesheet_directory_uri().'/js/metaquery.min.js', array('jquery','match_media'));\n\t\twp_enqueue_script('metaquery');\n\t\t*/\n\t\twp_enqueue_style( 'base-theme-css', get_stylesheet_directory_uri() . '/style.css', array() );\n\n\t\t// Define Ajax URL for scripts\n\t\twp_localize_script( 'site_js', 'spr_admin', array(\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' )\n\t\t));\n\n\t}\n}", "protected function renderJavaScriptAndCss() {}", "function goodrds_admin_scripts() {\n\t\t// only on our backend page\n\t\tif (get_current_screen()->base == 'settings_page_goodrds') {\n\t wp_register_style( 'goodrds_css', plugins_url('goodrds-admin.css', __FILE__), false, '0.1' );\n\t wp_enqueue_style( 'goodrds_css' );\n\n\t wp_register_script( 'goodrds_js', plugins_url('goodrds-admin.js', __FILE__), array('jquery'), '0.1', true );\n\t wp_enqueue_script( 'goodrds_js' );\n\t }\n\t}", "function clean_and_sober_scripts() {\n\tglobal $post;\n\n\twp_enqueue_style( 'reset', get_stylesheet_directory_uri() . '/reset.css' );\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\twp_enqueue_style( 'responsive', get_stylesheet_directory_uri() . '/responsive.css' );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image( $post->ID ) ) {\n\t\twp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n}", "function c9music_client_scripts()\n\t{\n\n\t\t$c9_default_font = get_theme_mod('c9_default_font', 'no');\n\n\t\tif ($c9_default_font == 'no') {\n\t\t\twp_enqueue_style('c9music-font-default', 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,700;1,400;1,700&display=swap', array('c9-styles'));\n\t\t}\n\n\t\twp_enqueue_style('c9music-client-styles', get_template_directory_uri() . '/client/client-assets/dist/client.min.css', array('c9-styles'));\n\t\twp_enqueue_script('c9music-client-scripts', get_template_directory_uri() . '/client/client-assets/custom-client.js', array('jquery', 'c9-scripts'), false, true);\n\t\twp_add_inline_style('c9music-client-styles', c9_music_custom_css_output());\n\t}", "function rhapsody_scripts() {\n\twp_enqueue_style( 'rhapsody-style', get_stylesheet_uri() );\n\n if (!is_admin()) add_action(\"wp_enqueue_scripts\", \"wrmc_jquery_enqueue\", 11);\n function wrmc_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n }\n\n wp_enqueue_script( 'rhapsody-modernizr', get_template_directory_uri() . '/assets/js/modernizr.custom.js',array(), '3.3.1', false);\n wp_enqueue_script( 'rhapsody-app', get_template_directory_uri() . '/assets/js/all.js', array(), '1.0.0', true );\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function mgr_add_scripts(){\n wp_enqueue_style('mgr-main-style',plugins_url().'/includes/my-github-repos/css/style.css');\n wp_enqueue_script('mgr-main-script',plugins_url().'/includes/my-github-repos/js/main.js');\n}", "function _ext_scripts()\r\n\t{\r\n\t\t$str = '';\r\n\r\n\t\t/* -------------------------------------------\r\n\t\t/* 'cp_js_end' hook.\r\n\t\t/* - Add Javascript into a file call at the end of the control panel\r\n\t\t/* - Added 2.1.2\r\n\t\t*/\r\n\t\t\t$str = $this->extensions->call('cp_js_end');\r\n\t\t/*\r\n\t\t/* -------------------------------------------*/\r\n\t\t\r\n\t\t$this->output->out_type = 'cp_asset';\r\n\t\t$this->output->set_header(\"Content-Type: text/javascript\");\r\n\t\t$this->output->set_header(\"Cache-Control: no-cache, must-revalidate\"); \r\n\t\t$this->output->set_header('Content-Length: '.strlen($str));\r\n\t\t$this->output->set_output($str);\r\n\t}", "function tvlc_scripts() {\n\twp_enqueue_style( 'theme', get_stylesheet_uri() );\n\n\twp_deregister_script('jquery');\n wp_enqueue_script( 'jquery', TVLC_JS_DIR . '/jquery-3.3.1.min.js' );\n// wp_enqueue_script('num_animator', TVLC_JS_DIR . '/num-animator.js', false, null, false);\n wp_enqueue_script('mainscript', TVLC_JS_DIR . '/main.min.js', array('jquery'), null, true);\n wp_enqueue_script('wowscript', TVLC_JS_DIR . '/wow.js', false, null, true);\n\n}", "function admin_include_scripts() {\n\n\t\t\twp_register_style('wa_wcc_admin',get_template_directory_uri().'/plugin/collapse/assets/css/admin.css');\n\t\t\twp_enqueue_style('wa_wcc_admin');\n\n\t}", "public function register_styles_scripts(){\n\t\t\tglobal $eventon_rs;\n\t\t\t\n\t\t\tif(is_admin()) return false;\n\t\t\t\n\t\t\t$evOpt = evo_get_options('1');\n\t\t\tif( evo_settings_val('evcal_concat_styles',$this->evoopt1, true))\n\t\t\t\twp_register_style( 'evo_RS_styles',$eventon_rs->assets_path.'RS_styles.css', '', $eventon_rs->version);\n\t\t\t\n\t\t\twp_register_script('evo_RS_script',$eventon_rs->assets_path.'RS_script.js', \n\t\t\t\tarray('jquery','jquery-ui-core'), \n\t\t\t\t$eventon_rs->version, true );\n\n\t\t\twp_localize_script( \n\t\t\t\t'evo_RS_script', \n\t\t\t\t'evors_ajax_script', \n\t\t\t\tarray( \n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ) , \n\t\t\t\t\t'postnonce' => wp_create_nonce( 'evors_nonce' )\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function scripts_styles_footer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$theme_url = get_template_directory_uri();\n\t\t$fa_ver = '4.7.0';\n\t\t$fa_url = \"//maxcdn.bootstrapcdn.com/font-awesome/$fa_ver/css/font-awesome.min.css\";\n\t\t$main_js_url = $theme_url . '/js/main.min.js';\n\t\t$main_js_path = get_template_directory() . '/js/main.min.js';\n\t\t$main_js_ver = file_exists( $main_js_path ) ? filemtime( $main_js_path ) : '';\n\n\t\twp_enqueue_style( 'fa-style', $fa_url, null, $fa_ver );\n\t\twp_enqueue_style( 'gfont', 'https://fonts.googleapis.com/css?family=Handlee' );\n\t\twp_enqueue_script( 'superiocity-script', $main_js_url, null, $main_js_ver, true );\n\t}", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }" ]
[ "0.8177206", "0.78772044", "0.78522444", "0.7757424", "0.7617622", "0.7596285", "0.75814486", "0.75814486", "0.75529563", "0.7548456", "0.7531649", "0.75290394", "0.75020283", "0.74744207", "0.7458399", "0.7454763", "0.7453838", "0.7452905", "0.7441865", "0.74111116", "0.7398501", "0.73787826", "0.7376577", "0.73742163", "0.73723197", "0.73693544", "0.73552203", "0.7331712", "0.7330243", "0.73244846", "0.7322334", "0.7305195", "0.7303397", "0.7283759", "0.7272775", "0.7268695", "0.72645926", "0.7258732", "0.72441334", "0.7239581", "0.7231918", "0.7231478", "0.7229316", "0.7222229", "0.7213057", "0.721087", "0.72103894", "0.7209181", "0.72086275", "0.7204606", "0.7202069", "0.71984535", "0.71972066", "0.7189684", "0.7186913", "0.7184767", "0.7178324", "0.7165821", "0.7163663", "0.7162471", "0.71623826", "0.71545804", "0.7143438", "0.7132497", "0.71307003", "0.71279144", "0.7123671", "0.71206176", "0.7120279", "0.7119278", "0.7116674", "0.7115402", "0.7108294", "0.71002495", "0.7096434", "0.7094119", "0.70796996", "0.7070147", "0.7067636", "0.706243", "0.70607316", "0.7058547", "0.7057298", "0.70570415", "0.705533", "0.7055303", "0.7054275", "0.70533824", "0.70515746", "0.70486456", "0.70483124", "0.70457256", "0.70435023", "0.70431846", "0.7040583", "0.7040459", "0.7037871", "0.70338476", "0.702948", "0.7025667" ]
0.74148273
19
Handle admin menu insertion
public function register_grimage_admin_menus() { add_options_page('Grimage settings', 'Grimage', 'manage_options', 'grimage_options', array($this, 'grimage_options_page')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_admin_menus()\n\t{\n\t}", "function procMenuAdminInsertItemForAdminMenu()\n\t{\n\t\t$requestArgs = Context::getRequestVars();\n\t\t$tmpMenuName = explode(':', $requestArgs->menu_name);\n\t\t$moduleName = $tmpMenuName[0];\n\t\t$menuName = $tmpMenuName[1];\n\n\t\t// variable setting\n\t\t$logged_info = Context::get('logged_info');\n\t\t//$oMenuAdminModel = getAdminModel('menu');\n\t\t$oMemberModel = getModel('member');\n\n\t\t//$parentMenuInfo = $oMenuAdminModel->getMenuItemInfo($requestArgs->parent_srl);\n\t\t$groupSrlList = $oMemberModel->getMemberGroups($logged_info->member_srl);\n\n\t\t//preg_match('/\\{\\$lang->menu_gnb\\[(.*?)\\]\\}/i', $parentMenuInfo->name, $m);\n\t\t$oModuleModel = getModel('module');\n\t\t//$info = $oModuleModel->getModuleInfoXml($moduleName);\n\t\t$info = $oModuleModel->getModuleActionXml($moduleName);\n\n\t\t$url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->menu->{$menuName}->index);\n\t\tif(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin', 'act', $info->admin_index_act);\n\t\tif(empty($url)) $url = getNotEncodedFullUrl('', 'module', 'admin');\n\t\t$dbInfo = Context::getDBInfo();\n\n\t\t$args = new stdClass();\n\t\t$args->menu_item_srl = (!$requestArgs->menu_item_srl) ? getNextSequence() : $requestArgs->menu_item_srl;\n\t\t$args->parent_srl = $requestArgs->parent_srl;\n\t\t$args->menu_srl = $requestArgs->menu_srl;\n\t\t$args->name = sprintf('{$lang->menu_gnb_sub[\\'%s\\']}', $menuName);\n\t\t//if now page is https...\n\t\tif(strpos($url, 'https') !== false)\n\t\t{\n\t\t\t$args->url = str_replace('https'.substr($dbInfo->default_url, 4), '', $url);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$args->url = str_replace($dbInfo->default_url, '', $url);\n\t\t}\n\t\t$args->open_window = 'N';\n\t\t$args->expand = 'N';\n\t\t$args->normal_btn = '';\n\t\t$args->hover_btn = '';\n\t\t$args->active_btn = '';\n\t\t$args->group_srls = implode(',', array_keys($groupSrlList));\n\t\t$args->listorder = -1*$args->menu_item_srl;\n\n\t\t// Check if already exists\n\t\t$oMenuModel = getAdminModel('menu');\n\t\t$item_info = $oMenuModel->getMenuItemInfo($args->menu_item_srl);\n\t\t// Update if exists\n\t\tif($item_info->menu_item_srl == $args->menu_item_srl)\n\t\t{\n\t\t\t$output = executeQuery('menu.updateMenuItem', $args);\n\t\t\tif(!$output->toBool()) return $output;\n\t\t}\n\t\t// Insert if not exist\n\t\telse\n\t\t{\n\t\t\t$args->listorder = -1*$args->menu_item_srl;\n\t\t\t$output = executeQuery('menu.insertMenuItem', $args);\n\t\t\tif(!$output->toBool()) return $output;\n\t\t}\n\t\t// Get information of the menu\n\t\t$menu_info = $oMenuModel->getMenu($args->menu_srl);\n\t\t$menu_title = $menu_info->title;\n\t\t// Update the xml file and get its location\n\t\t$xml_file = $this->makeXmlFile($args->menu_srl);\n\n\t\t$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminSetup');\n\t\t$this->setRedirectUrl($returnUrl);\n\t}", "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public function onWpAdminMenu() {\n\t}", "function handleAdminMenu ()\n\t{\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'post', 'normal' );\n\t\tadd_meta_box( 'avhamazonmetabox01', 'AVH Amazon Short Code', array (&$this, 'createMetabox' ), 'page', 'normal' );\n\t}", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "function templ_add_admin_menu_()\r\n{\r\n\tdo_action('templ_add_admin_menu_');\r\n}", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "public function admin_menu(&$menu)\n {\n\n\t}", "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "public function add_menus()\n {\n }", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "public function add_admin_menu() {\n\n extract( $this->args );\n\n if( $menu_type === 'submenu' ) {\n\n $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );\n\n } else {\n\n $menu_page = call_user_func( 'add_menu_page', $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ), $menu_icon, $menu_position );\n\n if( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {\n\n // create submenus\n $tab_key = 1;\n foreach ( $this->pre_tabs as $section ) {\n\n call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug .'#tab='. $tab_key, '__return_null' );\n\n if( ! empty( $section['subs'] ) ) {\n $tab_key += ( count( $section['subs'] )-1 );\n }\n\n $tab_key++;\n\n }\n\n remove_submenu_page( $menu_slug, $menu_slug );\n\n }\n\n if( ! empty( $menu_hidden ) ) {\n remove_menu_page( $menu_slug );\n }\n\n }\n\n add_action( 'load-'. $menu_page, array( &$this, 'add_page_on_load' ) );\n\n }", "public function adminMenu() {\n add_submenu_page(\n 'tools.php',\n self::NAME,\n self::NAME,\n 'import',\n __CLASS__ . '_opt_menu',\n array(&$this, 'showBackupPage')\n );\n }", "function admin_menu() {\n\t\tif ( class_exists( 'Jetpack' ) )\n\t\t\tadd_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );\n\t\telse\n\t\t\t$this->load_menu();\n\t}", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "function addAdminMenu()\n\t{\n\t\tglobal $tpl, $tree, $rbacsystem, $lng;\n\n\t\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\t$objects = $tree->getChilds(SYSTEM_FOLDER_ID);\n\t\tforeach($objects as $object)\n\t\t{\n\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]]\n\t\t\t\t= $object;\n\t\t\t//have to set it manually as translation type of main node cannot be \"sys\" as this type is a orgu itself.\n\t\t\tif($object[\"type\"] == \"orgu\")\n\t\t\t\t$new_objects[$object[\"title\"].\":\".$object[\"child\"]][\"title\"] = $lng->txt(\"obj_orgu\");\n\t\t}\n\n\t\t// add entry for switching to repository admin\n\t\t// note: please see showChilds methods which prevents infinite look\n\t\t$new_objects[$lng->txt(\"repository_admin\").\":\".ROOT_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => ROOT_FOLDER_ID,\n\t\t\t\t\"ref_id\" => ROOT_FOLDER_ID,\n\t\t\t\t\"depth\" => 3,\n\t\t\t\t\"type\" => \"root\",\n\t\t\t\t\"title\" => $lng->txt(\"repository_admin\"),\n\t\t\t\t\"description\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t\t\"desc\" => $lng->txt(\"repository_admin_desc\"),\n\t\t\t);\n\n//$nd = $tree->getNodeData(SYSTEM_FOLDER_ID);\n//var_dump($nd);\n\t\t$new_objects[$lng->txt(\"general_settings\").\":\".SYSTEM_FOLDER_ID] =\n\t\t\tarray(\n\t\t\t\t\"tree\" => 1,\n\t\t\t\t\"child\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"ref_id\" => SYSTEM_FOLDER_ID,\n\t\t\t\t\"depth\" => 2,\n\t\t\t\t\"type\" => \"adm\",\n\t\t\t\t\"title\" => $lng->txt(\"general_settings\"),\n\t\t\t);\n\t\tksort($new_objects);\n\n\t\t// determine items to show\n\t\t$items = array();\n\t\tforeach ($new_objects as $c)\n\t\t{\n\t\t\t// check visibility\n\t\t\tif ($tree->getParentId($c[\"ref_id\"]) == ROOT_FOLDER_ID && $c[\"type\"] != \"adm\" &&\n\t\t\t\t$_GET[\"admin_mode\"] != \"repository\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// these objects may exist due to test cases that didnt clear\n\t\t\t// data properly\n\t\t\tif ($c[\"type\"] == \"\" || $c[\"type\"] == \"objf\" ||\n\t\t\t\t$c[\"type\"] == \"xxx\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$accessible = $rbacsystem->checkAccess('visible,read', $c[\"ref_id\"]);\n\t\t\tif (!$accessible)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"ref_id\"] == ROOT_FOLDER_ID &&\n\t\t\t\t!$rbacsystem->checkAccess('write', $c[\"ref_id\"]))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($c[\"type\"] == \"rolf\" && $c[\"ref_id\"] != ROLE_FOLDER_ID)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$items[] = $c;\n\t\t}\n\n\t\t$titems = array();\n\t\tforeach ($items as $i)\n\t\t{\n\t\t\t$titems[$i[\"type\"]] = $i;\n\t\t}\n\t\t// admin menu layout\n\t\t$layout = array(\n\t\t\t1 => array(\n\t\t\t\t\"adn\" =>\n\t\t\t\t\tarray(\"xaad\", \"xaec\",\"xaed\", \"xaes\", \"xaep\", \"xacp\", \"xata\", \"xamd\", \"xast\"),\n\t\t\t\t\"basic\" =>\n\t\t\t\t\tarray(\"adm\", \"stys\", \"adve\", \"lngf\", \"hlps\", \"accs\", \"cmps\", \"extt\"),\n\t\t\t\t\"user_administration\" =>\n\t\t\t\t\tarray(\"usrf\", 'tos', \"rolf\", \"auth\", \"ps\", \"orgu\"),\n\t\t\t\t\"learning_outcomes\" =>\n\t\t\t\t\tarray(\"skmg\", \"cert\", \"trac\")\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t\"user_services\" =>\n\t\t\t\t\tarray(\"pdts\", \"prfa\", \"nwss\", \"awra\", \"cadm\", \"cals\", \"mail\"),\n\t\t\t\t\"content_services\" =>\n\t\t\t\t\tarray(\"seas\", \"mds\", \"tags\", \"taxs\", 'ecss', \"pays\", \"otpl\"),\n\t\t\t\t\"maintenance\" =>\n\t\t\t\t\tarray('sysc', \"recf\", 'logs', \"root\")\n\t\t\t),\n\t\t\t3 => array(\n\t\t\t\t\"container\" =>\n\t\t\t\t\tarray(\"reps\", \"crss\", \"grps\", \"prgs\"),\n\t\t\t\t\"content_objects\" =>\n\t\t\t\t\tarray(\"bibs\", \"blga\", \"chta\", \"excs\", \"facs\", \"frma\",\n\t\t\t\t\t\t\"lrss\", \"mcts\", \"mobs\", \"svyf\", \"assf\", \"wbrs\", \"wiks\")\n\t\t\t)\n\t\t);\n\n\t\t// now get all items and groups that are accessible\n\t\t$groups = array();\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\t$groups[$i] = array();\n\t\t\tforeach ($layout[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\t$groups[$i][$group] = array();\n\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\tforeach ($entries as $e)\n\t\t\t\t{\n\t\t\t\t\tif ($e == \"---\" || $titems[$e][\"type\"] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\" && $entries_since_last_sep)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if ($e != \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$groups[$i][$group][] = $e;\n\t\t\t\t\t\t\t$entries_since_last_sep = true;\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\tinclude_once(\"./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php\");\n\t\t$gl = new ilGroupedListGUI();\n\n\t\tfor ($i = 1; $i <= 3; $i++)\n\t\t{\n\t\t\tif ($i > 1)\n\t\t\t{\n//\t\t\t\t$gl->nextColumn();\n\t\t\t}\n\t\t\tforeach ($groups[$i] as $group => $entries)\n\t\t\t{\n\t\t\t\tif (count($entries) > 0)\n\t\t\t\t{\n\t\t\t\t\t$gl->addGroupHeader($lng->txt(\"adm_\".$group));\n\n\t\t\t\t\tforeach ($entries as $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($e == \"---\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$gl->addSeparator();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$path = ilObject::_getIcon(\"\", \"tiny\", $titems[$e][\"type\"]);\n\t\t\t\t\t\t\t$icon = ($path != \"\")\n\t\t\t\t\t\t\t\t? ilUtil::img($path).\" \"\n\t\t\t\t\t\t\t\t: \"\";\n\n\t\t\t\t\t\t\tif ($_GET[\"admin_mode\"] == \"settings\" && $titems[$e][\"ref_id\"] == ROOT_FOLDER_ID)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;admin_mode=repository\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_rep\",\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_rep\"),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$gl->addEntry($icon.$titems[$e][\"title\"],\n\t\t\t\t\t\t\t\t\t\"ilias.php?baseClass=ilAdministrationGUI&amp;ref_id=\".\n\t\t\t\t\t\t\t\t\t$titems[$e][\"ref_id\"].\"&amp;cmd=jump\",\n\t\t\t\t\t\t\t\t\t\"_top\", \"\", \"\", \"mm_adm_\".$titems[$e][\"type\"],\n\t\t\t\t\t\t\t\t\tilHelp::getMainMenuTooltip(\"mm_adm_\".$titems[$e][\"type\"]),\n\t\t\t\t\t\t\t\t\t\"bottom center\", \"top center\", false);\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//$gl->addSeparator();\n\n\t\t$tpl->setLeftNavContent(\"<div id='adn_adm_side_menu'>\".$gl->getHTML().\"</div>\");\n\t}", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "function network_admin_menu()\n {\n }", "public function register_admin_menu(){\r\n $all_modules = HW_TGM_Module_Activation::get_register_modules();\r\n $module = $this->_option('module');\r\n $name = $module->module_name;\r\n $label = isset($all_modules[$name])? $all_modules[$name]['name'] : $name;\r\n\r\n $this->add_help_content(self::load_settings_page_hook_slug(HW_Module_Settings_page::PAGE_SLUG) ,$name , $label);\r\n }", "public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}", "function initAdminMenu() {\r\n\r\n\t\t$accounts_hook = $this->addMenu('accounts', ShoppWholesale::SHOPP_MENU_ROOT);\r\n\t\t$this->addMenu('account-review', $accounts_hook);\r\n\t\t$this->addMenu('account-settings', $accounts_hook);\r\n\t\t$this->addMenu('account-shortcode-help', $accounts_hook);\r\n\r\n\t\t//reorder menus\r\n\t\t$this->sendToBottom('Settings');\r\n\r\n\t}", "public function addAdminMenu()\n\t {\n\t add_menu_page('Create Metas', 'Create Metas', 'manage_options', 'create-metas', array( $this, 'optionsPage' ), 'dashicons-admin-tools', 66 );\n\t }", "function on_admin_menu ()\n{\n global $cap_collation_name;\n\n // adds a menu entry to the dashboard menu\n add_submenu_page (\n 'index.php',\n $cap_collation_name . ' Dashboard',\n $cap_collation_name,\n 'edit_pages',\n DASHBOARD_PAGE_ID,\n __NAMESPACE__ . '\\on_menu_dashboard_page'\n );\n}", "function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}", "public function insertMenuEvent(){\n //\n }", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "function create_admin_menu()\n {\n add_menu_page(\n 'Mattevideo Exercises', //page title\n 'Mattevideo Exercises', //menu title\n 'manage_options', //capabilities\n 'mattevideo_exercise', //menu slug\n array($this, 'mattevideo_exercise') //function\n );\n add_submenu_page('mattevideo_exercise', //parent slug\n 'Create Exercise', //page title\n 'Create Exercise', //menu title\n 'manage_options', //capability\n 'create_exercise', //menu slug\n array($this, 'create_exercise')); //function\n }", "function h_add_menus(array $args) {\n if (!is_admin()) { return;}\n\n $menu = new H_Sidenav($args);\n $menu->add();\n}", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "function jigoshop_admin_menu() {\n\tglobal $menu;\n\t\n\t$menu[] = array( '', 'read', 'separator-jigoshop', '', 'wp-menu-separator jigoshop' );\n\t\n add_menu_page(__('Jigoshop'), __('Jigoshop'), 'manage_options', 'jigoshop' , 'jigoshop_dashboard', jigoshop::plugin_url() . '/assets/images/icons/menu_icons.png', 55);\n add_submenu_page('jigoshop', __('Dashboard', 'jigoshop'), __('Dashboard', 'jigoshop'), 'manage_options', 'jigoshop', 'jigoshop_dashboard'); \n add_submenu_page('jigoshop', __('General Settings', 'jigoshop'), __('Settings', 'jigoshop') , 'manage_options', 'settings', 'jigoshop_settings');\n add_submenu_page('jigoshop', __('System Info','jigoshop'), __('System Info','jigoshop'), 'manage_options', 'sysinfo', 'jigoshop_system_info');\n add_submenu_page('edit.php?post_type=product', __('Attributes','jigoshop'), __('Attributes','jigoshop'), 'manage_options', 'attributes', 'jigoshop_attributes');\n}", "function spreadshop_admin_menu_entry($content) \n\t{\n add_menu_page(\"Spreadshop Admin\", \"Spreadshop\", 1, \"Spreadshop_Admin\", \"spreadshop_admin\"); \n\t}", "function manage()\n\t{\n\t\tglobal $template, $errors, $db, $mod_loader, $security;\n\t\t\n\t\t$menuid = ( isset( $_GET[ 'menuid' ] ) ) ? intval( $_GET[ 'menuid' ] ) : 0;\n\t\t\n\t\tif ( $menuid != 0 )\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_parent='$menuid'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$sql = \"SELECT m.*, c.* FROM \" . MORECONTENT_MENU_TABLE . \" m LEFT JOIN \" . MORECONTENT_CONTENT_TABLE . \" c ON c.menu_id=m.menu_id WHERE m.menu_id='$menuid' LIMIT 1\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$menu = $db->sql_fetchrow( $result );\n\t\t}else\n\t\t{\n\t\t\t$sql = \"SELECT * FROM \" . MORECONTENT_MENU_TABLE . \" WHERE menu_level='0'\";\n\t\t\tif ( !$result = $db->sql_query( $sql ) )\n\t\t\t{\n\t\t\t\t$errors->report_error( 'Couldn\\'t read database', CRITICAL_ERROR );\n\t\t\t}\n\t\t\t$submenus = $db->sql_fetchrowset( $result );\n\t\t\t\n\t\t\t$menu = array( 'menu_id' => 0, 'menu_parent' => 0, 'menu_level' => -1, 'menu_title' => $this->lang[ 'Menu_na' ], 'menu_content' => 0, 'id' => 0, 'content' => '' );\n\t\t}\n\t\t\n\t\t// get the editor\n\t\t$mods = $mod_loader->getmodule( 'editor', MOD_FETCH_NAME, NOT_ESSENTIAL );\n\t\t$mod_loader->port_vars( array( 'name' => 'editor1', 'quickpost' => FALSE, 'def_text' => stripslashes( $menu[ 'content' ] ) ) );\n\t\t$mod_loader->execute_modules( 0, 'show_editor' );\n\t\t$editor = $mod_loader->get_vars( array( 'editor_HTML', 'editor_WYSIWYG' ) );\n\t\t\n\t\t$frame = '<b><a href=\"%s\">%s</a></b> :: ';\n\t\t$parsed_submenus = '';\n\t\tif ( is_array( $submenus ) )\n\t\t{\n\t\t\tforeach ( $submenus as $sub )\n\t\t\t{\n\t\t\t\t$url = $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $sub[ 'menu_id' ] );\n\t\t\t\t$parsed_submenus .= sprintf( $frame, $url, $sub[ 'menu_title' ] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$template->assign_block_vars( 'manage', '', array(\n\t\t\t'L_TITLE' => $this->lang[ 'Manage_title' ],\n\t\t\t'L_EXPLAIN' => $this->lang[ 'Manage_explain' ],\n\t\t\t'L_TITLE2' => $this->lang[ 'Menu_title' ],\n\t\t\t'L_TITLE3' => $menu[ 'menu_title' ],\n\t\t\t'L_ADDMENU' => $this->lang[ 'Menu_add' ],\n\t\t\t'L_ADDTITLE' => $this->lang[ 'Menu_addtitle' ],\n\t\t\t'L_DELMENU' => $this->lang[ 'Menu_delete' ],\n\t\t\t'L_CHANGEMENU' => $this->lang[ 'Menu_change' ],\n\t\t\t'L_UP' => $this->lang[ 'Menu_up' ],\n\t\t\t\n\t\t\t'S_EDITOR' => $editor[ 'editor_HTML' ],\n\t\t\t'S_MENUS' => $parsed_submenus,\n\t\t\t'S_FORM_ACTION' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage2&menuid=' . $menu[ 'menu_id' ] . '&menulevel=' . $menu[ 'menu_level' ] ),\n\t\t\t\n\t\t\t'U_UP' => $security->append_sid( '?' . MODE_URL . '=ACP&' . SUBMODE_URL . '=ACP_MoreContent&s=manage&menuid=' . $menu[ 'menu_parent' ] ),\n\t\t) );\n\t\t$template->assign_switch( 'manage', TRUE );\n\t}", "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "function polizeipresse_create_admin_menu() {\r\n\tif(current_user_can('manage_options')){\r\n\t\t// Create new top-level menu\r\n\t\tadd_options_page('Polizeipresse-Plugin',\r\n\t\t\t\t\t\t 'Polizeipresse',\r\n\t\t\t\t\t\t 'manage_options',\r\n\t\t\t\t\t\t 'polizeipresse_options',\r\n\t\t\t\t\t\t 'polizeipresse_option_page');\r\n\t}\r\n}", "static function adminMenuPage()\n {\n // Include the view for this menu page.\n include PROJECTEN_PLUGIN_ADMIN_VIEWS_DIR . '/admin_main.php';\n }", "public function add_menu() {\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=blicki',\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t__( 'Suggestion Review', 'blicki' ),\n\t\t\t'edit_others_posts',\n\t\t\t'blicki-show-diff',\n\t\t\tarray( $this, 'admin_suggestion_viewer' )\n\t\t);\n\t\tremove_submenu_page( 'edit.php?post_type=blicki', 'blicki-show-diff' );\n\t}", "function jpa_menu_administrator()\n{\n add_menu_page(JPA_NOMBRE,JPA_NOMBRE,'manage_options',JPA_RUTA . '/admin/jpa-configuration.php');\n add_submenu_page(JPA_RUTA . '/admin/jpa-configuration.php','Add resource','Add resource','manage_options',JPA_RUTA . '/admin/jpa-add_resource.php');\n}", "function templ_add_mainadmin_menu_()\r\n{\r\n\t$menu_title = __('Tevolution', 'templatic');\r\n\tif (function_exists('add_object_page'))\r\n\t{\r\n\t\t$hook = add_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_system_menu', 'dashboard_bundles', '',25); /* title of new sidebar*/\r\n\t}else{\r\n\t\tadd_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_wp_admin_menu', 'design','');\t\t\r\n\t} \r\n}", "public function add_admin_menus()\n {\n\n add_menu_page(\n 'Online Exam',\n 'Online Exam',\n 'manage_department',\n 'online_exam',\n function () {\n new \\OE\\includes\\html\\Manage_Department;\n },\n 'dashicons-text-page',\n );\n\n /**\n * adding theme setting menu to admin page\n */\n\n add_menu_page(\n 'OE Theme Setting',\n 'Theme Setting',\n 'manage_options',\n 'oe_theme_setting',\n function () {\n new \\OE\\includes\\html\\Theme_Setting;\n },\n 'dashicons-admin-generic',\n 98\n );\n\n /**\n * adding all the submens to admin page\n * this is teacher's submenu page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Teacher's\",\n // menu title\n \"Manage Teacher's\",\n // capability\n 'manage_teachers',\n // menu slug\n 'manage_teachers',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Teaher;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Questions\",\n // menu title\n \"Manage Questions\",\n // capability\n 'manage_questions',\n // menu slug\n 'manage_questions',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Question;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Exam Routine\",\n // menu title\n \"Exam Routine\",\n // capability\n 'manage_routine',\n // menu slug\n 'manage_routine',\n // callback function\n function () {\n new \\OE\\includes\\html\\Exam_Routine;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Students\",\n // menu title\n \"Manage Students\",\n // capability\n 'manage_students',\n // menu slug\n 'manage_students',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Student;\n },\n );\n\n /**\n * adding create all question page according to question folder\n * this is question creation page\n */\n if (isset($_GET['exam_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Create Qustion\",\n // menu title\n \"Create Qustion\",\n // capability\n 'create_question',\n // menu slug\n 'create_question',\n // callback function\n function () {\n new \\OE\\includes\\html\\Create_Qustion;\n },\n );\n }\n\n /**\n * adding student performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['current_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Student's Performence\",\n // menu title\n \"Student's Performence\",\n // capability\n 'student_performence',\n // menu slug\n 'student_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Student_Performence;\n },\n );\n }\n\n /**\n * adding individual performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['performence_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // menu title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // capability\n 'individual_performence',\n // menu slug\n 'individual_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Individual_Performence;\n },\n );\n }\n\n /**\n * renaming online exam menu\n */\n\n $this->admin_menu_rename();\n }", "public function adminMenu()\r\n {\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'post', 'normal');\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'page', 'normal');\r\n if ( function_exists('add_submenu_page') ) {\r\n $page = add_submenu_page('plugins.php', __('wpGoogleMaps Configuration'), __('wpGoogleMaps Configuration'), 'manage_options', 'wpGoogleMaps-config', array($this, 'configPage'));\r\n add_action( 'admin_print_scripts-'.$page, array($this, 'printScripts') );\r\n }\r\n }", "private function set_admin_menu() {\n $TSB_settings_admin_menu = new Admin_Menu( Initial_Value::TSB_main_settings_page() );\n $this->loader->add_action( 'admin_menu', $TSB_settings_admin_menu, 'add_admin_menu_page' );\n\n// $plugin_name_sample_admin_sub_menu1 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page1() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu1, 'add_admin_sub_menu_page' );\n//\n// $plugin_name_sample_admin_sub_menu2 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page2() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu2, 'add_admin_sub_menu_page' );\n\n }", "static function admin_menu()\n\t{\n\t\t$icon = plugins_url( 'jumplead/assets/jumplead-icon.png' );\n\n\t\t// Main Menu\n\t\tadd_menu_page( 'Jumplead', 'Jumplead', 'edit_pages', 'jumplead', 'Jumplead::show_page_jumplead', $icon );\n\n\t\t// Subpages\n\t\tadd_submenu_page( 'jumplead', 'Integrations', 'Integrations', 'edit_pages', 'jumplead_integrations', 'Jumplead::show_page_integrations' );\n\t\tadd_submenu_page( 'jumplead', 'Settings', 'Settings', 'edit_pages', 'jumplead_settings', 'Jumplead::show_page_settings' );\n\t}", "function wp_admin_bar_edit_site_menu($wp_admin_bar)\n {\n }", "public function run()\n {\n \n\n \\DB::table('admin_menu')->delete();\n \n \\DB::table('admin_menu')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'parent_id' => 0,\n 'order' => 1,\n 'title' => 'Index',\n 'icon' => 'fa-bar-chart',\n 'uri' => '/',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'parent_id' => 0,\n 'order' => 2,\n 'title' => 'Admin',\n 'icon' => 'fa-tasks',\n 'uri' => '',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'parent_id' => 2,\n 'order' => 3,\n 'title' => 'Users',\n 'icon' => 'fa-users',\n 'uri' => 'auth/users',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 4,\n 'parent_id' => 2,\n 'order' => 4,\n 'title' => 'Roles',\n 'icon' => 'fa-user',\n 'uri' => 'auth/roles',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 4 => \n array (\n 'id' => 5,\n 'parent_id' => 2,\n 'order' => 5,\n 'title' => 'Permission',\n 'icon' => 'fa-user',\n 'uri' => 'auth/permissions',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 5 => \n array (\n 'id' => 6,\n 'parent_id' => 2,\n 'order' => 6,\n 'title' => 'Menu',\n 'icon' => 'fa-bars',\n 'uri' => 'auth/menu',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 6 => \n array (\n 'id' => 7,\n 'parent_id' => 2,\n 'order' => 7,\n 'title' => 'Operation log',\n 'icon' => 'fa-history',\n 'uri' => 'auth/logs',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 7 => \n array (\n 'id' => 8,\n 'parent_id' => 0,\n 'order' => 8,\n 'title' => 'Helpers',\n 'icon' => 'fa-gears',\n 'uri' => '',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 8 => \n array (\n 'id' => 9,\n 'parent_id' => 8,\n 'order' => 9,\n 'title' => 'Scaffold',\n 'icon' => 'fa-keyboard-o',\n 'uri' => 'helpers/scaffold',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 9 => \n array (\n 'id' => 10,\n 'parent_id' => 8,\n 'order' => 10,\n 'title' => 'Database terminal',\n 'icon' => 'fa-database',\n 'uri' => 'helpers/terminal/database',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 10 => \n array (\n 'id' => 11,\n 'parent_id' => 8,\n 'order' => 11,\n 'title' => 'Laravel artisan',\n 'icon' => 'fa-terminal',\n 'uri' => 'helpers/terminal/artisan',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ),\n 11 => \n array (\n 'id' => 12,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => 'Banner',\n 'icon' => 'fa-bars',\n 'uri' => '/banner',\n 'created_at' => '2017-06-09 10:04:09',\n 'updated_at' => '2017-06-09 12:02:55',\n ),\n 12 => \n array (\n 'id' => 13,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '菜单',\n 'icon' => 'fa-bars',\n 'uri' => '/menu',\n 'created_at' => '2017-06-09 12:05:24',\n 'updated_at' => '2017-06-09 12:05:24',\n ),\n 13 => \n array (\n 'id' => 14,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '分类',\n 'icon' => 'fa-bars',\n 'uri' => 'type',\n 'created_at' => '2017-06-09 12:15:50',\n 'updated_at' => '2017-06-09 12:15:50',\n ),\n 14 => \n array (\n 'id' => 15,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '标签',\n 'icon' => 'fa-bars',\n 'uri' => 'tag',\n 'created_at' => '2017-06-09 12:19:52',\n 'updated_at' => '2017-06-09 12:19:52',\n ),\n 15 => \n array (\n 'id' => 16,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '文章',\n 'icon' => 'fa-bars',\n 'uri' => 'post',\n 'created_at' => '2017-06-09 12:28:37',\n 'updated_at' => '2017-06-09 12:28:37',\n ),\n 16 => \n array (\n 'id' => 17,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '评论',\n 'icon' => 'fa-bars',\n 'uri' => 'comment',\n 'created_at' => '2017-06-09 13:22:14',\n 'updated_at' => '2017-06-09 13:22:14',\n ),\n 17 => \n array (\n 'id' => 18,\n 'parent_id' => 0,\n 'order' => 0,\n 'title' => '友情链接',\n 'icon' => 'fa-bars',\n 'uri' => 'link',\n 'created_at' => '2017-06-10 03:57:58',\n 'updated_at' => '2017-06-10 03:57:58',\n ),\n ));\n \n \n }", "function csdb_add_menu_page(){\n\tadd_menu_page(\n\t\t'CSDB',\n\t\t'CSDB',\n\t\t'read',\n\t\t'csdb_plugin',\n\t\t'csdb_menu_page_callback',\n\t\t'dashicons-admin-tools',\n\t\t60\n\t);\n\t\n\t\n\t\n\t\n}", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "public function admin_menu(): void {\n\t\tif ( is_plugin_active_for_network( plugin_basename( WP_SENTRY_PLUGIN_FILE ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_management_page(\n\t\t\t'WP Sentry test',\n\t\t\t'WP Sentry test',\n\t\t\t'activate_plugins',\n\t\t\tself::ADMIN_PAGE_SLUG,\n\t\t\t[ $this, 'render_admin_page' ]\n\t\t);\n\t}", "public static function onAdminMenuInit($event)\n {\n $event->sender->addItem(array(\n 'label' => \"Note\",\n 'url' => Url::to(['/Note/admin']),\n 'group' => 'manage',\n 'icon' => '<i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i>',\n 'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'Note' && Yii::$app->controller->id == 'admin'),\n 'sortOrder' => 99999,\n ));\n }", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "public function event()\n {\n return 'admin_menu';\n }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\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 hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollection\" Entity',\n 'page callback' => '_thumbwhere_content_collection_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollection notifications'\n ),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollection',\n 'description' => 'Add edit and update thumbwhere_contentcollections.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollections.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollection',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_add_page',\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollection'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollection',\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollection_create(array('type' => 'thumbwhere_contentcollection'))),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollection'),\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollection entities\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollection_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollection/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollection_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollection.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollections\n $items['thumbwhere_contentcollection/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollection_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollection_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollection_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\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}", "public function display_admin_menu_item() {\n add_menu_page(\n 'Visit Seattle Partners Importer',\n 'Partners Importer',\n 'manage_options',\n 'visit-seattle-partners-importer',\n array( 'VSPI_Admin', 'display_page' ),\n 'dashicons-update'\n );\n }", "public function adminmenu() {\n\t\n\t\tglobal $current_screen;\n\t\tglobal $parent_file;\n\n\t\tif ( $current_screen->base == 'settings_page_schedule-a-visit-to-sherpa' ) {\n\t\t\t// We have to reset this after the Menu is generated so Settings Errors still appear\n\t\t\t$parent_file = 'options-general.php';\n\t\t}\n\n\t}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\n\t\tadd_submenu_page(\n\t\t\t'ltple-settings',\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=affiliate-commission'\n\t\t);\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Affiliates', \n\t\t\t'All Affiliates', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=affiliates'\n\t\t);\n\t}", "protected function registerMenu()\n {\n }", "function wp_admin_bar_new_content_menu($wp_admin_bar)\n {\n }", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "public function admin_menu() {\n // Duplicate link into properties mgmt\n \tadd_submenu_page(\n \t\tself::SLUG,\n \t\t__('Settings'),\n \t\t__('Settings'),\n \t\t'manage_options',\n \t\tself::SLUG,\n \t\t1\n \t);\n }", "function wp_admin_bar_edit_menu($wp_admin_bar)\n {\n }", "public static function menu_init()\n\t\t{ \n\t\t\t\n\t\t\t# create db upon install \n register_activation_hook(__FILE__, array(__CLASS__, 'Install'));\n register_deactivation_hook(__FILE__, array(__CLASS__, 'Uninstall'));\n\t\t\t\n\t\t\t# physical data inputs\n\t\t\tadd_action( 'init',array( __CLASS__, 'menucategory_post_custom') );\n\t\t\tadd_action( 'admin_init', array( __CLASS__, 'menucat_metabox') );\n\t\t\tadd_action( 'admin_menu', array( __CLASS__,'menu_subpage_categories') );\n\t\t\tadd_action( 'admin_menu', array( __CLASS__,'menu_subpage_settings') );\n\t\t\t\n\t\t\t# manage custom posts\n\t\t\tadd_filter( 'manage_edit-'.self::$post_type.'_columns', array( __CLASS__,'edit_post_columns') ) ;\n\t\t\tadd_action( 'manage_'.self::$post_type.'_posts_custom_column',array( __CLASS__, 'manage_post_columns'), 10, 2 );\n\t\t\tadd_action( 'restrict_manage_posts', array( __CLASS__,'admin_posts_filter_restrict_manage_posts') );\n\t\t\tadd_filter( 'parse_query', array( __CLASS__,'parse_posts_filter') );\n\t\t\t\n # datasaving\n\t\t\tadd_action( 'save_post',array( __CLASS__, 'save_custom_post') );\n\t\t\t\n\t\t\t# ajax Requests\n\t\t\tadd_action('wp_ajax_add_category', array( __CLASS__,'func_ajax_add_category'));\n\t\t\tadd_action('wp_ajax_load_menu', array( __CLASS__,'func_ajax_load_menu'));\n\t\t\tadd_action('wp_ajax_delete_category', array( __CLASS__,'func_ajax_del_menu'));\n\t\t\tadd_action('wp_ajax_save_category', array( __CLASS__,'func_ajax_sav_menu'));\n\t\t\tadd_action('wp_ajax_save_setting', array( __CLASS__,'func_ajax_sav_setting'));\n\t\t\t\n\t\t\t# displaying output\n\t\t\tadd_filter('the_content',array( __CLASS__,'display_in_content'));\n\t\t\tadd_action( 'template_redirect',array( __CLASS__, 'display_in_redirect'));\n\t\t\t\n \n\t\t}", "function sld_manage_menu_items() {\n\tif( !current_user_can( 'administrator' ) ) {\n\t}\n\tremove_menu_page('link-manager.php'); // Links\n\t// remove_menu_page('edit.php'); // Posts\n\tremove_menu_page('upload.php'); // Media\n\t// remove_menu_page('edit-comments.php'); // Comments\n\t// remove_menu_page('edit.php?post_type=page'); // Pages\n\t// remove_menu_page('plugins.php'); // Plugins\n\t// remove_menu_page('themes.php'); // Appearance\n\t// remove_menu_page('users.php'); // Users\n\t// remove_menu_page('tools.php'); // Tools\n\t// remove_menu_page('options-general.php'); // Settings\n}", "function admin_menu(){\n\t\t\tadd_menu_page('Videos','Videos', 'moderate_comments', 'videos', array($this, 'admin_action'));\n\n\t\t\t//add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t\tadd_submenu_page( 'videos', 'Add New', 'Add New', 'moderate_comments', 'videos&action=add', array($this, 'admin_action') );\n\n\t\t}", "public function add_admin_menu_entry() {\n\t\t\n\t\t// for all menu entries:\n\t\t$callback = array( $this, 'show_admin_page' );\n\t\t/**\n\t\t * Filter the IggoGrid admin menu entry name.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param string $entry_name The admin menu entry name. Default \"IggoGrid\".\n\t\t */\n\t\t$admin_menu_entry_name = apply_filters( 'iggogrid_admin_menu_entry_name', 'IggoGrid' );\n\n\t\tif ( $this->is_top_level_page ) {\n\t\t\t$this->init_i18n_support(); // done here as translated strings for admin menu are needed already\n\t\t\t$this->init_view_actions(); // after init_i18n_support(), as it requires translation\n\t\t\t$min_access_cap = $this->view_actions['list']['required_cap'];\n\t\t\t\n\t\t\t$icon_url = 'dashicons-list-view';\n\t\t\tswitch ( $this->parent_page ) {\n\t\t\t\tcase 'top':\n\t\t\t\t\t$position = 3; // position of Dashboard + 1\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'middle':\n\t\t\t\t\t$position = ( ++$GLOBALS['_wp_last_object_menu'] );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bottom':\n\t\t\t\t\t$position = ( ++$GLOBALS['_wp_last_utility_menu'] );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tadd_menu_page( 'IggoGrid', $admin_menu_entry_name, $min_access_cap, 'iggogrid', $callback, $icon_url, $position );\n\t\t\t\n\t\t\tforeach ( $this->view_actions as $action => $entry ) {\n\t\t\t\tif ( ! $entry['show_entry'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$slug = 'iggogrid';\n\t\t\t\tif ( 'list' != $action ) {\n\t\t\t\t\t$slug .= '_' . $action;\n\t\t\t\t}\n\t\t\t\t$this->page_hooks[] = add_submenu_page( 'iggogrid', sprintf( __( '%1$s &lsaquo; %2$s', 'iggogrid' ), $entry['page_title'], 'IggoGrid' ), $entry['admin_menu_title'], $entry['required_cap'], $slug, $callback );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->init_view_actions(); // no translation necessary here\n\t\t\t$min_access_cap = $this->view_actions['list']['required_cap'];\n\t\t\t$this->page_hooks[] = add_submenu_page( $this->parent_page, 'IggoGrid', $admin_menu_entry_name, $min_access_cap, 'iggogrid', $callback );\n\t\t}\n\t}", "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}", "public function addMenu()\n {\n $wpMenu = [\n [\n 'Bolsista',\n 'Bolsista',\n 'edit_pages',\n 'bolsista',\n $this,\n 'doAction',\n 'dashicons-format-aside',\n 2\n ]\n ];\n $wpSubMenu = [];\n $this->addMenuItem($wpMenu, $wpSubMenu);\n }", "public static function modify_admin_menu_links() {\n\t\t$post_type = Registrations::get_post_type();\n\t\t$path = 'edit.php?post_type=' . $post_type;\n\n\t\t// Remove 'Add New' link.\n\t\tremove_submenu_page( $path, 'post-new.php?post_type=' . $post_type );\n\n\t\t// Add 'Queue' link.\n\t\t$post_type_obj = get_post_type_object( $post_type );\n\t\tadd_submenu_page(\n\t\t\t$path,\n\t\t\t__( 'Photos In Moderation', 'wporg-photos' ),\n\t\t\t__( 'Queue', 'wporg-photos' ),\n\t\t\t$post_type_obj->cap->edit_posts,\n\t\t\tesc_url( add_query_arg( [ 'post_status' => 'pending' ], $path ) ),\n\t\t\t'',\n\t\t\t1\n\t\t);\n\t}", "public function adminMenu()\n {\n add_menu_page( 'Barcode', 'Barcode', 'manage_options', 'wp-barcode', [$this, 'adminPage'] );\n }", "private function instantiate_admin_pages() {\n $this->admin_objs[ 'menu' ] = new HRHS_Admin_Menu();\n }", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/host/notify'] = array(\n 'title' => 'Notifications Callback for \"Host\" Entity',\n 'page callback' => '_thumbwhere_host_notify',\n 'access arguments' => array(\n 'send thumbwhere host notifications'\n ),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'Host',\n 'description' => 'Add edit and update thumbwhere_hosts.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_hosts.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a Host',\n 'title' => 'Add',\n 'description' => 'Add a new Host',\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array(thumbwhere_host_create(array('type' => 'thumbwhere_host'))),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_host'),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a Host',\n 'title' => 'Add',\n\t 'description' => 'Add a new Host',\n 'page callback' => 'thumbwhere_host_add_page',\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_host'] = array(\n 'title' => 'Add ' . 'ThumbWhereHost',\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array(thumbwhere_host_create(array('type' => 'thumbwhere_host'))),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_host'),\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_host entities\n $items[$this->path . '/thumbwhere_host/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_host_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_host/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_host/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_host_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_host.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_hosts\n $items['thumbwhere_host/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_host_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_host_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_host_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "public function menu_entry_for_admin() {\n\t\tglobal $current_site, $wpdb;\n\t\t// $current_site is not the right way to do this - it is internal, and could be anything\n\t\tif (is_multisite() && (!is_super_admin() || !is_object($wpdb) || !isset($wpdb->blogid) || 1 != $wpdb->blogid)) return;\n\n\t\tadd_action( 'admin_init', array($this, 'tfaRegisterTwoFactorAuthSettings' ));\n\n\t\tadd_options_page(\n\t\t\t__('Two Factor Authentication', 'two-factor-authentication'),\n\t\t\t__('Two Factor Authentication', 'two-factor-authentication'),\n\t\t\t'manage_options',\n\t\t\t'two-factor-auth',\n\t\t\tarray($this, 'tfaShowAdminSettingsPage')\n\t\t);\n\t}", "public function hook_menu() {\n\n $items = array();\n \n // Add a notification page...\n $items['thumbwhere/content_collection_item/notify'] = array(\n 'title' => 'Notifications Callback for \"ContentCollectionItem\" Entity',\n 'page callback' => '_thumbwhere_content_collection_item_notify',\n 'access arguments' => array(\n 'send thumbwhere contentcollectionitem notifications'\n ),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n ); \n \n $id_count = count(explode('/', $this->path));\n $wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;\n\n $items[$this->path] = array(\n 'title' => 'ContentCollectionItem',\n 'description' => 'Add edit and update thumbwhere_contentcollectionitems.',\n 'page callback' => 'system_admin_menu_block_page',\n 'access arguments' => array('access administration pages'),\n 'file path' => drupal_get_path('module', 'system'),\n 'file' => 'system.admin.inc',\n );\n\n // Change the overview menu type for the list of thumbwhere_contentcollectionitems.\n $items[$this->path]['type'] = MENU_LOCAL_TASK;\n\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n\n/*\n // Change the add page menu to multiple types of entities\n $items[$this->path . '/add'] = array(\n //'title' => 'Add a ContentCollectionItem',\n 'title' => 'Add',\n\t 'description' => 'Add a new ContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_add_page',\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit'),\n 'type' => MENU_NORMAL_ITEM,\n 'weight' => 20,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n\n );\n*/ \n/*\n $items[$this->path . '/add/' . 'thumbwhere_contentcollectionitem'] = array(\n 'title' => 'Add ' . 'ThumbWhereContentCollectionItem',\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array(thumbwhere_contentcollectionitem_create(array('type' => 'thumbwhere_contentcollectionitem'))),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', 'edit ' . 'thumbwhere_contentcollectionitem'),\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n*/\n // Loading and editing thumbwhere_contentcollectionitem entities\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard] = array(\n 'page callback' => 'thumbwhere_contentcollectionitem_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'weight' => 0,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/edit'] = array(\n 'title' => 'Edit',\n 'type' => MENU_DEFAULT_LOCAL_TASK,\n 'weight' => -10,\n 'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,\n );\n\n $items[$this->path . '/thumbwhere_contentcollectionitem/' . $wildcard . '/delete'] = array(\n 'title' => 'Delete',\n 'page callback' => 'thumbwhere_contentcollectionitem_delete_form_wrapper',\n 'page arguments' => array($id_count + 1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('edit', $id_count + 1),\n 'type' => MENU_LOCAL_TASK,\n 'context' => MENU_CONTEXT_INLINE,\n 'weight' => 10,\n 'file' => 'thumbwhere_contentcollectionitem.admin.inc',\n 'file path' => drupal_get_path('module', $this->entityInfo['module'])\n );\n\n // Menu item for viewing thumbwhere_contentcollectionitems\n $items['thumbwhere_contentcollectionitem/' . $wildcard] = array(\n //'title' => 'Title',\n 'title callback' => 'thumbwhere_contentcollectionitem_page_title',\n 'title arguments' => array(1),\n 'page callback' => 'thumbwhere_contentcollectionitem_page_view',\n 'page arguments' => array(1),\n 'access callback' => 'thumbwhere_contentcollectionitem_access',\n 'access arguments' => array('view', 1),\n 'type' => MENU_CALLBACK,\n );\n return $items;\n }", "public static function admin_menu() {\n\t\t$title = 'Micropub';\n\t\t// If the IndieWeb Plugin is installed use its menu.\n\t\tif ( class_exists( 'IndieWeb_Plugin' ) ) {\n\t\t\t$options_page = add_submenu_page(\n\t\t\t\t'indieweb',\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t} else {\n\t\t\t$options_page = add_options_page(\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t}\n\n\t}", "public function loadAdminMenu()\n {\n\t\t$file = $this->xoops_root_path . '/modules/' . $this->getInfo('dirname') . '/' . $this->getInfo('adminmenu');\n if ($this->getInfo('adminmenu') && $this->getInfo('adminmenu') != '' && \\XoopsLoad::fileExists($file)) {\n $adminmenu = array();\n include $file;\n $this->adminmenu = $adminmenu;\n }\n }", "public function admin_menu() {\n\t\t$intrusion_count = (int) Mute_Screamer::instance()->get_option( 'new_intrusions_count' );\n\t\t$intrusions_menu_title = sprintf( __( 'Intrusions %s', 'mute-screamer' ), \"<span class='update-plugins count-$intrusion_count' title='$intrusion_count'><span class='update-count'>\" . number_format_i18n( $intrusion_count ) . '</span></span>' );\n\t\tadd_dashboard_page( __( 'Mute Screamer Intrusions', 'mute-screamer' ), $intrusions_menu_title, 'activate_plugins', 'mscr_intrusions', array( $this, 'intrusions' ) );\n\t\tadd_options_page( __( 'Mute Screamer Configuration', 'mute-screamer' ), __( 'Mute Screamer', 'mute-screamer' ), 'activate_plugins', 'mscr_options', array( $this, 'options' ) );\n\n\t\t// Modify the Dashboard menu updates count\n\t\t$this->set_update_badge();\n\t}", "function admin_menu() {\n\t\t\n\t\t// Bail early if ACF is hidden.\n\t\tif( !acf_get_setting('show_admin') ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Vars.\n\t\t$slug = 'edit.php?post_type=acf-field-group';\n\t\t$cap = acf_get_setting('capability');\n\t\t\n\t\t// Add menu items.\n\t\tadd_menu_page( __(\"Custom Fields\",'acf'), __(\"Custom Fields\",'acf'), $cap, $slug, false, 'dashicons-welcome-widgets-menus', '80.025' );\n\t\tadd_submenu_page( $slug, __('Field Groups','acf'), __('Field Groups','acf'), $cap, $slug );\n\t\tadd_submenu_page( $slug, __('Add New','acf'), __('Add New','acf'), $cap, 'post-new.php?post_type=acf-field-group' );\n\t\t\n\t\t// Only register info page when needed.\n\t\tif( isset($_GET['page']) && $_GET['page'] === 'acf-settings-info' ) {\n\t\t\tadd_submenu_page( $slug, __('Info','acf'), __('Info','acf'), $cap,'acf-settings-info', array($this,'info_page_html') );\n\t\t}\n\t}", "public function run()\n {\n $menuItems = [\n ['id' => 1, 'parent_id' => 0, 'order' => 1, 'title' => 'Dashboard', 'icon' => 'fa-dashboard', 'uri' => '/'],\n ['id' => 2, 'parent_id' => 0, 'order' => 3, 'title' => 'Admin', 'icon' => 'fa-gear', 'uri' => NULL,],\n ['id' => 3, 'parent_id' => 2, 'order' => 4, 'title' => 'Users', 'icon' => 'fa-users', 'uri' => 'auth/users'],\n ['id' => 4, 'parent_id' => 2, 'order' => 5, 'title' => 'Roles', 'icon' => 'fa-user', 'uri' => 'auth/roles'],\n ['id' => 5, 'parent_id' => 2, 'order' => 6, 'title' => 'Permission', 'icon' => 'fa-ban', 'uri' => 'auth/permissions'],\n ['id' => 6, 'parent_id' => 2, 'order' => 7, 'title' => 'Menu', 'icon' => 'fa-bars', 'uri' => 'auth/menu'],\n ['id' => 7, 'parent_id' => 2, 'order' => 8, 'title' => 'Operation log', 'icon' => 'fa-history', 'uri' => 'auth/logs'],\n ['id' => 8, 'parent_id' => 0, 'order' => 2, 'title' => 'Users', 'icon' => 'fa-users', 'uri' => 'user'],\n ];\n\n DB::statement(\"TRUNCATE TABLE admin_menu\");\n DB::table('admin_menu')->insert($menuItems);\n }", "function admin_menu(){\n\t\t//Add the containing menu\n\t\tadd_menu_page(\n\t\t\t'Club Manager',\n\t\t\t'Club Manager',\n\t\t\t'clubMemberZone_access_memberZone',\n\t\t\t'clubMemberZone-memberZone',\n\t\t\tarray (&$this, 'load_view')\n\t\t\t//$this->pPlugin_url.'club-manager.png'\n\t\t\t);\n\n\t\t//add the submenus\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone membre',\t\t'Zone membre',\t\t'clubMemberZone_access_memberZone',\t'clubMemberZone-memberZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Mes groupes',\t\t'Mes groupes',\t\t'clubMemberZone_access_membership',\t'clubMemberZone-memberships',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone publication',\t'Zone publication',\t'clubMemberZone_access_publishZone',\t'clubMemberZone-publishZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Groupes',\t\t\t'Groupes',\t\t\t'clubMemberZone_edit_groups',\t\t\t'clubMemberZone-groups',\t\tarray(&$this, 'load_view'));\n\t}", "function add_admin_menu() {\r\n\t\tadd_management_page( __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), 'manage_options', 'regenthumbs-stamina', array(&$this, 'regenerate_interface') );\r\n\t}", "protected function prepend_admin()\n\t{\n\t\tl10n::set(__DIR__.'/locales/'.$this->okt->user->language.'/admin');\n\n\t\t# on détermine si on est actuellement sur ce module\n\t\t$this->onThisModule();\n\n\t\t# on ajoutent un item au menu admin\n\t\tif (!defined('OKT_DISABLE_MENU'))\n\t\t{\n\t\t\t$this->okt->page->estimateSubMenu = new htmlBlockList(null,adminPage::$formatHtmlSubMenu);\n\t\t\t$this->okt->page->mainMenu->add(\n\t\t\t\t__('m_estimate_menu_Estimates'),\n\t\t\t\t'module.php?m=estimate',\n\t\t\t\tON_ESTIMATE_MODULE,\n\t\t\t\t30,\n\t\t\t\t$this->okt->checkPerm('estimate'),\n\t\t\t\tnull,\n\t\t\t\t$this->okt->page->estimateSubMenu,\n\t\t\t\t$this->url().'/icon.png'\n\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Estimates_list'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=index',\n\t\t\t\t\tON_ESTIMATE_MODULE && (!$this->okt->page->action || $this->okt->page->action === 'index' || $this->okt->page->action === 'estimate'),\n\t\t\t\t\t1\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Products'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=products',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'products' || $this->okt->page->action === 'product'),\n\t\t\t\t\t2,\n\t\t\t\t\t$this->okt->checkPerm('estimate_products')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('m_estimate_menu_Accessories'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=accessories',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'accessories' || $this->okt->page->action === 'accessory'),\n\t\t\t\t\t3,\n\t\t\t\t\t$this->config->enable_accessories && $this->okt->checkPerm('estimate_accessories')\n\t\t\t\t);\n\t\t\t\t$this->okt->page->estimateSubMenu->add(\n\t\t\t\t\t__('c_a_menu_configuration'),\n\t\t\t\t\t'module.php?m=estimate&amp;action=config',\n\t\t\t\t\tON_ESTIMATE_MODULE && ($this->okt->page->action === 'config'),\n\t\t\t\t\t10,\n\t\t\t\t\t$this->okt->checkPerm('estimate_config')\n\t\t\t\t);\n\t\t}\n\t}", "private function loadMenu()\n\t{\n\t\tglobal $txt, $context, $modSettings, $settings;\n\n\t\t// Need these to do much\n\t\trequire_once(SUBSDIR . '/Menu.subs.php');\n\n\t\t// Define the menu structure - see subs/Menu.subs.php for details!\n\t\t$admin_areas = array(\n\t\t\t'forum' => array(\n\t\t\t\t'title' => $txt['admin_main'],\n\t\t\t\t'permission' => array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'index' => array(\n\t\t\t\t\t\t'label' => $txt['admin_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_home',\n\t\t\t\t\t\t'class' => 'i-home i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'credits' => array(\n\t\t\t\t\t\t'label' => $txt['support_credits_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_credits',\n\t\t\t\t\t\t'class' => 'i-support i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'maillist' => array(\n\t\t\t\t\t\t'label' => $txt['mail_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMaillist',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'permission' => array('approve_emails', 'admin_forum'),\n\t\t\t\t\t\t'enabled' => featureEnabled('pe'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'emaillist' => array($txt['mm_emailerror'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailfilters' => array($txt['mm_emailfilters'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailparser' => array($txt['mm_emailparsers'], 'admin_forum'),\n\t\t\t\t\t\t\t'emailtemplates' => array($txt['mm_emailtemplates'], 'approve_emails'),\n\t\t\t\t\t\t\t'emailsettings' => array($txt['mm_emailsettings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'news' => array(\n\t\t\t\t\t\t'label' => $txt['news_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageNews',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'permission' => array('edit_news', 'send_mail', 'admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editnews' => array($txt['admin_edit_news'], 'edit_news'),\n\t\t\t\t\t\t\t'mailingmembers' => array($txt['admin_newsletters'], 'send_mail'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packages' => array(\n\t\t\t\t\t\t'label' => $txt['package'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\Packages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['browse_packages']),\n\t\t\t\t\t\t\t'installed' => array($txt['installed_packages']),\n\t\t\t\t\t\t\t'options' => array($txt['package_settings']),\n\t\t\t\t\t\t\t'servers' => array($txt['download_packages']),\n\t\t\t\t\t\t\t'upload' => array($txt['upload_packages']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'packageservers' => array(\n\t\t\t\t\t\t'label' => $txt['package_servers'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\Packages\\\\PackageServers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-package i-admin',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t\t'search' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_search',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'select' => 'index'\n\t\t\t\t\t),\n\t\t\t\t\t'adminlogoff' => array(\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Admin',\n\t\t\t\t\t\t'function' => 'action_endsession',\n\t\t\t\t\t\t'label' => $txt['admin_logoff'],\n\t\t\t\t\t\t'enabled' => empty($modSettings['securityDisable']),\n\t\t\t\t\t\t'class' => 'i-sign-out i-admin',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'config' => array(\n\t\t\t\t'title' => $txt['admin_config'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'corefeatures' => array(\n\t\t\t\t\t\t'label' => $txt['core_settings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\CoreFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'featuresettings' => array(\n\t\t\t\t\t\t'label' => $txt['modSettings_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageFeatures',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-switch-on i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'basic' => array($txt['mods_cat_features']),\n\t\t\t\t\t\t\t'layout' => array($txt['mods_cat_layout']),\n\t\t\t\t\t\t\t'pmsettings' => array($txt['personal_messages']),\n\t\t\t\t\t\t\t'karma' => array($txt['karma'], 'enabled' => featureEnabled('k')),\n\t\t\t\t\t\t\t'likes' => array($txt['likes'], 'enabled' => featureEnabled('l')),\n\t\t\t\t\t\t\t'mention' => array($txt['mention']),\n\t\t\t\t\t\t\t'sig' => array($txt['signature_settings_short']),\n\t\t\t\t\t\t\t'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => featureEnabled('cp')),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'serversettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_server_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageServer',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-menu i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['general_settings']),\n\t\t\t\t\t\t\t'database' => array($txt['database_paths_settings']),\n\t\t\t\t\t\t\t'cookie' => array($txt['cookies_sessions_settings']),\n\t\t\t\t\t\t\t'cache' => array($txt['caching_settings']),\n\t\t\t\t\t\t\t'loads' => array($txt['loadavg_settings']),\n\t\t\t\t\t\t\t'phpinfo' => array($txt['phpinfo_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'securitysettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_security_moderation'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSecurity',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_security_general']),\n\t\t\t\t\t\t\t'spam' => array($txt['antispam_title']),\n\t\t\t\t\t\t\t'moderation' => array($txt['moderation_settings_short'], 'enabled' => !empty($modSettings['warning_enable'])),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_admin'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme']),\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'admin' => array($txt['themeadmin_admin_title']),\n\t\t\t\t\t\t\t'list' => array($txt['themeadmin_list_title']),\n\t\t\t\t\t\t\t'reset' => array($txt['themeadmin_reset_title']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'current_theme' => array(\n\t\t\t\t\t\t'label' => $txt['theme_current_settings'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageThemes',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'custom_url' => getUrl('admin', ['action' => 'admin', 'area' => 'theme', 'sa' => 'list', 'th' => $settings['theme_id']]),\n\t\t\t\t\t\t'class' => 'i-paint i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'languages' => array(\n\t\t\t\t\t\t'label' => $txt['language_configuration'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageLanguages',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-language i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'edit' => array($txt['language_edit']),\n\t\t\t\t\t\t\t// 'add' => array($txt['language_add']),\n\t\t\t\t\t\t\t'settings' => array($txt['language_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'addonsettings' => array(\n\t\t\t\t\t\t'label' => $txt['admin_modifications'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AddonSettings',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-puzzle i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'general' => array($txt['mods_cat_modifications_misc']),\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'layout' => array(\n\t\t\t\t'title' => $txt['layout_controls'],\n\t\t\t\t'permission' => array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'manageboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_boards'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBoards',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-directory i-admin',\n\t\t\t\t\t\t'permission' => array('manage_boards'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'main' => array($txt['boardsEdit']),\n\t\t\t\t\t\t\t'newcat' => array($txt['mboards_new_cat']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'postsettings' => array(\n\t\t\t\t\t\t'label' => $txt['manageposts'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePosts',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'class' => 'i-post-text i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'posts' => array($txt['manageposts_settings']),\n\t\t\t\t\t\t\t'censor' => array($txt['admin_censored_words']),\n\t\t\t\t\t\t\t'topics' => array($txt['manageposts_topic_settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'editor' => array(\n\t\t\t\t\t\t'label' => $txt['editor_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageEditor',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-modify i-admin',\n\t\t\t\t\t\t'permission' => array('manage_bbc'),\n\t\t\t\t\t),\n\t\t\t\t\t'smileys' => array(\n\t\t\t\t\t\t'label' => $txt['smileys_manage'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSmileys',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-smiley i-admin',\n\t\t\t\t\t\t'permission' => array('manage_smileys'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'editsets' => array($txt['smiley_sets']),\n\t\t\t\t\t\t\t'addsmiley' => array($txt['smileys_add'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editsmileys' => array($txt['smileys_edit'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'setorder' => array($txt['smileys_set_order'], 'enabled' => !empty($modSettings['smiley_enable'])),\n\t\t\t\t\t\t\t'editicons' => array($txt['icons_edit_message_icons'], 'enabled' => !empty($modSettings['messageIcons_enable'])),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'manageattachments' => array(\n\t\t\t\t\t\t'label' => $txt['attachments_avatars'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageAttachments',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-paperclip i-admin',\n\t\t\t\t\t\t'permission' => array('manage_attachments'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['attachment_manager_browse']),\n\t\t\t\t\t\t\t'attachments' => array($txt['attachment_manager_settings']),\n\t\t\t\t\t\t\t'avatars' => array($txt['attachment_manager_avatar_settings']),\n\t\t\t\t\t\t\t'attachpaths' => array($txt['attach_directories']),\n\t\t\t\t\t\t\t'maintenance' => array($txt['attachment_manager_maintenance']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'managesearch' => array(\n\t\t\t\t\t\t'label' => $txt['manage_search'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearch',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-search i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'weights' => array($txt['search_weights']),\n\t\t\t\t\t\t\t'method' => array($txt['search_method']),\n\t\t\t\t\t\t\t'managesphinx' => array($txt['search_sphinx']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\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'members' => array(\n\t\t\t\t'title' => $txt['admin_manage_members'],\n\t\t\t\t'permission' => array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'viewmembers' => array(\n\t\t\t\t\t\t'label' => $txt['admin_users'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembers',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user i-admin',\n\t\t\t\t\t\t'permission' => array('moderate_forum'),\n\t\t\t\t\t),\n\t\t\t\t\t'membergroups' => array(\n\t\t\t\t\t\t'label' => $txt['admin_groups'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMembergroups',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-users',\n\t\t\t\t\t\t'permission' => array('manage_membergroups'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['membergroups_edit_groups'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'add' => array($txt['membergroups_new_group'], 'manage_membergroups'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'permissions' => array(\n\t\t\t\t\t\t'label' => $txt['edit_permissions'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePermissions',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-lock i-admin',\n\t\t\t\t\t\t'permission' => array('manage_permissions'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'index' => array($txt['permissions_groups'], 'manage_permissions'),\n\t\t\t\t\t\t\t'board' => array($txt['permissions_boards'], 'manage_permissions'),\n\t\t\t\t\t\t\t'profiles' => array($txt['permissions_profiles'], 'manage_permissions'),\n\t\t\t\t\t\t\t'postmod' => array($txt['permissions_post_moderation'], 'manage_permissions', 'enabled' => $modSettings['postmod_active']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'ban' => array(\n\t\t\t\t\t\t'label' => $txt['ban_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageBans',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-thumbdown i-admin',\n\t\t\t\t\t\t'permission' => 'manage_bans',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'list' => array($txt['ban_edit_list']),\n\t\t\t\t\t\t\t'add' => array($txt['ban_add_new']),\n\t\t\t\t\t\t\t'browse' => array($txt['ban_trigger_browse']),\n\t\t\t\t\t\t\t'log' => array($txt['ban_log']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'regcenter' => array(\n\t\t\t\t\t\t'label' => $txt['registration_center'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageRegistration',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-user-plus i-admin',\n\t\t\t\t\t\t'permission' => array('admin_forum', 'moderate_forum'),\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'register' => array($txt['admin_browse_register_new'], 'moderate_forum'),\n\t\t\t\t\t\t\t'agreement' => array($txt['registration_agreement'], 'admin_forum'),\n\t\t\t\t\t\t\t'privacypol' => array($txt['privacy_policy'], 'admin_forum'),\n\t\t\t\t\t\t\t'reservednames' => array($txt['admin_reserved_set'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'sengines' => array(\n\t\t\t\t\t\t'label' => $txt['search_engines'],\n\t\t\t\t\t\t'enabled' => featureEnabled('sp'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageSearchEngines',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-website i-admin',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'stats' => array($txt['spider_stats']),\n\t\t\t\t\t\t\t'logs' => array($txt['spider_logs']),\n\t\t\t\t\t\t\t'spiders' => array($txt['spiders']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'paidsubscribe' => array(\n\t\t\t\t\t\t'label' => $txt['paid_subscriptions'],\n\t\t\t\t\t\t'enabled' => featureEnabled('ps'),\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManagePaid',\n\t\t\t\t\t\t'class' => 'i-credit i-admin',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'permission' => 'admin_forum',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'view' => array($txt['paid_subs_view']),\n\t\t\t\t\t\t\t'settings' => array($txt['settings']),\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'maintenance' => array(\n\t\t\t\t'title' => $txt['admin_maintenance'],\n\t\t\t\t'permission' => array('admin_forum'),\n\t\t\t\t'areas' => array(\n\t\t\t\t\t'maintain' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Maintenance',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-cog i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'routine' => array($txt['maintain_sub_routine'], 'admin_forum'),\n\t\t\t\t\t\t\t'database' => array($txt['maintain_sub_database'], 'admin_forum'),\n\t\t\t\t\t\t\t'members' => array($txt['maintain_sub_members'], 'admin_forum'),\n\t\t\t\t\t\t\t'topics' => array($txt['maintain_sub_topics'], 'admin_forum'),\n\t\t\t\t\t\t\t'hooks' => array($txt['maintain_sub_hooks_list'], 'admin_forum'),\n\t\t\t\t\t\t\t'attachments' => array($txt['maintain_sub_attachments'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'logs' => array(\n\t\t\t\t\t\t'label' => $txt['logs'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\AdminLog',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-comments i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'errorlog' => array($txt['errlog'], 'admin_forum', 'enabled' => !empty($modSettings['enableErrorLogging']), 'url' => getUrl('admin', ['action' => 'admin', 'area' => 'logs', 'sa' => 'errorlog', 'desc'])),\n\t\t\t\t\t\t\t'adminlog' => array($txt['admin_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'modlog' => array($txt['moderation_log'], 'admin_forum', 'enabled' => featureEnabled('ml')),\n\t\t\t\t\t\t\t'banlog' => array($txt['ban_log'], 'manage_bans'),\n\t\t\t\t\t\t\t'spiderlog' => array($txt['spider_logs'], 'admin_forum', 'enabled' => featureEnabled('sp')),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t\t'pruning' => array($txt['pruning_title'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'scheduledtasks' => array(\n\t\t\t\t\t\t'label' => $txt['maintain_tasks'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageScheduledTasks',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-calendar i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'tasks' => array($txt['maintain_tasks'], 'admin_forum'),\n\t\t\t\t\t\t\t'tasklog' => array($txt['scheduled_log'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'mailqueue' => array(\n\t\t\t\t\t\t'label' => $txt['mailqueue_title'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\ManageMail',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-envelope-blank i-admin',\n\t\t\t\t\t\t'subsections' => array(\n\t\t\t\t\t\t\t'browse' => array($txt['mailqueue_browse'], 'admin_forum'),\n\t\t\t\t\t\t\t'settings' => array($txt['mailqueue_settings'], 'admin_forum'),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'reports' => array(\n\t\t\t\t\t\t'enabled' => featureEnabled('rg'),\n\t\t\t\t\t\t'label' => $txt['generate_reports'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\Reports',\n\t\t\t\t\t\t'function' => 'action_index',\n\t\t\t\t\t\t'class' => 'i-pie-chart i-admin',\n\t\t\t\t\t),\n\t\t\t\t\t'repairboards' => array(\n\t\t\t\t\t\t'label' => $txt['admin_repair'],\n\t\t\t\t\t\t'controller' => '\\\\ElkArte\\\\AdminController\\\\RepairBoards',\n\t\t\t\t\t\t'function' => 'action_repairboards',\n\t\t\t\t\t\t'select' => 'maintain',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$this->_events->trigger('addMenu', array('admin_areas' => &$admin_areas));\n\n\t\t// Any files to include for administration?\n\t\tcall_integration_include_hook('integrate_admin_include');\n\n\t\t$menuOptions = array(\n\t\t\t'hook' => 'admin',\n\t\t);\n\n\t\t// Actually create the menu!\n\t\t$menu = new Menu();\n\t\t$menu->addMenuData($admin_areas);\n\t\t$menu->addOptions($menuOptions);\n\t\t$admin_include_data = $menu->prepareMenu();\n\t\t$menu->setContext();\n\t\tunset($admin_areas);\n\n\t\t// Make a note of the Unique ID for this menu.\n\t\t$context['admin_menu_id'] = $context['max_menu_id'];\n\t\t$context['admin_menu_name'] = 'menu_data_' . $context['admin_menu_id'];\n\n\t\t// Where in the admin are we?\n\t\t$context['admin_area'] = $admin_include_data['current_area'];\n\n\t\treturn $admin_include_data;\n\t}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "private function gen_admin_menu()\n {\n $admin_menu = array (array(\n 'link' => 'plugins/dynamictemplate/admin/main_settings.php'.$this->SID,\n 'text' => $this->user->lang('dynamictemplate'),\n 'check' => 'a_dynamictemplate_main',\n 'icon' => 'fa-list-alt',\n ));\n\n return $admin_menu;\n }", "public function filter_adminhandler_post_loadplugins_main_menu( $menu ) {\n\t\t// obtain existing last submenu item\n\t\t$last_used = end( $menu[ 'create' ][ 'submenu' ]);\n\t\t// add a menu item at the bottom\n\t\t$menu[ 'create' ][ 'submenu' ][] = array(\n\t\t\t'title' => _t( 'Create a new Menu', 'termmenus' ),\n\t\t\t'url' => URL::get( 'admin', array( 'page' => 'menus', 'action' => 'create' ) ),\n\t\t\t'text' => _t( 'Menu', 'termmenus' ),\n\t\t\t'hotkey' => $last_used[ 'hotkey' ] + 1, // next available hotkey is last used + 1\n\t\t);\n\t\t$last_used = end( $menu[ 'manage' ][ 'submenu' ]);\n\t\t$menu[ 'manage' ][ 'submenu' ][] = array(\n\t\t\t'title' => _t( 'Manage Menus', 'termmenus' ),\n\t\t\t'url' => URL::get( 'admin', 'page=menus' ), // might as well make listing the existing menus the default\n\t\t\t'text' => _t( 'Menus', 'termmenus' ),\n\t\t\t'hotkey' => $last_used[ 'hotkey' ] + 1,\n\t\t);\n\t\treturn $menu;\n\t}", "public function admin_menu() {\n\n $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );\n\n $this->menu_page = add_options_page(\n __( 'Custom Login Settings', CUSTOM_LOGIN_DIRNAME ),\n __( 'Custom Login', CUSTOM_LOGIN_DIRNAME ),\n $capability,\n CUSTOM_LOGIN_DIRNAME,\n array( $this, 'settings_page' )\n );\n }", "public function action_admin_menu_add_menu_item() {\n\t\tif ( $this->parent_menu_slug == 'plugins.php' ) {\n\t\t\t$page_title = esc_html__( 'WordPress.com VIP Plugins', 'wpcom-vip-plugins-ui' );\n\t\t\t$menu_label = esc_html__( 'WP.com VIP Plugins', 'wpcom-vip-plugins-ui' );\n\t\t} else {\n\t\t\t$page_title = esc_html__( 'WordPress.com VIP Plugins & Services', 'wpcom-vip-plugins-ui' );\n\t\t\t$menu_label = esc_html__( 'Plugins', 'wpcom-vip-plugins-ui' );\n\t\t}\n\t\t$this->hook_suffix = add_menu_page( $page_title, $menu_label, $this->capability, 'vip-plugins', array( $this, 'display_menu_page' ), 'dashicons-admin-plugins', 64 );\n\n\t\t// This is required because WPCOM_VIP_Plugins_UI_List_Table() is defined inside of a function\n\t\tadd_filter( 'manage_' . $this->hook_suffix . '_columns', array( 'WPCOM_VIP_Plugins_UI', 'community_plugins_menu_columns' ) );\n\t}", "public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}", "public function admin_menu() {\n\t\tadd_submenu_page( 'tools.php', 'EP Troubleshooting', 'EP Troubleshooting', 'manage_options', 'ep_troubleshoot', array(\n\t\t\t$this,\n\t\t\t'menu_page'\n\t\t) );\n\t}", "public function add_admin_menu()\n\n {\n\n\n\n $page_title = 'Trip Booking';\n\n $menu_title = 'Trip Booking';\n\n $capability = 'manage_options';\n\n\n\n $menu_slug = 'trip-booking';\n\n $icon_url = 'dashicons-image-filter';\n\n $position = 7;\n\n\n\n add_menu_page($page_title, $menu_title, $capability, $menu_slug, array($this, 'trip_booking_admin'), $icon_url, $position);\n\n \n\n }" ]
[ "0.7936905", "0.7687668", "0.7596544", "0.7561742", "0.7561742", "0.7561742", "0.74937963", "0.74486524", "0.7426101", "0.73887515", "0.7357174", "0.7341609", "0.7276958", "0.7222066", "0.7218996", "0.71982986", "0.719314", "0.7155845", "0.7146222", "0.71453667", "0.7116234", "0.7106258", "0.70935416", "0.70910156", "0.708726", "0.70549905", "0.7053269", "0.7038636", "0.6998498", "0.6996708", "0.6975607", "0.6972222", "0.6968204", "0.69678354", "0.6960688", "0.695189", "0.6948424", "0.6946007", "0.6942271", "0.69418216", "0.6915313", "0.69056183", "0.6892961", "0.687959", "0.68771905", "0.68744546", "0.68714654", "0.6867632", "0.6866603", "0.6857281", "0.6841142", "0.6831925", "0.68240774", "0.68221253", "0.6819088", "0.6816522", "0.681469", "0.68085676", "0.6807715", "0.68048865", "0.67964935", "0.67937917", "0.6791426", "0.6788514", "0.678689", "0.6786294", "0.67841506", "0.67806613", "0.67784154", "0.6765957", "0.67654926", "0.675815", "0.6756171", "0.6755547", "0.6750573", "0.6741811", "0.6741207", "0.6730992", "0.67290926", "0.67262626", "0.6723714", "0.6723015", "0.6720831", "0.6720776", "0.6716014", "0.6711212", "0.67051065", "0.67042804", "0.6697776", "0.6697776", "0.6697776", "0.6697776", "0.6697776", "0.6697776", "0.6695593", "0.6685219", "0.6682341", "0.6681472", "0.667883", "0.66690046", "0.6661037" ]
0.0
-1
The grimage options page.
public function grimage_options_page() { if (isset($_POST['facebook_appid'])) { if ($this->process_grimage_update_page($_POST)) { ?> <div class="notice notice-success is-dismissible"> <p>Done!</p> </div> <?php } } ?> <div class="wrap"> <h2>Grimage Settings</h2> <form name="grimage_form" method="post" action=""> <div style="margin-top:10px;"> <label for="display_option"><strong>Display Option:</strong></label> <input type="radio" name="display_option" value="none" <?php if(get_option('grimage_display_option') == 'none') echo "checked"; ?> /> None <small>(deactivate plugin)</small> <input type="radio" name="display_option" value="under" <?php if(get_option('grimage_display_option') == 'under') echo "checked"; ?> /> Under <small>(link will be displayed below posts.)</small> <input type="radio" name="display_option" value="over" <?php if(get_option('grimage_display_option') == 'over') echo "checked"; ?> /> Over <small>(link will be displayed on hover)</small> </div> <div style="margin-top:10px;"><label for="facebook_appid"><strong>Facebook AppID:</strong></label><br/> <input type="text" name="facebook_appid" placeholder="app id" id="facebook_appid" value="<?php if (get_option('grimage_facebook_appid')) echo get_option("grimage_facebook_appid"); ?>"/> </div> <div style="margin-top:10px;"> <label for="modalcontent"><strong>Modal Content</strong></label><br/> <textarea name="modalcontent" id="modalcontent" style="width:50%;height:400px;"><?php echo stripslashes(get_option('grimage_modalcontent')); ?></textarea> </div> <div style="margin-top:10px;"> <label for="grimage_fb_linktext"><strong>FB Link Text</strong></label><br/> <input type="text" name="grimage_fb_linktext" id="grimage_fb_linktext" style="" value="<?php echo stripslashes(get_option('grimage_fb_linktext')); ?>" /> </div> <div style="margin-top:10px;"> <label for="grimagecustomcss"><strong>Custom CSS</strong></label><br/> <textarea name="grimagecustomcss" id="grimagecustomcss" style="width:50%;height:400px;"><?php echo stripslashes(get_option('grimage_grimagecustomcss')); ?></textarea> </div> <div style="margin-top:10px;"> <button type="submit" class="button btn btn-primary">Update</button> </div> </form> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' );\n submit_button();\n print '</form>';\n print '</div>';\n }", "function austeve_gallery_admin_add_page() {\n add_options_page('AUSteve Gallery settings', 'AUSteve Gallery settings', 'manage_options', 'austeve_image_gallery', 'austeve_image_gallery_options_page');\n}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function register_grimage_admin_menus()\n {\n add_options_page('Grimage settings', 'Grimage', 'manage_options', 'grimage_options', array($this, 'grimage_options_page'));\n }", "public function optionsPage()\r\n {\r\n $this->updateOptions();\r\n include_once($this->path . '/views/options.php');\r\n }", "function austeve_image_gallery_options_page() {\n?>\n<div>\n\t<h2>AUSteve Gallery settings</h2>\n\tOptions relating to the AUSteve Image Gallery plugin.\n\n\t<form action=\"options.php\" method=\"post\">\n\n\t\t<?php settings_fields('austeve_image_gallery_options'); ?>\n\t\t<?php do_settings_sections('austeve_image_gallery'); ?>\n\t \n\t\t<input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n\t</form>\n</div>\n<?php\n}", "public function view_option_page() {\n\t\tinclude_once plugin_dir_path( __FILE__ ) . 'options.php';\n\t}", "function civ_slider_options_page(){\n add_options_page('Civ Slider Options', 'Civ Slider Options', 8, 'civ_slider', 'civ_slider_options');\n}", "public function options_page_overview() \n\t\t{\n\t\t\t$html = '';\n\t\t\t\n\t\t\tforeach( $this->size_groups as $size_group => $sizes ) \n\t\t\t{\n\t\t\t\t$html .= '<h3>' . $this->get_group_headline( $size_group ) . '</h3>';\n\t\t\t\t\n\t\t\t\t$html .= '<ul>';\n\t\t\t\t\n\t\t\t\tforeach( $sizes as $key => $image ) \n\t\t\t\t{\n\t\t\t\t\t$info = $image['width'] . '*' . $image['height'];\n\t\t\t\t\tif( isset( $image['crop'] ) && true === $image['crop'] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$info .= ' ' . __( '(cropped)', 'avia_framework' );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$info .= ' - ' . $this->get_image_key_info( $key );\n\t\t\t\t\t\n\t\t\t\t\t$html .= '<li>' . $info . '</li>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</ul>';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function addOptionsPage(){\n\t\tadd_options_page( 'Post icon', 'Post icon', 'manage_options', 'post_icon_options', array( $this, 'showPostIconOptions' ) );\n\t}", "function gallery_options_page() {\r\n\tadd_options_page('Featured Content Gallery Options', 'Featured Content Gallery', 10, 'featured-content-gallery/options.php');\r\n}", "public function add_options_page()\n {\n }", "function elm_admin_get_show_image_options() {\n\t$options = array(\n\t\t1 => __('Yes', 'elm'),\n\t\t0 => __('No', 'elm')\n\t);\n\t\n\treturn $options;\n}", "public function render_options_page() {\r\n\r\n\t\tinclude( Views::load_view( TBSC_OPTIONS_PLUGIN_DIR . 'src/views/options-page/options-page.php' ) );\r\n\r\n\t}", "function wpec_gd_options_page() {\n\tadd_options_page( __( 'WPEC Group Deal Options', 'wpec-group-deals' ), __( 'Group Deals', 'wpec-group-deals' ), 'administrator', 'wpec_gd_options', 'wpec_gd_options_page_form' );\n}", "function owa_options_page() {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$params = array();\r\n\t$params['view'] = 'base.options';\r\n\t$params['subview'] = 'base.optionsGeneral';\r\n\techo $owa->handleRequest($params);\r\n\t\r\n\treturn;\r\n}", "public function add_options_page() {\n add_options_page(\n __( 'Instagram Settings', 'bii-instagram' ),\n __( 'Instagram', 'bii-instagram' ),\n 'manage_options',\n 'bii-instagram',\n array( &$this, 'create_options_page' )\n );\n }", "function options_page(){\r\n include($this->plugin_dir.'/include/options-page.php');\r\n }", "function HERITAGE_general_options_callback() {\n ?>\n <p>\n <?php echo esc_html__('Setup custom logo.', 'heritage'); ?>\n </p>\n <?php\n /*print theme settings*/\n if (LC_SWP_PRINT_SETTINGS) {\n $general = get_option('heritage_theme_general_options');\n\n ?>\n <pre>heritage_theme_general_options:\n\t\t\t<?php echo (json_encode($general)); ?>\n\t\t</pre>\n <?php\n }\n}", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "function optionsframework_options() {\n\t\t$options_pages = array(); \n\t\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t\t$options_pages[''] = 'Select a page:';\n\t\tforeach ($options_pages_obj as $page):\n\t\t\t$options_pages[$page->ID] = $page->post_title;\n\t\tendforeach;\n\t\n\t\t// If using image radio buttons, define a directory path\n\t\t$imagepath = get_template_directory_uri() . '/lib/assets/images/icons/';\n\t\n\t\t$options = array();\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('General Settings', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Favicon', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload your favicon to the site, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_favicon',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('RSS Link', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Add in the URL of your RSS feed here to overwrite the defaut WordPress ones.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_rss',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom CSS', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Not 100% happy with our lovely styles? Here you can add some custom CSS if you require minor changes to the ones we\\'ve created. We won\\'t be offended, honest :)', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_css',\n\t\t\t'type' \t\t=> 'textarea');\t\n\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Google Analytics (or custom Javascript)', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If you\\'re hooked up with Google Analytics you can paste the Javascript includes for it here (without the script tags). Or alternatively if you just want some custom Javascript added on top of ours, add that here too.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_js',\n\t\t\t'type' \t\t=> 'textarea');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Breadcrumb Trail?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the breadcrumb trail on all pages in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_breadcrumbs',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Application Form ID', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_application_form_id',\n\t\t\t'desc'\t\t=> 'If you have added an applcation form for the jobs section of your site using the Contact Form & plugin, you can add the ID of the form here for it to be pulled out automatically.',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Header', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Custom Logo', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To upload a custom logo, simply add the URL to it or upload and select it using the Upload button here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_custom_logo',\n\t\t\t'type' \t\t=> 'upload');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Header Text', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_text',\n\t\t\t'des'\t\t=> 'You can add some text to the header if you like. Keep it short and sweet mind; nobody likes a waffler :)',\n\t\t\t'std' \t\t=> '',\n\t\t\t'type' \t\t=> 'text');\t\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Contact Telephone', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your contact telephone number here to go in the header.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_header_phone',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __('Footer', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __('Copyright Text', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the text for your copyright here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_footer_copyright',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Hide FrogsThemes Link?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will hide our link :\\'( <--sad face', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_hide_ft_link',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Blog', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Style', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select if you prefer the blog to be as a list or in masonry.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_blog_style',\n\t\t\t'options' \t=> array('list' => __('List', 'frogsthemes'), 'masonry' => __('Masonry', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'list',\n\t\t\t'type' \t\t=> 'select');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Share Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the share links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_share_links',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Author Box?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the author box on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_author',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Next/Previous Links?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the next/previous post links on all posts.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_next_prev',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Show Related Posts?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will show the related posts section. These are related by tag.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_show_related_posts',\n\t\t\t'std' \t\t=> '1',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Slider', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Speed of Transition', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the speed you would like the transition to be in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_speed',\n\t\t\t'std'\t\t=> '600',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pause Time', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter the time you would like the gallery to pause between transitions in milliseconds (1000 = 1 second).', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_pause',\n\t\t\t'std'\t\t=> '7000',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Start?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically start the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_auto_start',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Auto Loop?', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('If checked, this will automatically loop through the gallery.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_loop',\n\t\t\t'std' \t\t=> '0',\n\t\t\t'type' \t\t=> 'checkbox');\n\t\t/*\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Animation Type', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Select which effect you would like to use when going between slides.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_slider_transition',\n\t\t\t'options' \t=> array('fade' => __('Fade', 'frogsthemes'), 'slide' => __('Slide', 'frogsthemes')),\n\t\t\t'std'\t\t=> 'fade',\n\t\t\t'type' \t\t=> 'select');\n\t\t*/\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Connections', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Facebook URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Facebook URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_facebook',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Twitter URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Twitter URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_twitter',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Google+ URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Google+ URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_google_plus',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'LinkedIn URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full LinkedIn URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_linkedin',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'Pinterest URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full Pinterest URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_pinterest',\n\t\t\t'type' \t\t=> 'text');\n\t\t\n\t\t$options[] = array( \n\t\t\t'name' \t\t=> __( 'YouTube URL', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('Enter your full YouTube URL here.', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'ft_youtube',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API Options', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'heading');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Twitter API', 'frogsthemes'),\n\t\t\t'desc' \t\t=> __('To use the Twitter API, you need to sign up for an <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">app with Twitter</a>.', 'frogsthemes'),\n\t\t\t'type' \t\t=> 'info');\n\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Key', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_key',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Consumer Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'consumer_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token',\n\t\t\t'type' \t\t=> 'text');\n\t\t\t\t\t\t\t\n\t\t$options[] = array(\n\t\t\t'name' \t\t=> __( 'Access Token Secret', 'frogsthemes'),\n\t\t\t'id' \t\t=> 'access_token_secret',\n\t\t\t'type' \t\t=> 'text');\n\t\n\t\treturn apply_filters('optionsframework_options', $options);\n\t}", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function showPostIconOptions(){\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php echo get_admin_page_title() ?></h2>\n\t\t\t<form action=\"options.php\" method=\"POST\">\n\t\t\t<?php\n\t\t\t\tsettings_fields( 'post_icon_options_main' );\n\t\t\t\tdo_settings_sections( 'post_icon_options_page' );\n\t\t\t\t$all_posts = $this -> getAllPostsData();\n\t\t\t?>\n\t\t\t\t\n\t\t\t<div class =\"pi_icons\"></div>\n\t\t\t<?php\n\t\t\t\tsubmit_button( 'Save', 'primary', 'pi_save_button' );\n\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function getOptionImage()\n {\n return $this->optionImage;\n }", "function nndcustgrav_options_page() {\r\n?>\r\n<div>\r\n\t<h2>NND Custom Gravatar</h2>\r\nOptions relating to the NND Custom Gravatar Plugin.\r\n\t<form action=\"options.php\" method=\"post\">\r\n\t\t<?php settings_fields('nndcustgrav_settings'); ?>\r\n\t\t<?php do_settings_sections('nndcustgrav'); ?>\r\n\t\t\r\n\t\t<input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\r\n\t</form>\r\n</div>\r\n<?php\r\n}", "function add_options_page() {\n\t\t\t\tif ( function_exists('add_theme_page') ) {\n\t\t\t\t \tadd_theme_page( 'Cap &amp; Run', 'Cap &amp; Run', 'manage_options', \n\t\t\t\t\t\t\t\t\tbasename(__FILE__), array(&$this, 'options_page') );\n\t\t\t\t}\n\t\t\t}", "function gtpress_admin_menu() {\r\n\t$gtpress_ico = get_option('siteurl').'/wp-content/plugins/'.basename(dirname(__FILE__)).'/';\r\n\tadd_options_page('GT Press', 'GT Press Setup', 8, basename(__FILE__), 'gtpressMenu_options_page', '', $gtpress_ico.'gtpress.png');\r\n}", "function ba_options_page() {\n add_menu_page(\n 'ba Theme Options', // Page title\n 'Theme Options', // Menu title\n 'manage_options', // Capability\n 'ba_options', // Menu slug\n 'ba_options_page_html', // Display\n 'dashicons-format-video', // Icon\n 150\n );\n}", "function options_page() {\n\t\t$settings = __( 'AdControl Settings', 'adcontrol' );\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n\t\techo <<<HTML\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>$settings</h2>\n\t\t\t<p>$notice</p>\n\t\t</div>\nHTML;\n\t}", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function render_screen_options()\n {\n }", "function getImageMenu() {\r\r\n\t$PView = new PView;\r\r\n\t$Appl = $PView -> getAppl();\r\r\n\t$ImageData = $PView -> getImageData($Appl[1]);\r\r\n\t// button for printerfriendly page\r\r\n\tif ($PView -> getPView_config(\"print\") OR (ADMIN && $PView -> getPView_config(\"admin_Mode\"))){\r\r\n\t\tif ($PView -> getPermission(\"config\",\"permPrint\",\"\")) {\r\r\n\t\t\t$ImageMenu.= \" <a href='\".e_BASE.\"print.php?plugin:pviewgallery.\".$Appl[1].\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/printer.png' border='0px'alt='\".LAN_IMAGE_47.\"' title='\".LAN_IMAGE_47.\"'></a>\";\r\r\n\t\t}\r\r\n\t}\r\r\n\t\r\r\n\t// button for Send image per email\r\r\n\tif (($PView -> getPView_config(\"email\") && $ImageData['sendImage']) OR (ADMIN && $PView -> getPView_config(\"admin_Mode\"))){\r\r\n\t\tif ($PView -> getPermission(\"config\",\"permEmail\",\"\")) {\r\r\n\t\t\t$ImageMenu.= \" <a href='\".e_BASE.\"email.php?plugin:pviewgallery.\".$Appl[1].\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/mail_next.png' border='0px'alt='\".LAN_IMAGE_48.\"' title='\".LAN_IMAGE_48.\"'></a>\";\r\r\n\t\t}\r\r\n\t}\t\r\r\n\t\r\r\n\t// button for generate pdf\r\r\n\tif ($PView -> getPView_config(\"pdf\") OR (ADMIN && $PView -> getPView_config(\"admin_Mode\"))){\r\r\n\t\tif ($PView -> getPermission(\"config\",\"permPdf\",\"\")) {\r\r\n\t\t\t$ImageMenu.= \" <a href='\".e_PLUGIN.\"pdf/pdf.php?plugin:pviewgallery.\".$Appl[1].\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/pdf.png' border='0px'alt='\".LAN_IMAGE_49.\"' title='\".LAN_IMAGE_49.\"'></a>\";\r\r\n\t\t}\r\r\n\t}\t\r\r\n\t\r\r\n\t\r\r\n\t// additional button to use image as albumimage (depends on album permission)\r\r\n\tif ($PView -> getPermission(\"album\",$PView -> getImageAlbum(),\"Edit\") && $ImageData['thumbnail']) {\r\r\n\t\t$ImageMenu.= \" <a href='\".e_PLUGIN.\"pviewgallery/pview_actions.php?album=\".$PView -> getImageAlbum().\"&amp;changeimage=\".$Appl[1].\"'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/favorite.png' border='0px'alt='\".LAN_ACTION_31.\"' title='\".LAN_ACTION_31.\"'></a>\";\r\r\n\t}\r\r\n\t\r\r\n\t// PERMISSION!!!\r\r\n\tif ($PView -> getPermission(\"image\",$Appl[1],\"Edit\")) {\r\r\n\t\t$ImageMenu.= \" <a href='\".e_PLUGIN.\"pviewgallery/pview_actions.php?image=\".$Appl[1].\"&amp;action=edit'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_edit.png' border='0px'alt='\".LAN_IMAGE_2.\"' title='\".LAN_IMAGE_2.\"'></a>\";\r\r\n\t}\r\r\n\t$ImageSize = getimagesize($PView -> getOrigPath($Appl[1]));\r\r\n\t$ImageMenu.= \t\"<script type=\\\"text/javascript\\\">\r\r\n\t\t\t\t\tfunction showImage() {\r\r\n\t\t\t\t\t\tpv_imagezoom(\\\"\".$PView -> getOrigPath($Appl[1]).\"\\\",\".$ImageSize[0].\",\".$ImageSize[1].\",\\\"\".$PView -> getImageName($Appl[1]).\"\\\",\\\"\".LAN_IMAGE_44.\"\\\");\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t</script>\";\r\r\n\t$ImageMenu.= \" <a href='javascript:showImage();'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/zoom.png' border='0px'alt='\".LAN_IMAGE_1.\"' title='\".LAN_IMAGE_1.\"'></a>\";\r\r\n\r\r\n\treturn $ImageMenu;\r\r\n}", "public function mm_options_menu() { \n if(function_exists('add_submenu_page')) {\n add_options_page(__('Better Gallery Settings', 'mm_bg'), __('Better Gallery Settings', 'mm_bg'), 'manage_options', 'mm-bg-options', array($this,'mm_options_page'));\n }\n }", "protected function get_options()\n\t{}", "function rkt_options_page() {\n require('tmpl/options.tmpl.php');\n}", "function dfcg_help_images() {\n?>\n\t<h3><?php _e( 'Dynamic Content Gallery - Quick Help - Image Management', DFCG_DOMAIN ); ?></h3>\n\t\n\t<p><?php _e( 'Quite simply, the Featured Images option is the best and easiest to use. The manual methods (Full and Partial) are primarily there for reasons of backwards compatibility, for those users who have been using the DCG since its earliest versions.', DFCG_DOMAIN ) ;?></p>\n\t\n\t<p><em><?php _e( 'Note: it is quite possible that the manual image management options will be removed in future. Therefore users are encouraged to use the Featured Image option - it is easier and more flexible.', DFCG_DOMAIN ); ?></em></p>\n\t\n\t<p><?php _e( 'If you select the Partial URL option you will be prompted to enter the URL to the root folder for your images. You must enter a URL here otherwise the DCG will not find your images.', DFCG_DOMAIN ); ?></p>\n\n<?php\n}", "function add_options_page() {\n\t\tadd_options_page(\n\t\t\t'AdControl',\n\t\t\t'AdControl',\n\t\t\t'manage_options',\n\t\t\t'adcontrol',\n\t\t\tarray( $this, 'options_page' )\n\t\t);\n\t}", "function gc_create_admin_menu() {\n add_options_page(\n 'Graph Commons',\n 'Graph Commons',\n 'manage_options',\n 'graphcommons',\n array(&$this, 'options_page')\n );\n }", "public function lp_rating_options_page()\n {\n add_menu_page(\n __( 'Ratings', 'lp' ),\n __( 'Ratings', 'lp' ),\n 'manage_options',\n 'lp_rating',\n array($this, 'lp_rating_page_html'),\n 'dashicons-star-empty'\n );\n\n add_submenu_page( \n 'lp_rating', \n __( 'Settings', 'lp' ), \n __( 'Settings', 'lp' ), \n 'manage_options', \n 'lp_rating_settings', \n array($this, 'lp_rating_settings_html')\n );\n }", "function ajb_get_options_page_cap() {\n return 'edit_theme_options';\n}", "public function options_page()\n\t\t{\n\t\t\tif (!@include 'options-page.php'):\n\t\t\t\tprintf(__('<div id=\"message\" class=\"updated fade\"><p>The options page for the <strong>Mailgun</strong> plugin cannot be displayed. The file <strong>%s</strong> is missing. Please reinstall the plugin.</p></div>',\n\t\t\t\t\t'mailgun'), dirname(__FILE__) . '/options-page.php');\n\t\t\tendif;\n\t\t}", "public function displayImagePreferences()\n\t{\n\t \tglobal $currentIndex;\n\t\techo '<br />\n\t\t<form action=\"'.$currentIndex.'&token='.$this->token.'\" method=\"post\">\n\t\t\t<fieldset class=\"width4\">\n\t\t\t\t<legend><img src=\"../img/admin/picture.gif\" /> '.$this->l('Images').'</legend>'.'\n\t\t\t\t<p>'.$this->l('JPEG images have a small file size and standard quality. PNG images have a bigger file size, a higher quality and support transparency. Note that in all cases the image files will have the .jpg extension.').'\n\t\t\t\t<br /><br />'.$this->l('WARNING: This feature may not be compatible with your theme or with some modules. In particular, PNG mode is not compatible with the Watermark module. If you encounter any issue, turn it off by selecting \"Use JPEG\".').'</p>\n\t\t\t\t<br />\n\t\t\t\t<label>'.$this->l('Image quality').' </label>\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<input type=\"radio\" value=\"jpg\" name=\"PS_IMAGE_QUALITY\" id=\"PS_IMAGE_QUALITY_0\" '.(Configuration::get('PS_IMAGE_QUALITY') == 'jpg' ? 'checked=\"checked\"' : '').' />\n\t\t\t\t\t<label class=\"t\" for=\"PS_IMAGE_QUALITY_0\">'.$this->l('Use JPEG').'</label>\n\t\t\t\t\t<br />\n\t\t\t\t\t<input type=\"radio\" value=\"png\" name=\"PS_IMAGE_QUALITY\" id=\"PS_IMAGE_QUALITY_1\" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png' ? 'checked=\"checked\"' : '').' />\n\t\t\t\t\t<label class=\"t\" for=\"PS_IMAGE_QUALITY_1\">'.$this->l('Use PNG only if the base image is in PNG format').'</label>\n\t\t\t\t\t<br />\n\t\t\t\t\t<input type=\"radio\" value=\"png_all\" name=\"PS_IMAGE_QUALITY\" id=\"PS_IMAGE_QUALITY_2\" '.(Configuration::get('PS_IMAGE_QUALITY') == 'png_all' ? 'checked=\"checked\"' : '').' />\n\t\t\t\t\t<label class=\"t\" for=\"PS_IMAGE_QUALITY_2\">'.$this->l('Use PNG for all images').'</label>\n\t\t\t\t</div>\n\t\t\t\t<br />\n\t\t\t\t<label for=\"PS_JPEG_QUALITY\">'.$this->l('JPEG quality').'</label>\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<input type=\"text\" name=\"PS_JPEG_QUALITY\" id=\"PS_JPEG_QUALITY\" value=\"'.(int)Configuration::get('PS_JPEG_QUALITY').'\" size=\"3\" />\n\t\t\t\t\t<p>'.$this->l('Ranges from 0 (worst quality, smallest file) to 100 (best quality, biggest file)').'</p>\n\t\t\t\t</div>\n\t\t\t\t<label for=\"PS_PNG_QUALITY\">'.$this->l('PNG quality').'</label>\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<input type=\"text\" name=\"PS_PNG_QUALITY\" id=\"PS_PNG_QUALITY\" value=\"'.(int)Configuration::get('PS_PNG_QUALITY').'\" size=\"3\" />\n\t\t\t\t\t<p>'.$this->l('Ranges from 9 (worst quality, smallest file) to 0 (best quality, biggest file)').'</p>\n\t\t\t\t</div>\t\t\n\t\t\t\t<div class=\"margin-form\">\n\t\t\t\t\t<input type=\"submit\" value=\"'.$this->l(' Save ').'\" name=\"submitImagePreferences\" class=\"button\" />\n\t\t\t\t</div>\n\t\t\t</fieldset>\n\t\t</form>';\n\t}", "static function get_options(){\n\t\t\t\tglobal $gdlr_core_item_pdb;\n\t\t\t\t\n\t\t\t\treturn array(\n\t\t\t\t\t'general' => array(\n\t\t\t\t\t\t'title' => esc_html__('General', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Image', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'thumbnail-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Thumbnail Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'combobox',\n\t\t\t\t\t\t\t\t'options' => 'thumbnail-size',\n\t\t\t\t\t\t\t\t'default' => 'full'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo Box Item Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'tinymce',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo box item sample content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'wrapper-class' => 'gdlr-core-fullsize'\n\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\t\t'text-align' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Text Align', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'radioimage',\n\t\t\t\t\t\t\t\t'options' => 'text-align',\n\t\t\t\t\t\t\t\t'default' => 'center'\n\t\t\t\t\t\t\t),\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'frame' => array(\n\t\t\t\t\t\t'title' => esc_html__('Frame Style', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'enable-frame' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Frame', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable'\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'enable-shadow' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Shadow', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'frame-padding' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Padding', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'30px', 'right'=>'30px', 'bottom'=>'10px', 'left'=>'30px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-background-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Background Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-width' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Width', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'0px', 'right'=>'1px', 'bottom'=>'1px', 'left'=>'1px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'typography' => array(\n\t\t\t\t\t\t'title' => esc_html__('Typography', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t'title' => esc_html__('Color', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'spacing' => array(\n\t\t\t\t\t\t'title' => esc_html__('Spacing', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'padding-bottom' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Padding Bottom ( Item )', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => $gdlr_core_item_pdb\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}", "public static function _options_page(){\n\t\tif( isset($_POST['urls']) ){\n\t\t\tself::updateUrls($_POST['urls']);\n\t\t}\n\t\t\n\t\t$vars = (object) array();\n\t\t$vars->messages = implode( \"\\n\", self::$messages );\n\t\t$vars->path = self::$path;\n\t\t$vars->urls = self::getUrls();\n\t\tself::render( 'admin', $vars );\n\t}", "function getOptions() ;", "public static function options_page()\n\t\t\t{\n\t\t\t\tif (!current_user_can('manage_options'))\n\t\t\t\t{\n\t\t\t\t\twp_die( __('You do not have sufficient permissions to access this page.') );\n\t\t\t\t}\n\t\n\t\t\t\t$plugin_id = HE_PLUGINOPTIONS_ID;\n\t\t\t\t// display options page\n\t\t\t\tinclude(self::file_path('options.php'));\n\t\t\t}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "function default_image_options() {\n update_option('image_default_align', 'center' );\n update_option('image_default_size', 'medium' );\n}", "function EWD_URP_Output_Options_Page() {\n\t\tglobal $URP_Full_Version;\n\t\t\n\t\tif (!isset($_GET['page'])) {$_GET['page'] = \"\";}\n\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminHeader.php');\n\t\tif ($_GET['page'] == 'urp-options') {include( plugin_dir_path( __FILE__ ) . '../html/OptionsPage.php');}\n\t\tif ($_GET['page'] == 'urp-woocommerce-import') {include( plugin_dir_path( __FILE__ ) . '../html/WooCommerceImportPage.php');}\n\t\tinclude( plugin_dir_path( __FILE__ ) . '../html/AdminFooter.php');\n}", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "function setOptions() {\n\n\t\t\t/*\n\t\t\t\tOPTION TYPES:\n\t\t\t\t- checkbox: name, id, desc, std, type\n\t\t\t\t- radio: name, id, desc, std, type, options\n\t\t\t\t- text: name, id, desc, std, type\n\t\t\t\t- colorpicker: name, id, desc, std, type\n\t\t\t\t- select: name, id, desc, std, type, options\n\t\t\t\t- textarea: name, id, desc, std, type, options\n\t\t\t*/\n\n\t\t\t$this->options = array(\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom Logo Image <span>insert your custom logo image in the header</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable custom logo image', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo\",\n\t\t\t\t\t\"desc\" => __('Check to use a custom logo in the header.', 'titan'),\n\t\t\t\t\t\"std\" => \"false\",\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Logo URL', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo_img\",\n\t\t\t\t\t\"desc\" => sprintf( __( 'Upload an image or enter an URL for your image.', 'titan' ), '<code>' . STYLESHEETPATH . '/images/</code>' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"upload\" => true,\n\t\t\t\t\t\"class\" => \"logo-image-input\",\n\t\t\t\t\t\"type\" => \"upload\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Logo image <code>&lt;alt&gt;</code> tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_logo_img_alt\",\n\t\t\t\t\t\"desc\" => __('Specify the <code>&lt;alt&gt;</code> tag for your logo image.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Display tagline', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_tagline\",\n\t\t\t\t\t\"desc\" => __('Check to show your tagline below your logo.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Follow Icons <span>control the follow icons in the top right of your header</span>', 'titan' ),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Twitter', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_twitter_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Hip to Twitter? Check this box.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Facebook', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_facebook_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to your Facebook page.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable Flickr', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_flickr_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to Flickr.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Enable email', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_email_toggle\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to show a link to email updates.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Disable all', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_disable\",\n\t\t\t\t\t\"desc\" => __( 'Check this box to hide all follow icons (including RSS). This option overrides any other settings.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Twitter link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_twitter\",\n\t\t\t\t\t\"desc\" => __( 'Enter your twitter link here.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Facebook link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_facebook\",\n\t\t\t\t\t\"desc\" => __( 'Enter your Facebook link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Flickr link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_follow_flickr\",\n\t\t\t\t\t\"desc\" => __( 'Enter your Flickr link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __( 'Email link', 'titan' ),\n\t\t\t\t\t\"id\" => $this->shortname.\"_feed_email\",\n\t\t\t\t\t\"desc\" => __( 'Enter your email updates link.', 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Homepage Notice <span>display a notice on your homepage</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable homepage notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_custom_notice\",\n\t\t\t\t\t\"desc\" => __('Check this box to use a custom notice on the home page.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_notice_content\",\n\t\t\t\t\t\"desc\" =>\t __('The content of your custom notice.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"3\",\n\t\t\t\t\t\t\"cols\" => \"50\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Sidebar Sidebox <span>customize your sidebox</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Disable sidebox', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox\",\n\t\t\t\t\t\"desc\" => __('Check this box to disable the sidebar sidebox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom code', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox_custom_code\",\n\t\t\t\t\t\"desc\" => __('Check this box to use custom code for the sidebox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Custom code content', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_sidebox_custom_code_content\",\n\t\t\t\t\t\"desc\" => __('Must use properly formatted XHTML/HTML.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"7\",\n\t\t\t\t\t\t\"cols\" => \"70\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Sidebar Adbox <span>control ads in your sidebar</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Enable adbox', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adbox\",\n\t\t\t\t\t\"desc\" => __('Check this box to enable the sidebar adbox.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"checkbox\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 file name', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adurl_1\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'Upload your image to the %s directory.' ), '<code>' . STYLESHEETPATH . '/images/sidebar/</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adlink_1\",\n\t\t\t\t\t\"desc\" => __('Link for the first ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 1 alt tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adalt_1\",\n\t\t\t\t\t\"desc\" => __('Alt tag for the first ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 file name', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adurl_2\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'Upload your image to the %s directory.' ), '<code>' . STYLESHEETPATH . '/images/sidebar/</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adlink_2\",\n\t\t\t\t\t\"desc\" => __('Link for the second ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Ad 2 alt tag', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_adalt_2\",\n\t\t\t\t\t\"desc\" => __('Alt tag for the second ad', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Footer <span>customize your footer</span>', 'titan'),\n\t\t\t\t\t\"type\" => \"subhead\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('About', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_about\",\n\t\t\t\t\t\"desc\" => __('Something about you or your business.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"6\",\n\t\t\t\t\t\t\"cols\" => \"80\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Flickr link', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_flickr\",\n\t\t\t\t\t\"desc\" => __('Create a Flickr badge. At the end of the process extract the URL and paste here.', 'titan'),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"pro\" => 'true',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"2\",\n\t\t\t\t\t\t\"cols\" => \"80\") ),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Copyright notice', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_copyright_name\",\n\t\t\t\t\t\"desc\" => __('Your name or the name of your business.', 'titan'),\n\t\t\t\t\t\"std\" => __('Your Name Here', 'titan'),\n\t\t\t\t\t\"type\" => \"text\"),\n\n\t\t\t\tarray(\n\t\t\t\t\t\"name\" => __('Stats code', 'titan'),\n\t\t\t\t\t\"id\" => $this->shortname.\"_stats_code\",\n\t\t\t\t\t\"desc\" => __( sprintf( __( 'If you would like to use Google Analytics or any other tracking script in your footer just paste it here. The script will be inserted before the closing %s tag.' ), '<code>&#60;/body&#62;</code>' ), 'titan' ),\n\t\t\t\t\t\"std\" => '',\n\t\t\t\t\t\"type\" => \"textarea\",\n\t\t\t\t\t\"options\" => array(\n\t\t\t\t\t\t\"rows\" => \"5\",\n\t\t\t\t\t\t\"cols\" => \"40\") ),\n\n\t\t\t);\n\t\t}", "function fgallery_screen_options($screen) {\n if ( is_string($screen) )\n\t\t$screen = convert_to_screen($screen);\n\t$option = str_replace( '-', '_', \"{$screen->id}_per_page\" );\n\n\t$per_page = (int) get_option( $option , 25);\n if ( $screen->id == '1-flash-gallery_page_fgallery_images') {\n $per_page_label = _x( 'Images', 'images per page (screen options)' );\n } else {\n $per_page_label = _x( 'Galleries', 'galleries per page (screen options)' );\n }\n\n\t$return = \"<div class='screen-options'>\\n\";\n\tif ( !empty($per_page_label) )\n\t$return .= \"<input type='text' class='screen-per-page' name='wp_screen_options[value]' id='$option' maxlength='3' value='$per_page' /> \n <label for='$option'>$per_page_label</label>\\n\";\n\t$return .= \"<input type='submit' class='button' value='\" . esc_attr__('Apply') . \"' />\";\n\t$return .= \"<input type='hidden' name='wp_screen_options[option]' value='\" . esc_attr($option) . \"' />\";\n\t$return .= \"</div>\\n\";\n return $return;\n}", "function admin_showimage($selection, $path, $options) { global $get, $uri;\n\t$real_path = $path.'/'.$selection;\n\tif (isset($get['o'])) {\n\t\t$url = explode('/',$get['o']);\n\t\t$url1 = explode('|', $url[0]);\n\t\t$url2 = explode('|', $url[1]);\n\t\t$found = in_array('sl', $url1) ? true : false;\n\t\t$link = pre_seao($url1[0], $url2[0], false, true);\n\t\t$link = str_replace('ebookcms.php/', '', $link);\n\t\t$link = str_replace('ebookcms.php?', '?', $link);\n\t\t$add = !isset($get['sl']) ? pre_seao('sl', '1') : '';\n\t\tfor ($i=1; $i<count($url1); $i++) {\n\t\t\t$link .= pre_seao($url1[$i], $url2[$i]);\n\t\t\tif ($i==2 && !$found) {$link .= $add;}\n\t\t}\n\t}\n\techo '<div class=\"show_img\">';\n\tif (!LOGGED && isAllowed('uplimg_access')) {echo t('not_allowed').'</div>'; exit;}\n\tif (is_dir($real_path)) { $images = '';\n\t\t$handle = opendir($real_path);\n\t\t$extensions = array('.jpg', '.bmp', '.gif', '.png');\n\t\twhile (($file = readdir($handle)) == true) {\n\t\t\tif ($file != '.' && $file != '..' && $file != 'thumbs') {\n\t\t\t\tclearstatcache();\n\t\t\t\t$ext = strrchr($file, '.');\n\t\t\t\tif (in_array($ext, $extensions)) {\n\t\t\t\t\tif (file_exists($real_path.'/thumbs/'.$file)) {\n\t\t\t\t\t\t$images = $images.'<li>\n\t\t\t\t\t\t\t<div class=\"si_title\">\n\t\t\t\t\t\t\t\t<h4>'.$file.'</h4>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"si_img\">\n\t\t\t\t\t\t\t\t<img src=\"'.$real_path.'/thumbs/'.$file.'\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"si_foot\">\n\t\t\t\t\t\t\t\t<p><a href=\"'.$link.'\" onClick=\"var r = confirm(\\''.t('delete_img').'?\\'); if (r) {deleteimage(\\''.$file.'\\',\\''.$real_path.'\\');}\" \n\t\t\t\t\t\t\t\t\ttarget=\"_self\">'.t('delete').'</a></p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>';\n\t\t\t\t\t} else {$images = $images.'<li>\n\t\t\t\t\t\t<div class=\"si_title\">\n\t\t\t\t\t\t\t<h4>'.$file.'</h4>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"si_img\">\n\t\t\t\t\t\t\t<img src=\"'.$real_path.'/'.$file.'\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"si_foot\">\n\t\t\t\t\t\t\t<p><a href=\"'.$link.'\" onClick=\"var r = confirm(\\''.t('delete_img').'?\\'); if (r) {deleteimage(\\''.$file.'\\',\\''.$real_path.'\\');}\" \n\t\t\t\t\t\t\t\t\ttarget=\"_self\">'.t('delete').'</a></p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>';}\n\t\t\t\t}\n\t\t\t}\n\t\t} closedir($handle);\n\t\tif (!empty($images)) {echo '<ul>'.$images.'</ul><br />';} else {echo t('no_image');}\n\t} else if (empty($selection)) {echo t('select_imgs');}\n\techo '</div>';\n\tif (!empty($images)) {return;}\n}", "public function mm_options_page() { \n $tmp = $this->plugin_dir . '/inc/views/options-page.php';\n \n ob_start();\n include( $tmp );\n $output = ob_get_contents();\n ob_end_clean();\n echo $output;\n }", "public function registerPage()\n\t{\n\t\tadd_options_page( \n\t\t\t'Gravity Forms Protected Downloads',\n\t\t\t'Gravity Forms Protected Downloads',\n\t\t\t'manage_options',\n\t\t\t'gfpd', \n\t\t\tarray( $this, 'settingsPage' ) \n\t\t);\n\t}", "public function setup_options_page() {\n\t\tacf_add_options_sub_page( [\n\t\t\t'page_title' \t=> _x( 'Promotions', 'Promotions page title in WP Admin', 'my-listing' ),\n\t\t\t'menu_title'\t=> _x( 'Promotions', 'Promotions menu title in WP Admin', 'my-listing' ),\n\t\t\t'menu_slug' \t=> 'theme-promotions-settings',\n\t\t\t'capability'\t=> 'manage_options',\n\t\t\t'redirect'\t\t=> false,\n\t\t\t'parent_slug' => 'case27/tools.php',\n\t\t] );\n\t}", "public function print_default_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<p>WPCampus settings require the Advanced Custom Fields PRO plugin. <a href=\"<?php echo admin_url( 'plugins.php' ); ?>\">Manage plugins</a></p>\n\t\t</div>\n\t\t<?php\n\t}", "public function get_options()\n {\n }", "function image_gallery_admin_settings() {\r\n _image_check_settings();\r\n\r\n // Show various messages if Views module is enabled.\r\n if (module_exists('views')) {\r\n // Test the status of the view:\r\n // It's enabled by default, so either:\r\n // - not set: view enabled\r\n // - FALSE: view enabled\r\n // - TRUE: view disabled\r\n // @see views_get_all_views().\r\n $status = variable_get('views_defaults', array());\r\n if (isset($status['image_gallery']) && $status['image_gallery']) {\r\n // The view is disabled: tell the user that more interesting things can be done.\r\n $form['info']['#value'] = t('Enabling the <a href=\"!views-link\">image_gallery view</a> will give you many more ways to customize your galleries.', array('!views-link' => url('admin/build/views')));\r\n }\r\n else {\r\n // The view is enabled: explain why there are no settings here and leave.\r\n $form['info'] = array(\r\n '#type' => 'item',\r\n '#title' => t('Image galleries are being made with the Views module'),\r\n );\r\n if (module_exists('views_ui')) {\r\n $form['info']['#value'] = t('To change the way galleries are displayed, edit the image_gallery view on the <a href=\"!views-link\">Views administration page</a>.', array('!views-link' => url('admin/build/views')));\r\n }\r\n else {\r\n $form['info']['#value'] = t('To change the way galleries are displayed, enable the <strong>Views UI</strong> module on the <a href=\"!modules-link\">Modules administration page</a>, then override the default image_gallery view.', array('!modules-link' => url('admin/build/modules')));\r\n }\r\n return $form;\r\n }\r\n }\r\n\r\n $form['gallery'] = array(\r\n '#type' => 'fieldset',\r\n '#title' => t('Gallery settings'),\r\n );\r\n $form['gallery']['image_images_per_page'] = array(\r\n '#type' => 'textfield',\r\n '#title' => t('Images per page'),\r\n '#default_value' => variable_get('image_images_per_page', 6),\r\n '#size' => 3,\r\n '#description' => t('Sets the number of images to be displayed in a gallery page.'),\r\n );\r\n $form['gallery']['image_gallery_node_info'] = array(\r\n '#type' => 'checkbox',\r\n '#title' => t('Display node info'),\r\n '#default_value' => variable_get('image_gallery_node_info', 0),\r\n '#description' => t(\"Checking this will display the \\\"Posted by\\\" node information on the gallery pages.\"),\r\n );\r\n $form['gallery']['image_gallery_sort_order'] = array(\r\n '#type' => 'radios',\r\n '#title' => t('Image display sort order'),\r\n '#default_value' => variable_get('image_gallery_sort_order', IMAGE_GALLERY_SORT_CREATE_DESC),\r\n '#options' => array(\r\n IMAGE_GALLERY_SORT_CREATE_DESC => t('Create date, newest first'),\r\n IMAGE_GALLERY_SORT_CREATE_ASC => t('Create date, oldest first'),\r\n IMAGE_GALLERY_SORT_FILENAME => t('File name'),\r\n IMAGE_GALLERY_SORT_TITLE => t('Image title'),\r\n ),\r\n );\r\n\r\n return system_settings_form($form);\r\n}", "function options_page_html()\n\t\t{\n\t\t\tif (!current_user_can('manage_options')) {\n\t\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"wrap\">';\n\t\t\techo '<h2>';\n\t\t\techo 'Verify Meta Tags Plugin Options';\n\t\t\techo '</h2>';\n\t\t\techo '<form method=\"post\" action=\"options.php\">';\n\t\t\tsettings_fields('vmt-options-page');\n\t\t\tdo_settings_sections('vmt-options-page');\n\t\t\techo '<p class=submit>';\n\t\t\techo '<input type=\"submit\" class=\"button-primary\" value=\"' . __('Save Changes') . '\" />';\n\t\t\techo '</p>';\n\t\t\techo '</form>';\n\t\t\techo '</div>';\n\t\t}", "public function render_options_page()\n\t{\n\t\treturn include 'src/views/form.php';\n\t}", "function getOptions();", "public function renderOptions() {\n $tab \t\t= sienna_mikado_get_admin_tab();\n $active_page \t= sienna_mikado_framework()->mkdOptions->getAdminPageFromSlug($tab);\n $current_theme \t= wp_get_theme();\n\n if ($active_page == null) return;\n ?>\n <div class=\"mkdf-options-page mkdf-page\">\n\n <?php $this->getHeader($current_theme->get('Name'), $current_theme->get('Version')); ?>\n\n <div class=\"mkdf-page-content-wrapper\">\n <div class=\"mkdf-page-content\">\n <div class=\"mkdf-page-navigation mkdf-tabs-wrapper vertical left clearfix\">\n\n <?php $this->getPageNav($tab); ?>\n <?php $this->getPageContent($active_page, $tab); ?>\n\n\n </div> <!-- close div.mkdf-page-navigation -->\n\n </div> <!-- close div.mkdf-page-content -->\n\n </div> <!-- close div.mkdf-page-content-wrapper -->\n\n </div> <!-- close div.mkd-options-page -->\n\n <a id='back_to_top' href='#'>\n <span class=\"fa-stack\">\n <span class=\"fa fa-angle-up\"></span>\n </span>\n </a>\n <?php }", "protected function defineOptions() {\r\n $options = parent::defineOptions();\r\n $options['view_type'] = array('default' => 'web');\r\n\t$options['image_style'] = array('default' => '');\r\n\t$options['link_to_entity'] = array('default' => '');\r\n\r\n return $options;\r\n }", "public function initialize_options() {\n add_option( 'wp_roni_photo_contest_same_voted', '1' );\n add_option( 'wp_roni_photo_contest_tracking', 'ipaddress' );\n add_option( 'wp_roni_photo_contest_custom_css', '.gallery { border: 5px solid red; }' );\n add_option( 'wp_roni_photo_contest_subtitle', 'Contest title' );\n add_option( 'wp_roni_photo_contest_description', 'Contest description.' );\n\n wp_insert_term('Roni gallery', 'category', array(\n 'slug' => 'roni-gallery'\n ));\n\n // Database object\n global $wpdb;\n\n // Database table names\n $image_table_name = $wpdb->prefix . 'roni_images';\n $votes_table_name = $wpdb->prefix . 'roni_votes';\n\n // If table roni_images doesn't exist create it\n $query = \"show tables like '\" . $image_table_name . \"';\";\n if(!$wpdb -> get_var($query))\t{\n $query = \"create table \" . $image_table_name . \" ( \";\n $query .= \"`images_id` int not null auto_increment, \";\n $query .= \"`attachment_id` int(11) not null default '0', \";\n $query .= \"`title` varchar(30) not null default '',\";\n $query .= \"`description` varchar(100) not null default '',\";\n $query .= \"`image_path` varchar(1000) not null, \";\n $query .= \"`thumbnaul_path` varchar(1000) not null, \";\n $query .= \"`author_name` varchar(50) not null, \";\n $query .= \"`author_email` varchar(50) not null, \";\n $query .= \"`number_of_votes` int not null default '0', \";\n $query .= \"`image_status` int not null default '0', \";\n $query .= \"`created` datetime not null default '00-00-0000 00:00:00', \";\n $query .= \"PRIMARY KEY (`images_id`)\";\n $query .= \") ENGINE=MyISAM AUTO_INCREMENT=1 CHARSET=UTF8 COLLATE=utf8_general_ci;\";\n\n $wpdb -> query($query);\n \t}\n\n // If table roni_votes doesn't exist create it\n $query = \"show tables like '\" . $votes_table_name . \"';\";\n if(!$wpdb->get_var( $query ))\t{\n $query = \"create table \" . $votes_table_name . \" ( \";\n $query .= \"`id` int not null auto_increment, \";\n $query .= \"`ip_address` varchar(100) not null, \";\n $query .= \"`attachment_id` int not null default '0', \";\n $query .= \"`created` datetime not null default '00-00-0000 00:00:00',\";\n $query .= \"PRIMARY KEY (`id`)\";\n $query .= \") ENGINE=MyISAM AUTO_INCREMENT=1 CHARSET=UTF8 COLLATE=utf8_general_ci;\";\n\n $wpdb->query($query);\n \t}\n }", "public function option_page() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\twp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'top-story' ) );\n\t\t}\n\n\t\tinclude_once( \"{$this->plugin->dir_path}/templates/option-page.php\" );\n\t}", "function vmt_options_page()\n\t\t{\n\t\t\t// Create the options page\n\t\t\t$options_page = add_options_page(\n\t\t\t\t'Verify Meta Tags Plugin Options', \n\t\t\t\t'Verify Meta Tags',\n\t\t\t\t'manage_options',\n\t\t\t\t'vmt-options-page', \n\t\t\t\tarray(&$this, 'options_page_html')\n\t\t\t);\n\t\t\t\n\t\t\tadd_action( 'admin_print_styles-' . $options_page, array($this, 'enqueue_admin_styles'), 1000 );\n\t\t\t\n\t\t\t// Add settings section\n\t\t\t\n\t\t\tadd_settings_section( \n\t\t\t\t'vmt-options-section', \n\t\t\t\t'Owner Verification Meta Tags', \n\t\t\t\tarray( &$this, 'display_ID_section_html'), \n\t\t\t\t'vmt-options-page'\n\t\t\t);\n\t\t\t\n\t\t\t// Google verification ID\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[google]',\t\n\t\t\t\t'Google Verification ID', \n\t\t\t\tarray( &$this, 'display_verify_id_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-section',\n\t\t\t\tarray('code'=>'google') \n\t\t\t);\n\n\t\t\t// Pinterest verification ID\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[pinterest]',\t\n\t\t\t\t'Pinterest Verification ID', \n\t\t\t\tarray( &$this, 'display_verify_id_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-section',\n\t\t\t\tarray('code'=>'pinterest') \n\t\t\t);\n\t\t\t\n\t\t\t// Analytics Code block in it's own section\n\t\t\tadd_settings_section( \n\t\t\t\t'vmt-options-analytics-section', \n\t\t\t\t'Site Statistics Tracking', \n\t\t\t\tarray( &$this, 'display_analytics_section_html'), \n\t\t\t\t'vmt-options-page'\n\t\t\t);\n\t\t\tadd_settings_field(\n\t\t\t\t'verify-meta-tags[analytics]',\t\n\t\t\t\t'Analytics code', \n\t\t\t\tarray( &$this, 'display_analytics_html' ), \n\t\t\t\t'vmt-options-page', \n\t\t\t\t'vmt-options-analytics-section',\n\t\t\t\tarray('code'=>'analytics') \n\t\t\t);\n\t\t}", "function myphotolinks_menu() {\n\n add_options_page(\n 'myphotolinks',\n 'myphotolinks',\n 'manage_options',\n 'myphotolinks',\n 'myphotolinks_options_page'\n );\n }", "static public function change_gform_options()\n {\n update_option( 'rg_gforms_disable_css', '1' );\n \tupdate_option( 'rg_gforms_enable_html5', '1' );\n }", "function image_gallery_admin() {\r\n _image_check_settings();\r\n\r\n $tree = taxonomy_get_tree(_image_gallery_get_vid());\r\n if ($tree) {\r\n $header = array(t('Name'), t('Operations'));\r\n foreach ($tree as $term) {\r\n $rows[] = array(str_repeat(' -- ', $term->depth) . ' ' . l($term->name, \"image/tid/$term->tid\"), l(t('edit gallery'), \"admin/content/image/edit/$term->tid\"));\r\n }\r\n return theme('table', $header, $rows);\r\n }\r\n else {\r\n return t('No galleries available');\r\n }\r\n}", "function abecaf_register_options_page() {\n add_options_page( 'CAF Donations', 'CAF Donations', 'manage_options', 'abe-caf', 'abecaf_options_page' );\n}", "public function lightbox_options() {\n\n\t\t/**\n\t\t * Filter whether to include the JavaScript initialization code.\n\t\t *\n\t\t * Customizing the lightbox options should be done by modifying the global\n\t\t * LGLJL_OPTIONS object through JavaScript, instead of disabling this\n\t\t * and adding a custom object.\n\t\t *\n\t\t * @since 1.0.0\n\t\t * @param bool $init Defaults to true, return false to disable.\n\t\t */\n\t\tif ( ! apply_filters( 'lgljl_init_lightbox', true ) ) return;\n\n\t\t/**\n\t\t * Filter the lightbox 'content type' option.\n\t\t *\n\t\t * @since 2.1.0\n\t\t * @param string $gallery_type Accepts 'image', 'iframe', 'inline', and\n\t\t * 'ajax'. Defaults to 'image', see Magnific Popup documentation for\n\t\t * differences.\n\t\t */\n\t\t$gallery_type = apply_filters( 'lgljl_gallery_type', 'image' );\n\n\t\tob_start(); ?>\n\t\t<script>\n\t\t\tvar LGLJL_OPTIONS={\n\t\t\t\tdelegate: \".<?php echo $this->_gallery_item_class; ?>\",\n\t\t\t\ttype: \"<?php echo $gallery_type; ?>\",\n\t\t\t\tdisableOn: 0,\n\t\t\t\ttClose: \"<?php _e( 'Close (Esc)', 'lgljl' ); ?>\",\n\t\t\t\ttLoading: \"<?php _e( 'Loading...', 'lgljl' ); ?>\",\n\t\t\t\tgallery: {\n\t\t\t\t\tenabled: true,\n\t\t\t\t\ttPrev: \"<?php _e( 'Previous (Left arrow key)', 'lgljl' ); ?>\",\n\t\t\t\t\ttNext: \"<?php _e( 'Next (Right arrow key)', 'lgljl' ); ?>\",\n\t\t\t\t\ttCounter: \"<?php _e( '%curr% of %total%', 'lgljl' ); ?>\"\n\t\t\t\t},\n\t\t\t\timage: {\n\t\t\t\t\ttError: \"<?php _e( '<a href=\\\"%url%\\\">The image</a> could not be loaded.', 'lgljl' ); ?>\"\n\t\t\t\t},\n\t\t\t\tajax: {\n\t\t\t\t\ttError: \"<?php _e( '<a href=\\\"%url%\\\">The content</a> could not be loaded.', 'lgljl' ); ?>\"\n\t\t\t\t}\n\t\t\t};\n\t\t</script>\n\t\t<?php $script = ob_get_clean();\n\n\t\t// Some unnecessary minification, for my own satisfaction\n\t\t$script = str_replace( array( \"\\n\", \"\\r\", \"\\t\" ), '', $script );\n\t\t$script = preg_replace( '/: (?=[\"0t{])/', ':', $script );\n\n\t\techo $script . \"\\n\";\n\t}", "public function add_plugin_settings_page() {\n\t\tadd_options_page(\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t__( 'Better WC Profile Pictures', 'bwcpp' ),\n\t\t\t'manage_options',\n\t\t\t'bwcpp_settings',\n\t\t\tarray( $this, 'render_settings_page' )\n\t\t);\n\t}", "public function mm_get_options() {\n $options = get_option('mm_gallery_options');\n $def_css = get_option('mm_gallery_css');\n $current = $this->mm_current_version();\n\n // Test to see if options exist\n if( $options == FALSE) { \n update_option('mm_gallery_options', $this->defaults);\n $options = $this->defaults;\n if( $def_css == FALSE) $this->mm_default_css();\n } else if(!$current) {\n $defaults = $this->defaults;\n\n $new_options['include_css'] = ( array_key_exists('include_css',$options) ? $options['include_css'] : $defaults['include_css'] );\n $new_options['show_captions'] = ( array_key_exists('show_captions',$options) ? $options['show_captions'] : $defaults['show_captions'] );\n $new_options['file_link'] = ( array_key_exists('file_link',$options) ? $options['file_link'] : $defaults['file_link'] );\n $new_options['itemtag'] = ( array_key_exists('itemtag',$options) ? $options['itemtag'] : $defaults['itemtag'] );\n $new_options['icontag'] = ( array_key_exists('icontag',$options) ? $options['icontag'] : $defaults['icontag'] );\n $new_options['captiontag'] = ( array_key_exists('captiontag',$options) ? $options['captiontag'] : $defaults['captiontag'] );\n $new_options['columns'] = ( array_key_exists('columns',$options) ? $options['columns'] : $defaults['columns'] );\n $new_options['size'] = ( array_key_exists('size',$options) ? $options['size'] : $defaults['size'] );\n $new_options['version'] = $defaults['version'];\n $new_options['name'] = $defaults['name'];\n\n update_option('mm_gallery_options', $new_options);\n $options = $new_options;\n if( $def_css == FALSE) $this->mm_default_css();\n }\n return $options;\n }", "public function options() {}", "function wptreehouse_badges_menu() {\n\n\t/*\n\t * \tUse the add_options_page function\n\t * \tadd_options_page( $page_title, $menu_title, $capability, $menu-slug, $function ) \n\t *\n\t*/\n\n\tadd_options_page(\n\t\t'Official Treehouse Badges Plugin',\n\t\t'Treehouse Badges',\n\t\t'manage_options',\n\t\t'wptreehouse-badges',\n\t\t'wptreehouse_badges_options_page'\n\t);\n\n}", "public function galerias_action()\n\t{\n\t\t$this->_title = 'Administrador - Galerias';\n\t\t$dados['lugar'] = 'galerias';\n\t\t$this->template('admin/galeriasAdmin',$dados);\n\t\t\n\t}", "function initlab_options_page() {\n add_menu_page(\n __('init Lab Options', 'initlab-addons'),\n __('init Lab', 'initlab-addons'),\n 'manage_options',\n 'initlab',\n 'initlab_options_page_html'\n );\n}", "function optionPage() {\r\n\t\t$out = $uninstall = '';\r\n\r\n\t\t// Check write permissions\r\n\t\t$this->_checkDir();\r\n\r\n\t\t// Settings update or delete\r\n\t\tif(isset($_POST['options_update'])) { // options update\r\n\t\t\t// strip slashes array\r\n\t\t\t$_POST = $this->stripArray($_POST);\r\n\r\n\t\t\t$this->options['user_lvl'] = $_POST['vp_userlevel'];\r\n\t\t\t$this->options['show_option'] = $_POST['vp_show'];\r\n\t\t\t$this->options['class_name'] = $_POST['vp_classname'];\r\n\t\t\t$this->options['class_name_with_type'] = $_POST['vp_classwithtype'];\r\n\t\t\t$this->options['ins_shortcode'] = (isset($_POST['vp_shortcode']) && $_POST['vp_shortcode']=='1' ? '1' : '0');\r\n\t\t\t$this->updateOptions();\r\n\r\n\t\t\t$_POST = '';\r\n\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\r\n\t\t} elseif(isset($_POST['uninst'])) { // uninstall\r\n\t\t\t$this->deleteOptions();\r\n\t\t\tif (file_exists($this->data_dir))\r\n\t\t\t\t$this->_removeDir($this->data_dir);\r\n\t\t\t$this->note .= __('All files and folders have (probably) been deleted. Now click <strong>Plugins</strong> in the admin panel above and <b>Deactivate</b> the VideoPop plugin.', $this->textdomain_name);\r\n\t\t\t$this->note .= \"<br />\" . $this->data_dir;\r\n\t\t\t$this->error++;\r\n\t\t\t$this->initOptions();\r\n\t\t\terror_reporting(0);\r\n\t\t}\r\n\r\n\t\t// Add Options\r\n\t\t$out .= \"<div class=\\\"wrap\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('VideoPop+ Options', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"update_options\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<table class=\\\"optiontable form-table\\\" style=\\\"margin-top:0;\\\"><tbody>\\n\";\r\n\r\n\t\t// Add User Level\r\n\t\t// Permission -- Subscriber = 0, Contributor = 1, Author = 2, Editor = 7, Administrator = 9\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('User Level', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_userlevel\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'0').\">\".__('subscriber', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'1').\">\".__('contributor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"2\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'2').\">\".__('author', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"7\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'7').\">\".__('editor', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"9\\\"\".$this->_setOptionSelected($this->options['user_lvl'],'9').\">\".__('administrator', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Set the user level the user needs to have (at least) to manage/upload/delete videos', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Method of display\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Method of display', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td><select name=\\\"vp_show\\\">\";\r\n\t\t$out .= \"<option value=\\\"popup\\\"\" .$this->_setOptionSelected($this->options['show_option'],'popup').\">\". __('Pop up', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"lightpop\\\"\".$this->_setOptionSelected($this->options['show_option'],'lightpop').\">\".__('LightPop', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"inline\\\"\" .$this->_setOptionSelected($this->options['show_option'],'inline').\">\". __('In line', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"none\\\"\" .$this->_setOptionSelected($this->options['show_option'],'none').\">\". __('The effect none', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"<td>\".__('Please select it from &quot;Pop up&quot;, &quot;LightPop&quot;, &quot;In line&quot;, and &quot;The effect none&quot;.', $this->textdomain_name);\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Add Class Name Setting\r\n\t\t$out .= \"<tr style=\\\"border-style:none;\\\">\\n\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><strong>\".__('Class name of the link tag', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\"><input type=\\\"text\\\" name=\\\"vp_classname\\\" value=\\\"\".$this->options['class_name'].\"\\\"/>&nbsp;</td>\";\r\n\t\t$out .= \"<td style=\\\"border-style:none;\\\">\".__('Please set the class name of the link tag.', $this->textdomain_name).\"</td>\\n\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><select name=\\\"vp_classwithtype\\\">\";\r\n\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'0').\">\".__('Without File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"<option value=\\\"1\\\"\".$this->_setOptionSelected($this->options['class_name_with_type'],'1').\">\".__('With File Type', $this->textdomain_name).\"</option>\";\r\n\t\t$out .= \"</select>&nbsp;</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t// Insert Editor Option (Shortcode or HTML Tag?)\r\n\t\t$out .= \"<tr>\\n\";\r\n\t\t$out .= \"<td><strong>\".__('Insert Editor Option', $this->textdomain_name).\"</strong></td>\";\r\n\t\t$out .= \"<td colspan=\\\"2\\\"><input type=\\\"checkbox\\\" name=\\\"vp_shortcode\\\" value=\\\"1\\\" style=\\\"margin-right:0.5em;\\\" \".($this->options['ins_shortcode']=='1' ? \" checked\" : \"\").\" />\".__('Shortcode is inserted in the editor.', $this->textdomain_name).\"</td>\";\r\n\t\t$out .= \"</tr>\\n\";\r\n\t\t$out .= \"<tr>\\n\";\r\n\r\n\t\t$out .= \"</tbody></table>\\n\";\r\n\r\n\t\t// Add Update Button\r\n\t\t$out .= \"<div style=\\\"text-align:right;margin-top:1em;\\\">\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"options_update\\\" value=\\\"\".__('Update Options', $this->textdomain_name).\"\\\" class=\\\"button\\\" />\";\r\n\t\t$out .= \"</div>\";\r\n\t\t$out .= \"</form></div>\\n\";\r\n\r\n\t\t// Add uninstall\r\n\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"margin-top:2em;\\\">\\n\";\r\n\t\t$out .= \"<h2>\".__('Uninstall', $this->textdomain_name).\"</h2><br />\\n\";\r\n\t\t$out .= \"<p>\".__('If you want to keep your videos and the popup functionality of your links but want to get rid of the additional menus in the control panel, just deactivate the plugin.<br />For a complete uninstall including all uploaded videos use the uninstall button.', $this->textdomain_name).\"</p>\\n\";\r\n\t\t$out .= \"<div style=\\\"text-align:right;\\\">\";\r\n\t\t$out .= \"<form method=\\\"post\\\" id=\\\"uninstall\\\" action=\\\"\".$this->admin_action.\"\\\">\\n\";\r\n\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"uninst\\\" value=\\\"\".__('Uninstall VideoPop+', $this->textdomain_name).\"\\\" onclick=\\\"javascript:check=confirm('\".__('You are about to delete all your settings and Videos! The links you created with VideoPop will not work after uninstall! Proceed with uninstall?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" />\\n\";\r\n\t\t$out .= \"</form>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\t\t$out .= \"</div>\\n\";\r\n\r\n\t\t// Output\r\n\t\techo (!empty($this->note) ? \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>{$this->note}</p></div>\\n\" : '' ).\"\\n\";\r\n\t\techo ($this->error > 0 ? '' : $out).\"\\n\";\r\n\t}", "function optionsframework_options() {\n\t\n\t// Test data\n\t$test_array = array(\"one\" => \"One\",\"two\" => \"Two\",\"three\" => \"Three\",\"four\" => \"Four\",\"five\" => \"Five\");\n\t\n\t// Multicheck Array\n\t$multicheck_array = array(\"one\" => \"French Toast\", \"two\" => \"Pancake\", \"three\" => \"Omelette\", \"four\" => \"Crepe\", \"five\" => \"Waffle\");\n\t\n\t// Multicheck Defaults\n\t$multicheck_defaults = array(\"one\" => \"1\",\"five\" => \"1\");\n\t\n\t// Background Defaults\n\t\n\t$background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat','position' => 'top center','attachment'=>'scroll');\n\t\n\t\n\t// Pull all the categories into an array\n\t$options_categories = array(); \n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n \t$options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\t\n\t// Pull all the pages into an array\n\t$options_pages = array(); \n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n \t$options_pages[$page->ID] = $page->post_title;\n\t}\n\t\t\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_bloginfo('stylesheet_directory') . '/images/';\n\t\n// PRICING ARRAY\n\t$test_array = array(\"not_featured\" => \"not featured\",\"featured\" => \"featured\");\n\n\t$options = array();\n\t\n\t$options[] = array( \"name\" => \"Header\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n//HEADER LOGO\n\t$options[] = array( \"name\" => \"Logo\",\n\t\t\t\t\t\t\"desc\" => \"upload your logo\",\n\t\t\t\t\t\t\"id\" => \"logo\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\n//HOME PAGE SLIDER\n\t$options[] = array( \"name\" => \"Home Page Slider Link 1\",\n\t\t\t\t\t\t\"desc\" => \"Enter a URL for the first slide.\",\n\t\t\t\t\t\t\"id\" => \"home_sliderlink1\",\n\t\t\t\t\t\t\"std\" => \"http://\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => \"Home Page Slider Image 1\",\n\t\t\t\t\t\t\"desc\" => \"Home Page Slider Image for the first slide.\",\n\t\t\t\t\t\t\"id\" => \"homeslideimg1\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page Slider Link 2\",\n\t\t\t\t\t\t\"desc\" => \"Enter a URL for the second slide.\",\n\t\t\t\t\t\t\"id\" => \"home_sliderlink2\",\n\t\t\t\t\t\t\"std\" => \"http://\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => \"Home Page Slider Image 2\",\n\t\t\t\t\t\t\"desc\" => \"Home Page Slider Image for the second slide.\",\n\t\t\t\t\t\t\"id\" => \"homeslideimg2\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page Slider Link 3\",\n\t\t\t\t\t\t\"desc\" => \"Enter a URL for the third slide.\",\n\t\t\t\t\t\t\"id\" => \"home_sliderlink3\",\n\t\t\t\t\t\t\"std\" => \"http://\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\t\t\t\t\t\n\t$options[] = array( \"name\" => \"Home Page Slider Image 3\",\n\t\t\t\t\t\t\"desc\" => \"Home Page Slider Image for the third slide.\",\n\t\t\t\t\t\t\"id\" => \"homeslideimg3\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t//HOME PAGE FEATURED CONTENT\n\t$options[] = array( \"name\" => \"Home Page Feature Image 1\",\n\t\t\t\t\t\t\"desc\" => \"IMAGE MUST BE 60PX by 60PX. This is the left most home page feature area image.\",\n\t\t\t\t\t\t\"id\" => \"home_featureimage1\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 1 Title\",\n\t\t\t\t\t\t\"desc\" => \"This is the left most home page feature area title.\",\n\t\t\t\t\t\t\"id\" => \"home_featuretitle\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 1 Content\",\n\t\t\t\t\t\t\"desc\" => \"This is the left most home page feature area content.\",\n\t\t\t\t\t\t\"id\" => \"home_featurecontent\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature Image 2\",\n\t\t\t\t\t\t\"desc\" => \"IMAGE MUST BE 60PX by 60PX. This is the middle home page feature area image.\",\n\t\t\t\t\t\t\"id\" => \"home_featureimage2\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 2 Title\",\n\t\t\t\t\t\t\"desc\" => \"This is the middle home page feature area title.\",\n\t\t\t\t\t\t\"id\" => \"home_featuretitle2\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 2 Content\",\n\t\t\t\t\t\t\"desc\" => \"This is the left most home page feature area content.\",\n\t\t\t\t\t\t\"id\" => \"home_featurecontent2\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature Image 3\",\n\t\t\t\t\t\t\"desc\" => \"IMAGE MUST BE 60PX by 60PX. This is the left most home page feature area image.\",\n\t\t\t\t\t\t\"id\" => \"home_featureimage3\",\n\t\t\t\t\t\t\"type\" => \"upload\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 3 Title\",\n\t\t\t\t\t\t\"desc\" => \"This is the right most home page feature area title.\",\n\t\t\t\t\t\t\"id\" => \"home_featuretitle3\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Home Page Feature 3 Content\",\n\t\t\t\t\t\t\"desc\" => \"This is the right most home page feature area content.\",\n\t\t\t\t\t\t\"id\" => \"home_featurecontent3\",\n\t\t\t\t\t\t\"type\" => \"textarea\");\n\t\n//PRICING\n\n\t$options[] = array( \"name\" => \"Pricing\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n//PRICING TABLE 1\n\n\t$options[] = array( \"name\" => \"Featured Pricing Table\",\n\t\t\t\t\t\t\"desc\" => \"Please Select Featured or No \",\n\t\t\t\t\t\t\"id\" => \"featured_pricing\",\n\t\t\t\t\t\t\"std\" => \"two\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"class\" => \"mini\",\n\t\t\t\t\t\t\"options\" => $test_array);\n\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Name\",\n\t\t\t\t\t\t\"desc\" => \"The name of your 1st pricing table. Example: Basic Hosting\",\n\t\t\t\t\t\t\"id\" => \"pricing1_name\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Payment Structure\",\n\t\t\t\t\t\t\"desc\" => \"The Payment Structure your 1st pricing table. Example: Pay Yearly, Per Month, One Time. \",\n\t\t\t\t\t\t\"id\" => \"pricing1_structure\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\"); \n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Option 1\",\n\t\t\t\t\t\t\"desc\" => \"The 1st for your 1st pricing table. Example: 1TB Bandwith. \",\n\t\t\t\t\t\t\"id\" => \"pricing1_option1\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Option 2\",\n\t\t\t\t\t\t\"desc\" => \"The 2nd option for your 1st pricing table. Example: 1 Gig of Space. \",\n\t\t\t\t\t\t\"id\" => \"pricing1_option2\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Option 3\",\n\t\t\t\t\t\t\"desc\" => \"The 3rd option for your 1st pricing table. Example: Email Support. \",\n\t\t\t\t\t\t\"id\" => \"pricing1_option3\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Price\",\n\t\t\t\t\t\t\"desc\" => \"The price for your 1st pricing table. Example: $19.95. \",\n\t\t\t\t\t\t\"id\" => \"pricing1_price\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 1 Button Link\",\n\t\t\t\t\t\t\"desc\" => \"The link for your 1st pricing table. Example: A sign up page, Paypal Link or Google Checkout. You can redirect them to any URL you want.\",\n\t\t\t\t\t\t\"id\" => \"pricing1_link\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\n\n\n\n\n//PRICING TABLE 2\n\n\t$options[] = array( \"name\" => \"Featured Pricing Table\",\n\t\t\t\t\t\t\"desc\" => \"Please Select Featured or No \",\n\t\t\t\t\t\t\"id\" => \"featured_pricing2\",\n\t\t\t\t\t\t\"std\" => \"two\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"class\" => \"mini\",\n\t\t\t\t\t\t\"options\" => $test_array);\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Name\",\n\t\t\t\t\t\t\"desc\" => \"The name of your 2nd pricing table. Example: Basic Hosting\",\n\t\t\t\t\t\t\"id\" => \"pricing2_name\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Payment Structure\",\n\t\t\t\t\t\t\"desc\" => \"The Payment Structure your 2nd pricing table. Example: Pay Yearly, Per Month, One Time. \",\n\t\t\t\t\t\t\"id\" => \"pricing2_structure\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\"); \n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Option 1\",\n\t\t\t\t\t\t\"desc\" => \"The 1st option for your 2nd pricing table. Example: 1TB Bandwith. \",\n\t\t\t\t\t\t\"id\" => \"pricing2_option1\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Option 2\",\n\t\t\t\t\t\t\"desc\" => \"The 2nd option for your 2nd pricing table. Example: 1 Gig of Space. \",\n\t\t\t\t\t\t\"id\" => \"pricing2_option2\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Option 3\",\n\t\t\t\t\t\t\"desc\" => \"The 3rd option for your 2nd pricing table. Example: Email Support. \",\n\t\t\t\t\t\t\"id\" => \"pricing2_option3\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Price\",\n\t\t\t\t\t\t\"desc\" => \"The price for your 2nd pricing table. Example: $19.95. \",\n\t\t\t\t\t\t\"id\" => \"pricing2_price\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 2 Button Link\",\n\t\t\t\t\t\t\"desc\" => \"The link for your 2nd pricing table. Example: A sign up page, Paypal Link or Google Checkout. You can redirect them to any URL you want.\",\n\t\t\t\t\t\t\"id\" => \"pricing2_link\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\n\n//PRICING TABLE 3\n\t$options[] = array( \"name\" => \"Featured Pricing Table\",\n\t\t\t\t\t\t\"desc\" => \"Please Select Featured or No \",\n\t\t\t\t\t\t\"id\" => \"featured_pricing3\",\n\t\t\t\t\t\t\"std\" => \"two\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"class\" => \"mini\",\n\t\t\t\t\t\t\"options\" => $test_array);\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Name\",\n\t\t\t\t\t\t\"desc\" => \"The name of your 3rd pricing table. Example: Basic Hosting\",\n\t\t\t\t\t\t\"id\" => \"pricing3_name\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Payment Structure\",\n\t\t\t\t\t\t\"desc\" => \"The Payment Structure your 3rd pricing table. Example: Pay Yearly, Per Month, One Time. \",\n\t\t\t\t\t\t\"id\" => \"pricing3_structure\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\"); \n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Option 1\",\n\t\t\t\t\t\t\"desc\" => \"The 1st option for your 3rd pricing table. Example: 1TB Bandwith. \",\n\t\t\t\t\t\t\"id\" => \"pricing3_option1\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Option 2\",\n\t\t\t\t\t\t\"desc\" => \"The 2nd option for your 3rd pricing table. Example: 1 Gig of Space. \",\n\t\t\t\t\t\t\"id\" => \"pricing3_option2\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Option 3\",\n\t\t\t\t\t\t\"desc\" => \"The 3rd for your 3rd pricing table. Example: Email Support. \",\n\t\t\t\t\t\t\"id\" => \"pricing3_option3\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Price\",\n\t\t\t\t\t\t\"desc\" => \"The price for your 3rd pricing table. Example: $19.95. \",\n\t\t\t\t\t\t\"id\" => \"pricing3_price\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 3 Button Link\",\n\t\t\t\t\t\t\"desc\" => \"The link for your 3rd pricing table. Example: A sign up page, Paypal Link or Google Checkout. You can redirect them to any URL you want.\",\n\t\t\t\t\t\t\"id\" => \"pricing3_link\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\n\n//PRICING TABLE 4\n\n\t$options[] = array( \"name\" => \"Featured Pricing Table\",\n\t\t\t\t\t\t\"desc\" => \"Please Select Featured or No \",\n\t\t\t\t\t\t\"id\" => \"featured_pricing4\",\n\t\t\t\t\t\t\"std\" => \"two\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"class\" => \"mini\",\n\t\t\t\t\t\t\"options\" => $test_array);\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Name\",\n\t\t\t\t\t\t\"desc\" => \"The name of your 4th pricing table. Example: Basic Hosting\",\n\t\t\t\t\t\t\"id\" => \"pricing4_name\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Payment Structure\",\n\t\t\t\t\t\t\"desc\" => \"The Payment Structure your 4th pricing table. Example: Pay Yearly, Per Month, One Time. \",\n\t\t\t\t\t\t\"id\" => \"pricing4_structure\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\"); \n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Option 1\",\n\t\t\t\t\t\t\"desc\" => \"The 1st option for your 1st pricing table. Example: 1TB Bandwith. \",\n\t\t\t\t\t\t\"id\" => \"pricing4_option1\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Option 2\",\n\t\t\t\t\t\t\"desc\" => \"The 2nd for your 2nd pricing table. Example: 1 Gig of Space. \",\n\t\t\t\t\t\t\"id\" => \"pricing4_option2\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Option 3\",\n\t\t\t\t\t\t\"desc\" => \"The 3rd option for your 4th pricing table. Example: Email Support. \",\n\t\t\t\t\t\t\"id\" => \"pricing4_option3\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Price\",\n\t\t\t\t\t\t\"desc\" => \"The price for your 4th pricing table. Example: $19.95. \",\n\t\t\t\t\t\t\"id\" => \"pricing4_price\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 4 Button Link\",\n\t\t\t\t\t\t\"desc\" => \"The link for your 4th pricing table. Example: A sign up page, Paypal Link or Google Checkout. You can redirect them to any URL you want.\",\n\t\t\t\t\t\t\"id\" => \"pricing4_link\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n//PRICING TABLE 5\n\t$options[] = array( \"name\" => \"Featured Pricing Table\",\n\t\t\t\t\t\t\"desc\" => \"Please Select Featured or No \",\n\t\t\t\t\t\t\"id\" => \"featured_pricing5\",\n\t\t\t\t\t\t\"std\" => \"two\",\n\t\t\t\t\t\t\"type\" => \"select\",\n\t\t\t\t\t\t\"class\" => \"mini\",\n\t\t\t\t\t\t\"options\" => $test_array);\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Name\",\n\t\t\t\t\t\t\"desc\" => \"The name of your 1st pricing table. Example: Basic Hosting\",\n\t\t\t\t\t\t\"id\" => \"pricing5_name\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Payment Structure\",\n\t\t\t\t\t\t\"desc\" => \"The Payment Structure your 5th pricing table. Example: Pay Yearly, Per Month, One Time. \",\n\t\t\t\t\t\t\"id\" => \"pricing5_structure\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\"); \n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Option 1\",\n\t\t\t\t\t\t\"desc\" => \"The first option for your 5th pricing table. Example: 1TB Bandwith. \",\n\t\t\t\t\t\t\"id\" => \"pricing5_option1\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Option 2\",\n\t\t\t\t\t\t\"desc\" => \"The first option for your 5th pricing table. Example: 1 Gig of Space. \",\n\t\t\t\t\t\t\"id\" => \"pricing5_option2\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Option 3\",\n\t\t\t\t\t\t\"desc\" => \"The first option for your 5th pricing table. Example: Email Support. \",\n\t\t\t\t\t\t\"id\" => \"pricing5_option3\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Price\",\n\t\t\t\t\t\t\"desc\" => \"The price for your 5th pricing table. Example: $19.95. \",\n\t\t\t\t\t\t\"id\" => \"pricing5_price\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\n\t$options[] = array( \"name\" => \"Pricing Table 5 Button Link\",\n\t\t\t\t\t\t\"desc\" => \"The link for your 2nd pricing table. Example: A sign up page, Paypal Link or Google Checkout. You can redirect them to any URL you want.\",\n\t\t\t\t\t\t\"id\" => \"pricing5_link\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"text\");\n\t\n\t//FOOTER\n\n\t$options[] = array( \"name\" => \"Footer\",\n\t\t\t\t\t\t\"type\" => \"heading\");\n\t\n\t$options[] = array( \"name\" => \"Google Analytics Code\",\n\t\t\t\t\t\t\"desc\" => \"Paste your Google Analytics Code into this text box.\",\n\t\t\t\t\t\t\"id\" => \"google_analytics\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\t$options[] = array( \"name\" => \"Twitter User Name\",\n\t\t\t\t\t\t\"desc\" => \"Paste your Twitter User Name into this text box.\",\n\t\t\t\t\t\t\"id\" => \"twitter_username\",\n\t\t\t\t\t\t\"std\" => \"Default Text\",\n\t\t\t\t\t\t\"type\" => \"textarea\"); \n\n\treturn $options;\n}", "public function add_options_page() {\n add_options_page($this->title, $this->title, 'manage_options', $this->page, array(&$this, 'display_options_page'));\n }", "function bn_project_options_page() {\n // add top level menu page\n if ( empty ( $GLOBALS['admin_page_hooks']['bn_options'] ) ) {\n add_menu_page(\n 'Komunikaty',\n 'Komunikaty',\n '',\n 'bn_options',\n '',\n plugins_url('brodnet-logo.png', __FILE__ )\n );\n }\n\tadd_submenu_page(\n\t\t'bn_options',\n\t\t__('Komunikaty', 'bn-netto'),\n\t\t__('Komunikaty', 'bn-netto'),\n\t\t'manage_options',\n\t\t'bn_project_options',\n\t\t'bn_project_options_page_html'\n\t);\n}", "function getImageOptions() {\n $config = json_decode(tmdbget(\"configuration\"), true)[\"images\"];\n return [\n \"path\" => $config[\"secure_base_url\"],\n \"posterLow\" => $config[\"poster_sizes\"][1],\n \"posterMed\" => $config[\"poster_sizes\"][2],\n \"posterHigh\" => $config[\"poster_sizes\"][3],\n \"backdrop\" => $config[\"backdrop_sizes\"][2],\n \"profile\" => $config[\"profile_sizes\"][1],\n \"profileHigh\" => $config[\"profile_sizes\"][2]\n ];\n}", "function wgGlossary_create_options() {\n\tadd_option(wgGlossarySettingOneSlug, 'disabled'); // Page to override.\n\tadd_option(wgGlossarySettingTwoSlug, 'Papercut-Avoided.css'); // Display Style.\n\tadd_option(wgGlossarySettingThreeSlug, file_get_contents(DEFAULT_CSS_STYLE_FILE_LOCATION)); // Default Custom Style CSS.\n\tadd_option(wgGlossarySettingFourSlug, 1); // Use jQuery.\n\tadd_option(wgGlossarySettingNineSlug, 1); // Enable read more link.\n\tadd_option(wgGlossarySettingTenSlug, 'Read more…'); // Read more link text.\n\tadd_option(wgGlossarySettingThirteenSlug, 'glossary-term'); // Glossary term rewrite slug.\n\tadd_option(wgGlossarySettingFourteenSlug, 1); // Delete settings on plugin deletion.\n\tadd_option(wgGlossarySettingFifteenSlug, 1); // Delete custom posts and terms on plugin deletion.\n\t\n\n\n\n\tadd_option('wgGlossary_fullname', 'WordGallery Glossary');\n\tadd_option('wgGlossary_name', 'WG Glossary');\n\tadd_option('wgGlossary_version', '0.7');\n\tadd_option('wgGlossary_url_slug', 'wg-glossary');\n\tadd_option('wgGlossary_url_slug_long', 'wordgallery-glossary');\n\tadd_option('wgGlossary_items_security_level', 'Editor');\n\tadd_option('wgGlossary_displayPageID', 0);\n\t\n\tadd_option('wgGlossary_ignore_excerpt', 1);\n\tadd_option('wgGlossary_show_read_more_link', 0);\n\tadd_option('wgGlossary_read_more_text', 'Read more...');\n\tadd_option('wgGlossary_use_jQuery', 0);\n\t\n\t// Custom post type names\n\tadd_option('wgGlossary_custom_post_type_name', 'Glossary Term');\n\tadd_option('wgGlossary_custom_post_type_name_plural', 'Glossary Terms');\n\tadd_option('wgGlossary_custom_post_type_name_slug', 'glossary-term');\n\tadd_option('wgGlossary_custom_taxonomy_name', 'Group');\n\tadd_option('wgGlossary_custom_taxonomy_name_plural', 'Groups');\n\tadd_option('wgGlossary_custom_taxonomy_slug', 'group');\n\t\n\t//update_option('wgGlossary_custom_post_type_name', 'FAQ');\n\t//update_option('wgGlossary_custom_post_type_name_plural', 'FAQs');\n\t//update_option('wgGlossary_custom_post_type_name_slug', 'faq');\n\tupdate_option('wgGlossary_custom_post_type_name', 'Glossary Term');\n\tupdate_option('wgGlossary_custom_post_type_name_plural', 'Glossary Terms');\n\tupdate_option('wgGlossary_custom_post_type_name_slug', 'glossary-term');\n}", "public function register_options(){\n\t\tparent::register_options();\n\t\t//$orgzr = \\WBF\\modules\\options\\Organizer::getInstance();\n\t\t//Do stuff...\n\t}", "function option_definition() {\r\n $options = parent::option_definition();\r\n $options['allow']['contains']['expose_imagestyle'] = array('default' => FALSE);\r\n\r\n return $options;\r\n }", "function optionsframework_options() {\n $options_categories = array();\n $options_categories_obj = get_categories();\n foreach ($options_categories_obj as $category) {\n $options_categories[$category->cat_ID] = $category->cat_name;\n }\n\n // Pull all the pages into an array\n $options_pages = array();\n $options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n $options_pages[''] = 'Select a page:';\n foreach ($options_pages_obj as $page) {\n $options_pages[$page->ID] = $page->post_title;\n }\n\n // If using image radio buttons, define a directory path\n $imagepath = get_template_directory_uri() . '/includes/admin/images/';\n \n \n // VARIABLES \n $shortname = \"gg\"; \n $skin = array(\"light\" => __('light','gxg_textdomain'), \"dark\" => __('dark','gxg_textdomain'),);\n $fonts = array(\"Lato\" => \"default (Lato)\",\n \"Source Sans Pro\" => \"Source Sans Pro\",\n \"Open Sans\" => \"Open Sans\",\n \"Open Sans Condensed\" => \"Open Sans Condensed\",\n \"Montserrat\" => \"Montserrat\",\n \"Bree Serif\" => \"Bree Serif\",\n \"Patua One\" => \"Patua One\",\n \"Croissant One\" => \"Croissant One\",\n \"Cherry Swash\" => \"Cherry Swash\",\n \"Ruda\" => \"Ruda\",\n \"Dosis\" => \"Dosis\",\n \"Ubuntu Mono\" => \"Ubuntu Mono\",\n \"Anonymous Pro\" => \"Anonymous Pro\",\n \"Love Ya Like A Sister\" => \"Love Ya Like A Sister\",\n \"Patrick Hand\" => \"Patrick Hand\",\n \"Rancho\" => \"Rancho\" );\n \n $bloglayout = array(\"1col\" => \"1 column with sidebar\", \"masonry\" => \"masonry\", \"masonrysidebar\" => \"masonry with sidebar\");\n \n $trans = array(\"none\" => \"none\", \"uppercase\" => \"uppercase\");\n \n $topbar = array(\"dark\" => \"dark\", \"white\" => \"white with grey border\"); \n \n $contactsection = array(\"dark\" => \"dark\", \"white\" => \"white with grey border\"); \n \n $postinfo = array(\"black\" => \"black\", \"transparent\" => \"transparent\"); \n \n\n // Pull all the slider posts into an array\n $args = array(\"numberposts\" => -1 , \"orderby\" => \"post_date\" , \"post_type\" => \"slider\"); \n $options_slides = array();\n $options_slides_obj = get_posts($args);\n $options_slides[''] = 'Select a slider:';\n foreach ($options_slides_obj as $page) {\n $options_slides[$page->ID] = $page->post_title;\n }\n \n \n // Pull all the pages into an array\n \n $options_layout = array();\n $options_layout_obj = get_pages();\n $options_layout[''] = 'Select a page:';\n foreach ($options_layout_obj as $layout) {\n $options_layout[$layout->ID] = $layout->post_title;\n }\n \n \n \n // OPTIONS \n $options = array(); \n\n//------------------------------------------------------------------------------\n// GENERAL\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('GENERAL','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/g.png\");\n\n $options[] = array( \"name\" => __('Configure the general setup of your theme.','gxg_textdomain'),\n \"type\" => \"info\");\n\n\n \n $options[] = array( \"name\" => __('Custom CSS','gxg_textdomain'),\n \"desc\" => __('Want to add any custom CSS code? Put it in here, and the rest is taken care of. This overrides any other stylesheets.','gxg_textdomain'),\n \"id\" => $shortname.\"_custom_css\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n \n $options[] = array( \"name\" => __('Load WooCommerce stylesheets','gxg_textdomain'), \n \"desc\" => __('Check this box after you have installed the WooCommerce plugin.','gxg_textdomain'), \n \"id\" => $shortname.\"_woo\",\n \"std\" => \"\",\n \"type\" => \"checkbox\"); \n\n $options[] = array( \"name\" => __('Lazy load image (for page speed improvements)','gxg_textdomain'), \n \"id\" => $shortname.\"_lazyload\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\"); \n\t\t\t\t\t\t\n $options[] = array( \"name\" => __('404 Error','gxg_textdomain'),\n \"desc\" => __('Add your own text to display on error pages.','gxg_textdomain'),\n \"id\" => $shortname.\"_404error\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n\n $options[] = array( \"name\" => __('Google Analytics Code','gxg_textdomain'),\n \"desc\" => __('Enter your Google Analytics or other tracking code here, it will be added to all pages. (NOTE: you do not need to wrap your code with &lt;script> ... &lt;/script>) ','gxg_textdomain'),\n \"id\" => $shortname.\"_google_analytics\",\n \"std\" => \"\",\n \"type\" => \"textarea\");\n\n\n// LOGO\n $options[] = array( \"name\" => __('Logo','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n \n $options[] = array( \"name\" => __('Upload Logo','gxg_textdomain'),\n \"desc\" => __('Upload your Logo.','gxg_textdomain'),\n \"id\" => $shortname.\"_logo_image\",\n \"type\" => \"upload\");\n\n $options[] = array( \"name\" => __('Upload Retina Logo (Optional)','gxg_textdomain'),\n \"desc\" => __('Upload your Retina Logo. This should be your Logo in double size (If your Logo is 140 x 24px, it should be 280 x 48px)','gxg_textdomain'),\n \"id\" => $shortname.\"_logo_retina\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => __('Original Logo Width (important for Retina Logo to display properly)','gxg_textdomain'),\n \"desc\" => __('Enter the width of the Standard Logo you have uploaded (not the Retina Logo) here. If your Logo has a width of 140px, enter: 140.','gxg_textdomain'),\n \"id\" => $shortname.\"_logo_width\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => __('Original Logo Height (important for Retina Logo to display properly)','gxg_textdomain'),\n \"desc\" => \"Enter the height of the Standard Logo you have uploaded (not the Retina Logo) here. If your Logo has a height of 24px, enter: 24.\",\n \"id\" => $shortname.\"_logo_height\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => __('Logo text instead of image','gxg_textdomain'),\n \"id\" => $shortname.\"_logo_text\",\n \"type\" => \"text\");\n \n \n// THEME CUSTOMIZATION\n $options[] = array( \"name\" => __('Theme Customization','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n \n $options[] = array( \"name\" => __('Sticky header','gxg_textdomain'),\n \"desc\" => __('Keep header visible when scrolling down','gxg_textdomain'), \n \"id\" => $shortname.\"_sticky_header\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n\n $options[] = array( \"name\" => __('Search Button in header','gxg_textdomain'),\n \"desc\" => __('Display search button in header','gxg_textdomain'), \n \"id\" => $shortname.\"_searchbar\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n\n $options[] = array( \"name\" => __('FRONTPAGE Blog Section number of posts','gxg_textdomain'),\n \"desc\" => __('How many blog posts would you like to display in the Frontpage blog section?','gxg_textdomain'), \n \"id\" => $shortname.\"_posts_number\",\n \"std\" => \"3\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => __('Main Blog Page layout','gxg_textdomain'),\n \"desc\" => __('Layout of your Main Blog Page - the page you selected in Settings > Reading > Posts Page','gxg_textdomain'),\n \"id\" => $shortname.\"_bloglayout\",\n \"std\" => \"masonry\",\n \"type\" => \"select\",\n \"options\" => $bloglayout);\n\n\n\n $options[] = array( \"name\" => __('Show author info in the post info section','gxg_textdomain'),\n \"id\" => $shortname.\"_author\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\");\n\n $options[] = array( \"name\" => __('Remove Comments','gxg_textdomain'),\n \"id\" => $shortname.\"_commentremove\",\n \"desc\" => __('Remove all comment sections from the entire website','gxg_textdomain'),\n \"std\" => \"0\",\n \"type\" => \"checkbox\");\n \n $options[] = array( \"name\" => __('Copyright text','gxg_textdomain'),\n \"desc\" => __('Add your own copyright text to display below content.','gxg_textdomain'),\n \"id\" => $shortname.\"_copyright\",\n \"std\" => \"\",\n \"type\" => \"textarea\"); \n\n// FAVICON\n $options[] = array( \"name\" => __('Favicon','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n\n $options[] = array( \"name\" => __('Favicon','gxg_textdomain'),\n \"desc\" => __('Upload a 16 x 16 favicon','gxg_textdomain'),\n \"id\" => $shortname.\"_favicon\",\n \"std\" => \"\",\n \"type\" => \"upload\");\n \n// GRAVATAR\n $options[] = array( \"name\" => __('Custom Gravatar','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n \n $options[] = array( \"name\" => __('Custom Gravatar','gxg_textdomain'),\n \"desc\" => __('Upload a Gravatar.','gxg_textdomain'),\n \"id\" => $shortname.\"_gravatar\",\n \"std\" => \"\",\n \"type\" => \"upload\");\n\n\n\n//------------------------------------------------------------------------------\n// PORTFOLIO\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('PORTFOLIO','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/st.png\");\n\n $options[] = array( \"name\" => __('Set up the portfolio section / portfolio page','gxg_textdomain'),\n \"type\" => \"info\");\n\n $options[] = array( \"name\" => __('PORTFOLIO gutter width','gxg_textdomain'),\n \"desc\" => __('Set the space in between portfolio items. If you want to add a space of 4px, enter: 4 . Recommended values: narrow: 4 wide: 24','gxg_textdomain'), \n \"id\" => $shortname.\"_gutter\",\n \"std\" => \"4\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => __('Portfolio items overlay color','gxg_textdomain'),\n \"id\" => $shortname.\"_overlaycolor\",\n \"desc\" => __('Default color: #14b8f5','gxg_textdomain'),\n \"std\" => \"#14b8f5\",\n \"type\" => \"color\"); \n\n $options[] = array( \"name\" => __('Portfolio items overlay opacity','gxg_textdomain'),\n \"desc\" => __('Example 70% opacity, enter: 0.7','gxg_textdomain'),\n \"id\" => $shortname.\"_overlayopacity\",\n \"std\" => \"0.7\",\n \"type\" => \"text\"); \n\n\n \n//------------------------------------------------------------------------------\n// TYPOGRAPHY\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('TYPOGRAPHY','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/t.png\");\n\n $options[] = array( \"name\" => __('Style your Headings and links. Remove values to use default settings.','gxg_textdomain'),\n \"type\" => \"info\");\n \n $options[] = array( \"name\" => __('Google Web Font for Headings','gxg_textdomain'),\n \"desc\" => __('Simply enter the name of the Google font that you would like to use for Headings here. The rest is taken care of. Default font: Lato','gxg_textdomain'),\n \"id\" => $shortname.\"_font\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => __('Font Weight for Headings','gxg_textdomain'),\n \"desc\" => __('Set font weight for Headings. Default: 800. Info: Normal = 400','gxg_textdomain'),\n \"id\" => $shortname.\"_fontweight\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => __('Text Transform for Headings','gxg_textdomain'),\n \"desc\" => __('Some Headings are UPPERCASE letters by default. However, some fonts simply don\\'t look right with just uppercase letters. Here you can set the text transform to NONE','gxg_textdomain'),\n \"id\" => $shortname.\"_trans\",\n \"std\" => \"uppercase\",\n \"type\" => \"select\",\n \"options\" => $trans);\n\n $options[] = array( \"name\" => __('Remove Letter spacing from Headings','gxg_textdomain'),\n \"desc\" => __('Some Headings have some extra space in between characters. However, some fonts simply don\\'t look right with letter spacing. Here you can remove it.','gxg_textdomain'),\n \"id\" => $shortname.\"_letterspacing\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\");\n \n $options[] = array( \"name\" => __('Home Title Font Size','gxg_textdomain'),\n \"desc\" => \"Enter the font size for the Home Title. If you would like to use a font size of 80px, enter: 80. (default: 80)\",\n \"id\" => $shortname.\"_hometitlesize\",\n \"std\" => \"80\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => __('Home Title Minimum Font Size (for mobile devices)','gxg_textdomain'),\n \"desc\" => \"Enter the minimum font size for the Home Title. If you would like to use a font size of 36px, enter: 36. (default: 36)\",\n \"id\" => $shortname.\"_minhometitlesize\",\n \"std\" => \"36\",\n \"type\" => \"text\"); \n \n \n $options[] = array( \"name\" => __('Section Title Font Size','gxg_textdomain'),\n \"desc\" => \"Enter the font size for the Section Titles. If you would like to use a font size of 80px, enter: 80. (default: 80, min-size: 48)\",\n \"id\" => $shortname.\"_sectiontitlesize\",\n \"std\" => \"80\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => __('Section Title Minimum Font Size (for mobile devices)','gxg_textdomain'),\n \"desc\" => \"Enter the minimum font size for the Section Titles. If you would like to use a font size of 48px, enter: 48. (default: 48)\",\n \"id\" => $shortname.\"_minsectiontitlesize\",\n \"std\" => \"48\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => __('Remove links underline','gxg_textdomain'),\n \"id\" => $shortname.\"_underline\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"); \n\n//------------------------------------------------------------------------------\n// COLOR\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('COLOR','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/col.png\");\n\n $options[] = array( \"name\" => __('Set the theme color.','gxg_textdomain'),\n \"type\" => \"info\");\n\n\n $options[] = array( \"name\" => __('Predefined Primary Color','gxg_textdomain'),\n \"id\" => $shortname.\"_primary_color\",\n \"std\" => \"#ff4229\",\n \"type\" => \"images\",\n \"options\" => array(\n '#f9ba00' => $imagepath . '/color/f9ba00.jpg',\n '#F1592A' => $imagepath . '/color/f1592a.jpg',\n '#ff4229' => $imagepath . '/color/ff4229.jpg',\n '#ed2528' => $imagepath . '/color/ed2528.jpg',\n '#fb2e2e' => $imagepath . '/color/fb2e2e.jpg',\n '#ff1d4d' => $imagepath . '/color/ff1d4d.jpg',\n \n '#18cece' => $imagepath . '/color/18cece.jpg',\n '#0faf97' => $imagepath . '/color/0faf97.jpg', \n '#14b8f5' => $imagepath . '/color/14b8f5.jpg',\n '#2980b9' => $imagepath . '/color/2980b9.jpg',\n '#00becc' => $imagepath . '/color/00becc.jpg',\n '#9a8764' => $imagepath . '/color/9a8764.jpg' \n )\n );\n \n $options[] = array( \"name\" => __('Custom Primary Color','gxg_textdomain'),\n \"desc\" => __('If you prefer a different color than the ones above, you can select a custom color here. This field has priority over the Predefined Primary Theme Color.','gxg_textdomain'),\n \"id\" => $shortname.\"_primary_color_colorpicker\",\n \"std\" => \"\",\n \"type\" => \"color\");\n\n $options[] = array( \"name\" => __('Predefined Secondary Color','gxg_textdomain'),\n \"id\" => $shortname.\"_secondary_color\",\n \"desc\" => __('Pick a secondary color (for Buttons, Pagination ...)','gxg_textdomain'),\n \"std\" => \"#14b8f5\",\n \"type\" => \"images\",\n \"options\" => array(\n '#f9ba00' => $imagepath . '/color/f9ba00.jpg',\n '#F1592A' => $imagepath . '/color/f1592a.jpg',\n '#ff4229' => $imagepath . '/color/ff4229.jpg',\n '#ed2528' => $imagepath . '/color/ed2528.jpg',\n '#fb2e2e' => $imagepath . '/color/fb2e2e.jpg',\n '#ff1d4d' => $imagepath . '/color/ff1d4d.jpg',\n\n '#18cece' => $imagepath . '/color/18cece.jpg',\n '#0faf97' => $imagepath . '/color/0faf97.jpg', \n '#14b8f5' => $imagepath . '/color/14b8f5.jpg',\n '#2980b9' => $imagepath . '/color/2980b9.jpg',\n '#00becc' => $imagepath . '/color/00becc.jpg',\n '#9a8764' => $imagepath . '/color/9a8764.jpg' \n )\n );\n\n $options[] = array( \"name\" => __('Custom Secondary Color','gxg_textdomain'),\n \"desc\" => __('If you prefer a different color than the ones above, you can select a custom color here. This field has priority over the Predefined Secondary Theme Color.','gxg_textdomain'),\n \"id\" => $shortname.\"_secondary_color_colorpicker\",\n \"std\" => \"\",\n \"type\" => \"color\");\n\n $options[] = array( \"name\" => __('Hover Color','gxg_textdomain'),\n \"desc\" => __('Pick a hover color for all links and buttons. Default: #aaaaaa','gxg_textdomain'),\n \"id\" => $shortname.\"_hovercolor\",\n \"std\" => \"#aaaaaa\",\n \"type\" => \"color\");\n \n $options[] = array( \"name\" => __('Post info background color','gxg_textdomain'),\n \"id\" => $shortname.\"_postinfocolor\",\n \"desc\" => \"Background color of post info below post title (comments, categories,...)\",\n \"std\" => \"black\",\n \"type\" => \"select\",\n \"options\" => $postinfo);\n \n\n// SEARCH\n $options[] = array( \"name\" => __('Custom Search Color','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n\n $options[] = array( \"name\" => __('Predefined Search Button and Form color in top bar','gxg_textdomain'),\n \"id\" => $shortname.\"_searchcolor\",\n \"std\" => \"#14b8f5\",\n \"type\" => \"images\",\n \"options\" => array(\n '#f9ba00' => $imagepath . '/color/f9ba00.jpg',\n '#F1592A' => $imagepath . '/color/f1592a.jpg',\n '#ff4229' => $imagepath . '/color/ff4229.jpg',\n '#ed2528' => $imagepath . '/color/ed2528.jpg',\n '#fb2e2e' => $imagepath . '/color/fb2e2e.jpg',\n '#ff1d4d' => $imagepath . '/color/ff1d4d.jpg',\n\n '#18cece' => $imagepath . '/color/18cece.jpg',\n '#0faf97' => $imagepath . '/color/0faf97.jpg', \n '#14b8f5' => $imagepath . '/color/14b8f5.jpg',\n '#2980b9' => $imagepath . '/color/2980b9.jpg',\n '#00becc' => $imagepath . '/color/00becc.jpg',\n '#9a8764' => $imagepath . '/color/9a8764.jpg' \n )\n );\n\n $options[] = array( \"name\" => __('Custom Search Button and Form color in top bar','gxg_textdomain'),\n \"id\" => $shortname.\"_searchcolor_colorpicker\",\n \"desc\" => __('If you prefer a different color than the ones above, you can select a custom color here. This field has priority over the Predefined Search Button and Form Color.','gxg_textdomain'),\n \"type\" => \"color\");\n \n\n// FORMS\n $options[] = array( \"name\" => __('Form Colors','gxg_textdomain'),\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n\n $options[] = array( \"name\" => __('Form input fields background color','gxg_textdomain'),\n \"desc\" => __('Pick a background color for input fields (such as contact form and comment form). Default: #a3d7df','gxg_textdomain'),\n \"id\" => $shortname.\"_inputcolor\",\n \"std\" => \"#a3d7df\",\n \"type\" => \"color\");\n\n $options[] = array( \"name\" => __('Form input fields text color','gxg_textdomain'),\n \"desc\" => __('Pick a text color for input fields (such as contact form and comment form). Default: #ffffff','gxg_textdomain'),\n \"id\" => $shortname.\"_inputtextcolor\",\n \"std\" => \"#ffffff\",\n \"type\" => \"color\");\n\n\n//------------------------------------------------------------------------------\n// HOME\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('HOME','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/h.png\");\n\n $options[] = array( \"name\" => __('Set up the Home section','gxg_textdomain'),\n \"type\" => \"info\");\n\n\n $options[] = array( \"name\" => __('Display Home Section Image with 100% height','gxg_textdomain'),\n \"id\" => $shortname.\"_homeimage\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n\n $options[] = array( \"name\" => __('Remove border around Home Section Image','gxg_textdomain'),\n \"id\" => $shortname.\"_homeimageborder\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"); \n\n $options[] = array( \"name\" => __('Fade in Title, Subtitle, Buttons in Home Section','gxg_textdomain'),\n \"id\" => $shortname.\"_homefade\",\n \"desc\" => __('Check this box if you would like to fade in the title, subtitle and buttons in the Home Section. If unchecked, they will display immediately.','gxg_textdomain'),\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n \n//------------------------------------------------------------------------------\n// SOCIAL\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('SOCIAL','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/tw.png\");\n\n $options[] = array( \"name\" => __('Set up the Twitter Section and enter the info for your social network accounts to display them in the Social Section, and optionally also in the footer.','gxg_textdomain'), \n \"type\" => \"info\"); \n\n\n\n// TWITTER SECTION\n $options[] = array( \"name\" => __('Twitter Section','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n $options[] = array( \"name\" => \"Twitter ID\",\n \"desc\" => __('Enter Twitter ID.<br> This is how you find the Twitter ID:<br> Go to www.twitter.com and log in, go to your Settings page by clicking on your profile image up top and then \\'Settings\\', then click Widgets on the left hand side. Click \\'Create New\\', then select \\'User timeline\\' and click \\'Create widget\\'. Now look at the URL in your web browser, you will see the ID, which is a long number like this: 554079775447613440.','gxg_textdomain'),\n \"id\" => $shortname.\"_twitter_id\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n//-----------\n// $options[] = array( \"name\" => __('Display Retweets?','gxg_textdomain'),\n// \"id\" => $shortname.\"_retweets\",\n// \"std\" => \"1\",\n// \"type\" => \"checkbox\");\n// \n// $options[] = array( \"name\" => __('Display Replies?','gxg_textdomain'),\n// \"id\" => $shortname.\"_replies\",\n// \"std\" => \"1\",\n// \"type\" => \"checkbox\");\n//-----------\n\n $options[] = array( \"name\" => __('Color of tweet text in twitter Section','gxg_textdomain'),\n \"desc\" => __('This affects the color in the twitter Section only, not in the twitter widget.','gxg_textdomain'), \n \"id\" => $shortname.\"_tweetcolor\",\n \"std\" => \"#ffffff\",\n \"type\" => \"color\"); \n\n// SHARE BUTTONS\n $options[] = array( \"name\" => __('Facebook and Twitter share buttons','gxg_textdomain'),\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n \n $options[] = array( \"name\" => __('Display Facebook and Twitter share icons on single post and portfolio pages?','gxg_textdomain'),\n \"id\" => $shortname.\"_share\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n\n// SOCIAL SECTION\n $options[] = array( \"name\" => __('Social Section & Social Icons in Footer ','gxg_textdomain'),\n \"desc\" => \"\",\n \"id\" => \"general_heading\",\n \"class\" => \"subheading\",\n \"type\" => \"info\");\n\n $options[] = array( \"name\" => __('Display social icons in footer','gxg_textdomain'),\n \"desc\" => __('Display social icons also in footer, next to copyright info','gxg_textdomain'), \n \"id\" => $shortname.\"_socialfooter\",\n \"std\" => \"1\",\n \"type\" => \"checkbox\");\n\n $options[] = array( \"name\" => __('Color of icons in Social Section','gxg_textdomain'),\n \"desc\" => __('This affects the color in the social Section only, not in the footer.','gxg_textdomain'), \n \"id\" => $shortname.\"_socialcolor\",\n \"std\" => \"\",\n \"type\" => \"color\");\n\n\n $options[] = array( \"name\" => \"Facebook\",\n \"desc\" => __('Enter the full URL to your Facebook profile','gxg_textdomain'),\n \"id\" => $shortname.\"_fb\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Twitter\",\n \"desc\" => __('Enter the full URL to your Twitter profile','gxg_textdomain'),\n \"id\" => $shortname.\"_twitter\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Google Plus\",\n \"desc\" => __('Enter the full URL to your Google Plus profile','gxg_textdomain'),\n \"id\" => $shortname.\"_googleplus\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Dribbble\",\n \"desc\" => __('Enter the full URL to your dribbble profile','gxg_textdomain'),\n \"id\" => $shortname.\"_dribbble\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Behance\",\n \"desc\" => __('Enter the full URL to your Behance profile','gxg_textdomain'),\n \"id\" => $shortname.\"_behance\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Github\",\n \"desc\" => __('Enter the full URL to your Github page','gxg_textdomain'),\n \"id\" => $shortname.\"_github\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Spotify\",\n \"desc\" => __('Enter the full URL to your Spotify profile','gxg_textdomain'),\n \"id\" => $shortname.\"_spotify\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"YouTube\",\n \"desc\" => __('Enter the full URL to your YouTube page','gxg_textdomain'),\n \"id\" => $shortname.\"_youtube\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Vimeo\",\n \"desc\" => __('Enter the full URL to your Vimeo page','gxg_textdomain'),\n \"id\" => $shortname.\"_vimeo\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Vine\",\n \"desc\" => __('Enter the full URL to your Vine page','gxg_textdomain'),\n \"id\" => $shortname.\"_vine\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Soundcloud\",\n \"desc\" => __('Enter the full URL to your Soundcloud page','gxg_textdomain'),\n \"id\" => $shortname.\"_soundcloud\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"Instagram\",\n \"desc\" => __('Enter the full URL to your Instagram profile','gxg_textdomain'),\n \"id\" => $shortname.\"_instagram\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Pinterest\",\n \"desc\" => __('Enter the full URL to your Pinterest profile','gxg_textdomain'),\n \"id\" => $shortname.\"_pinterest\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Flickr\",\n \"desc\" => __('Enter the full URL to your Flickr profile','gxg_textdomain'),\n \"id\" => $shortname.\"_flickr\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"Deviantart\",\n \"desc\" => __('Enter the full URL to your Deviantart profile','gxg_textdomain'),\n \"id\" => $shortname.\"_deviantart\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"Stack Overflow\",\n \"desc\" => __('Enter the full URL to your Stack Overflow profile','gxg_textdomain'),\n \"id\" => $shortname.\"_stackoverflow\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"LinkedIn\",\n \"desc\" => __('Enter the full URL to your LinkedIn profile','gxg_textdomain'),\n \"id\" => $shortname.\"_linkedin\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Skype\",\n \"desc\" => __('Enter the full URL to your Skype profile','gxg_textdomain'),\n \"id\" => $shortname.\"_skype\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Tumblr\",\n \"desc\" => __('Enter the full URL to your Tumblr profile','gxg_textdomain'),\n \"id\" => $shortname.\"_tumblr\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n \n $options[] = array( \"name\" => \"Xing\",\n \"desc\" => __('Enter the full URL to your Xing profile','gxg_textdomain'),\n \"id\" => $shortname.\"_xing\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"500px\",\n \"desc\" => __('Enter the full URL to your 500px profile','gxg_textdomain'),\n \"id\" => $shortname.\"_500px\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Houzz\",\n \"desc\" => __('Enter the full URL to your Houzz profile','gxg_textdomain'),\n \"id\" => $shortname.\"_houzz\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"Tipadvisor\",\n \"desc\" => __('Enter the full URL to your Tripadvisor profile','gxg_textdomain'),\n \"id\" => $shortname.\"_tripadvisor\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n $options[] = array( \"name\" => \"Amazon\",\n \"desc\" => __('Enter the full URL to your Amazon profile','gxg_textdomain'),\n \"id\" => $shortname.\"_amazon\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n//------------------------------------------------------------------------------\n// CLIENTS\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('CLIENTS','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/so.png\");\n\n $options[] = array( \"name\" => __('Upload your client\\'s logos to display them in the Clients Section.','gxg_textdomain'), \n \"type\" => \"info\"); \n\n $options[] = array( \"name\" => __('Border around client logos','gxg_textdomain'),\n \"desc\" => __('Remove color value if you want to display no border at all.','gxg_textdomain'), \n \"id\" => $shortname.\"_clientbordercolor\",\n \"std\" => \"#eeeeee\",\n \"type\" => \"color\");\n \n\n $options[] = array( \"name\" => __('Center logos','gxg_textdomain'),\n \"desc\" => __('Display logos centered on the site instead of left aligned.','gxg_textdomain'), \n \"id\" => $shortname.\"_clientcenter\",\n \"std\" => \"0\",\n \"type\" => \"checkbox\"); \n\n $options[] = array( \"name\" => \"Client 1\",\n \"desc\" => __('Upload logo of client 1','gxg_textdomain'),\n \"id\" => $shortname.\"_client1\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 1 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client1url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n\n $options[] = array( \"name\" => \"Client 2\",\n \"desc\" => __('Upload logo of client 2','gxg_textdomain'),\n \"id\" => $shortname.\"_client2\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 2 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client2url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 3\",\n \"desc\" => __('Upload logo of client 3','gxg_textdomain'),\n \"id\" => $shortname.\"_client3\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 3 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client3url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 4\",\n \"desc\" => __('Upload logo of client 4','gxg_textdomain'),\n \"id\" => $shortname.\"_client4\",\n \"type\" => \"upload\");\n\n $options[] = array( \"name\" => \"Client 4 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client4url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 5\",\n \"desc\" => __('Upload logo of client 5','gxg_textdomain'),\n \"id\" => $shortname.\"_client5\",\n \"type\" => \"upload\");\n\n \n $options[] = array( \"name\" => \"Client 5 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client5url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 6\",\n \"desc\" => __('Upload logo of client 6','gxg_textdomain'),\n \"id\" => $shortname.\"_client6\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 6 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client6url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 7\",\n \"desc\" => __('Upload logo of client 7','gxg_textdomain'),\n \"id\" => $shortname.\"_client7\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 7 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client7url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 8\",\n \"desc\" => __('Upload logo of client 8','gxg_textdomain'),\n \"id\" => $shortname.\"_client8\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 8 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client8url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 9\",\n \"desc\" => __('Upload logo of client 9','gxg_textdomain'),\n \"id\" => $shortname.\"_client9\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 9 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client9url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 10\",\n \"desc\" => __('Upload logo of client 10','gxg_textdomain'),\n \"id\" => $shortname.\"_client10\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 10 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client10url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 11\",\n \"desc\" => __('Upload logo of client 11','gxg_textdomain'),\n \"id\" => $shortname.\"_client11\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 11 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client11url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 12\",\n \"desc\" => __('Upload logo of client 12','gxg_textdomain'),\n \"id\" => $shortname.\"_client12\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 12 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client12url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 13\",\n \"desc\" => __('Upload logo of client 13','gxg_textdomain'),\n \"id\" => $shortname.\"_client13\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 13 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client13url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 14\",\n \"desc\" => __('Upload logo of client 14','gxg_textdomain'),\n \"id\" => $shortname.\"_client14\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 14 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client14url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 15\",\n \"desc\" => __('Upload logo of client 15','gxg_textdomain'),\n \"id\" => $shortname.\"_client15\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 15 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client15url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 16\",\n \"desc\" => __('Upload logo of client 16','gxg_textdomain'),\n \"id\" => $shortname.\"_client16\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 16 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client16url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 17\",\n \"desc\" => __('Upload logo of client 17','gxg_textdomain'),\n \"id\" => $shortname.\"_client17\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 17 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client17url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 18\",\n \"desc\" => __('Upload logo of client 18','gxg_textdomain'),\n \"id\" => $shortname.\"_client18\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 18 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client18url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 19\",\n \"desc\" => __('Upload logo of client 19','gxg_textdomain'),\n \"id\" => $shortname.\"_client19\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 19 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client19url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n $options[] = array( \"name\" => \"Client 20\",\n \"desc\" => __('Upload logo of client 20','gxg_textdomain'),\n \"id\" => $shortname.\"_client20\",\n \"type\" => \"upload\");\n \n $options[] = array( \"name\" => \"Client 20 URL\",\n \"desc\" => __('Enter full URL','gxg_textdomain'),\n \"id\" => $shortname.\"_client20url\",\n \"std\" => \"\",\n \"type\" => \"text\");\n \n//------------------------------------------------------------------------------\n// CONTACT\n//------------------------------------------------------------------------------\n\n $options[] = array( \"name\" => __('CONTACT','gxg_textdomain'),\n \"type\" => \"heading\",\n \"img\" => \"/includes/admin/images/cont.png\");\n\n $options[] = array( \"name\" => __('Set up Contact Section / Contact Page','gxg_textdomain'),\n \"type\" => \"info\");\n\n \n \n $options[] = array( \"name\" => __('Display Google Map','gxg_textdomain'),\n \"id\" => $shortname.\"_googlemap\",\n \"desc\" => __('Display Google Map in contact section / on contact page. This requires the \"Basic Google Maps Placemarks\" plugin','gxg_textdomain'),\n \"std\" => \"0\",\n \"type\" => \"checkbox\"); \n \n $options[] = array( \"name\" => \"Enter Contact Form 7 Shortcode\",\n \"desc\" => __('Enter Contact Form 7 Shortcode to display a Contact Form in contact section / on contact page','gxg_textdomain'),\n \"id\" => $shortname.\"_cf7\",\n \"std\" => \"\",\n \"type\" => \"text\"); \n\n return $options;\n}", "public function displayImgTag() {\n $urlimg = \"/plugins/graphontrackers/reportgraphic.php?_jpg_csimd=1&group_id=\".(int)$this->graphic_report->getGroupId().\"&atid=\". $this->graphic_report->getAtid();\n $urlimg .= \"&report_graphic_id=\".$this->graphic_report->getId().\"&id=\".$this->getId();\n \n \n echo '<img src=\"'. $urlimg .'\" ismap usemap=\"#map'. $this->getId() .'\" ';\n if ($this->width) {\n echo ' width=\"'. $this->width .'\" ';\n }\n if ($this->height) {\n echo ' height=\"'. $this->height .'\" ';\n }\n echo ' alt=\"'. $this->title .'\" border=\"0\">';\n }", "abstract function options();", "function options() {\n\t\tif ( ! current_user_can( 'manage_options' ) )\t{\n\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t}\n\t\tinclude WP_PLUGIN_DIR . '/qoorate/admin_options_page.php';\n\t}", "public function acf_options_page() { \n\n\t\t\t// Check ACF Admin OK\n\t\t\tif ( ! $this->admin_acf_active() ) { return; }\n\n\t\t\t// Check Options Page OK \n\t\t\tif ( ! function_exists('acf_add_options_page') ) { return; }\n\t\t\t\n\t\t\t// Add Options Page\n\t\t\t$parent = acf_add_options_page( [ \n\t\t\t\t'title' => apply_filters( 'ipress_acf_title', 'iPress' ), \n\t\t\t\t'capability' => 'manage_options', \n\t\t\t] ); \n\n\t\t\t// Set Options Page Subpages\n\t\t\t$subpages = apply_filters( 'ipress_acf_pages', [] );\n\t \n\t\t\t// Add Subpages? \n\t\t\tif ( $subpages ) {\n\t\t\t\tforeach ( $subpages as $k=>$v ) {\n\t\t\t\t\tacf_add_options_sub_page( $v );\n\t\t\t\t} \n\t\t\t}\n\t\t}", "protected function getOptions() {}", "protected function getOptions() {}" ]
[ "0.6849492", "0.6815114", "0.6809839", "0.678257", "0.65929335", "0.658276", "0.6555441", "0.65472525", "0.65136254", "0.6494048", "0.648386", "0.6408938", "0.639008", "0.6359193", "0.63338953", "0.6323065", "0.6285545", "0.6252929", "0.62474513", "0.6239306", "0.62075675", "0.61972165", "0.6196662", "0.61932766", "0.61927176", "0.61703116", "0.61703116", "0.61703116", "0.61703116", "0.61703116", "0.616842", "0.61535114", "0.61506134", "0.61423844", "0.61415845", "0.61301816", "0.6118029", "0.6109051", "0.60790735", "0.6061239", "0.6049749", "0.60372436", "0.6020914", "0.6016043", "0.60080594", "0.5988783", "0.59860915", "0.5984705", "0.59846926", "0.5975646", "0.5972822", "0.5972045", "0.5961767", "0.5957469", "0.59430736", "0.5936345", "0.5935345", "0.59153503", "0.590166", "0.5893978", "0.58908993", "0.58907115", "0.5880951", "0.587914", "0.5872326", "0.58612514", "0.58491707", "0.5842843", "0.5841642", "0.58366144", "0.58297306", "0.5829389", "0.58273286", "0.5815085", "0.5814524", "0.58120906", "0.58111614", "0.580391", "0.5793531", "0.57907766", "0.57902193", "0.5787865", "0.57859445", "0.57702774", "0.5767244", "0.57660514", "0.57595795", "0.5758008", "0.5752991", "0.5748403", "0.5737738", "0.5737263", "0.57294506", "0.57289857", "0.57193446", "0.5718316", "0.57162076", "0.5714128", "0.5699972", "0.5699972" ]
0.6347083
14
The JS to get address to the header.
public function hook_js() { ?> <script>window.fbAsyncInit = function () { FB.init({ appId: '<?php echo get_option('grimage_facebook_appid');?>', xfbml: true, version: 'v2.6' }); }; (function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); (function ($) { $(document).ready(function () { function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } // bind it late for infinite scroll posts.... $('.grimage .clicker').on('click',function (e) { console.log('sharing this page...'+$(e.currentTarget).data('url')); var image_url = $(e.currentTarget).siblings('img').attr('src'); FB.ui({ method: 'share', href: $(e.currentTarget).data('url'), // title: 'This should be set in the meta headers..', picture: image_url, // caption: 'This should be set in the meta headers..', // description: 'This should be set in the meta headers..' }, function (response) { // Debug response (optional) //console.log(response); // Make sure the modal hasn't been shown in the last 7 days, and make sure the modal hasn't already been clicked like. if (getCookie('grimage_modal_shown') == "" && getCookie('grimage_modal_liked') == "") { setTimeout(function () { // click the modal button to show the modal :) //$('#show_grimage_modal').click(); $('.grimage_modal .grimage_modal-dialog').css('-webkit-transform', 'translate(0, 0)'); $('.grimage_modal .grimage_modal-dialog').css('-ms-transform', 'translate(0, 0)'); $('.grimage_modal .grimage_modal-dialog').css('transform', 'translate(0, 0)'); $('.grimage_modal .grimage_modal-dialog').css('top', '20%'); $('.grimage_modalclose').click(function (e) { e.preventDefault(); // User clicked the close button, so lets set a cookie to prevent the modal from popping up for a few days.. document.cookie = "grimage_modal_shown=true; expires=<?php echo date('D, d M Y', strtotime('+1 WEEK'));?> 12:00:00 UTC"; $('.grimage_modal').hide(); }); }, 500); } // end if hide modal... }); FB.Event.subscribe('edge.create', function (response) { document.cookie = "grimage_modal_liked=true; expires=<?php echo date('D, d M Y', strtotime('+1 YEAR'));?> 12:00:00 UTC"; //console.log('like button clicked!'); $('.grimage_modal').hide(); }); }); }); }(jQuery))</script> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeader();", "public function getHeader();", "public function getHeader();", "function get_header()\n\t{\n\t\treturn $this->header;\n\t}", "public function get_header() {\n $this->do_header();\n return $this->c_header;\n }", "function get_html_header();", "public function getHeader(){\n\t\treturn $this->header;\n\t}", "function GetHeader() {\n return ($this->ses['response']['header']);\n }", "public function getHeader()\n {\n return $this->content['header'];\n }", "public function getHeader() {\n }", "function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeaderCode() {\n\n\t\t$scripts = (array) $this->getMeta( App::s()->getPrefix( '_scripts' ), array() );\n\n\t\treturn isset( $scripts['header'] ) ? $scripts['header'] : '';\n\n\t}", "public function getHeader ()\n {\n return $this->header;\n }", "public function header() {\n return $this->header;\n }", "public function getHeader() {\r\n return $this->__header;\r\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader()\n {\n return $this->header;\n }", "public function getHeader() {\n return $this->header;\n }", "public function getHeader() {\n return $this->Header;\n }", "public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHeader()\n {\n return $this->Header;\n }", "private static final function getJSSHeader () {\r\n $jssHeaderString = new S;\r\n $jssReplaceString = new S ('[%SCRIPT_JS_SRC%]');\r\n $jssPureString = new FileContent (FORM_TP_DIR . _S . 'frm_web_header_js.tp');\r\n foreach (self::$objPageJSS as $k => $v) {\r\n $jssHeaderString->appendString (str_replace ($jssReplaceString->toString (),\r\n self::$objPageJSS[$k], $jssPureString->toString ()));\r\n }\r\n // Do return ...\r\n return $jssHeaderString;\r\n }", "public function getHeader(): string\n {\n return $this->header;\n }", "public function get_header() {\n\t\tif (!isset($this->header)) {\n\t\t\t$this->get_array();\n\t\t}\n\t\treturn $this->header;\n\t}", "public function getHeader()\n {\n $p = $this->path . '/HEADER.html';\n if (is_file($p))\n return file_get_contents($p);\n return '';\n }", "function Header(){\n\t\t}", "public function getLocationHeader()\n {\n return $this->getHeader(self::HEADER_LOCATION);\n }", "function rest_output_link_header()\n {\n }", "public function getHeader()\n {\n return $this->httpHeader;\n }", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "public function get_header()\n {\n return <<<EOD\n<div id=\"sitehdr\">\n Sitewide Header\n</div>\n\nEOD;\n }", "public function getHeader() {\n\t\t\tglobal $arConfig; \n\t\t\t$strHTML = \"\\n\\t\\t<title>\" . $this->strTitle . \"</title>\";\n\t\t\t$strHTML .= \"\\n\\t\\t<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" />\"; \n\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"shortcut icon\\\" href=\\\"\" . fixPath(\"favicon.png\") . \"\\\" type=\\\"image/png\\\" />\"; \n\t\t\tforeach($this->arMeta as $strKey=>$strVal) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<meta name=\\\"\" . $strKey . \"\\\" content=\\\"\" . $strVal . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arCSS as $strFile=>$arData) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<link rel=\\\"stylesheet\\\" href=\\\"\" . $strFile . \"\\\" type=\\\"text/css\\\" media=\\\"\" . $arData[\"media\"] . \"\\\" />\"; \n\t\t\t} \n\t\t\tforeach($this->arJS as $strFile) {\n\t\t\t\t$strHTML .= \"\\n\\t\\t<script src=\\\"\" . $strFile . \"\\\"></script>\"; \n\t\t\t} \n\t\t\t$strHTML .= \"\\n\\t\\t<script>\n\t\t\t\tvar strRoot = \\\"\" . settings(\"domain\", \"root\") . \"\\\"; \n\t\t\t</script>\"; \n\t\t\t\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "public function getHeader() {\n return (isset($this->header)) ? $this->header : '';\n }", "function get_header(){\n\t\tglobal $FANNIE_ROOT;\n\t\tob_start();\n\t\t$page_title = $this->title;\n\t\t$header = $this->header;\n\t\tinclude($FANNIE_ROOT.'src/header_install.html');\n\t\treturn ob_get_clean();\n\n\t}", "public function getHeadCode()\n {\n return $this->head_code;\n }", "public static function getHeader()\n {\n return self::$_header;\n }", "function getHeader() {\n return '';\n }", "public function GetHeader()\n {\n return $this->HeaderName;\n }", "function getHeader(){\n\t\trequire 'pages/headerfooter/header.html';\n\t}", "public function getPageHeader()\n\t{\n\t\treturn $this->_pageHeader;\n\t}", "function newsroom_elated_get_header() {\n $id = newsroom_elated_get_page_id();\n\n //will be read from options\n $header_type = 'header-type3';\n $header_behavior = newsroom_elated_options()->getOptionValue('header_behaviour');\n\n if(HeaderFactory::getInstance()->validHeaderObject()) {\n $parameters = array(\n 'hide_logo' => newsroom_elated_options()->getOptionValue('hide_logo') == 'yes' ? true : false,\n 'header_in_grid' => newsroom_elated_options()->getOptionValue('header_in_grid') == 'yes' ? true : false,\n 'logo_position' => newsroom_elated_get_meta_field_intersect('logo_position',$id),\n 'show_sticky' => in_array($header_behavior, array(\n 'sticky-header-on-scroll-up',\n 'sticky-header-on-scroll-down-up'\n )) ? true : false,\n );\n\n $parameters = apply_filters('newsroom_elated_header_type_parameters', $parameters, $header_type);\n\n HeaderFactory::getInstance()->getHeaderObject()->loadTemplate($parameters);\n }\n }", "public function get($header)\n {\n }", "public function header()\n\t{\n\t\t$header = Request::current()->headers();\n\t\treturn $header;\n\t}", "abstract public function header();", "public function requestheader() {\n return $this->info['request_header'];\n }", "function getresponseheader($header = false){\n $headers = $this->getLastResponseHeaders();\n foreach ($headers as $head){\n if ( is_integer(strpos ($head, $header) )){\n $hstart = strpos ($head, \": \");\n $head = trim(substr($head,$hstart+2,100));\n return $head;\n }\n }\n }", "function asu_brand_get_block_header() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:header';\n \n // Set js settings, include js file, and inject head into <head>.\n asu_brand_head_inject();\n \n return asu_brand_get_cached_content($cache_id, $settings->header_path);\n}", "public function HeaderNavigation() {\n return file_get_contents('http://www.eionet.europa.eu/dropdownmenus.txt');\n }", "public function presentHeader() {\r\n $html = parent::presentHeader();\r\n\r\n return $html;\r\n }", "function getHead() {\n return '';\n // return $this->document->getHead();\n }", "public function getFullHeader()\n {\n }", "public function getHeader()\r\n {\r\n return $this->headers;\r\n }", "static function header() {\n $url = $GLOBALS[\"path\"] ? $GLOBALS[\"path\"] : \"http://localhost:8000/\";\n echo '<script src=\"'.$url.'pontoon.js\"></script>'.\"\\n\";\n }", "public function hookDisplayBackOfficeHeader()\n {\n $this->context->controller->addJS($this->_path.'views/js/ts_customshipping.js');\n $this->context->controller->addCSS($this->_path.'views/css/ts_customshipping.css');\n\n $out = '<script>var customshipping_carrier_id = '.Configuration::get('TS_CUSTOM_SHIPPING_CARRIER_ID').';</script>';\n $out .= '<script>var customshipping_token = \"'.sha1(_COOKIE_KEY_.'ts_customshipping').'\";</script>';\n $out .= '<script>var customshipping_ajax_url = \"'.$this->_path.'ajax.php'.'\";</script>';\n\n return $out;\n }", "function getHeader($header, $loc = '') {\n\tglobal $sql;\n\t$sql = \"SELECT header FROM \" . $loc . \"snapshot_headers WHERE id=\".$header;\n\t$query = mysql_query($sql);\n\tcheckDBError($sql);\n\tif ($result = mysql_fetch_array($query))\n\t\treturn $result['header'];\n\treturn \"\";\n}", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function getHeader()\n {\n return isset($this->header) ? $this->header : null;\n }", "public function getHeaderData() {}", "public function getHeaderString () {\n\t\t$headers = array();\n\t\tforeach ($this->_headers as $name => $value) {\n\t\t $headers[] = $name . \": \" . $value;\n\t\t}\n\t\treturn implode(\"\\r\\n\", $headers);\n\t}", "public function getHeaderHtml()\n\t{\n\t\treturn $this->_main->getHeaderHtml();\n\t}", "function ihs_add_script_header() {\n\n\t\t$output = '';\n\n\t\t$id = ihs_get_current_page_id();\n\t\tif ( $id ) {\n\t\t\t$output = stripslashes( get_post_meta( $id, 'ihs_add_script_header_meta', true ) );\n\t\t}\n\t\techo $output;\n\t}", "public function getHeader(string $header): string;", "public function getHeader()\n {\n return <<<EOF\n<info>\nWW WW UU UU RRRRRR FFFFFFF LL \nWW WW UU UU RR RR FF LL \nWW W WW UU UU RRRRRR FFFF LL \n WW WWW WW UU UU RR RR FF LL \n WW WW UUUUU RR RR FF LLLLLLL \n \n</info>\n\nEOF;\n\n}", "function getContentHeader() {\n return '';\n }", "public function getProxyHeader()\n {\n return isset($this->proxy_header) ? $this->proxy_header : '';\n }", "public function getProxyHeader()\n {\n return isset($this->proxy_header) ? $this->proxy_header : '';\n }", "public function get_header($key)\n {\n }", "abstract protected function header();", "public function getRequestHeader()\n {\n return $this->get(self::REQUEST_HEADER);\n }", "function get_css_header();", "function get_header($name = \\null, $args = array())\n {\n }", "public function get_head()\n\t{\n\t\treturn $this->its_all_in_your_head;\n\t}", "public function header()\n {\n return $this->headerRequested;\n }", "public function getHeaderString() {\n return $this->getPayload(FALSE);\n }", "private function getHeader() : object {\n return imap_rfc822_parse_headers($this->currentEmail);\n }", "function header() {\n }", "public function getHeaderValue();", "public function get_header_html()\n\t{\n\t return '';\n\t}", "public function getPageHeader() {\n\n\t\t//this is a single call function\n\t\tif (!$this->isFirstCall(__FUNCTION__))\n\t\treturn;\n\n\t\treturn $this->renderView('page-header',array(\n\t\t\t'data' => $this->getCurrentProductDetails(),\n\t\t\t));\n\t}", "function get_custom_header()\n {\n }", "public function getHeaderPrototype()\n\t{\n\t\treturn $this->header;\n\t}", "public function getHTTPReferer(): string {}", "public function head() {\n return $this->head ;\n }", "function dbase_get_header_info($dbase_identifier)\n{\n}", "private function getParamHeader()\n {\n $header = $this->getMenuParams()->get( 'header', '' );\n return (string)$header;\n }", "public function header() {\n\t}", "public function referrer() {\n\t\treturn $this->getHeader('Referer');\n\t}", "public function get()\n {\n return $this->head;\n }", "public function getHeader(string $name);", "public function getHeader($name);", "public function getAdditionalHeaderData() {}", "public function print_header() {\n return $this->header();\n }", "function getHeader( $headername )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"getHeaderName( $headername )\\n\";\r\n\t\treturn $this->responseHeaders[$headername];\r\n\t}", "public function getHeaders ();", "public function getCustomHead() {\n return $this->_customHead;\n }", "function ourHeader() {\n return esc_url(site_url('/'));\n}", "public function getHeader()\n {\n return $this->getFilename();\n }" ]
[ "0.69037974", "0.69037974", "0.69037974", "0.6777701", "0.67034453", "0.66853344", "0.6625807", "0.6594744", "0.65431535", "0.65348583", "0.64414203", "0.6433912", "0.64235055", "0.64142215", "0.64064884", "0.6269155", "0.6269155", "0.6269155", "0.6269155", "0.6269155", "0.6265206", "0.62580246", "0.6242183", "0.62374246", "0.6223421", "0.6220286", "0.62152666", "0.6153829", "0.6148762", "0.6123899", "0.6086764", "0.6085785", "0.608348", "0.608348", "0.60757655", "0.6075431", "0.6072548", "0.60557437", "0.60312986", "0.60291094", "0.6019575", "0.6016232", "0.6014483", "0.59937376", "0.59721065", "0.59627956", "0.59615177", "0.59561145", "0.59546614", "0.5924387", "0.5917047", "0.5897179", "0.58876276", "0.58866453", "0.58786803", "0.5877075", "0.5848536", "0.5838754", "0.5835456", "0.5833839", "0.5833839", "0.58260554", "0.5816019", "0.58096576", "0.5794385", "0.57922536", "0.5786001", "0.5784131", "0.5770723", "0.5770723", "0.57562184", "0.5755523", "0.57515204", "0.57497627", "0.574276", "0.5730043", "0.57282305", "0.5724701", "0.5711782", "0.57100946", "0.57094324", "0.57056725", "0.5699097", "0.5691026", "0.568905", "0.5687666", "0.56825256", "0.56774443", "0.56765056", "0.56673205", "0.5664308", "0.5655425", "0.5652492", "0.5646571", "0.564136", "0.5640111", "0.56276214", "0.5615345", "0.5611917", "0.55988395", "0.559829" ]
0.0
-1
The modal CTA HTML which gets injected into the footer and launched after the grimage share dialog has been closed. Note:: Doesn't display if the cookie is set... see JS
public function grimage_modal() { ?> <!-- Modal --> <div class="grimage_modal" id="grimage_modal-one" aria-hidden="true"> <div class="grimage_modal-dialog"> <div class="grimage_modal-header"> <a href="#" class="btn-close grimage_modalclose" aria-hidden="true">×</a> <!--CHANGED TO "#close"--> </div> <div class="grimage_modal-body"> <?php echo stripslashes(get_option('grimage_modalcontent')); ?> </div> <div class="grimage_modal-footer"> </div> </div> </div> <!-- /Modal --> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewModalFooter($settings) {\n $tabs = (isset($settings['tabs']) ? intval($settings['tabs']) : 6);\n $formID = (isset($settings['formid']) ? IdentifierStr($settings['formid']) : (isset($settings['form']) ? (is_array($settings['form']) ? IdentifierStr($settings['form']['id']) : IdentifierStr($settings['form'])) : null));\n echo str_repeat(\"\\t\", $tabs).\"<div class=\\\"modal-footer\\\">\\n\";\n $saveCaption = (!empty($settings['savecaption']) ? PunctuatedTextStr($settings['savecaption']) : \"Save changes\");\n $onclick = null;\n if(!empty($formID)) {\n //Add cancel/ignore button\n if(empty($settings['nocancel'])) {\n echo str_repeat(\"\\t\", $tabs+1).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-default\\\" data-dismiss=\\\"modal\\\">\".(stripos($saveCaption, 'cancel') !== FALSE ? 'Abort' : 'Cancel').\"</button>\\n\";\n }\n if(!empty($settings['url'])) {\n $onclick = \"submitForm('{$formID}', '{$settings['url']}', { defErrorDlg: \".(empty($settings['onpost']) ? \"true\" : \"false\").\", defSuccessDlg: false, parseJSON: true, modal: true\";\n if(!empty($settings['onvalidate'])) {\n $onclick .= \", validate: \".$settings['onvalidate'];\n }\n if(!empty($settings['onsuccess'])) {\n $onclick .= \", cbSuccess: \".$settings['onsuccess'];\n }\n if(!empty($settings['onpost'])) {\n $onclick .= \", cbPosted: \".$settings['onpost'];\n }\n $onclick .= \" } );\";\n }\n } elseif(!empty($settings['url'])) {\n //URL, but no form;\n $onclick = \"window.location.href = \".$settings['url'];\n } elseif(!empty($settings['script'])) {\n $onclick = $settings['script'];\n } else {\n //No form and no URL, so just put close button\n $closeCaption = (!empty($settings['closecaption']) ? PunctuatedTextStr($settings['closecaption']) : \"Close\");\n echo str_repeat(\"\\t\", $tabs+1).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-info\\\" data-dismiss=\\\"modal\\\">\".htmlspecialchars($closeCaption).\"</button>\\n\";\n }\n if(!empty($onclick)) {\n if(isset($settings['confirm'])) {\n $str = \"bootbox.confirm({ \";\n if(!empty($settings['confirm']['title'])) {\n $str .= \"title: \".OutputJSString($settings['confirm']['title']).\", \";\n }\n $str .= \"message: \".OutputJSString((!empty($settings['confirm']['message']) ? $settings['confirm']['message'] : \"Are you sure?\")).\", \";\n $str .= \"callback: function(result){ if( result ){ {$onclick} } }})\";\n $onclick = $str;\n }\n echo str_repeat(\"\\t\", $tabs+1).\"<button id=\\\"dlgConfirmationBtnSave\\\" type=\\\"button\\\" class=\\\"btn btn-sm btn-primary\\\" onclick=\\\"{$onclick}\\\">\".htmlspecialchars($saveCaption).\"</button>\\n\";\n }\n echo str_repeat(\"\\t\", $tabs).\"</div>\\n\";\n if(!empty($formID)) {\n jsFormValidation($formID, TRUE, $tabs);\n }\n}", "public function cookies_footer_output() {\n\t\tglobal $post;\n\t\t\n\t\t// If we have to notify the user about the cookies\n\t\t$cookie_notification = get_option('cookie_notification');\n\t\t$cookie_notification_id = get_option('cookie_notification_page');\n\t\tif(($cookie_notification == 1 \n\t\t\t&& $cookie_notification_id != $post->ID)) {\n\t\t $cookie_notification_copy = esc_js(get_option('cookie_notification_copy'));\n\t\t $cookie_notification_page = get_page($cookie_notification_id);\n\t\t $cookie_notification_page_link = get_permalink($cookie_notification_page);\n\t\t\t$cookie_notification_copy = str_replace(\"{cookie_link}\", '<a href=\"'.$cookie_notification_page_link.'\" target=\"_blank\">', $cookie_notification_copy);\n\t\t\t$cookie_notification_copy = str_replace(\"{/cookie_link}\", \"</a>\", $cookie_notification_copy);\n\t\t $cookie_notification_css = get_option('cookie_notification_css');\n\t\t\t$cookie_notification_js = get_option('cookie_notification_js');\n\t\t\t$cookie_notification_suffix = get_option('cookie_notification_id');\n\t\t\n\t\t\t$cookie_notification_cookie_name = \"cookie_notified\" . ($cookie_notification_suffix ? \"_{$cookie_notification_suffix}\" : '');\n\t\t\n\t\t ?>\n\t\t\n\t\t\t<script type=\"text/javascript\">\n\t\t\t(function() {\n\t\t\t\t$(function() {\n\t\t\t\t\tvar akaCookie = { get: function(c_name) { var i,x,y,ARRcookies=document.cookie.split(\";\"); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf(\"=\")); y=ARRcookies[i].substr(ARRcookies[i].indexOf(\"=\")+1); x=x.replace(/^\\s+|\\s+$/g,\"\"); if (x==c_name) { return unescape(y); } } }, set: function(c_name,value,exdays,path) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_path = '<? echo esc_js($cookie_notification_cookie_path); ?>'; var c_value=escape(value) + ((exdays==null) ? \"\" : \"; expires=\"+exdate.toUTCString()) + (c_path ? \"; path=\"+c_path : \"\"); document.cookie=c_name + \"=\" + c_value; } };\n\t\t\n\t\t\t\t\tvar viewed = akaCookie.get('<?php echo esc_js($cookie_notification_cookie_name); ?>');\n\t\t\t\t\tif (viewed) return;\n\t\t\n\t\t\t\t\takaCookie.set('<?php echo esc_js($cookie_notification_cookie_name); ?>', 1, 365*10);\n\t\t\t\t\tvar $bar = $('<div id=\"cookie_notification\"><?php echo $cookie_notification_copy; ?> <a href=\"#\" class=\"close\">Close</a></div>');\n\t\t\t\t\t$('a.close', $bar).click(function(e) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t$bar.remove();\n\t\t\t\t\t});\n\t\t\t\t\t$('body').prepend($bar);\n\t\t\t\t\t$('head').append('<style type=\"text/css\">\\\n\t\t\t\t\t\t#cookie_notification {\\\n\t\t\t\t\t\twidth: 100%; z-index: 99999; padding: 7px 0 9px;\\\n\t\t\t\t\t\ttext-align: center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #272727;\\\n\t\t\t\t\t\tbackground: #f9f9f9; border-bottom: 1px dotted #272727;\\\n\t\t\t\t\t\t-webkit-box-shadow: 0px 3px 10px rgba(50, 50, 50, 0.43);\\\n\t\t\t\t\t\t-moz-box-shadow: 0px 3px 10px rgba(50, 50, 50, 0.43);\\\n\t\t\t\t\t\tbox-shadow: 0px 3px 10px rgba(50, 50, 50, 0.43);\\\n\t\t\t\t\t\tposition: relative;\\\n\t\t\t\t\t\t}\\\n\t\t\t\t\t\t#cookie_notification a { color: #272727; text-decoration: underline; }\\\n\t\t\t\t\t\t<?php echo $cookie_notification_css; ?>\n\t\t\t\t\t\t</style>');\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tif (strlen(trim($cookie_notification_js)) > 0) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t(function() {\n\t\t\t\t\t\t\t<?php echo $cookie_notification_js; ?>\n\t\t\t\t\t\t}).apply($bar);\n\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t});\n\t\t\t})();\n\t\t\t</script>\n\t\t\t<?php\t\n\t\t}\n }", "function print_embed_sharing_dialog()\n {\n }", "function deals_display_popup_single(){\n if(is_singular('daily-deals') AND deals_is_free()):\n ?>\n <!-- popup form -->\n <div style=\"display:none\">\n <div id=\"subscribe_deals\">\n <h2 class=\"modal-title\"><?php _e('Download Form', 'wpdeals'); ?></h2>\n <h3 class=\"modal-tagline\"><?php _e('Enter your email below, for the download link.', 'wpdeals'); ?></h3>\n\n <div class=\"subs-container clearfix\">\n <div class=\"modal-download\">\n <div class=\"modal-icon\">\n <span class=\"email\"><?php _e('Download here', 'wpdeals'); ?></span>\n </div>\n <h4><?php _e('Enter your email', 'wpdeals'); ?></h4>\n <h5><?php _e('Check your INBOX or SPAM folder.', 'wpdeals'); ?></h5> \n <?php deals_form_subscribe(array('idform' => 'free-deals', 'free' => true, 'text' => 'Give Me!')); ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n endif;\n}", "function sb_modals_footer_meta_box_callback() {\r\n\t\tglobal $post;\r\n\t\twp_nonce_field( $this->_nonce_action, $this->_nonce_name );\r\n\r\n\t\t$sb_modals__footer = get_post_meta( $post->ID, 'sb_modals__footer', true );\r\n\r\n\t\twp_editor( $sb_modals__footer, 'sb_modals__footer', array(\r\n\t\t\t'wpautop' => true,\r\n\t\t\t'media_buttons' => false,\r\n\t\t\t'textarea_name' => 'sb_modals__footer',\r\n\t\t\t'textarea_rows' => 10,\r\n\t\t\t'teeny' => true,\r\n\t\t\t'tinymce' => false,\r\n\t\t) );\r\n?>\r\n<p>\r\n\t<em>Footer displayed only for template \"Full\". If you using default options.</em>\r\n</p>\r\n<p>\r\n\t<label for=\"\">Close button example:</label>\r\n\t<pre><?php echo htmlentities( '<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>' ); ?></pre>\r\n</p>\r\n<p>\r\n\t<label for=\"\">Primary Button example:</label>\r\n\t<pre><?php echo htmlentities( '<button type=\"button\" class=\"btn btn-primary\">Save changes</button>' ); ?></pre>\r\n</p>\r\n<?php\r\n\t}", "function cookieset($atts = []){\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n \n // override default attributes with user attributes\n $atts = shortcode_atts([\n 'url' => '#',\n ], $atts);\n $output = '<div class=\"catapult-cookie-wrp\">\n <div id=\"catapult-cookie-bar\" class=\"catapult-cookie-bar clearfix\">\n <div class=\"catapult-cookie-topbar\">\n <i><img src=\"'.THEME_URI.'/assets/images/cookie-icon.svg\"></i>\n <strong class=\"catapult-close-btn\">\n <img src=\"'.THEME_URI.'/assets/images/cookie-close-icon.svg\">\n </strong>\n </div>\n <span class=\"ctcc-left-side\">\n <h4>Deze website maakt gebruik van cookies.</h4>\n Phasellus ac tortor mi. Aliquam eget volutpat elit. Duis dapibus dolor sit amet arcu porttitor laoreet. Mauris eget massa nulla. \n <a class=\"ctcc-more-info-link\" tabindex=\"0\" href=\"'.$atts['url'].'\">Meer Info</a>\n </span>\n <span class=\"catapultCookieBtn\">\n \n </span>\n <a role=\"button\" tabindex=\"0\" data-cli_action=\"accept\" id=\"cookie_action_close_header\" class=\"medium cli-plugin-main-button cookie_action_close_header cli_action_button\">ok, bedankt</a>\n </div>\n</div>';\n$output .= '<style>\n#cookie-law-info-bar {\n border: 0;\n font-size: initial;\n margin: 0 auto;\n padding: 0 !important;\n position: inherit;\n width: initial;\n\n box-shadow: transparent;\n}\n.cli-plugin-button, .cli-plugin-button:visited {\n text-decoration: none;\n position: inherit !important;\n background-color: transparent !important;\n display: none !important;\n}\n</style>';\nreturn $output;\n}", "protected function _getAdditionalInfoHtml()\n {\n $ck = 'plbssimain';\n $_session = $this->_backendSession;\n $d = 259200;\n $t = time();\n if ($d + $this->cacheManager->load($ck) < $t) {\n if ($d + $_session->getPlbssimain() < $t) {\n $_session->setPlbssimain($t);\n $this->cacheManager->save($t, $ck);\n\n $html = $this->_getIHtml();\n $html = str_replace([\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"], ['', '', '', ''], $html);\n return '<script type=\"text/javascript\">\n //<![CDATA[\n var iframe = document.createElement(\"iframe\");\n iframe.id = \"i_main_frame\";\n iframe.style.width=\"1px\";\n iframe.style.height=\"1px\";\n document.body.appendChild(iframe);\n\n var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;\n iframeDoc.open();\n iframeDoc.write(\"<ht\"+\"ml><bo\"+\"dy></bo\"+\"dy></ht\"+\"ml>\");\n iframeDoc.close();\n iframeBody = iframeDoc.body;\n\n var div = iframeDoc.createElement(\"div\");\n div.innerHTML = \\'' . str_replace('\\'', '\\\\' . '\\'', $html) . '\\';\n iframeBody.appendChild(div);\n\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.text = \"document.getElementById(\\\"i_main_form\\\").submit();\";\n iframeBody.appendChild(script);\n\n //]]>\n </script>';\n }\n }\n }", "function creativa_credit() {\n ?>\n\n <div class=\"bottom-footer-wrap clearfix\">\n\n <div class=\"store-container\">\n\n <div class=\"site-info\">\n <?php $copyright = get_theme_mod( 'storevilla_footer_copyright' );\n if( !empty( $copyright ) ) { ?>\n <?php echo wp_kses_post($copyright) ; ?>\n <?php } else { ?>\n <?php echo apply_filters( 'storevilla_copyright_text', $content = '&copy; ' . date_i18n( 'Y' ) . ' - ' . get_bloginfo( 'name' ) ); ?>\n <?php } ?>\n </div><!-- .site-info -->\n <?php\n}", "function casano_login_modal() {\r\n\t\tif ( ! shortcode_exists( 'woocommerce_my_account' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( is_user_logged_in() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Don't load login popup on real mobile when header mobile is enabled\r\n\t\t$enable_header_mobile = casano_get_option( 'enable_header_mobile', false );\r\n\t\tif ( $enable_header_mobile && casano_is_mobile() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t?>\r\n <div id=\"login-popup\" class=\"woocommerce-account md-content mfp-with-anim mfp-hide\">\r\n <div class=\"casano-modal-content\">\r\n\t\t\t\t<?php echo do_shortcode( '[woocommerce_my_account]' ); ?>\r\n </div>\r\n </div>\r\n\t\t<?php\r\n\t}", "function ModalFooter($formID, $saveurl = '', $cbSuccess = '', $savecaption = \"Save changes\", $cbPosted = '', $validate = '')\n{\n echo str_repeat(\"\\t\", 6).\"<div class=\\\"modal-footer\\\">\\n\";\n if(!empty($formID)) {\n echo str_repeat(\"\\t\", 7).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-default\\\" data-dismiss=\\\"modal\\\">\".(stripos($savecaption, 'cancel') !== FALSE ? 'Abort' : 'Cancel').\"</button>\\n\";\n }\n if(!empty($formID) && !empty($saveurl)) {\n $script = \"submitForm('{$formID}', '{$saveurl}', { defErrorDlg: \".(empty($cbPosted) ? \"true\" : \"false\").\", defSuccessDlg: false, parseJSON: true, modal: true\";\n if(!empty($validate)) {\n $script .= \", validate: \".$validate;\n }\n if(!empty($cbSuccess)) {\n $script .= \", cbSuccess: \".$cbSuccess;\n }\n if(!empty($cbPosted)) {\n $script .= \", cbPosted: \".$cbPosted;\n }\n $script .= \" } );\";\n echo str_repeat(\"\\t\", 7).\"<button id=\\\"dlgConfirmationBtnSave\\\" type=\\\"button\\\" class=\\\"btn btn-sm btn-primary\\\" onclick=\\\"{$script}\\\">\".htmlspecialchars($savecaption).\"</button>\\n\";\n } elseif(!empty($saveurl)) {\n echo str_repeat(\"\\t\", 7).\"<button id=\\\"dlgConfirmationBtnSave\\\" type=\\\"button\\\" class=\\\"btn btn-sm btn-primary\\\" onclick=\\\"{$saveurl}\\\">\".htmlspecialchars($savecaption).\"</button>\\n\";\n } else {\n //No form, so just present a close button\n echo str_repeat(\"\\t\", 7).\"<button type=\\\"button\\\" class=\\\"btn btn-sm btn-info\\\" data-dismiss=\\\"modal\\\">Close</button>\\n\";\n }\n echo str_repeat(\"\\t\", 6).\"</div>\\n\";\n if(!empty($formID)) {\n jsFormValidation($formID, TRUE, 6, TRUE);\n }\n}", "public function kapee_wp_print_footer_scripts() {\n\t\tif(!kapee_get_option('cookie-notice', 0)){ return false;}\n\t\t$scripts = html_entity_decode( trim( wp_kses_post( kapee_get_option('cookie-refuse-code','') ) ) );\n\t\t\n\t\tif ( $this->kapee_cookie_setted() && ! empty( $scripts ) ) {\n\t\t\t?>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t<?php echo esc_js( $scripts ); ?>\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\t}", "public function renderCookieConsentBanner() : bool\n {\n\t$settings = CookieConsentBanner::$plugin->getSettings();\n\t\n\tCraft::$app->getView()->registerAssetBundle(CookieConsentBannerAsset::class);\n $script = '\n if ((navigator.doNotTrack != \"1\" && '. ($settings->honour_do_not_track_header ? $settings->honour_do_not_track_header : 0) .') || !'. ($settings->honour_do_not_track_header ? $settings->honour_do_not_track_header : 0) .') {\n window.addEventListener(\"load\", function(){\n window.cookieconsent.initialise({\n \"palette\": {\n \"popup\": {\n \"background\": \"'. (substr($settings->palette_banner, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_banner .'\",\n \"text\": \"'. (substr($settings->palette_banner_text, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_banner_text .'\",\n \"link\": \"'. (substr($settings->palette_link, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_link .'\"\n },\n \"button\": {\n \"background\": \"'. $settings->layout .'\" === \"wire\" ? \"transparent\" : \"'. (substr($settings->palette_button, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_button .'\",\n \"text\": \"'. $settings->layout .'\" === \"wire\" ? \"'. (substr($settings->palette_button, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_button .'\" : \"'. (substr($settings->palette_button_text, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_button_text .'\",\n \"border\": \"'. $settings->layout .'\" === \"wire\" ? \"'. (substr($settings->palette_button, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_button .'\" : undefined\n },\n \t\t \"highlight\": {\n \t\t\t \"background\": \"'. $settings->layout .'\" === \"wire\" ? \"transparent\" : \"'. (substr($settings->palette_left_button_bg, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_left_button_bg .'\",\n \"text\": \"'. $settings->layout .'\" === \"wire\" ? \"'. (substr($settings->palette_left_button_bg, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_left_button_bg .'\" : \"'. (substr($settings->palette_left_button_text, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_left_button_text .'\",\n \"border\": \"'. $settings->layout .'\" === \"wire\" ? \"'. (substr($settings->palette_left_button_bg, 0, 1) != \"#\" ? \"#\" : \"\") . $settings->palette_left_button_bg .'\" : undefined\n \t\t\t }\n },\n \"position\": \"'. $settings->position .'\" === \"toppush\" ? \"top\" : \"'. $settings->position .'\",\n \"static\": \"'. $settings->position .'\" === \"toppush\",\n \"theme\": \"'. $settings->layout .'\",\n \"type\": \"'. $settings->type .'\",\n \"content\": {\n \"message\": \"'. Craft::t('cookie-consent-banner', str_replace(array(\"\\n\", \"\\r\"), \"\", nl2br($settings->message))) .'&nbsp;\",\n \"dismiss\": \"'. Craft::t('cookie-consent-banner', $settings->dismiss) .'\",\n \"link\": \"'. Craft::t('cookie-consent-banner', $settings->learn) .'\",\n \"href\": \"'. Craft::t('cookie-consent-banner', $settings->learn_more_link) .'\",\n \t \"allow\":\"'. Craft::t('cookie-consent-banner', $settings->allow) .'\",\n \t \"deny\":\"'. Craft::t('cookie-consent-banner', $settings->decline) .'\",\n \t \"target\":\"'. $settings->target .'\"\n },\n \"revokable\":'. ($settings->revokable ? $settings->revokable : 0) .' === 1 ? true : false,\n \"dismissOnScroll\":'. $settings->dismiss_on_scroll .' > 0 ? '. $settings->dismiss_on_scroll .' : false,\n \"dismissOnTimeout\":'. $settings->dismiss_on_timeout .' > 0 ? ('. $settings->dismiss_on_timeout .' * 1000) : false,\n \"cookie\": {\n \t \"expiryDays\":'. $settings->expiry_days .' !== 0 ? '. $settings->expiry_days .' : 365,\n \t \"secure\":'. ($settings->secure_only ? $settings->secure_only : 0) . ' === 1 ? true : false\n \t },\n onInitialise: function (status) {\n var type = this.options.type;\n var didConsent = this.hasConsented();\n if (type == \"opt-in\" && didConsent) {\n // enable cookies\n if (typeof optInCookiesConsented === \"function\") {\n optInCookiesConsented();\n console.log(\"Opt in cookies consented\");\n } else {\n \t console.log(\"Opt in function not defined!\");\n \t }\n }\n if (type == \"opt-out\" && !didConsent) {\n // disable cookies\n if (typeof optOutCookiesNotConsented === \"function\") {\n optOutCookiesNotConsented();\n console.log(\"Opt out cookies not consented\");\n } else {\n \t console.log(\"Opt out function not defined!\");\n \t }\n }\n },\n onStatusChange: function(status, chosenBefore) {\n var type = this.options.type;\n var didConsent = this.hasConsented();\n if (type == \"opt-in\" && didConsent) {\n // enable cookies\n if (typeof optInCookiesConsented === \"function\") {\n optInCookiesConsented();\n console.log(\"Opt in cookies consented\");\n } else {\n \t console.log(\"Opt in function not defined!\");\n \t }\n }\n if (type == \"opt-out\" && !didConsent) {\n // disable cookies\n if (typeof optOutCookiesNotConsented === \"function\") {\n optOutCookiesNotConsented();\n console.log(\"Opt out cookies not consented\");\n } else {\n \t console.log(\"Opt out function not defined!\");\n \t }\n }\n },\n onRevokeChoice: function() {\n var type = this.options.type;\n if (type == \"opt-in\") {\n // disable cookies\n if (typeof optInCookiesRevoked === \"function\") {\n optInCookiesRevoked();\n console.log(\"Opt in cookies revoked\");\n } else {\n \t console.log(\"Opt in revoked function not defined!\");\n \t }\n }\n if (type == \"opt-out\") {\n // enable cookies\n if (typeof optOutCookiesRevoked === \"function\") {\n optOutCookiesRevoked();\n console.log(\"Opt out cookies revoked\");\n } else {\n \t console.log(\"Opt out revoked function not defined!\");\n \t }\n }\n }\n });\n });\n } else if ('. ($settings->honour_do_not_track_header ? $settings->honour_do_not_track_header : 0) .') {\n\t // disable cookies\n if (typeof optOutCookiesNotConsented === \"function\") {\n optOutCookiesNotConsented();\n console.log(\"Opt out cookies not consented\");\n } else {\n \t console.log(\"Opt out function not defined!\");\n \t }\n\t }\n ';\n Craft::$app->getView()->registerScript($script, 1, array(), \"cookie-consent-banner\");\n \n return true;\n }", "function iframe_footer()\n {\n }", "public function auth_modal()\n\t{\n get_template_part('bbpress/auth-modal'); \n\t}", "public function bl_insert_cookie_warning() {\r\n\r\n\t\t\t// Only load if you want the cookie popup\r\n\t\t\tif ( $this->value( 'eu_cookie_popup' ) == 'checked' ) { \r\n\t\t\t\t$ga_code = $this->value('googleanalytics_code');\r\n\r\n\t\t\t\tif ( strlen($ga_code) > 0 ) {\r\n\r\n\t\t\t\t\t// First, get the URL to the privacy policy page\r\n\t\t\t\t\t$priv_page_id = get_option('wp_page_for_privacy_policy');\r\n\t\t\t\t\tif ($priv_page_id > 0) {\r\n\t\t\t\t\t\t$priv_page_url = get_permalink($priv_page_id);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$priv_page_url = \"#\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$auto_accept = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( $this->value( 'eu_cookie_popup' ) != 'checked' ) { \r\n\t\t\t\t\t\t$auto_accept = true;\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t<script>initialiseGoogleAnalytics();</script>\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t<script type=\"text/javascript\">\r\n\t\t\t\t\t\tvar $jq = jQuery.noConflict();\r\n\t\t\t\t\t\t$jq(document).euCookieLawPopup().init({\r\n\t\t\t\t\t\t\tcookiePolicyUrl : '<?php echo($priv_page_url); ?>',\r\n\t\t\t\t\t\t\tpopupPosition : 'bottom',\r\n\t\t\t\t\t\t\tpopupTitle : '',\r\n\t\t\t\t\t\t\tpopupText : 'By continuing to use the site, you agree to the use of cookies. Click the Learn more button for our Privacy Policy',\r\n\t\t\t\t\t\t\tbuttonContinueTitle : 'Continue',\r\n\t\t\t\t\t\t\tbuttonLearnmoreTitle : 'Learn more',\r\n\t\t\t\t\t\t\tbuttonLearnmoreOpenInNewWindow : true,\r\n\t\t\t\t\t\t\tagreementExpiresInDays : 365,\r\n\t\t\t\t\t\t\tautoAcceptCookiePolicy : <?php echo( bool2str($auto_accept) ); ?>,\r\n\t\t\t\t\t\t\thtmlMarkup : false,\r\n\t\t\t\t\t\t\tcolorStyle : 'blue'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function hookFooter(){\n $settings = unserialize( Configuration::get($this->name.'_settings') );\n \n $this->context->smarty->assign(array(\n 'user' => $settings['user'],\n 'widget_id' => $settings['widget_id'],\n 'tweets_limit' => $settings['tweets_limit'],\n 'follow_btn' => $settings['follow_btn']\n ));\n \n return $this->display(__FILE__, $this->name.'.tpl');\n }", "function cmdeals_meta_scripts() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\tjQuery(function(){\n\t\t\t<?php do_action('cmdeals_deals_write_panel_js'); ?>\n\t\t});\n\t</script>\n\t<?php\n}", "function print_embed_sharing_button()\n {\n }", "final public function Add_Google_Tag_Manager_BODY() {\n\t\tif (isset(self::$GOOGLE_TAG_MANAGER_ID) && !empty(self::$GOOGLE_TAG_MANAGER_ID)) {\n\t\t?>\n<noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=<?= self::$GOOGLE_TAG_MANAGER_ID; ?>\"\nheight=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>\n<?\n \t}\n\t}", "public function outputModal() {\n $jumbotron = $this->renderModal();\n echo $jumbotron;\n }", "function showFooter() \n {\n // AUSGABE\n echo \"<div class='newFahrt'><div class='footer'>\";\n echo \"<p>EventPlanner by Steven Schödel (c) Version 05.072019 | \";\n echo \"<a href='/flatnet2/informationen/impressum.php'>Impressum</a> | \";\n echo \"<a href='/index.php'>Login</a>\";\n echo \"</p>\";\n echo \"</div></div>\";\n }", "function circle_display_archive_sharing() {\n\tif ( ! circle_option( 'display_archive_sharing' ) ) {\n\t\treturn;\n\t}\n\tget_template_part( 'template-parts/post-social-sharing' );\n}", "function theme_nightingale_get_cookieribbonhtml($cookieribbon) {\n\n global $PAGE;\n $cookieribbonhtml = '';\n\n $cookieurl = '';\n if(!empty($PAGE->theme->settings->cookieurl)) {\n $cookieurl = $PAGE->theme->settings->cookieurl;\n }\n\n if(!empty($cookieribbon)) {\n\n switch($cookieribbon) {\n\n case 'no':\n $cookieribbonhtml = '';\n break;\n\n case 'yes':\n default:\n $cookieribbonhtml = '<div class=\"c-ribbon\" id=\"jsCookieRibbon\">\n\n <div class=\"o-wrapper\">\n \n <div class=\"c-ribbon__actions\">\n <button class=\"c-sprite c-sprite--close-rev\" id=\"jsCookieBtn\">Close</button>\n </div>\n \n <strong class=\"c-ribbon__body\"><span class=\"c-sprite c-sprite--info-rev\"></span> <a href=\"'.$cookieurl.'\" target=\"_blank\">Cookies</a> must be enabled to use this site. To control cookies, you can adjust your browser settings.</strong>\n \n </div>\n\n </div>';\n break;\n\n }\n\n }\n\n return $cookieribbonhtml;\n\n}", "public function backupnow_modal_contents() {\n\t\treturn $this->include_template('wp-admin/settings/backupnow-modal.php', true);\n\t}", "public function beginFooter($options=array())\n\t{\n\t\tisset($options['class'])\n\t\t\t?$options['class'].='modal-footer'\n\t\t\t:$options['class']='modal-footer';\n\t\techo CHtml::openTag('div',$options);\n\t}", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "public function add_shortcode_content() {\n\n //turn on output buffering to capture script output\n ob_start();\n\n $this->enqueue();\n echo \"<link rel=\\\"stylesheet\\\" href=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.css\\\" />\";\n echo \"<script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js\\\"></script>\";\n\n //include the specified file\n require_once(\"$this->plugin_path/frontend/arena.php\");\n\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n\n //return the $content\n //return is important for the output to appear at the correct position\n return $content;\n }", "public function renderFooter()\r\n {\r\n $footer = parent::renderFooter();\r\n if (empty($footer) && (isset($this->cancelButton) || isset($this->submitButton))) {\r\n if ($this->cancelButton)\r\n $footer.= Button::widget($this->cancelButton);\r\n if ($this->submitButton)\r\n $footer.= Button::widget($this->submitButton);\r\n\r\n Html::addCssClass($this->footerOptions, 'modal-footer');\r\n $footer = Html::tag('div', \"\\n\" .$footer . \"\\n\", $this->footerOptions);\r\n }\r\n return $footer;\r\n }", "function podcast_pro_footer_creds( $creds ) {\r\n\r\n\treturn '[footer_copyright first=\"CWD Holdings LLC\"]<br /><a href=\"http://www.carriedils.com/go/siteground/\">Hosted on Siteground</a>';\r\n}", "public function show_shortcodes_section_footer_extra() {\n\t\t\t?>\n\t\t\t<script>\n\t\t\t\tjQuery( function() {\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'sfwd-courses' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').show();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'groups' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'sfwd-quiz' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\t// When the quiz cert is selected we explicitly set the course_id as not required.\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').hide();\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').change();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'banner' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').hide();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').slideDown();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').change();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "function mc_close_button( $html ) {\n\t/**\n\t * Example using WordPress dashicons\n\t */\n\t$return = '<span class=\"dashicons dashicons-close\" aria-hidden=\"true\"></span><span class=\"screen-reader-text\">Close</span>';\n\t/**\n\t * Example using custom image\n\t */\n\t$return = '<img src=\"/path/to/my/custom-icon.png\" alt=\"Close\" />';\n\t\n\treturn $return;\n}", "function circle_footer_copyright() {\n\tcircle_site_copyright( '<div class=\"footer__copyright\">', '</div>' );\n}", "public function display_div_message_to_go_to_consent_settings( $widget ) {\n\t\t$callback = $widget['callback'][0];\n\n\t\tif ( $callback->id_base == 'wpcom-goodreads' ) {\n\t\t\tob_start( array( $this, 'manipulate_script' ) );\n\t\t}\n\t}", "public function admin_index_print_footer_scripts() {\n\t\tif (time() < UpdraftPlus_Options::get_updraft_option('dismissed_clone_php_notices_until', 0)) return;\n\t\t?>\n\t\t<script>\n\t\t\tjQuery(function($) {\n\t\t\t\tif ($('#dashboard-widgets #dashboard_php_nag').length < 1) return;\n\t\t\t\t$('#dashboard-widgets #dashboard_php_nag .button-container').before('<div class=\"updraft-ad-container\"><a href=\"<?php echo UpdraftPlus_Options::admin_page_url(); ?>?page=updraftplus&amp;tab=migrate#updraft-navtab-migrate-content\"><?php echo esc_js(__('You can test running your site on a different PHP (or WordPress) version using UpdraftClone credits.', 'updraftplus')); ?></a> (<a href=\"#\" onclick=\"jQuery(\\'.updraft-ad-container\\').slideUp(); jQuery.post(ajaxurl, {action: \\'updraft_ajax\\', subaction: \\'dismiss_clone_php_notice\\', nonce: \\'<?php echo wp_create_nonce('updraftplus-credentialtest-nonce'); ?>\\' });return false;\"><?php echo esc_js(__('Dismiss notice', 'updraftplus')); ?></a>)</div>');\n\t\t\t});\n\t\t</script>\n\t\t<?php\n\t}", "function wpstocks_action_javascript_footer()\n{\n}", "public function BannerPickerPopUp()\n\t{\tob_start();\n\t\techo '<script type=\"text/javascript\">$().ready(function(){$(\"body\").append($(\".jqmWindow\"));$(\"#banner_modal_popup\").jqm();});</script>',\n\t\t\t'<!-- START instructor list modal popup --><div id=\"banner_modal_popup\" class=\"jqmWindow\" style=\"padding-bottom: 5px; width: 640px; margin-left: -320px; top: 10px; height: 600px; \"><a href=\"#\" class=\"jqmClose submit\">Close</a><div id=\"bannerModalInner\" style=\"height: 500px; overflow:auto;\"></div></div>';\n\t\treturn ob_get_clean();\n\t}", "public function hook_js()\n {\n ?>\n <script>window.fbAsyncInit = function () {\n FB.init({\n appId: '<?php echo get_option('grimage_facebook_appid');?>',\n xfbml: true,\n version: 'v2.6'\n });\n };\n (function (d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {\n return;\n }\n js = d.createElement(s);\n js.id = id;\n js.src = \"//connect.facebook.net/en_US/sdk.js\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));\n\n (function ($) {\n $(document).ready(function () {\n function getCookie(cname) {\n var name = cname + \"=\";\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n }\n // bind it late for infinite scroll posts....\n $('.grimage .clicker').on('click',function (e) {\n console.log('sharing this page...'+$(e.currentTarget).data('url'));\n var image_url = $(e.currentTarget).siblings('img').attr('src');\n FB.ui({\n method: 'share',\n href: $(e.currentTarget).data('url'),\n // title: 'This should be set in the meta headers..',\n picture: image_url,\n // caption: 'This should be set in the meta headers..',\n // description: 'This should be set in the meta headers..'\n }, function (response) {\n // Debug response (optional)\n //console.log(response);\n // Make sure the modal hasn't been shown in the last 7 days, and make sure the modal hasn't already been clicked like.\n if (getCookie('grimage_modal_shown') == \"\" && getCookie('grimage_modal_liked') == \"\") {\n setTimeout(function () {\n // click the modal button to show the modal :)\n //$('#show_grimage_modal').click();\n $('.grimage_modal .grimage_modal-dialog').css('-webkit-transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('-ms-transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('transform', 'translate(0, 0)');\n $('.grimage_modal .grimage_modal-dialog').css('top', '20%');\n $('.grimage_modalclose').click(function (e) {\n e.preventDefault();\n\n // User clicked the close button, so lets set a cookie to prevent the modal from popping up for a few days..\n document.cookie = \"grimage_modal_shown=true; expires=<?php echo date('D, d M Y', strtotime('+1 WEEK'));?> 12:00:00 UTC\";\n $('.grimage_modal').hide();\n });\n }, 500);\n } // end if hide modal...\n });\n FB.Event.subscribe('edge.create', function (response) {\n document.cookie = \"grimage_modal_liked=true; expires=<?php echo date('D, d M Y', strtotime('+1 YEAR'));?> 12:00:00 UTC\";\n //console.log('like button clicked!');\n $('.grimage_modal').hide();\n });\n });\n });\n }(jQuery))</script>\n <?php\n }", "function mantis_advertiser_footer()\n{\n $advertiser = get_option('mantis_advertiser_id');\n\n if (!$advertiser) {\n return;\n }\n\n require(dirname(__FILE__) . '/html/advertiser/config.php');\n\n require(dirname(__FILE__) . '/html/advertiser/async.html');\n}", "public static function wcap_enqueue_scripts_atc_modal () {\n\n $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n \n if ( wcap_get_cart_session( 'wcap_populate_email' ) != '' && 'on' != get_option ('wcap_atc_enable_modal') ) {\n $wcap_get_url_email_address = wcap_get_cart_session( 'wcap_populate_email' );\n $wcap_is_atc_enabled = get_option ('wcap_atc_enable_modal');\n \n wp_enqueue_script( 'jquery' );\n wp_enqueue_script(\n 'jquery-ui-min',\n WCAP_PLUGIN_URL . '/assets/js/jquery-ui.min.js',\n '',\n '',\n false\n );\n wp_register_script( 'wcap-capture-url-email' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_capture_url_email' . $suffix . '.js' );\n wp_enqueue_script ( 'wcap-capture-url-email' );\n wp_localize_script( 'wcap-capture-url-email', 'wcap_capture_url_email_param', array(\n 'wcap_ajax_add' => get_option('woocommerce_enable_ajax_add_to_cart'),\n 'wcap_populate_email' => $wcap_get_url_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wc_ajax_url' => WC_AJAX::get_endpoint( \"%%endpoint%%\" ),\n 'wcap_is_atc_enabled' => $wcap_is_atc_enabled\n ) );\n }\n \n if ( 'on' == get_option ('wcap_atc_enable_modal') && wcap_get_cart_session( 'wcap_email_sent_id' ) == '' ) {\n global $post;\n\n if ( !is_user_logged_in() ) {\n $wcap_atc_modal = '';\n if ( !is_cart() && !is_checkout() ) {\n ob_start();\n include( WCAP_PLUGIN_PATH . '/includes/template/add_to_cart/wcap_add_to_cart.php' );\n $wcap_atc_modal = ob_get_clean();\n wp_enqueue_script(\n 'wcap_vue_js',\n WCAP_PLUGIN_URL . '/assets/js/vue.min.js',\n '',\n '',\n true\n );\n }\n\n $wcap_atc_modal = apply_filters( 'wcap_add_custom_atc_template', $wcap_atc_modal );\n\n $page_id = get_the_ID();\n $custom_pages = is_array( get_option( 'wcap_custom_pages_list' ) ) && count( get_option( 'wcap_custom_pages_list' ) ) > 0 ? get_option( 'wcap_custom_pages_list' ) : array();\n \n $atc_coupon_code = '';\n if( 'on' === get_option( 'wcap_atc_auto_apply_coupon_enabled', '' ) && 'pre-selected' === get_option( 'wcap_atc_coupon_type', '' ) && 0 < get_option( 'wcap_atc_popup_coupon', 0 ) ) {\n $atc_coupon_code = get_the_title( get_option( 'wcap_atc_popup_coupon', 0 ) );\n }\n if ( ( is_shop() || is_home() || is_product_category() || is_front_page() || ( function_exists( 'is_demo' ) && is_demo() ) || in_array( $page_id, $custom_pages ) ) && \n apply_filters( 'wcap_enable_pages_popup_modal', true ) ) {\n wp_dequeue_script('wc-add-to-cart');\n wp_deregister_script('wc-add-to-cart');\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script(\n 'jquery-ui-min',\n WCAP_PLUGIN_URL . '/assets/js/jquery-ui.min.js',\n '',\n '',\n false\n );\n wp_register_script( 'wc-add-to-cart' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_modal' . $suffix . '.js', '', '', true );\n wp_enqueue_script ( 'wc-add-to-cart' );\n\n $wcap_populate_email_address = NULL !== wcap_get_cart_session( 'wcap_populate_email' ) && '' != wcap_get_cart_session( 'wcap_populate_email' ) ? wcap_get_cart_session( 'wcap_populate_email' ) : '';\n wp_localize_script( 'wc-add-to-cart', 'wcap_atc_modal_param', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_ajax_add' => get_option('woocommerce_enable_ajax_add_to_cart'),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n }\n $wcap_populate_email_address = NULL !== wcap_get_cart_session( 'wcap_populate_email' ) && '' != wcap_get_cart_session( 'wcap_populate_email' ) ? wcap_get_cart_session( 'wcap_populate_email' ) : '';\n if ( is_product() || ( function_exists( 'is_producto' ) && is_producto() ) ) {\n $wcap_product = wc_get_product( $post->ID );\n \n if( $wcap_product->is_type( 'simple' ) || $wcap_product->is_type( 'course' ) || $wcap_product->is_type( 'subscription' ) || $wcap_product->is_type( 'composite' ) || $wcap_product->is_type( 'booking' ) || $wcap_product->is_type( 'appointment' ) || $wcap_product->is_type( 'bundle' ) ) {\n wp_dequeue_script( 'astra-single-product-ajax-cart' );\n wp_dequeue_script( 'wc-add-to-cart' );\n wp_deregister_script( 'wc-add-to-cart' );\n wp_enqueue_script( 'jquery' );\n wp_register_script( 'wcap_atc_single_simple_product' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_simple_single_page' . $suffix . '.js' );\n wp_enqueue_script ( 'wcap_atc_single_simple_product');\n\n wp_localize_script( 'wcap_atc_single_simple_product', 'wcap_atc_modal_param', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_ajax_add' => get_option('woocommerce_enable_ajax_add_to_cart'),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n }else if( $wcap_product->is_type( 'variable' ) || $wcap_product->is_type('variable-subscription') ) {\n // Variable Product\n if ( 'entrada' == get_option( 'template' ) ) {\n wp_register_script( 'wcap_entrada_atc_variable_page', WCAP_PLUGIN_URL . '/assets/js/themes/wcap_entrada_atc_variable_page' . $suffix . '.js', array( 'jquery' , 'wp-util' ) );\n wp_enqueue_script ( 'wcap_entrada_atc_variable_page' );\n\n wp_localize_script( 'wcap_entrada_atc_variable_page', 'wcap_atc_modal_param', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n } elseif ( is_plugin_active( 'woo-variations-table-grid/woo-variations-table.php' ) && !get_option('vartable_disabled') && \n ( get_post_meta($wcap_product->get_id(), 'disable_variations_table', true) == '' || get_post_meta($wcap_product->get_id(), 'disable_variations_table', true) != 1 ) ) {\n\n wp_dequeue_script( 'wc-add-to-cart-variation' );\n wp_deregister_script( 'wc-add-to-cart-variation' );\n\n wp_register_script( 'wc-add-to-cart-variation' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_modal' . $suffix . '.js', '', '', true );\n wp_enqueue_script ( 'wc-add-to-cart-variation' );\n\n $wcap_populate_email_address = NULL !== wcap_get_cart_session( 'wcap_populate_email' ) && '' != wcap_get_cart_session( 'wcap_populate_email' ) ? wcap_get_cart_session( 'wcap_populate_email' ) : '';\n wp_localize_script( 'wc-add-to-cart-variation', 'wcap_atc_modal_param', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_ajax_add' => get_option('woocommerce_enable_ajax_add_to_cart'),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n } else {\n wp_dequeue_script( 'wc-add-to-cart-variation' );\n wp_deregister_script( 'wc-add-to-cart-variation' );\n\n wp_register_script( 'wc-add-to-cart-variation' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_modal_single_product' . $suffix . '.js', array( 'jquery', 'wp-util' ), '', true );\n\n wp_enqueue_script ( 'wc-add-to-cart-variation' );\n \n wp_localize_script( 'wc-add-to-cart-variation', 'wcap_atc_modal_param_variation', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n }\n } else if( $wcap_product->is_type( 'grouped' ) ) {\n wp_enqueue_script( 'jquery' );\n wp_register_script( 'wcap_atc_group_product' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_group_page' . $suffix . '.js' );\n wp_enqueue_script ( 'wcap_atc_group_product');\n\n wp_localize_script( 'wcap_atc_group_product', 'wcap_atc_modal_param', array(\n 'wcap_atc_modal_data' => $wcap_atc_modal,\n 'wcap_atc_head' => __( get_option('wcap_heading_section_text_email'), 'woocommerce-ac' ),\n 'wcap_atc_text' => __( get_option('wcap_text_section_text'), 'woocommerce-ac' ),\n 'wcap_atc_email_place' => __( get_option('wcap_email_placeholder_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button' => __( get_option('wcap_button_section_input_text'), 'woocommerce-ac' ),\n 'wcap_atc_button_bg_color' => get_option('wcap_button_color_picker'),\n 'wcap_atc_button_text_color'=> get_option('wcap_button_text_color_picker'),\n 'wcap_atc_popup_text_color' => get_option('wcap_popup_text_color_picker'),\n 'wcap_atc_popup_heading_color' => get_option('wcap_popup_heading_color_picker'),\n 'wcap_atc_mandatory_email' => get_option( 'wcap_atc_mandatory_email' ),\n 'wcap_atc_non_mandatory_input_text' => __( get_option('wcap_non_mandatory_text'), 'woocommerce-ac' ),\n 'wcap_ajax_add' => get_option('woocommerce_enable_ajax_add_to_cart'),\n 'wcap_populate_email' => $wcap_populate_email_address,\n 'wcap_ajax_url' => WCAP_ADMIN_URL,\n 'wcap_mandatory_text' => __('Email address is mandatory for adding product to the cart.', 'woocommerce-ac'),\n 'wcap_mandatory_email_text' => __(' Please enter a valid email address.', 'woocommerce-ac'),\n 'wcap_atc_coupon_applied_msg' => __( \"Thank you. Coupon $atc_coupon_code will be auto-applied to your cart.\", 'woocommerce-ac' ),\n ) );\n }\n }\n\n if ( is_cart() && ( 'yes' === get_option( 'woocommerce_cart_redirect_after_add' ) || 'no'===get_option( 'woocommerce_cart_redirect_after_add' ) ) ) {\n wp_enqueue_script( 'jquery' );\n wp_register_script( 'wcap_atc_cart' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_atc_cart_page' . $suffix . '.js' );\n wp_enqueue_script ( 'wcap_atc_cart');\n wp_localize_script( 'wcap_atc_cart', 'wcap_atc_cart_param', array(\n 'wcap_ajax_url' => WCAP_ADMIN_URL\n ) );\n }\n do_action( 'wcap_after_atc_scripts_loaded', $wcap_atc_modal, $wcap_populate_email_address, $atc_coupon_code );\n }\n }\n\n if ( wcap_get_cart_session( 'wcap_email_sent_id' ) == '' && ( 'on' === get_option( 'ac_capture_email_from_forms' ) || '' !== get_option( 'ac_capture_email_address_from_url' ) ) && !is_user_logged_in() ) {\n wp_register_script( 'wcap_mailchimp_capture' , WCAP_PLUGIN_URL . '/assets/js/frontend/wcap_mailchimp_capture' . $suffix . '.js' );\n wp_localize_script( \n 'wcap_mailchimp_capture', \n 'wcap_mailchimp_setting', \n array(\n 'wcap_popup_setting' => get_option('wcap_atc_enable_modal'),\n 'wcap_form_classes' => str_replace( ' ', '', trim( get_option('ac_email_forms_classes') ) ),\n 'wcap_ajax_url' => WCAP_ADMIN_AJAX_URL,\n 'wcap_url_capture' => get_option('ac_capture_email_address_from_url'),\n )\n );\n wp_enqueue_script ( 'wcap_mailchimp_capture' );\n }\n }", "public function hookFooter()\n\t{\n\t\t//Assign template variables\n\t\t$this->context->smarty->assign(\n\t\t\tarray(\n\t\t\t\t'clerk_public_key' => Configuration::get('CLERK_PUBLIC_KEY', ''),\n\t\t\t)\n\t\t);\n\n\t\treturn $this->display(__FILE__, 'visitor_tracking.tpl', $this->getCacheId(BlockCMSModel::FOOTER));\n\t}", "function opinionstage_settings_load_footer(){\n}", "function mixtape_qodef_woocommerce_login_holder_close()\n {\n echo \"</div>\";\n }", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "public function paml_print_style_js() {\n\t\tif( !is_user_logged_in() ) { \n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t\t$( 'a[href=\"#pa_modal_login\"]' )\n\t\t\t\t\t\t.attr( 'href', '#modal-login' )\n\t\t\t\t\t\t.attr( 'data-toggle', 'ml-modal' )\n\t\t\t\t\t;\n\t\t\t\t\t$( 'a[href=\"#pa_modal_register\"]' )\n\t\t\t\t\t\t.attr( 'href', '#modal-register' )\n\t\t\t\t\t\t.attr( 'data-toggle', 'ml-modal' )\n\t\t\t\t\t;\n\t\t\t\t} );\n\t\t\t</script>\n\t\t\t<?php \n\t\t} else { \n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjQuery( document ).ready( function($) {\n\t\t\t\t\t$( 'a[href=\"#pa_modal_login\"]' ).attr( 'href', '<?php echo wp_logout_url() ?>'.replace( '&amp;', '&' ) );\n\t\t\t\t} );\n\t\t\t</script>\n\t\t\t<?php\n\t\t}\n\n\t}", "public function displayContentFooter() {\n ?>\n <footer class=\"container-fluid text-center\">\n <p>IT360 Applied Database Systems Project By Harrison Bleckley, Drake Bodine, and Lani Davis</p>\n </footer>\n <?php\n }", "function cera_grimlock_footer() {\n\t\tdo_action( 'grimlock_prefooter', array(\n\t\t\t'callback' => 'cera_grimlock_prefooter_callback',\n\t\t) );\n\n\t\tdo_action( 'grimlock_footer', array(\n\t\t\t'callback' => 'cera_grimlock_footer_callback',\n\t\t) );\n\t}", "function emc_single_footer_meta() {\r\n\r\n\tif ( ! class_exists( 'Acf', false ) ) return false;\r\n\r\n\t$source = ( get_field( 'source' ) ) ? get_field( 'source' ) : __( 'Not specified', 'emc' );\r\n\t$copyright = ( get_field( 'copyright' ) ) ? get_field( 'copyright' ) : __( '&copy; Erikson Insitute', 'emc' );\r\n\t$content_id = ( get_field( 'id' ) ) ? get_field( 'id' ) : __( 'Not specified', 'emc' );\r\n\r\n\t$html = sprintf( __( 'Source: %1$s &bull; Copyright: %2$s &bull; Content ID: %3$s', 'emc' ),\r\n\t\tesc_html( $source ),\r\n\t\tesc_html( $copyright ),\r\n\t\tesc_html( $content_id )\r\n\t);\r\n\r\n\techo $html;\r\n\r\n}", "function finalizar(){\n\t\t//destruir cookie e sessao\n\t\t$this->f3->set('SESSION.participante','');\n\t\t$this->f3->set('SESSION.mail','');\n\t\t$this->f3->set('COOKIE','');\n\t\t$header = \"Final da Pesquisa\";\n\t\t$texto = \"Muito obrigada por participar da pesquisa! A sua contribuição será muito\n\t\t\t\t\tvaliosa para a continuidade dos estudos sobre os fatores que favorecem a aprendizagem\n\t\t\t\t\tde estudantes universitários brasileiros. Caso queira saber mais sobre a pesquisa, ou entrar em contato conosco, clique nos links no menu acima. Muito sucesso para você!\";\n\t\tif ($this->f3->get(\"POST.naoaceito\")) {\n\t\t\t$header = \"Prezado estudante,\";\n\t\t\t$texto = \"Agradecemos a sua atenção. Esperamos poder contar com a sua participação em outro momento.\";\n\t\t\t$this->f3->set('cordialmente',\"Cordialmente,\");\t\n\t\t}\n\n\t\t$this->f3->set('header',$header);\n\t\t$this->f3->set('texto',$texto);\n\t\t$this->f3->set('assinado',\"Evely Boruchovitch e equipe.\");\n\t\t$this->f3->set('content','agradecimento.html');\n\t\techo \\Template::instance()->render('tela.htm');\n\n\t}", "function page_footer()\n\t\t{\n\t\t\t$output = '\t\t\t</div>'; // <!-- end .ace_options_container -->\n\t\t\t$output .= '\t\t\t<div class=\"ace_footer\">';\n\t\t\t$output .= \t\t\t$this->hidden_data();\n\t\t\t$output .= '\t\t\t<span class=\"ace_loading\"></span>';\n\t\t\t$output .= '\t\t\t\t<ul class=\"ace_footer_links\">';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_reset\">'.$this->reset_button().'</li>';\n\t\t\t$output .= '\t\t\t\t\t<li class=\"ace_footer_save\">'.$this->save_button().'</li>';\n\t\t\t$output .= '\t\t\t\t</ul>';\n\t\t\t$output .= '\t\t\t</div>';\n\t\t\t$output .= '\t\t</div>'; // <!--end ace_options_page_content-->\n\t\t\t$output .= '\t\t<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '\t</div>'; //<!--end ace_options_page_inner-->\n\t\t\t$output .= '</form>'; // <!-- end #ace_options_page -->\n\t\t\t$output .= '<div class=\"ace_bottom_shadow\"></div>';\n\n\t\t\t\n\t\t\treturn $output;\n\t\t}", "public function admin_footer() {\n\t\t\t$link_button_args = array(\n\t\t\t\t'hash'\t=>\t'buy-toolset'\n\t\t\t);\n\t\t\t$link_learn =\t$this->get_affiliate_promotional_link( 'http://wp-types.com/' );\n\t\t\t$link_button =\t$this->get_affiliate_promotional_link( 'http://wp-types.com/', $link_button_args );\n\n ob_start();\n ?>\n\n <div class=\"ddl-dialogs-container\">\n <div id=\"js-buy-toolset-embedded-message-wrap\"></div>\n </div>\n <script type=\"text/html\" id=\"js-buy-toolset-embedded-message\">\n <div class=\"toolset-modal\">\n <h2><?php _e('Want to edit Views, CRED forms and Layouts? Get the full <em>Toolset</em> package!', 'wpcf'); ?></h2>\n\n <div class=\"content\">\n <p class=\"full\"><?php _e('The full <em>Toolset</em> package allows you to develop and customize themes without touching PHP. You will be able to:', 'wpcf'); ?></p>\n\n <div class=\"icons\">\n <ul>\n <li class=\"template\"><?php _e('Create templates', 'wpcf'); ?></li>\n <li class=\"layout\"><?php _e('Design page layouts using drag-and-drop', 'wpcf'); ?></li>\n <li class=\"toolset-search\"><?php _e('Build parametric searches', 'wpcf'); ?></li>\n </ul>\n <ul>\n <li class=\"list\"><?php _e('Display lists of content', 'wpcf'); ?></li>\n <li class=\"form\"><?php _e('Create front-end content editing forms', 'wpcf'); ?></li>\n <li class=\"more\"><?php _e('and more…', 'wpcf'); ?></li>\n </ul>\n </div>\n\n <p class=\"description\"><?php _e('Once you buy the full Toolset, you will be able to edit Views, CRED forms and Layouts in your site, as well as build new ones.', 'wpcf'); ?></p>\n\n <a href=\"<?php echo $link_button; ?>\"\n class=\"button\"><?php _e('<em>Toolset</em> Package Options', 'wpcf'); ?></a>\n <a href=\"<?php echo $link_learn; ?>\"\n class=\"learn\"><?php _e('Learn more about <em>Toolset</em>', 'wpcf'); ?></a>\n\n </div>\n <span class=\"icon-toolset-logo\"></span>\n <span class=\"js-close-promotional-message\"></span>\n </div>\n </script>\n <?php\n echo ob_get_clean();\n }", "public static function displayFooter() {\r\n ?>\r\n <br><br><br>\r\n <div id=\"push\"></div>\r\n </div>\r\n <div id=\"footer\"><br>&copy 2016 Power House. All Rights Reserved.</div>\r\n <script type=\"text/javascript\" src=\"<?= BASE_URL ?>/www/js/ajax_autosuggestion.js\"></script>\r\n </body>\r\n </html>\r\n <?php\r\n }", "public static function footer()\n {\n $version ='<strong style=\"color: green;\">'.EcrHtml::getVersionFromCHANGELOG('com_easycreator').'</strong>';\n ?>\n<div class=\"ecrFooter\">\n<span class=\"img icon-16-easycreator\">EasyCreator</span> <?php echo $version; ?> runs best on\n<a href=\"http://www.mozilla-europe.org/firefox/\" title=\"FireFox\" class=\"external\">\n<span class=\"img icon-16-firefox\">Firefox</span></a>\nand <a href=\"http://opensuse.org\" title=\"openSUSE\" class=\"external\">\n<span class=\"img icon-16-opensuse\">openSUSE</span></a> <br />\nMade and partially Copyright &copy; 2008 - 2012 by <a\nhref=\"https://github.com/elkuku\"\n class=\"external\">El KuKu</a><br />\n<small> <em style=\"color: silver;\"><span class=\"img icon-16-joomla\"></span>\nEasyCreator is not affiliated with or endorsed by the <a\n href=\"http://joomla.org\" class=\"external\">Joomla! Project</a>. It is\nnot supported or warranted by the <a href=\"http://joomla.org\"\n class=\"external\">Joomla! Project</a> or <a\n href=\"http://opensourcematters.org/\" class=\"external\">Open Source\nMatters</a>.<br />\n <a\n href=\"http://www.joomla.org/about-joomla/the-project/conditional-use-logos.html\"\n class=\"external\">The Joomla! logo</a> is used under a limited license\ngranted by <a href=\"http://opensourcematters.org/\" class=\"external\">Open\nSource Matters</a> the trademark holder in the United States and other\ncountries.</em></small>\n</div>\n <?php\n\n if(defined('ECR_DEBUG') && ECR_DEBUG )\n {\n EcrDebugger::printSysVars('get');\n EcrDebugger::printSysVars('post');\n }\n\n echo NL.'<!-- EasyCreator END -->'.NL;\n }", "function footer() {\n\n\techo '<p>Copyright Dynamic Sites LLC 2012</p>';\n\t\n}", "function tp_comm_footer_script() {\r\n\tglobal $tp_comm_comments_form;\r\n\tif ($tp_comm_comments_form != true) return; // nothing to do, not showing comments\r\n\r\n\tif ( is_user_logged_in() ) return; // don't bother with this stuff for logged in users\r\n\r\n\t?>\r\n<script type=\"text/javascript\">\r\n\tjQuery(function() {\r\n\t\tvar ajax_url = '<?php echo admin_url(\"admin-ajax.php\"); ?>';\r\n\t\tvar data = { action: 'tp_comm_get_display' }\r\n\t\tjQuery.post(ajax_url, data, function(response) {\r\n\t\t\tif (response != '0' && response != 0) {\r\n\t\t\t\tjQuery('#alt-comment-login').hide();\r\n\t\t\t\tjQuery('#comment-user-details').hide().after(response);\r\n\r\n\t\t\t\t<?php\r\n\t\t\t\t$options = tp_options();\r\n\t\t\t\tif (!empty($options['comment_text'])) { // dont do this if disabled\r\n\t\t\t\t?>\r\n\t\t\t\tjQuery('#tp_comm_send').html('<input style=\"width: auto;\" type=\"checkbox\" name=\"tp_comm_send\" value=\"send\"/><label for=\"tp_comm_send\"><?php _e('Send Comment to Twitter', 'tp'); ?></label>');\r\n\r\n\t\t\t\t<?php } ?>\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n</script>\r\n\t<?php\r\n}", "public function postModal();", "function fechaJanela($sMensagem = \"\") {\n\n if ($sMensagem != \"\") {\n db_msgbox($sMensagem);\n }\n \n echo \"<script>\";\n echo \" parent.db_iframe_processa.hide();\";\n echo \"</script>\";\n exit;\n\n\n}", "function showModal($args)\n{\n global $res;\n\n $modalHeader = $closeButton = null;\n if (!is_array($args))\n exit('Parametro inválido');\n\n if (is_array($args) && count($args)==1 && !isset($args['content']))\n $args['content'] = $args[0];\n\n if (!isset($args['button']['param']))\n $args['button']['param'] = null;\n if (!isset($args['button']['link']))\n $args['button']['link'] = null;\n if (!isset($args['button']['value']))\n $args['button']['value'] = null;\n if (!isset($args['button']['class']))\n $args['button']['class'] = null;\n\n $closeButton = 'Fechar';\n //$closeButton = !empty($args['button']['value']) ? 'Cancelar' : 'Fechar';\n\n\n if (isset($args['title']))\n $modalHeader = \"<div class='modal-header'> <a class='close' data-dismiss='modal'>×</a> <h3>{$args['title']}</h3> </div>\";\n else\n $modalHeader = \"<div class='modal-header'> <a class='close' data-dismiss='modal'>×</a> </div>\";\n\n\n $js = null;\n $js .= \"\\n\\t\\tvar template = \\\"<div class='fixedVersion'><div class='modal fade hide' id='msg-modal'>\\\";\n template += \\\"{$modalHeader}\\\";\n template += \\\"<div class='modal-body'>\\\";\n template += \\\"<p>{$args['content']}</p>\\\";\n template += \\\"</div>\\\";\n template += \\\"<div class='modal-footer'>\\\";\";\n\n if (!isset($args['button']['close']) || $args['button']['close']==true)\n $js .= \"\\n\\t\\ttemplate += \\\" <a href='javascript:void(0);' class='btn' data-dismiss='modal'>{$closeButton}</a>\\\";\";\n\n if (!empty($args['button']['value']))\n $js .= \"\\n\\t\\ttemplate += \\\"<a href='{$args['button']['link']}' id='{$args['button']['param']}' class='btn-rm btn {$args['button']['class']} btn-primary'>{$args['button']['value']}</a>\\\";\";\n\n $js .= \"\\n\\n\\t\\ttemplate += \\\"</div></div></div>\\\";\";\n // $js .= \"\\n\\t\\tif ($('#html-msg'))\";\n // $js .= \"\\n\\t\\t\\t$('#html-msg').html(template);\";\n // $js .= \"\\n\\t\\telse\";\n $js .= \"\\n\\t\\t\\t$(template).appendTo('body');\";\n $js .= \"\\n\\t\\tif ($('#lightbox')) $('#lightbox').hide();\";\n $js .= \"\\n\\t\\tif ($('.hide')) $('.hide').hide();\";\n $js .= \"\\n\\t\\t$('.fixedVersion .modal').modal().on('shown', function(){ $('.modal-backdrop').insertAfter($(this)); } );\\n\\n\";\n return $js;\n\n}", "function d4tw_filter_admin_footer () {\r\n echo '<span id=\"dashFooter\">Website developed by <a style = \"color: #ff0000; text-decoration: none;\" href=\"http://www.knockmedia.com\" target=\"_blank\">KnockMedia</a></span>';\r\n}", "function extamus_change_admin_footer(){\n\t echo '<span id=\"footer-note\">Please dont hesitate to reach out to your friends at <a href=\"http://www.extamus.com/\" target=\"_blank\">Extamus Media</a> with any questions.</span>';\n\t}", "function modalC($cabeza,$cuerpo,$abajo){\n\t echo '<div class=\"modal-dialog modal-md\">\n\t <!-- Modal content-->\n\t <div class=\"modal-content\">\n\t <div class=\"modal-header\">\n\t '.$cabeza.'\n\t </div>\n\t <div class=\"modal-body\" align=center>\n\t '.$cuerpo.'\n\t </div>\n\t <div class=\"modal-footer\">\n\t '.$abajo.'\n\t </div>\n\t </div>\n\t </div>';\n\t}", "function cosmetics_footer_scripts() {\n global $cosmetics_options;\n $cosmetics_footer_scripts = $cosmetics_options['cosmetics_footer_scripts_editor'];\n\n if ( !empty( $cosmetics_footer_scripts ) ) :\n echo $cosmetics_footer_scripts;\n endif;\n}", "function display( array $atts, $content = '' ) {\n\n\t\tob_start();\n\n\t\tpublisher_set_prop( 'shortcode-bs-social-share-atts', $atts );\n\t\tpublisher_get_view( 'shortcodes', 'bs-social-share' );\n\t\tpublisher_clear_props();\n\n\t\treturn ob_get_clean();\n\n\t}", "function um_messaging_open_modal(){\r\n\r\n\tif ( ! empty( $_COOKIE['UMTestCookie'] ) && ! empty( $_POST ) ) {\r\n\t\t$data = json_decode( wp_unslash( $_COOKIE['UMTestCookie'] ), true ); ?>\r\n\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\tsetTimeout( function(){\r\n\t\t\t\t<?php $message_to = $data['message_to']; ?>\r\n\t\t\t\tjQuery('.um-message-btn[data-message_to=\"<?php echo $message_to; ?>\"]')[0].click();\r\n\t\t\t},1000) ;\r\n\t\t</script>\r\n\r\n\t<?php }\r\n\r\n\tif ( ! is_user_logged_in() ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( ! isset( $_SESSION[\"um_messaging_message_to\"] ) ) {\r\n\t\treturn;\r\n\t} ?>\r\n\r\n\t<script type=\"text/javascript\">\r\n\t\tjQuery('document').ready( function(){\r\n\t\t\t<?php $message_to = $_SESSION[\"um_messaging_message_to\"]; ?>\r\n\t\t\tsetTimeout( function(){\r\n\t\t\t\tjQuery('.um-message-btn[data-message_to=\"<?php echo $message_to; ?>\"]')[0].click();\r\n\t\t\t},1000) ;\r\n\r\n\t\t});\r\n\t</script>\r\n\r\n\t<?php unset( $_SESSION[\"um_messaging_message_to\"] );\r\n}", "function hybrid_footer_insert() {\n\t$footer_insert = hybrid_get_setting( 'footer_insert' );\n\n\tif ( !empty( $footer_insert ) )\n\t\techo '<div class=\"footer-content footer-insert\">' . do_shortcode( $footer_insert ) . '</div>';\n}", "public static function customFooter()\n\t{\n\t\treturn '';\n\t\treturn 'Default custom server message / google analytics code.';\n\t}", "function writeScript()\r\n\t{\r\n\t\tglobal $user;\r\n\t\tif(!$user) return;\r\n\t\tob_start();\r\n?>\r\n<div class=\"dialog\" id=\"subscribePopup\" style=\"width: 320px\">\r\n <div class=\"dialog_header\" id=\"subscribePopupHeader\">\r\n <div style=\"padding: 4px;\">\r\n <div style=\"float: right\">&nbsp;<a id='closeSubscribePopup'\">Close &times;</a></div>\r\n <span\"style=\"font-weight: bold\"><?php echo $this->popupTitle ?></span>\r\n </div>\t\r\n </div>\r\n <div class=\"dialog_body\">\r\n<?\r\n\t$this->drawView();\r\n ?>\r\n <br><button class='button' style='float: right; margin-bottom: 4px' onclick='updateSubscription()'>Update Subscription</button>\r\n </div>\r\n</div>\r\n<?php \r\n\r\n\t\t$script .= ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\t\r\n\t\tob_start();\r\n?>\r\n<script type='text/javascript'>\r\n\r\nvar subscribePopupDialog;\r\n\r\nfunction subscribePopup(id, source, topOffset)\r\n{\r\n\tvar popup = $('subscribePopup');\r\n\t\r\n\tif (!subscribePopupDialog)\r\n\t{\r\n\t\tsubscribePopupDialog = new FloatingDialog('subscribePopup', {'closeLink': $('closeSubscribePopup'), 'position': 'absolute'});\r\n\t}\r\n\r\n\tsubscribePopupDialog.targetID = id;\r\n\tsubscribePopupDialog.top = source.getCoordinates().top - topOffset;\r\n\tsubscribePopupDialog.left = source.getCoordinates().left - 204;\r\n\tsubscribePopupDialog.show();\r\n}\r\n\r\n\r\nfunction updateSubscription()\r\n{\r\n\tvar id = subscribePopupDialog.targetID;\r\n\tvar popup = $('subscribePopup');\r\n\r\n\tvar subscription_type;\r\n\tvar forum_subscription_id;\r\n\r\n\t/* Only used for topic subscription; 0 for forum subscription */\r\n\tvar topic_id = popup.getElementById(\"topic_id\").value;\r\n\r\n\tforum_subscription_id = popup.getElementById(\"forum_subscription_id\").value;\r\n\t\r\n\tpopup.getElements(\"input[type='radio']\").each(function(e) \r\n\t\t\t{ if (e.checked) \r\n\t\t\t\tsubscription_type = e.value;\r\n\t\t\t}\r\n\t\t);\r\n\r\n\r\n\tvar request = new Request({\r\n\t\turl: \"/action/forum/update_subscription?forum_id=\" + id + \"&subscription_type=\" + subscription_type + \"&topic_id=\" + topic_id + \"&forum_subscription_id=\" + forum_subscription_id,\r\n\t\tmethod: 'get',\r\n\t\tonSuccess: function (response) \r\n\t\t{\r\n\t\t\tif (response == 1)\r\n\t\t\t{\r\n\t\t\t\twindow.location.reload();\r\n\t\t\t}\r\n\t\t},\r\n\t\tonFailure: function () {},\r\n\t\tasync: true\r\n\t});\r\nrequest.send();\r\n}\r\n</script>\r\n<?\r\n\t\t$script .= ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\treturn $script;\r\n\t}", "protected function setFooter() {\n $footer = \"<div class='footer'>\n <center>\n <a href='https://www.linkedin.com/in/ali-mohtasham-a75a2886' >Designed by <strong> Ali Mohtasham Gilani </strong> All rights reserved.</a>\n </center>\n </div>\n \";\n return $footer;\n }", "function training_modal_callback() {\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n $output = ctools_modal_text_button('Click me to show modal', 'training/ctools/modal/nojs/form', 'Click', 'ctools-modal-some-class');\n $settings = array(\n 'some-class' => array(\n 'modalSize' => array(\n 'type' => 'fixed',\n 'width' => 500,\n 'height' => 300,\n ),\n 'animation' => 'fadeIn',\n ),\n );\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n array(\n '#attached' => array(\n 'js' => array(\n drupal_get_path('module', 'training') . '/js/training.js',\n array(\n 'data' => $settings,\n 'type' => 'setting',\n ),\n ),\n ),\n ),\n );\n}", "function encrypted_footer_script() {\n\t$script = <<<SCRIPT\n\t(function($){\n\t\twindow.ENCRYPTED_UPLOADS_ACTIVATED = false;\n\t\twp.Uploader.prototype.init = _.wrap( wp.Uploader.prototype.init, function( fn ){\n\t\t\tfn.call( this );\n\t\t\tthis.uploader.bind('BeforeUpload', function(up, file){\n\t\t\t\tup.setOption(\n\t\t\t\t\t'multipart_params',\n\t\t\t\t\t$.extend( \n\t\t\t\t\t\tup.getOption( 'multipart_params' ),\n\t\t\t\t\t\t{ encrypted: window.ENCRYPTED_UPLOADS_ACTIVATED }\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t// Reset the global var so it reflects the checkbox status ( which is diff according to current screen )\n\t\t\t\twindow.ENCRYPTED_UPLOADS_ACTIVATED = $( '#upload_encrypted' ).is( ':checked' );\n\t\t\t} );\n\t\t} );\n\t\t\n\t\t$(document).on( 'click', '#upload_encrypted', function(){\n\t\t\twindow.ENCRYPTED_UPLOADS_ACTIVATED = $(this).is( ':checked' );\n\t\t});\n\t})(jQuery);\nSCRIPT;\n\twp_add_inline_script( 'media-views', $script );\n}", "function showHTMLFooter() {\r\n echo '<form style=\"background-color:#E6E6FA\">';\r\n\techo '<hr/>';\t\r\n\techo '<p><center><strong>Aplikacija BANKOMATI v1.3</strong></center></p>';\r\n\techo '<hr/>';\r\n\techo '</form>';\r\n\t?>\r\n\t\r\n\t<input type=\"button\" onclick=\"window.location='/bankomati_RTM1/auth/logout.php'\" class=\"logout\" value=\"Logout\"/>\r\n\t\r\n\t<?php\r\n\techo '</body>'; // završava BODY dio HTML stranice otvoren u zaglavlju\r\n\techo '</html>'; // završava ispravan HTML blok koda otvoren u zaglavlju\r\n}", "function aldolat_cookie_consent() {\n $output = \"\\n\" . '<!--Start Cookie Script-->\n <script type=\"text/javascript\" charset=\"UTF-8\" src=\"http://chs02.cookie-script.com/s/403a65b8e7139b91b2d4d0877eb5eef7.js\"></script>\n <!--End Cookie Script-->' . \"\\n\\n\";\n echo $output;\n}", "function tr_custom_admin_footer() {\n\t_e('<span id=\"footer-thankyou\">Developed by <a href=\"http://third-law.com\" target=\"_blank\">Kenny Scott (Third Law Web Design)</a></span>. Built using Tabula Rasa.', 'tabula_rasa');\n}", "public function bl_insert_cookiefy() {\r\n\t\t\t// Only load if you want the cookie popup\r\n\t\t\tif ( $this->value( 'eu_cookie_popup' ) == 'checked' ) { \r\n\t\t\t\t$siteurl = get_option('siteurl');\r\n\t\t\t\t$url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__));\r\n\t\t\t\twp_enqueue_style( 'bl-eu-cookie-style', $url . '/jquery-eu-cookie-law-popup.css' );\r\n\t\t\t\twp_enqueue_script( 'bl-eu-cookie-law-script', $url . '/jquery-eu-cookie-law-popup.js', array('jquery'), \"1.0\", false );\r\n\t\t\t}\r\n\t\t}", "function social_share(){\n\t?>\n\t<style type=\"text/css\">\n\t\tp.share-info{\n\t\t\tmargin-bottom: 0;\n\t\t}\n\t\t.share-buttons .has-tip{\n\t\t\tborder: none;\n\t\t}\n\t\t.share-buttons a{\n\t\t\tborder: none;\n\t\t\twidth: 33px;\n\t\t\theight: 33px;\n\t\t}\n\t\t.share-buttons a.button{\n\t\t\tpadding: 0;\n\t\t\tmargin-right: 3px;\n\t\t}\n\t\t.share-buttons a.button.facebook{\n\t\t\tbackground: rgb(59, 89, 152);\n\t\t}\n\t\t.share-buttons a.button.twitter{\n\t\t\tbackground: rgb(29, 161, 242);\n\t\t}\n\t\t.share-buttons a.button.linkedin{\n\t\t\tbackground: rgb(0, 119, 181);\n\t\t}\n\t\t.share-buttons a.button.google-plus{\n\t\t\tbackground: rgb(220, 78, 65);\n\t\t}\n\t\t.share-buttons a i{\n\t\t\tfont-size: 1.4rem;\n\t\t\tline-height: 2.4rem;\n\t\t}\n\t</style>\n\t<p class=\"share-info\"><small>Compartilhe:</small></p>\n\t<div class=\"button-group share-buttons\">\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Facebook\">\n\t\t\t<a class=\"button facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-facebook\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Twitter\">\n\t\t\t<a class=\"button twitter\" href=\"https://twitter.com/home?status=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-twitter\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"LinkedIn\">\n\t\t\t<a class=\"button linkedin\" href=\"https://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title( ); ?>&summary=&source=<?php bloginfo( 'url' ); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-linkedin\"></i></a>\n\t\t</span>\n\t\t<span data-tooltip aria-haspopup=\"true\" class=\"has-tip top\" data-disable-hover=\"false\" tabindex=\"1\" title=\"Google plus\">\n\t\t\t<a class=\"button google-plus\" href=\"https://plus.google.com/share?url=<?php the_permalink(); ?>\" onclick=\"window.open(this.href, 'Compartilhar notícia', 'width=490,height=530');return false;\"><i class=\"fa fa-google-plus\"></i></a>\n\t\t</span>\t\t\t\t\t\t\t\n\t</div>\n\t<?php\n}", "function displayFooter()\n\t{\n\t\t// footer (not really)\n\t\tif ($this->cmd != \"logout\")\n\t\t{\n\t\t\tif ($this->setup->ini_ilias_exists and $this->display_mode == \"setup\" and $this->setup->getClient()->getId() != \"\")\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"client_id\").\": \".$this->setup->getClient()->getId().\")\");\n\t\t\t}\n\t\t\telseif ($this->setup->isAdmin())\n\t\t\t{\n\t\t\t\t$this->tpl->setVariable(\"TXT_ACCESS_MODE\",\"(\".$this->lng->txt(\"root_access\").\")\");\n\t\t\t}\n\n\t\t\t$this->displayNavButtons();\n\t\t}\n\n\t\t$this->tpl->show();\n\t}", "function cosmetro_footer_copyright() {\n\t$copyright = get_theme_mod( 'footer_copyright', cosmetro_theme()->customizer->get_default( 'footer_copyright' ) );\n\t$format = '<div class=\"footer-copyright\">%s</div>';\n\n\tif ( empty( $copyright ) ) {\n\t\treturn;\n\t}\n\n\tprintf( $format, wp_kses( cosmetro_render_macros( $copyright ), wp_kses_allowed_html( 'post' ) ) );\n}", "public function confirmPageTemplate( $data ) {\n\t\t\t?>\n <div id=\"WBCR\" class=\"wrap\">\n <div class=\"wbcr-factory-pages-000-impressive-page-template factory-bootstrap-000 factory-fontawesome-000\">\n <div id=\"wbcr-factory-confirm-dialog\">\n <h2><?php echo $data['title'] ?></h2>\n <p class=\"wbcr-factory-confirm-description\"><?php echo $data['description'] ?></p>\n\t\t\t\t\t\t<?php if ( isset( $data['hint'] ) ): ?>\n <p class=\"wbcr-factory-confirm-hint\"><?php echo $data['hint'] ?></p>\n\t\t\t\t\t\t<?php endif; ?>\n <div class='wbcr-factory-confirm-actions'>\n\t\t\t\t\t\t\t<?php foreach ( $data['actions'] as $action ) { ?>\n <a href='<?php echo $action['url'] ?>' class='<?php echo $action['class'] ?>'>\n\t\t\t\t\t\t\t\t\t<?php echo $action['title'] ?>\n </a>\n\t\t\t\t\t\t\t<?php } ?>\n </div>\n </div>\n </div>\n </div>\n\t\t\t<?php\n\t\t}", "function content() {\n echo \"<div class='container'>{$this->params['body']}\n <p style='background-color: #95a5a6; padding: 10px; text-align: center; margin-top: 10px; border-top-left-radius: 2px; border-top-right-radius: 2px;'><a href='http://{$_SERVER['SERVER_NAME']}/mailmaid/subscriber/unsubscribe/{$this->params['email']}/{$this->params['emailId']}' style='font-family: Arial; color: #333;'>Click here to unsubscribe from our updates</a></p>\n </div>\";\n }", "public function openModal()\n {\n $this->confirmationArchived = true;\n }", "protected function _getContainerSnippet() {\n $containerId = Mage::helper('googletagmanager')->getContainerId();\n return \"<noscript><iframe src=\\\"//www.googletagmanager.com/ns.html?id=\" . $containerId . \"\\\"\nheight=\\\"0\\\" width=\\\"0\\\" style=\\\"display:none;visibility:hidden\\\"></iframe></noscript>\n<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\nnew Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\nj=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);\n})(window,document,'script','dataLayer','\" . $containerId . \"');</script>\\n\";\n }", "public function setContent(){\n\n\t\t$jContent='';\n\t\t$jContent.=$this->brand();\n\t\t$jContent.=$this->navigation->jTabs();\n\t\treturn $this->jQuery_DocReady().$this->vendor->setJS_Group('footer');\n\t\t\n\t}", "public function modalContent() {\n\n $postID = $this->postID;\n $field = $this->field;\n\n $heading = $field . '_title';\n $content = $field . '_content';\n\n $modal = [];\n\n $modal['heading'] = get_field( $heading, $postID );\n $modal['content'] = get_field( $content, $postID );\n $modal['ID'] = 'modal-' . $postID;\n $modal['cta'] = $this->ctaButton;\n\n return $modal;\n\n }", "function c7s_reveal_modal( $post_id, $echo = true ) {\n\tglobal $media_embed_mb;\n\t$media_embed_mb->the_meta(); \n\t$media_source = $media_embed_mb->get_the_value( 'media_source' );\n\t$media_embed_code = $media_embed_mb->get_the_value( 'media_embed_code' );\n\t\n\t// If media embed source or code is available, set to true\n\t$media_embed = ( $media_source || $media_embed_code ) ? true : false;\n\t\n\tif ( ! $media_embed ) :\n\t\treturn;\n\t\n\telse :\n\t\t// Get theme options\n\t\t$instant_default_width = c7s_get_option( 'instant_default_width', 640 );\n\t\t$instant_default_height = c7s_get_option( 'instant_default_height', 640 );\n\t\t\n\t\t$instant = '<div class=\"instant\"><div id=\"video-' . absint( $post_id ) . '\" class=\"instant-view\">';\n\t\t$instant .= apply_filters( 'get_media', absint( $post_id ), absint( $instant_default_width ), absint( $instant_default_height ), false );\n\t\t$instant .= '</div></div>';\n\t\t\t\t\n\t\tif ( $echo ) :\n\t\t echo $instant;\n\t\telse :\n\t\t return $instant;\n\t\tendif;\n\t\t\n\tendif; // end $media_embed check\n}", "function mantis_publisher_footer()\n{\n\t$site = get_option('mantis_site_id');\n\n\tif (!$site) {\n\t\treturn;\n\t}\n\n\trequire(dirname(__FILE__) . '/html/publisher/config.php');\n\n\trequire(dirname(__FILE__) . '/html/publisher/styling.php');\n\n\tif (get_option('mantis_async')) {\n\t\trequire(dirname(__FILE__) . '/html/publisher/async.html');\n\t} else {\n\t\trequire(dirname(__FILE__) . '/html/publisher/sync.html');\n\t}\n}", "function social_sharing_buttons() {\n $siteURL = site_url();\n $pageURL = wp_get_shortlink();\n\n // Get current page title\n $pageTitle = str_replace( ' ', '%20', get_the_title());\n\n // Construct sharing URL without using any script\n $twitterURL = 'https://twitter.com/intent/tweet?text='.$pageTitle.'&amp;url='.$pageURL.'&amp;via=YOUR_TWITTER_USERNAME';\n $facebookURL = 'https://facebook.com/sharer/sharer.php?u='.$pageURL;\n $googleURL = 'https://plus.google.com/share?url='.$pageURL;\n $linkedinURL = 'https://www.linkedin.com/shareArticle?mini=true&url='.$pageURL.'&title='.$pageTitle.'&source='.$siteURL;\n $telegramURL = 'https://telegram.me/share/url?url='.$pageURL.'&text='.$pageTitle;\n\n // Add sharing button at the end of page/page content\n $content = '<div class=\"share-modal share-modal--close\" >\n <div class=\"share-body\">\n <a class=\"share-modal__close\" href=\"#\" id=\"closeModalButton\">\n <i class=\"fa fa-close icon\" aria-hidden=\"true\"></i>\n </a>\n <p class=\"share-modal__title\">\n <span>انتشار مطلب</span>\n <i class=\"fa fa-share icon\" aria-hidden=\"true\"></i>\n </p>\n <p class=\"share-modal__post-title\">'.urldecode($pageTitle).'</p>\n\n <div class=\"share-buttons-container\">\n <a class=\"twitter\" href=\"'.$twitterURL .'\" target=\"_blank\"><i class=\"fa fa-twitter icon\" aria-hidden=\"true\"></i></a>\n <a class=\"facebook\" href=\"'.$facebookURL.'\" target=\"_blank\"><i class=\"fa fa-facebook icon\" aria-hidden=\"true\"></i></a>\n <a class=\"google-plus\" href=\"'.$googleURL.'\" target=\"_blank\"><i class=\"fa fa-google-plus icon\" aria-hidden=\"true\"></i></a>\n <a class=\"linkedin\" href=\"'.$linkedinURL.'\" target=\"_blank\"><i class=\"fa fa-linkedin icon\" aria-hidden=\"true\"></i></a>\n <a class=\"telegram\" href=\"'.$telegramURL.'\" target=\"_blank\"><i class=\"fa fa-paper-plane icon\" aria-hidden=\"true\"></i></a>\n </div>\n\n <p class=\"share-modal__post-title share-modal__post-title--small\">آدرس کوتاه شده این مطلب</p>\n <input type=\"text\" readonly=\"\" class=\"share-modal__link-box\" value=\"'.$pageURL.'\" onClick=\"this.select();\">\n </div>\n</div>';\n\n return $content;\n}", "public function showComponent($atts)\r\n\t{\r\n\t\t\r\n\t\t$this->prepareData();\r\n\r\n\t\t// Default values\r\n\t\t$atts = shortcode_atts(array('show' => 'facebook, twitter, linkedin, email, whatsapp, viber'), $atts);\r\n\t\twp_enqueue_style('social-shares');\r\n\t\twp_enqueue_script('social-shares');\r\n\t\tob_start();\r\n\t?>\r\n\r\n<div class=\"ss\">\r\n\r\n\t<?php if (strpos($atts['show'], 'facebook') !== false) : ?>\r\n\t<a class=\"ss__facebook\" href=\"http://www.facebook.com/share.php?u=<?php echo $this->shared_url; ?>\" title=\"Facebook\" target=\"_BLANK\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\">\r\n\t\t\t<path d=\"M12 2.04C6.5 2.04 2 6.53 2 12.06C2 17.06 5.66 21.21 10.44 21.96V14.96H7.9V12.06H10.44V9.85C10.44 7.34 11.93 5.96 14.22 5.96C15.31 5.96 16.45 6.15 16.45 6.15V8.62H15.19C13.95 8.62 13.56 9.39 13.56 10.18V12.06H16.34L15.89 14.96H13.56V21.96A10 10 0 0 0 22 12.06C22 6.53 17.5 2.04 12 2.04Z\" />\r\n\t\t</svg>\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n\t<?php if (strpos($atts['show'], 'twitter') !== false) : ?>\r\n\t<a class=\"ss__twitter\" data-size=\"large\" href=\"https://twitter.com/intent/tweet?text=<?php echo $this->tweet; ?>\" title=\"Twitter\" target=\"_BLANK\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\">\r\n\t\t\t<path d=\"M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 3,4.79C2.63,5.42 2.42,6.16 2.42,6.94C2.42,8.43 3.17,9.75 4.33,10.5C3.62,10.5 2.96,10.3 2.38,10C2.38,10 2.38,10 2.38,10.03C2.38,12.11 3.86,13.85 5.82,14.24C5.46,14.34 5.08,14.39 4.69,14.39C4.42,14.39 4.15,14.36 3.89,14.31C4.43,16 6,17.26 7.89,17.29C6.43,18.45 4.58,19.13 2.56,19.13C2.22,19.13 1.88,19.11 1.54,19.07C3.44,20.29 5.7,21 8.12,21C16,21 20.33,14.46 20.33,8.79C20.33,8.6 20.33,8.42 20.32,8.23C21.16,7.63 21.88,6.87 22.46,6Z\" />\r\n\t\t</svg>\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n\t<?php if (strpos($atts['show'], 'linkedin') !== false) : ?>\r\n\t<a class=\"ss__linkedin\" href=\"https://www.linkedin.com/shareArticle?mini=true&url=&title=<?php echo $this->title; ?>&summary=&source=<?php echo $this->shared_url; ?>\" title=\"LinkedIn\" target=\"_BLANK\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\">\r\n\t\t\t<path d=\"M21,21H17V14.25C17,13.19 15.81,12.31 14.75,12.31C13.69,12.31 13,13.19 13,14.25V21H9V9H13V11C13.66,9.93 15.36,9.24 16.5,9.24C19,9.24 21,11.28 21,13.75V21M7,21H3V9H7V21M5,3A2,2 0 0,1 7,5A2,2 0 0,1 5,7A2,2 0 0,1 3,5A2,2 0 0,1 5,3Z\" />\r\n\t\t</svg>\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n\t<?php if (strpos($atts['show'], 'email') !== false) : ?>\r\n\t<a class=\"ss__email\" href=\"mailto:?subject=<?php echo $this->title; ?>&body=<?php echo $this->shared_url; ?>\" title=\"E-mail\" target=\"_BLANK\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\">\r\n\t\t\t<path d=\"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z\" />\r\n\t\t</svg>\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n\t<?php if (strpos($atts['show'], 'whatsapp') !== false) : ?>\r\n\t<a class=\"ss__whatsapp ss__mobile\" href=\"whatsapp://send?text=<?php echo $this->title; ?>\" title=\"WhatsApp\" target=\"_BLANK\" data-action=\"share/whatsapp/share\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 24 24\">\r\n\t\t\t<path d=\"M16.75,13.96C17,14.09 17.16,14.16 17.21,14.26C17.27,14.37 17.25,14.87 17,15.44C16.8,16 15.76,16.54 15.3,16.56C14.84,16.58 14.83,16.92 12.34,15.83C9.85,14.74 8.35,12.08 8.23,11.91C8.11,11.74 7.27,10.53 7.31,9.3C7.36,8.08 8,7.5 8.26,7.26C8.5,7 8.77,6.97 8.94,7H9.41C9.56,7 9.77,6.94 9.96,7.45L10.65,9.32C10.71,9.45 10.75,9.6 10.66,9.76L10.39,10.17L10,10.59C9.88,10.71 9.74,10.84 9.88,11.09C10,11.35 10.5,12.18 11.2,12.87C12.11,13.75 12.91,14.04 13.15,14.17C13.39,14.31 13.54,14.29 13.69,14.13L14.5,13.19C14.69,12.94 14.85,13 15.08,13.08L16.75,13.96M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C10.03,22 8.2,21.43 6.65,20.45L2,22L3.55,17.35C2.57,15.8 2,13.97 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.72 4.54,15.31 5.46,16.61L4.5,19.5L7.39,18.54C8.69,19.46 10.28,20 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z\" />\r\n\t\t</svg>\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n\t<?php if (strpos($atts['show'], 'viber') !== false) : ?>\r\n\t<a class=\"ss__viber ss__mobile\" href=\"viber://forward?text=<?php echo $this->title; ?> <?php $this->shared_url; ?>\" title=\"Viber\" target=\"_BLANK\">\r\n\t\t<svg width=\"30\" height=\"30\" viewBox=\"0 0 455.731 455.731\">\r\n\t\t\t<path d=\"M371.996,146.901l-0.09-0.36c-7.28-29.43-40.1-61.01-70.24-67.58l-0.34-0.07\r\n\t\t\tc-48.75-9.3-98.18-9.3-146.92,0l-0.35,0.07c-30.13,6.57-62.95,38.15-70.24,67.58l-0.08,0.36c-9,41.1-9,82.78,0,123.88l0.08,0.36\r\n\t\t\tc6.979,28.174,37.355,58.303,66.37,66.589v32.852c0,11.89,14.49,17.73,22.73,9.15l33.285-34.599\r\n\t\t\tc7.219,0.404,14.442,0.629,21.665,0.629c24.54,0,49.09-2.32,73.46-6.97l0.34-0.07c30.14-6.57,62.96-38.15,70.24-67.58l0.09-0.36\r\n\t\t\tC380.996,229.681,380.996,188.001,371.996,146.901z M345.656,264.821c-4.86,19.2-29.78,43.07-49.58,47.48\r\n\t\t\tc-25.921,4.929-52.047,7.036-78.147,6.313c-0.519-0.014-1.018,0.187-1.38,0.559c-3.704,3.802-24.303,24.948-24.303,24.948\r\n\t\t\tl-25.85,26.53c-1.89,1.97-5.21,0.63-5.21-2.09v-54.422c0-0.899-0.642-1.663-1.525-1.836c-0.005-0.001-0.01-0.002-0.015-0.003\r\n\t\t\tc-19.8-4.41-44.71-28.28-49.58-47.48c-8.1-37.15-8.1-74.81,0-111.96c4.87-19.2,29.78-43.07,49.58-47.48\r\n\t\t\tc45.27-8.61,91.17-8.61,136.43,0c19.81,4.41,44.72,28.28,49.58,47.48C353.765,190.011,353.765,227.671,345.656,264.821z\" />\r\n\t\t\t<path d=\"M270.937,289.942c-3.044-0.924-5.945-1.545-8.639-2.663\r\n\t\t\tc-27.916-11.582-53.608-26.524-73.959-49.429c-11.573-13.025-20.631-27.73-28.288-43.292c-3.631-7.38-6.691-15.049-9.81-22.668\r\n\t\t\tc-2.844-6.948,1.345-14.126,5.756-19.361c4.139-4.913,9.465-8.673,15.233-11.444c4.502-2.163,8.943-0.916,12.231,2.9\r\n\t\t\tc7.108,8.25,13.637,16.922,18.924,26.485c3.251,5.882,2.359,13.072-3.533,17.075c-1.432,0.973-2.737,2.115-4.071,3.214\r\n\t\t\tc-1.17,0.963-2.271,1.936-3.073,3.24c-1.466,2.386-1.536,5.2-0.592,7.794c7.266,19.968,19.513,35.495,39.611,43.858\r\n\t\t\tc3.216,1.338,6.446,2.896,10.151,2.464c6.205-0.725,8.214-7.531,12.562-11.087c4.25-3.475,9.681-3.521,14.259-0.624\r\n\t\t\tc4.579,2.898,9.018,6.009,13.43,9.153c4.331,3.086,8.643,6.105,12.638,9.623c3.841,3.383,5.164,7.821,3.001,12.412\r\n\t\t\tc-3.96,8.408-9.722,15.403-18.034,19.868C276.387,288.719,273.584,289.127,270.937,289.942\r\n\t\t\tC267.893,289.017,273.584,289.127,270.937,289.942z\" />\r\n\t\t\t<path d=\"M227.942,131.471c36.515,1.023,66.506,25.256,72.933,61.356c1.095,6.151,1.485,12.44,1.972,18.683\r\n\t\t\tc0.205,2.626-1.282,5.121-4.116,5.155c-2.927,0.035-4.244-2.414-4.434-5.039c-0.376-5.196-0.637-10.415-1.353-15.568\r\n\t\t\tc-3.78-27.201-25.47-49.705-52.545-54.534c-4.074-0.727-8.244-0.918-12.371-1.351c-2.609-0.274-6.026-0.432-6.604-3.675\r\n\t\t\tc-0.485-2.719,1.81-4.884,4.399-5.023C226.527,131.436,227.235,131.468,227.942,131.471\r\n\t\t\tC264.457,132.494,227.235,131.468,227.942,131.471z\" />\r\n\t\t\t<path d=\"M283.434,203.407c-0.06,0.456-0.092,1.528-0.359,2.538c-0.969,3.666-6.527,4.125-7.807,0.425\r\n\t\t\tc-0.379-1.098-0.436-2.347-0.438-3.529c-0.013-7.734-1.694-15.46-5.594-22.189c-4.009-6.916-10.134-12.73-17.318-16.248\r\n\t\t\tc-4.344-2.127-9.042-3.449-13.803-4.237c-2.081-0.344-4.184-0.553-6.275-0.844c-2.534-0.352-3.887-1.967-3.767-4.464\r\n\t\t\tc0.112-2.34,1.822-4.023,4.372-3.879c8.38,0.476,16.474,2.287,23.924,6.232c15.15,8.023,23.804,20.687,26.33,37.597\r\n\t\t\tc0.114,0.766,0.298,1.525,0.356,2.294C283.198,199.002,283.288,200.903,283.434,203.407\r\n\t\t\tC283.374,203.863,283.288,200.903,283.434,203.407z\" />\r\n\t\t\t<path d=\"M260.722,202.523c-3.055,0.055-4.69-1.636-5.005-4.437c-0.219-1.953-0.392-3.932-0.858-5.832\r\n\t\t\tc-0.918-3.742-2.907-7.21-6.055-9.503c-1.486-1.083-3.17-1.872-4.934-2.381c-2.241-0.647-4.568-0.469-6.804-1.017\r\n\t\t\tc-2.428-0.595-3.771-2.561-3.389-4.839c0.347-2.073,2.364-3.691,4.629-3.527c14.157,1.022,24.275,8.341,25.719,25.007\r\n\t\t\tc0.102,1.176,0.222,2.419-0.039,3.544C263.539,201.464,262.113,202.429,260.722,202.523\r\n\t\t\tC257.667,202.578,262.113,202.429,260.722,202.523z\" />\r\n\t\t</svg>\r\n\r\n\t</a>\r\n\t<?php endif; ?>\r\n\r\n</div>\r\n\r\n<?php\r\n\t\treturn ob_get_clean();\r\n\t}", "function seo_discount_popup_include() {\n\twp_enqueue_style( 'seo-discount-popup-style', plugin_dir_url( __FILE__ ) . 'seo-discount-popup.css', '', '1.0' );\n\twp_enqueue_script( 'jquery-cookie', plugin_dir_url( __FILE__ ) . 'js.cookie.js', array('jquery'), '1.4.1', true );\n\twp_enqueue_script( 'seo-discount-popup-script', plugin_dir_url( __FILE__ ) . 'seo-discount-popup.js', array('jquery', 'jquery-cookie'), '1.0', true );\n}", "function auxin_footer_copyright_markup( $echo = false ){\n global $post;\n\n $output = '';\n $copyright_text = ! empty( $post->ID ) ? auxin_get_post_meta( $post, 'page_footer_copyright', '') : '';\n $copyright_text = empty( $copyright_text ) ? auxin_get_option( 'copyright' ): $copyright_text ;\n\n if( $copyright_text ) {\n $date_format = 'Y'; // to pass theme check plugin\n $copyright_text = str_replace( array( '{{Y}}', '{{sitename}}' ), array( date_i18n( $date_format ), get_bloginfo( 'name' ) ), $copyright_text );\n $output .= '<small>' . do_shortcode( stripslashes( $copyright_text ) ) . '</small>';\n }\n\n $attribution = auxin_get_post_meta( $post, 'page_footer_attribution', 'default') ;\n $attribution = 'default' === $attribution ? auxin_get_option( 'attribution', false ) : $attribution;\n\n if ( auxin_is_true( $attribution ) ) {\n $output .= sprintf( '<small class=\"aux-attribution\"> %1$s <a href=\"https://wordpress.org/themes/phlox/\" title=\"%2$s\"> %3$s </a></small>',\n __( 'Powered by', 'phlox' ),\n __( 'Phlox Free WordPress Theme', 'phlox' ),\n __( 'Phlox Theme', 'phlox' )\n );\n }\n\n // Prints the policy markup in site footer\n if( auxin_get_option( 'footer_privacy_policy_link_display', 0 ) ){\n if ( function_exists( 'the_privacy_policy_link' ) ) {\n $output .= get_the_privacy_policy_link( '<small class=\"aux-privacy-policy\">', '</small>' );\n } else {\n $output .= sprintf( '<small class=\"aux-privacy-policy\">%s</small>', __( 'WordPress version 4.9.6 or higher is required for this feature.', 'phlox') );\n }\n }\n\n if( $echo ){\n echo $output;\n } else {\n return $output;\n }\n}", "function pageIframe() {\n\t\tglobal $body_id, $shortcode_tags;\n\t\t\n\t\t// Define this body for CSS\n\t\t$body_id = 'media-upload';\n\t\t\n\t\t// Add CSS for media style\n\t\twp_enqueue_style( 'media' );\n\t\t//wp_enqueue_script('ssm-main', SSM_URL . '/js/ssm-main.js', ('jquery') );\n\t\t\n\t\t// Send to editor ?\n\t\tif ( isset($_GET['shortcode']) ) {\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t/* <![CDATA[ */\n\t\t\tvar win = window.dialogArguments || opener || parent || top;\n\t\t\twin.send_to_editor('<?php echo $_GET['shortcode']; ?>');\n\t\t\t/* ]]> */\n\t\t\t</script>\n\t\t\t<?php\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t// Render list\n\t\twp_iframe( array($this, 'form') );\n\t\tdie();\n\t}", "public function common_metabox_footer() {\r\n\t\t$this->view( 'meta-box-footer', array(), 'common' );\r\n\t}", "public function footerAction() {$this->_helper->viewRenderer->setResponseSegment('footer');}", "public function offerClosedForADay() {\n\t\treturn response( 1, 200 )\n\t\t\t->cookie( 'doodleOffer', \"mrksohag\", config( 'constant.popupHideTimeInMinutes' ) );\n\t}", "function circle_footer_social() {\n\tget_template_part( 'template-parts/footer-social' );\n}", "public function trueFooter()\n {\n ?>\n <style>\n #wpfooter a {\n outline: none !important; text-decoration: none !important;\n } \n .wp-footer-true-link {\n position: relative;\n display: block; color: #aeaeae;\n -webkit-transition: color 0.22s ease;\n -o-transition: color 0.22s ease;\n transition: color 0.22s ease;\n }\n .wp-footer-true-link:before {\n content: '';\n position: absolute;\n bottom: 0; margin-left: 50%;\n width: 0%; height: 1px;\n background-color: #333;\n -webkit-transition: width 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3),\n margin-left 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3);\n -o-transition: width 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3),\n margin-left 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3);\n transition: width 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3),\n margin-left 0.28s cubic-bezier(0.63, 0.62, 0.48, 1.3);\n }\n .wp-footer-true-link > img {\n width: 45px; height: auto; position: relative; top: 2px;\n opacity: 0.7;\n -webkit-transition: opacity 0.22s ease;\n -o-transition: opacity 0.22s ease;\n transition: opacity 0.22s ease;\n }\n .wp-footer-true-link:hover {\n color: #333;\n }\n .wp-footer-true-link:hover:before {\n width: 100%; margin-left: 0%;\n }\n .wp-footer-true-link:hover > img {\n opacity: 1;\n }\n .acf-field.acf-field-image.acf-banner-image .acf-image-uploader .hide-if-value {\n margin-top: 50px;\n }\n .acf-field.acf-field-image.acf-banner-image .acf-image-uploader.has-value {\n min-height: 100px;\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value {\n position: absolute;\n z-index: 100;\n height: auto;\n max-height: 100px;\n overflow: hidden;\n -webkit-box-shadow: 1px 3px 12px transparent;\n box-shadow: 1px 3px 12px transparent;\n -webkit-transition: height .32s ease, max-height .32s ease, box-shadow .32s ease;\n -o-transition: height .32s ease, max-height .32s ease, box-shadow .32s ease;\n transition: height .32s ease, max-height .32s ease, box-shadow .32s ease\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value img {\n -webkit-transform: translate(0, -30px);\n -ms-transform: translate(0, -30px);\n -o-transform: translate(0, -30px);\n transform: translate(0, -30px);\n -webkit-transition: transform .32s ease;\n -o-transition: transform .32s ease;\n transition: transform .32s ease\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value:after {\n content: '';\n position: absolute;\n height: 20px;\n width: 100%;\n bottom: 0;\n left: 0;\n background-image: -webkit-linear-gradient(top, transparent 0, rgba(0, 0, 0, .25) 100%);\n background-image: -o-linear-gradient(top, transparent 0, rgba(0, 0, 0, .25) 100%);\n background-image: linear-gradient(to bottom, transparent 0, rgba(0, 0, 0, .25) 100%);\n background-repeat: repeat-x;\n opacity: 1;\n filter: alpha(opacity=100);\n -webkit-transition: opacity .01s linear .32s;\n -o-transition: opacity .01s linear .32s;\n transition: opacity .01s linear .32s\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value:hover {\n max-height: 470px;\n -webkit-box-shadow: 1px 3px 12px rgba(0, 0, 0, .45);\n box-shadow: 1px 3px 12px rgba(0, 0, 0, .45)\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value:hover img {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0)\n }\n .acf-field.acf-field-image.acf-banner-image .view.show-if-value:hover:after {\n opacity: 0;\n filter: alpha(opacity=0);\n -webkit-transition: opacity .01s;\n -o-transition: opacity .01s;\n transition: opacity .01s\n }\n </style>\n <a href=\"http://www.trueagency.com.au\" target=\"_blank\" class=\"wp-footer-true-link\">\n <img src=\"<?= \\TrueLib::getImageURL('common/true-footer-logo.png') ?>\" alt=\"Digital Agency Melbourne\">\n </a>\n <?php\n }", "function aitpro_login_footer() {\necho '<div id=\"footer\" class=\"row\">';\necho '<div class=\"sixteen columns\">';\necho '<div class=\"copyright\">Copyright &copy;'.date('Y').' '.bloginfo('name').'</div>';\necho '</div></div>';\n}", "function the_champ_social_sharing_page(){\r\n\t// social sharing options\r\n\tglobal $theChampSharingOptions, $theChampLoginOptions, $theChampIsBpActive;\r\n\tif(!isset($theChampSharingOptions['horizontal_sharing_size'])){\r\n\t\t$theChampSharingOptions['horizontal_sharing_size'] = 30;\r\n\t}\r\n\tif(!isset($theChampSharingOptions['horizontal_sharing_shape'])){\r\n\t\t$theChampSharingOptions['horizontal_sharing_shape'] = 'round';\r\n\t}\r\n\tif(!isset($theChampSharingOptions['vertical_sharing_size'])){\r\n\t\t$theChampSharingOptions['vertical_sharing_size'] = 35;\r\n\t}\r\n\tif(!isset($theChampSharingOptions['vertical_sharing_shape'])){\r\n\t\t$theChampSharingOptions['vertical_sharing_shape'] = 'square';\r\n\t}\r\n\t// message on saving options\r\n\techo the_champ_settings_saved_notification();\r\n\trequire 'admin/social_sharing.php';\r\n}", "function original_tweet_button_sc() {\n\t\treturn '<div sytle=\"margin:5px\"><script src=\"http://platform.twitter.com/widgets.js\" type=\"text/javascript\"></script><a href=\"http://twitter.com/share\" class=\"twitter-share-button\">Tweet</a></div>';\n}", "function getContentFooter() {\n return '';\n }", "function display_footer_social()\n {\n include 'assets/partials/footer-social.php';\n }", "function emc_sharing_display() {\r\n\r\n\tif ( class_exists( 'Jetpack', false ) ) {\r\n\t\t$jetpack_active_modules = get_option('jetpack_active_modules');\r\n\t\tif ( $jetpack_active_modules && in_array( 'sharedaddy', $jetpack_active_modules ) ) {\r\n\t\t\techo sharing_display();\r\n\t\t\t?>\r\n\t\t\t<!--<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:</h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow\" class=\"share-facebook sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=facebook\" title=\"Share on Facebook\" id=\"sharing-facebook-6199\"><span>Facebook</span></a></li><li class=\"share-twitter\"><a rel=\"nofollow\" class=\"share-twitter sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=twitter\" title=\"Click to share on Twitter\" id=\"sharing-twitter-6199\"><span>Twitter</span></a></li><li class=\"share-pinterest\"><a rel=\"nofollow\" class=\"share-pinterest sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=pinterest\" title=\"Click to share on Pinterest\"><span>Pinterest</span></a></li><li class=\"share-google-plus-1\"><a rel=\"nofollow\" class=\"share-google-plus-1 sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=google-plus-1\" title=\"Click to share on Google+\" id=\"sharing-google-6199\"><span>Google +1</span></a></li><li class=\"share-email\"><a rel=\"nofollow\" class=\"share-email sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/?share=email\" title=\"Click to email this to a friend\"><span>Email</span></a></li><li class=\"share-print\"><a rel=\"nofollow\" class=\"share-print sd-button share-icon\" href=\"http://local.earlymath.erikson.edu/new-study-differentiating-works/#print\" title=\"Click to print\"><span>Print</span></a></li><li class=\"share-end\"></li></ul></div></div></div>-->\r\n\t\t\t<?php\r\n\t\t}\r\n\t}\r\n\r\n}" ]
[ "0.5999225", "0.5993367", "0.57731926", "0.57665884", "0.5684943", "0.56751865", "0.5595678", "0.5577895", "0.55568224", "0.5532182", "0.54983115", "0.5472154", "0.54664725", "0.54579914", "0.5448874", "0.5443759", "0.5439526", "0.5438382", "0.5437344", "0.54279864", "0.5408732", "0.54025316", "0.5387516", "0.5297888", "0.52972597", "0.5292502", "0.52917767", "0.5284624", "0.52651364", "0.5248186", "0.52091086", "0.5206066", "0.5203201", "0.520262", "0.5198396", "0.5192049", "0.5190967", "0.51908", "0.51787883", "0.51765996", "0.51706743", "0.51659113", "0.5164632", "0.516234", "0.51484406", "0.51419604", "0.5136935", "0.51355314", "0.51265544", "0.5124665", "0.5120893", "0.5110334", "0.5107791", "0.5105843", "0.51052505", "0.5097165", "0.50847006", "0.50825197", "0.5077875", "0.50716203", "0.5067141", "0.50627905", "0.5062122", "0.5057416", "0.5050224", "0.504847", "0.5047775", "0.50429094", "0.5041247", "0.50401545", "0.5038576", "0.5034669", "0.50344396", "0.5033773", "0.50330234", "0.50305074", "0.5028286", "0.502201", "0.5019595", "0.50181013", "0.50114447", "0.5006854", "0.50027335", "0.49999145", "0.49963528", "0.49941733", "0.4993064", "0.49846768", "0.49840727", "0.49804503", "0.49794376", "0.49783832", "0.49781018", "0.49738884", "0.49709967", "0.49684945", "0.49671265", "0.49666822", "0.4953043", "0.49488655" ]
0.6117207
0
Get the instance as an array.
public function toArray() { $urls = []; $modelConfiguration = $this->getDisplay()->getModelConfiguration(); foreach ($this->locales as $locale) { if($locale == 'en') continue; $urls[] = [ 'text' => trans('admin.button.create', [ 'locale' => $locale, 'text' => $this->getDisplay()->getNewEntryButtonText() ]), 'url' => $modelConfiguration->getCreateUrl(['locale' => $locale]) ]; } return [ 'urls' => $urls, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function instanceToArray() : array{\n\n if(!method_exists(self::class,'instance')):\n return [];\n endif;\n\n return self::instance()->toArray();\n }", "public function toArray($instance): array;", "public function getAsArray();", "public function toArray() {\n return (array)$this;\n }", "function asArray(){\n\t\t\t$array = $this->toArray( $this );\n\t\t\treturn $array;\n\t\t}", "public function toArray()\n {\n return (array)$this;\n }", "public function toArray()\n {\n return (array)$this;\n }", "public function toArray()\n {\n return (array)$this;\n }", "public function toArray() {\n\t\treturn $this->array;\n\t}", "public function as_array()\n\t{\n\t\treturn $this->getArrayCopy();\n\t}", "public function toArray() {\n return $this->array;\n }", "public function toArray()\n {\n return $this->cast('array');\n }", "public function & toArray()\n\t{\n\t\t$x = new ArrayObject($this->data);\n\t\treturn $x;\n\t}", "public function asArray()\r\n {\r\n return $this->data;\r\n }", "public function getArray() : array {\n return $this->getArrayCopy();\n }", "public function toArray() :array {\n return get_object_vars($this);\n }", "public function asArray()\n {\n return $this->data;\n }", "public function toArray(): array {\n\t\treturn $this->array;\n\t}", "public function toArray() // untested\n {\n return $this->data;\n }", "public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}", "public function toArray() : array{\n return get_object_vars( $this );\n }", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function toArray() {}", "public function asArray()\n {\n return iterator_to_array($this, false);\n }", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray();", "public function asArray(){\n return $this->data;\n }", "public function to_array()\n\t{\n\t\treturn $this->getArrayCopy();\n\t}", "public function toArray()\n\t{\n\t\treturn array();\n\t}", "public function __toArray(): array\n {\n return call_user_func('get_object_vars', $this);\n }", "public function toArray(){\n $this->buildArray();\n return $this->array;\n }", "public function getArray()\n {\n return $this->get(self::_ARRAY);\n }", "public /*array*/ function toArray()\n\t{\n\t\treturn $this->_data;\n\t}", "public function toArray() {\n\t\treturn $this->data;\n\t}", "public function asArray() : array\n {\n return $this->a;\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function toArray()\n {\n return json_decode(json_encode($this), true);\n }", "public function toArray() {\n return json_decode(json_encode($this), true);\n }", "public function toArray()\n {\n // TODO: Implement toArray() method.\n }", "public function toArray()\n {\n // TODO: Implement toArray() method.\n }", "public function asArray()\n {\n }", "public function getArray()\n {\n return iterator_to_array($this->getIterator());\n }", "public function __toArray()\n {\n return $this->toArray();\n }", "function toArray(){\r\n\t\treturn $this->data;\r\n\t}", "public function toArray()\n {\n return get_object_vars($this);\n }", "public function toArray(): array\r\n {\r\n return get_object_vars($this);\r\n }", "public function toArray() {\n return get_object_vars($this);\n }", "public function toArray()\n {\n return $this->_data;\n }", "public function toArray()\n {\n return $this->_data;\n }", "public function toArray() : array\n {\n return $this->data;\n }", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "function toArray() {\n\t\treturn get_object_vars($this);\n\t}", "public function getArray()\n {\n return $this->array;\n }", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function getArray() {\n\t\treturn $this->data; \n\t}", "public function toArray() {\n return get_object_vars($this);\n }", "public function AsArray();", "public function toArray()\r\n {\r\n return $this->data;\r\n }", "public function toArray(): array\n {\n // TODO: Implement toArray() method.\n }", "public function toArray(): array\n {\n return $this->data;\n }", "public function toArray(): array\n {\n return $this->data;\n }", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;", "public function toArray(): array;" ]
[ "0.85852945", "0.8148092", "0.8078163", "0.79248744", "0.7906661", "0.7836803", "0.7836803", "0.7836803", "0.7799238", "0.7780902", "0.7745101", "0.7713653", "0.77060854", "0.7674092", "0.7661095", "0.7654164", "0.7645176", "0.764169", "0.76324755", "0.76228744", "0.7599066", "0.759768", "0.759768", "0.759768", "0.759768", "0.759768", "0.759768", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.7597103", "0.75662816", "0.7561541", "0.7561541", "0.7561541", "0.7561541", "0.7561541", "0.7561541", "0.7560244", "0.75506544", "0.75353235", "0.75329787", "0.7531777", "0.7524281", "0.752424", "0.7499065", "0.7492839", "0.748162", "0.748162", "0.74745315", "0.74699974", "0.74699974", "0.7466149", "0.7456513", "0.7455585", "0.7454854", "0.7454219", "0.7443394", "0.7434233", "0.74315983", "0.74315983", "0.74308527", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7427095", "0.7425503", "0.7398783", "0.7398783", "0.7393662", "0.7385883", "0.7383662", "0.7382659", "0.73813254", "0.73813254", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245", "0.7378245" ]
0.0
-1
Run the database seeds.
public function run() { // $category_restaurant = new CategoryRestaurant(); // $category_restaurant->name = "platos tipicos"; // $category_restaurant->slug = "platos_tipicos"; // $category_restaurant->save(); // $category_restaurant = new CategoryRestaurant(); // $category_restaurant->name = "comida china"; // $category_restaurant->slug = "comida_china"; // $category_restaurant->save(); // $category_restaurant = new CategoryRestaurant(); // $category_restaurant->name = "comida italiana"; // $category_restaurant->slug = "comida_italiana"; // $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida arabe"; $category_restaurant->slug = "comida_arabe"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida china"; $category_restaurant->slug = "comida_china"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida rapida"; $category_restaurant->slug = "comida_rapida"; $category_restaurant->status = true; $category_restaurant->save(); // $category_restaurant = new CategoryRestaurant(); // $category_restaurant->name = "restaurante de especialidades"; // $category_restaurant->slug = "restaurante_de_especialidades"; // $category_restaurant->status = true; // $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida francesa"; $category_restaurant->slug = "comida_francesa"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida gourmet"; $category_restaurant->slug = "comida_gourmet"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida italiana"; $category_restaurant->slug = "comida_italiana"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida japonesa"; $category_restaurant->slug = "comida_japonesa"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida libanesa"; $category_restaurant->slug = "comida_libanesa"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida local"; $category_restaurant->slug = "comida_local"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida mexicana"; $category_restaurant->slug = "comida_mexicana"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida peruana"; $category_restaurant->slug = "comida_peruana"; $category_restaurant->status = true; $category_restaurant->save(); $category_restaurant = new CategoryRestaurant(); $category_restaurant->name = "Comida tailandesa"; $category_restaurant->slug = "comida_tailandesa"; $category_restaurant->status = true; $category_restaurant->save(); }
{ "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
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 stok_barang($id_barang) { $jumlah_barang_masuk=0; $jumlah_barang_keluar=0; $sisa=0; $CI =& get_instance(); $CI->load->model('M_barang'); $masuk['barang_masuk']= $CI->M_barang->barang_masuk($id_barang); foreach($masuk['barang_masuk'] as $data){ $jumlah_barang_masuk= $data->barang_masuk; } $masuk['barang_keluar']= $CI->M_barang->barang_keluar($id_barang); foreach($masuk['barang_keluar'] as $data){ $jumlah_barang_keluar= $data->barang_keluar; } return $sisa=$jumlah_barang_masuk - $jumlah_barang_keluar; // echo "Masuk : $jumlah_barang_masuk <br> keluar : $jumlah_barang_keluar <br> sisa : $sisa"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }", "public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}", "function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }", "public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}", "public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('index');\n }", "public function show_index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "public function Index()\n {\n $this->standardView('Index');\n }", "public function index()\n {\n return view('main.welcome');\n }", "public function index()\n {\n // return view('welcome');\n }", "public function index()\n {\n $this->load->view('index');\n }", "public function index()\n {\n // return view('welcome');\n \n }", "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}", "public function index() {\n \n return view('welcome');\n }", "public function index()\n {\n return view('pages.welcome');\n }", "public function Index()\n {\n \treturn view(\"index\");\n\t}", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n $this->load->view('welcome_message');\n }", "public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }", "public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n return view('welcome');\n }", "public function index()\n\t{\n\t\treturn view('pages/home');\n\t}", "public function index()\n {\n return \"INDEX PAGE\";\n }", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n\t\treturn view('home');\n\t}", "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 actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}", "public function index()\n {\n return view('front.welcome');\n }", "public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}", "public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}", "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}", "public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}", "public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}", "public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}", "public function Index() {\n $this->Display();\n }", "public function index()\r\n {\r\n View::render('home');\r\n }", "public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }", "public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}", "public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }", "public function index()\n {\n return view(\"home\");\n }", "public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}", "function index() {\n $this->renderView(\"index\");\n }", "function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}", "public function index()\n\t{\n\t\treturn view('index');\n\t}", "public function index()\n {\n return view('welcome');\n }", "public function index()\n {\n\n\n\n return view('welcome');\n }", "public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une m&eacute;thode index', 'error');\n\t}", "public function index()\r\n\t{\r\n\t\t//\r\n\t}", "public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}", "public function index()\n {\n // Nothing to do\n }", "public function index()\n {\n return View(\"pages.home\");\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.7654609", "0.7413426", "0.7394598", "0.731692", "0.7227223", "0.7227223", "0.71899563", "0.7165393", "0.7151099", "0.7144871", "0.71078676", "0.7078446", "0.7074241", "0.70401293", "0.7029486", "0.7029486", "0.7029486", "0.7029486", "0.7029486", "0.697335", "0.6968791", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.694649", "0.693218", "0.6925767", "0.6912394", "0.69008887", "0.6895028", "0.68747455", "0.6858402", "0.6856054", "0.6838835", "0.6804161", "0.68017256", "0.68017256", "0.67949307", "0.67897016", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6767282", "0.6765904", "0.67649317", "0.6761374", "0.6761374", "0.6750939", "0.6750867", "0.67477846", "0.6741518", "0.67382467", "0.6730569", "0.6716669", "0.6713985", "0.6711219", "0.6704401", "0.67004186", "0.6692823", "0.6674554", "0.66629815", "0.66613066", "0.66507727", "0.6631868", "0.66218233", "0.6612657", "0.66054386", "0.6597767", "0.6594728", "0.659294", "0.6586656", "0.65768975", "0.65764683", "0.6574095", "0.65545213", "0.6548344", "0.6546561", "0.6544007", "0.6543472", "0.654347", "0.651755", "0.6516932", "0.6516932", "0.6516932", "0.6516932" ]
0.0
-1
Run the database seeds.
public function run() { DB::table('status')->insert([ 'slug' => Str::slug('Verificar'), 'name' => 'Verificar', ]); }
{ "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(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 // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\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 // $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 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(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 \\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 // $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\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\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 // $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 //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.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.7841958", "0.7834691", "0.78279406", "0.78198457", "0.78093415", "0.78030044", "0.7802443", "0.7801398", "0.7798975", "0.77957946", "0.77905124", "0.7789201", "0.77866685", "0.77786297", "0.7777914", "0.7764813", "0.7762958", "0.7762118", "0.77620417", "0.77614594", "0.7760672", "0.77599436", "0.77577287", "0.7753593", "0.7749794", "0.7749715", "0.77473587", "0.77301705", "0.77296484", "0.77280766", "0.77165425", "0.77143145", "0.7714117", "0.77136046", "0.7712814", "0.7712705", "0.7711485", "0.7711305", "0.77110684", "0.77102643", "0.7705902", "0.77048075", "0.77041686", "0.77038115", "0.7703085", "0.7702133", "0.77009964", "0.7698874", "0.769864", "0.76973957", "0.7696364", "0.7694127", "0.7692633", "0.76910555", "0.7690765", "0.7688756", "0.76879585", "0.76873547", "0.76871854", "0.7685407", "0.7683626", "0.76794547", "0.7678361", "0.7678022", "0.7676884", "0.7672536", "0.76717764", "0.7669418", "0.76692647", "0.76690245", "0.76667875", "0.76628584", "0.76624", "0.76618767", "0.7660002", "0.76567614", "0.76542175", "0.76541024", "0.7652618", "0.76524657", "0.7651689" ]
0.0
-1
Register,Create User. GET|HEAD /register
public function register (RegisterAPIRequest $request) { $data = $request->all(); $user = User::create([ 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), ]); return $this->sendResponse( array_merge($user->toArray(), ['token' => $user->createToken($user->email)->plainTextToken]), 'Registered successfully ' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}", "public function action_register()\n\t{\n Auth::create_user(\n 'promisemakufa',\n 'pass123',\n '[email protected]',\n 1,\n array(\n 'fullname' => 'P K systems',\n )\n );\n\n $this->template->title = \"User\";\n $this->template->content = View::forge('user/register');\n }", "public function registerAction() {\n\n $user = new User();\n\n // データを保存し、エラーをチェックする\n// $success = $user->save($this->request->getPost(), array('name', 'email'));\n\n $user->findFirst($this->request->getPost());\n\n if ($success) {\n echo \"Thanks for registering!\";\n } else {\n echo \"Sorry, the following problems were generated: \";\n foreach ($user->getMessages() as $message) {\n echo $message->getMessage(), \"<br/>\";\n }\n }\n\n $this->view->disable();\n\n }", "public function register () : void\n {\n $this->getHttpReferer();\n\n // if the user is already logged in,\n // redirection to the previous page\n if ($this->session->exist(\"auth\")) {\n $url = $this->router->url(\"admin\");\n Url::redirect(301, $url);\n }\n\n $errors = []; // form errors\n $flash = null; // flash message\n\n $tableUser = new UserTable($this->connection);\n $tableRole = new RoleTable($this->connection);\n\n // form validator\n $validator = new RegisterValidator(\"en\", $_POST, $tableUser);\n\n // check that the form is valid and add the new user\n if ($validator->isSubmit()) {\n if ($validator->isValid()) {\n $role = $tableRole->find([\"name\" => \"author\"]);\n\n $user = new User();\n $user\n ->setUsername($_POST[\"username\"])\n ->setPassword($_POST[\"password\"])\n ->setSlug(str_replace(\" \", \"-\", $_POST[\"username\"]))\n ->setRole($role);\n\n $tableUser->createUser($user, $role);\n\n $this->session->setFlash(\"Congratulations {$user->getUsername()}, you are now registered\", \"success\", \"mt-5\");\n $this->session\n ->write(\"auth\", $user->getId())\n ->write(\"role\", $user->getRole());\n\n // set the token csrf\n if (!$this->session->exist(\"token\")) {\n $csrf = new Csrf($this->session);\n $csrf->setSessionToken(175, 658, 5);\n }\n\n $url = $this->router->url(\"admin\") . \"?user=1&create=1\";\n Url::redirect(301, $url);\n } else {\n $errors = $validator->getErrors();\n $errors[\"form\"] = true;\n }\n }\n\n // form\n $form = new RegisterForm($_POST, $errors);\n\n // url of the current page\n $url = $this->router->url(\"register\");\n\n // flash message\n if (array_key_exists(\"form\", $errors)) {\n $this->session->setFlash(\"The form contains errors\", \"danger\", \"mt-5\");\n $flash = $this->session->generateFlash();\n }\n\n $title = App::getInstance()\n ->setTitle(\"Register\")\n ->getTitle();\n\n $this->render(\"security.auth.register\", $this->router, $this->session, compact(\"form\", \"url\", \"title\", \"flash\"));\n }", "public function doRegister()\n {\n\n //check if all the fields are filled\n if (!Request::checkVars(Request::postData(), array('username', 'password'))) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"Complete all the fields!\", \"type\" => \"error\")));\n exit;\n }\n\n //create the user entity based on filled data\n $userEntity = new User(Request::postData());\n\n //check if the user exists and get it as entity if exists\n if ($this->repository->findUser($userEntity)) {\n echo json_encode(array(\"swal\" => array(\"title\" => \"Oops!\", \"text\" => \"The username/email already exists!\", \"type\" => \"error\")));\n exit;\n }\n\n //add the user into DB\n $this->repository->addUser($userEntity);\n\n echo json_encode(\n array(\n \"swal\" => array(\"title\" => \"Success!\", \"text\" => \"Your account has been created!\", \"type\" => \"success\", \"hideConfirmButton\" => true),\n \"redirect\" => array(\"url\" => BASE_URL . '/index.php?page=home', 'time' => 1)\n )\n );\n }", "public function action_register(){\n\t\t\n\t\t$user = CurUser::get();\n\t\t\n\t\tif($user->save($_POST, User_Model::SAVE_REGISTER)){\n\t\t\t$user->login($user->{CurUser::LOGIN_FIELD}, $_POST['password']);\n\t\t\tApp::redirect('user/profile/greeting');\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\tMessenger::get()->addError('При регистрации возникли ошибки:', $user->getError());\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function register() {\n\n define('KDEBUG_JSON', true);\n\n $errors = array();\n $success = true;\n\n $slug = user::generateUniqueUsername($_REQUEST['username']);\n if (!isset($_REQUEST['username']) || empty($_REQUEST['username']) || $_REQUEST['username'] == 'Full name') {\n $errors['register_username'] = 'You must specify your Full Name';\n $success = false;\n } elseif (user::findOne(array('slug' => $slug))) {\n $errors['register_username'] = 'This username already exists';\n $success = false;\n }\n\n if (!isset($_REQUEST['email']) || empty($_REQUEST['email']) || $_REQUEST['email'] == 'email address') {\n $errors['register_email'] = 'You must specify an e-mail address';\n $success = false;\n } elseif (!filter_var($_REQUEST['email'], FILTER_VALIDATE_EMAIL)) {\n $errors['register_email'] = 'Invalid e-mail address';\n $success = false;\n } elseif (user::findOne(array('email' => $_REQUEST['email'])) != null) {\n $errors['register_email'] = 'This e-mail address already exists';\n $success = false;\n }\n\n\n if (!isset($_REQUEST['password']) || empty($_REQUEST['password']) || $_REQUEST['password'] == 'password') {\n $errors['register_password'] = 'You must specify a password';\n $success = false;\n } elseif (user::verify('password', $_REQUEST['password']) !== true) {\n $errors['register_password'] = user::verify('password', $_REQUEST['password']);\n $success = false;\n }\n\n if ($_REQUEST['password'] != $_REQUEST['verify']) {\n $errors['register_verify'] = 'Your passwords do not match';\n $success = false;\n }\n\n if ($success) {\n\n // create our new user\n $user = new user();\n $user->email = $_REQUEST['email'];\n $user->username = $_REQUEST['username'];\n $user->slug = $slug;\n\n $user->public = 1;\n $user->created = time();\n $user->updated = time();\n $user->password = crypt($_REQUEST['password']);\n $user->save();\n $user->login();\n\n }\n\n echo json_encode(array('success' => $success, 'errors' => $errors));\n return true;\n\n }", "public function registerUserAction() {\n\t\n\t\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\t\tif ($request->isPost()) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// get the json raw data\n\t\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t\t$http_raw_post_data = '';\n\t\t\t\t\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t\t}\n\t\t\t\tfclose($handle); \n\t\t\t\t\n\t\t\t\t// convert it to a php array\n\t\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\n\t\t\t\t//echo json_encode($json_data);\n\t\t\t\t\n\t\t\t\tif (is_array($json_data)) {\n\t\t\t\t\t// convert it back to json\n\t\t\t\t\t\n\t\t\t\t\t// write the user back to database\n\t\t\t\t\t$registered = Application_Model_User::registerUser($json_data);\n\t\t\t\t\t\n\t\t\t\t\tif($registered) {\n\t\t\t\t\t\techo json_encode($registered);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\techo 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}", "public function registerAction()\n {\n // specify required fields\n $requirements = array(\n 'userName',\n 'password',\n 'email'\n );\n\n // fech post json data\n $post = $this->fetchRequestData($requirements);\n\n //we need to match what's in the database\n $fields = array(\n 'yourEmail' => 'email',\n 'yourUserName' => 'userName',\n 'yourPassword' => 'password',\n 'fname' => 'fname',\n 'lname' => 'lname',\n 'yourIP' => 'ip',\n 'yourCountry' => 'countryAbbreviation',\n 'yourBday' => 'birthdate',\n 'accountId' => 'accountId',\n 'gender' => 'gender',\n 'cmsUserGroupId' => 'userRole',\n 'isChannel' => 'isChannel',\n );\n\n $params = array();\n $params['userId'] = 0;\n\n foreach ($fields as $key => $val) {\n if (isset($post[$val]) && $post[$val]) $params[$key] = $post[$val];\n }\n\n if (isset($params['yourEmail']) && $params['yourEmail']) {\n if ($this->get('UserServices')->checkDuplicateUserEmail($params['userId'], $params['yourEmail'])) {\n throw new HttpException(422, $this->translator->trans('This email address belongs to an existing Tourist Tuber.'));\n }\n }\n\n if (isset($params['yourUserName']) && $params['yourUserName']) {\n if ($this->get('UserServices')->checkDuplicateUserName($params['userId'], $params['yourUserName'])) {\n $suggestedNewUserNames = $this->get('UserServices')->suggestUserNameNew($params['yourUserName']);\n throw new HttpException(422, $this->translator->trans('Your username is already taken. try:') . ' ' . implode(' or ', $suggestedNewUserNames));\n }\n }\n\n if (isset($params['yourPassword']) && $params['yourPassword']) {\n //validate first for invalid password\n $validatePass = $this->get('UserServices')->validateUserLengthPassword($params['yourPassword']);\n if (isset($validatePass['success']) && $validatePass['success'] == false) {\n throw new HttpException(422, $validatePass['message']);\n }\n }\n\n if ((isset($params['fname']) && $params['fname']) || (isset($params['lname']) && $params['lname'])) {\n $fullname = '';\n if ($params['fname']) {\n $fullname .= $params['fname'];\n }\n if ($params['lname']) {\n $fullname .= $params['lname'];\n }\n } else {\n $fullname = $params['fname'] = $params['yourUserName'];\n }\n\n $params['fullName'] = $fullname;\n $params['defaultPublished'] = 0;\n $result = array();\n\n\n\n $insert = $this->get('UserServices')->generateUser($params);\n\n if (is_array($insert) && isset($insert['error']) && !empty($insert['error'])) {\n throw new HttpException(422, $insert['error']);\n } else {\n $this->get('UserServices')->sendRegisterActivationEmail(array('userId' => $insert->getId(), 'activationLink' => '/api/users/activate/'));\n $result['status'] = \"success\";\n $result['message'] = $this->translator->trans('An email is sent to you to activate your account.');\n }\n\n $response = new Response(json_encode($result));\n $response->setStatusCode(200);\n return $response;\n }", "public function registerAction()\n {\n Lb_Points_Helper_Data::debug_log(\"Registration request sent to LB\", true);\n $txtName = $_POST['txtName'];\n $txtEmail = $_POST['txtEmail'];\n $txtPhoneNumber = $_POST['txtPhoneNumber'];\n $result = Lb_Points_Helper_Data::registerUser($txtName,$txtEmail,$txtPhoneNumber);\n echo json_encode($result);\n }", "public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}", "public function register() {\n\t\t\n\t\t// DB connection\n\t\t$db = Database::getInstance();\n \t$mysqli = $db->getConnection();\n\t\t\n $data = (\"INSERT INTO user (username,password,first_name,\n last_name,dob,address,postcode,email)\n VALUES ('{$this->_username}',\n '{$this->_sha1}',\n '{$this->_first_name}',\n '{$this->_last_name}',\n '{$this->_dob}',\n '{$this->_address}',\n '{$this->_postcode}',\n '{$this->_email}')\");\n\t\t\t\t\t\t \n\t\t\t$result = $mysqli->query($data);\n if ( $mysqli->affected_rows < 1)\n // checks if data has been succesfully inputed\n $this->_errors[] = 'could not process form';\n }", "public function doRegister(){\n\t\t\t$requestUser = $this->registerView->getRequestUserName();\n\t\t\t$requestPassword = $this->registerView->getRequestPassword();\n\t\t\t$requestRePassword = $this->registerView->getRequestRePassword();\n\t\t\t\n\t\t\tif($this->registerView->didUserPressRegister() ){\n\t\t\t\ttry{\n\t\t\t\tif($this->checkUsername($requestUser) && $this->checkPassword($requestPassword,$requestRePassword)){\n\t\t\t\t\t//create and add new user\n\t\t\t\t\t$newUser = new User($requestUser,$requestPassword);\n\t\t\t\t\t$this->userList->add($newUser);\n\t\t\t\t\t\n\t\t\t\t\t$this->model->toggleJustRegistered();\n\t\t\t\t\t$this->model->setSessionUsername($requestUser);\n\t\t\t\t\t$this->navView->clearURL();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch (UserFewCharException $ufce){\n\t\t\t\t\t$this->registerView->setErrorUsernameFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (UserBadCharException $udce){\n\t\t\t\t\t$this->registerView->setErrorUsernameInvalidChar();\n\t\t\t\t\t$this->registerView->setUsernameField(strip_tags($requestUser));\n\t\t\t\t} \n\t\t\t\tcatch (UserExistsException $uee){\n\t\t\t\t\t$this->registerView->setErrorUsernameExists();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordLenException $ple){\n\t\t\t\t\t$this->registerView->setErrorPasswordFewChar();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t} \n\t\t\t\tcatch (PasswordMissmatchException $pme){\n\t\t\t\t\t$this->registerView->setErrorPasswordMatch();\n\t\t\t\t\t$this->registerView->setUsernameField($requestUser);\n\t\t\t\t}\n\t\t\t\tif(empty($requestUser) && empty($requestPassword) && empty($requestRePassword))\n\t\t\t\t\t$this->registerView->setErrorMissingFields();\t\t\n\t\t\t}\n\t\t}", "function registerAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $userObj = new User(\n $this->request->getQuery('username')\n , $this->request->getQuery('password')\n );\n $userObj->save();\n\n return parent::httpResponse(json_encode($userObj));\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "public function createRegister(){\n\t\t$userRepo = new UserRepository(App::getInstance());\n\n\t\t//check if user exists first. Search user by email.\n\t\t$user = $userRepo->getUserByEmail($_POST['email']);\n\t\tif($user!=null){\n\t\t\t//Error Message\n\t\t\treturn view('newRegForm')->with('error', true);\n\t\t}\n\n\t\telse{\n\t\t\t//Creates a new user and then returns ALL the registers to the view\n\t\t\t$user = new User($_POST);\n\t\t\t$user = $userRepo->create($user);\n\t\t\t$user = $userRepo->selectAll();\n\n\t\t\treturn view('viewRegisters')->with(['users'=>$user,'error'=>false]);\n\t\t}\n\t}", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "public function register(){\n $user = Container::getModel('User');\n $user->__set('name',$_POST['name']);\n $user->__set('email',$_POST['email']);\n if(isset($_POST['password']) && $_POST['password'] != ''){\n $user->__set('password',md5($_POST['password'])); \n }\n\n //if the fields are correct\n if($user->validateRegister()){\n //if user doesn't alredy exist\n if(count($user->getUserByEmail()) == 0){\n //success\n $user->save();\n $this->render('register');\n }else{\n //user does alredy exist\n $this->render('email_alredy_exists');\n }\n\n }else{\n //error if any of the fields are incorrect\n //this array will be use to auto-fill the fields\n $this->view->user = array(\n 'name' => $_POST['name'],\n 'email' => $_POST['email'],\n 'password' => $_POST['password']\n\n );\n $this->view->erroRegister = true;\n $this->render('inscreverse');\n }\n }", "public function register_action()\n {\n $registration_successful = RegistrationModel::registerNewUser();\n\n if ($registration_successful) {\n Redirect::to('index');\n } else {\n Redirect::to('user/register');\n }\n }", "public function register_action() \n\t{\n $rules = array(\n 'username' => 'required',\n 'email' => 'valid_email|required',\n 'password' => 'required',\n 'password2' => 'required',\n 'securityq1' => 'required',\n 'securityq2' => 'required',\n 'securitya1' => 'required',\n 'securitya2' => 'required',\n\n );\n \n // Readible array\n $readible = \n [ \n 'securityq1' => 'Security Queston 1',\n 'securityq2' => 'Security Queston 2',\n 'securitya1' => 'Security Answer 1',\n 'securitya2' => 'Security Answer 2'\n ];\n\n // readible inputs\n FormValidation::set_field_names($readible);\n \n //validate the info\n $validated = FormValidation::is_valid($_POST, $rules);\n \n // Check if validation was successful\n if($validated !== TRUE): \n \n //exit with an error\n exit(Alert::error(false, true, $validated));\n\n endif;\n\n\n UserModel::register();\n }", "public function register(){\n // 2- check post submitted\n $post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n if ($post['submit']){\n\n if ($post['name']=== \"\" || $post['email']=== \"\" ||\n $post['password']=== \"\" || $post['confirm_password']=== \"\" ){\n\n Messages::setMessage('Please Fill All Fields!', 'error');\n return;\n }\n\n // prepare query\n $this->query('INSERT INTO users (name, email, password) VALUES(:name, :email, :password)');\n\n // bind params\n $this->bind(':name',$post['name']);\n $this->bind(':email',$post['email']);\n $this->bind(':password',md5($post['password']));\n\n\n // execute\n $this->execute();\n // check if inserted\n if ($this->lastInsertId()){\n header('Location: '.'users/login');\n }\n\n }\n }", "public function register() {\n\t\t\tif($this->Session->read('Auth.User.id')){\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\tif(!empty($this->request->data)){\n\n\t\t\t\t\t$this->User->create($this->request->data);\n\t\t\t\t\t// Validation des données\n\t\t\t\t\tif($this->User->validates()) {\n\n\t\t\t\t\t\t$token = md5(time() .' - '. uniqid());\n\n\t\t\t\t\t\t$this->User->create(array(\n\t\t\t\t\t\t\t\"email\" \t\t=> $this->request->data['User']['email'],\n\t\t\t\t\t\t\t\"password\" \t\t=> $this->Auth->password($this->request->data['User']['password']),\n\t\t\t\t\t\t\t\"token\" \t\t=> $token\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t// Si tout est ok, on sauvegarde\n\t\t\t\t\t\t$this->User->save();\n\n\t\t\t\t\t\t// Envoie de l'email d'activation à l'utilisateur\n\t\t\t\t\t\t$CakeEmail = new CakeEmail('default');\n\t\t\t\t\t\t$CakeEmail->to($this->request->data['User']['email']);\n\t\t\t\t\t\t$CakeEmail->subject('Dezordre: Confirmation d\\'inscription');\n\t\t\t\t\t\t$CakeEmail->viewVars($this->request->data['User'] + array(\n\t\t\t\t\t\t\t'token' => $token,\n\t\t\t\t\t\t\t'id'\t=> $this->User->id,\n\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t$CakeEmail->emailFormat('text');\n\t\t\t\t\t\t$CakeEmail->template('register');\n\t\t\t\t\t\t$CakeEmail->send();\n\n\n\t\t\t\t\t\t$this->Session->setFlash(\"Votre compte à bien été créer. Un lien vous à été envoyé par email afin d'activer votre compte.\", 'alert', array('class' => 'success'));\n\t\t\t\t\t\t$this->redirect(array('controller' => 'pages', 'action' => 'display', 'home'));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->Session->setFlash(\"Erreur, merci de corriger\", 'alert', array('class' => 'danger'));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function register_post()\n\t{\n\t\t$array['username'] = strtolower($this->post('username'));\n\t\t$array['email'] = strtolower($this->post('email'));\n\t\t$array['password'] = hash('sha512', $this->post('password'));\n\n\t\t$error = [];\n\n\t\tif (!filter_var($array['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t$error[] = 'Invalid email format.';\n\t\t}\n\t\tif (!preg_match('/^[A-Za-z][A-Za-z0-9]{5,100}$/', $array['username'])) {\n\t\t\t$error[] = 'Invalid username format. Only alphabets & numbers are allowed.';\n\t\t}\n\n\t\tif (!empty($error)) {\n\t\t\t$this->response(['status' => FALSE, 'error' => $error], REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\n\t\tif (empty($array['username'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Username is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else if (empty($array['email'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Email is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else if (empty($array['password'])) {\n\t\t\t$this->response(['status' => FALSE, 'error' => 'Password is empty'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t} else {\n\t\t\t$data = $this->api_model->register($array);\n\t\t\tif ($data === FALSE) {\n\t\t\t\t$this->response(['status' => FALSE, 'error' => 'Email or username already registered.'], REST_Controller::HTTP_BAD_REQUEST);\n\t\t\t} else {\n\t\t\t\t$this->response(['status' => TRUE, 'message' => 'Account registered successfully.'], REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t}\n\t}", "public function register(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'username' => 'required|string|unique:users',\n 'password' => 'required|confirmed',\n \n ]);\n\n try \n {\n $user = new User;\n $user->username= $request->input('username');\n $user->password = app('hash')->make($request->input('password'));\n $user->user_ip = $request->ip();\n $user->register_date =Carbon::now();\n $user->isAdmin = true;\n $user->save();\n\n return response()->json( [\n 'entity' => 'users', \n 'action' => 'create', \n 'result' => 'success'\n ], 201);\n\n } \n catch (\\Exception $e) \n {\n return response()->json( [\n 'entity' => 'users', \n 'action' => 'create', \n 'result' => 'failed'\n ], 409);\n }\n }", "public function registerAction() {\n\t\t$this->setLayout('login');\n\t\t// If registrations are disabled, redirect to home\n\t\tif (!isset($this->config->registration_enabled) || $this->config->registration_enabled == false) {\n\t\t\t$this->redirect('/');\n\t\t}\n\n\t\t$form = new Website_Form_Register();\n\n\t\tif($this->getRequest()->isPost()) {\n\t\t\tif($form->isValid($this->getRequest()->getParams())) {\n\t\t\t\t$allOk = true;\n\t\t\t\t$testUser = User::getByName($this->getParam('username'));\n\t\t\t\tif ($testUser) {\n\t\t\t\t\t$allOk = false;\n\t\t\t\t\t$el = $form->getElement('username');\n\t\t\t\t\t$el->addError('Username already taken');\n\t\t\t\t}\n\n\t\t\t\tif ($this->getParam('pw') != $this->getParam('pw2')) {\n\t\t\t\t\t$allOk = false;\n\t\t\t\t\t$el = $form->getElement('pw2');\n\t\t\t\t\t$el->addError('Passwords do not match');\n\t\t\t\t}\n\n\t\t\t\tif ($allOk) {\n\t\t\t\t\t$user = User::create(array(\n\t\t\t\t\t\t\"parentId\" => 3,\n\t\t\t\t\t\t\"name\" => $this->getParam(\"username\"),\n\t\t\t\t\t\t\"password\" => Pimcore_Tool_Authentication::getPasswordHash($this->getParam(\"username\"), $this->getParam(\"pw\")),\n\t\t\t\t\t\t\"active\" => true,\n\t\t\t\t\t\t\"email\"=>$this->getParam('email'),\n\t\t\t\t\t\t'firstname'=>$this->getParam('firstname'),\n\t\t\t\t\t\t'lastname'=>$this->getParam('lastname')\n\t\t\t\t\t));\n\n // Create member\n $memberObject = new Website_Model_Members();\n $memberObject->setUserId($user->getId());\n $memberObject->save();\n\n // Login\n\t\t\t\t\t$securityService = Security_Service_Common::getInstance();\n $securityService->authenticate($form->getValues());\n\n\t\t\t\t\t$params = array(\n\t\t\t\t\t\t'name'=>$this->view->username($user),\n\t\t\t\t\t\t'url'=>$this->getAbsoluteUrl() . '/user/login',\n\t\t\t\t\t\t'username'=>$user->getName()\n\t\t\t\t\t);\n\t\t\t\t\t//sending the email\n\t\t\t\t\t$mail = new Pimcore_Mail();\n\t\t\t\t\t$mail->addTo($user->getEmail());\n\t\t\t\t\t$mail->setDocument('/_onderdelen/user_register');\n\t\t\t\t\t$mail->setParams($params);\n\t\t\t\t\t$mail->send();\n\n $this->addFlashMessage($this->view->translate('Your account was successfully created. Have fun!'));\n\t\t\t\t\t$this->redirect(\"/user\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t}", "public function registerUser()\n {\n $request = new Request();\n\n $email = $request->input('email');\n $password = $request->input('password');\n $password_repeat = $request->input('password_repeat');\n\n\n // Check email\n if (!$email) {\n $this->showRegisterForm(['Please enter email']);\n }\n // Check password\n if(!$password){\n $this->showRegisterForm(['Please enter password']);\n }\n if (!$password || !$password_repeat || $password != $password_repeat) {\n $this->showRegisterForm(['Passwords do not match']);\n }\n\n // Check user exist\n if ($this->getUser($email)) {\n $this->showRegisterForm(['User already isset']);\n }\n\n // Save user to DB\n $user = new User();\n $user->email = $email;\n $user->password = md5($password);\n $user->rights = 20;\n\n // Check save process\n if (!$user->save()) {\n $this->showRegisterForm(['Something goes wrong']);\n }\n\n // Redirect to endpoint\n header(\"Location: \" . self::ENDPOINTS['success_register']);\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function register(){\n\n\t\t$this->Login_model->register();\t\n\n\t}", "public function registerUserRequest()\n {\n $user = factory(User::class)->make();\n\n return $this->json('POST', '/api/v2/user', array_merge($user->toArray(), ['password' => 'secret1234', 'agb_check' => true]));\n }", "public function register() {\n\t\tif($this->isPost()) {\n\t\t\treturn $this->registerUser();\n\t\t}\n\t\techo json_encode(['success' => false, 'message' => 'Check method type!']);\n\t}", "public function registerAction(Request $request){\n //for the view\n $params = array(\"title\" => _(\"Sign up\"), \"errors\" => array());\n\n $params['username'] = \"\";\n $params['email'] = \"\";\n\n //handle register form\n if ($request->isMethod('post')){\n\n $username = $request->input('username');\n $params['username'] = $username;\n $email = $request->input('email');\n $params['email'] = $email;\n $password = $request->input('password');\n $password_bis = $request->input('password_bis');\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validateUsername($username);\n $validator->validateUniqueUsername($username);\n $validator->validateEmail($email);\n $validator->validateUniqueEmail($email);\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n if ($validator->isValid()){\n //hydrate user obj\n $securityHelper = new SH();\n $user = new User();\n \n $user->setNewUuid();\n $user->setUsername( $username );\n $user->setEmail( $email );\n $user->setEmailValidated(false);\n $user->setRole( \"user\" );\n $user->setSalt( SH::randomString() );\n $user->setToken( SH::randomString() );\n $user->setSiteLanguage( 'en' );\n $user->setActive( true );\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n \n $user->setPassword( $hashedPassword );\n// $user->setIpAtRegistration( $_SERVER['REMOTE_ADDR'] );\n $user->setIpAtRegistration($request->ip());\n $user->setDateCreated( time() );\n $user->setDateModified( time() );\n\n //save it\n $userManager = new UserManager();\n $userManager->save($user);\n// @TODO: MAILER\n// send email confirmation message\n// $mailer = new Mailer();\n//\n// $mailerResult = $mailer->sendRegistrationConfirmation($user);\n\n //log user in right now (will redirect home)\n $this->logUser($request, $user);\n// $this->logUser($request, $user);\n $json = new JsonResponse();\n $json->setData(array(\"redirectTo\" => Route('graph')));\n $json->send();\n }\n //not valid\n else {\n $errors = $validator->getErrors();\n $params[\"errors\"] = $errors;\n return response()->json([\n 'error' => $errors\n ],400);\n }\n\n }\n return view('auth.register',['params'=> $params]);\n// $view = new View(\"register.php\", $params);\n// $view->setLayout(\"../View/layouts/modal.php\");\n// $view->send(true);\n }", "public function registerAction()\n {\n\n\n $form = new Application_Form_User();\n if($this->_request->isPost() && $form->isValid($_POST))\n {\n //code to process the form\n $model = new Application_Model_Users();\n $formValues = $this->_request->getParams();\n $token = $model->getActivationToken();\n // echo $token;\n // die();\n // $nameWS = str_replace(' ', '', trim($formValues['name']->getName()));\n\n $id = $model->create($formValues['name'],\n $formValues['username'],\n \n $formValues['email'],\n $formValues['password'],\n $formValues['age'],\n // $formValues['password'],\n $token);\n if(isset($id))\n {\n $mail = new Application_Model_Mail();\n $mail->sendActivationEmail($formValues['username'], $formValues['email'], $token);\n $this->_redirect('users/register-success');\n }\n else\n {\n throw new Zend_Exception('Registration Error');\n }\n }\n else\n {\n $this->view->form=$form;\n $this->render('register'); \n }\n\n\n }", "public function register() \n\t{\n $referer = isset($_GET['referer']) ? htmlentities($_GET['referer'], ENT_QUOTES) : '';\n\t\t\n\t\t$this->View->RenderMulti(['_templates/header','user/register']);\n }", "public function register()\n\t{\n\t\t$rsp = new Response();\n\n\t\t//Do we have all the required fields ?\n\t\tif(empty($_POST['user_name']) ||\n empty($_POST['user_email']) ||\n empty($_POST['user_passwd']) ||\n empty($_POST['user_passwd_confirm']))\n {\n\t\t\t$rsp->setFailure(400, \"One or more fields are missing.\")\n ->send();\n }\n\n //Is password confirmation correct ?\n if($_POST['user_passwd'] !== $_POST['user_passwd_confirm'])\n {\n $rsp->setFailure(409, \"`user_passwd` and `user_passwd_confirm` does not match.\")\n ->send();\n\n return;\n }\n\n //Is email valid ?\n if(!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL))\n {\n $rsp->setFailure(409, \"`user_email` is not a valid email.\")\n ->send();\n\n return;\n }\n\n //Is email banned?\n if(Response::read(\"ban\", \"is\", \"email\", $_POST['user_email'])[\"code\"] == 401)\n {\n $rsp->setFailure(406, \"The email used is banned.\")\n ->send();\n\n return;\n }\n\n //Is user unique?\n if(!$this->model->isUnique($_POST['user_email']))\n {\n $rsp->setFailure(403, \"This email is already in use. You might want to log in.\")\n ->send();\n\n return;\n }\n\n //Register the user\n $userID = $this->model->addUser($_POST['user_name'], $_POST['user_email'], $_POST['user_passwd'], time());\n\n //Send an activation email\n if(!$this->model->sendMail($userID, $_POST['user_email'], time()))\n {\n $rsp->setFailure(400, \"Error while sending the activation email.\")\n ->send();\n\n return;\n }\n\n $rsp->setSuccess(201, \"User added and activation mail sent.\")\n ->bindValue(\"email\", $_POST['user_email'])\n ->bindValue(\"userID\", $userID)\n ->send();\n\t}", "public function registerUser($data);", "public function register()\n {\n $create_from = $this->request->get_body_params();\n\n $input = (object) array_intersect_key( $create_from,\n array_fill_keys(['username', 'password', 'email'], false)\n );\n\n $update = [\n 'first_name',\n 'last_name',\n ];\n\n /** @var \\WP_Error|integer $user */\n $user_id = \\wp_create_user($input->username, $input->password, $input->email);\n\n if (\\is_wp_error($user_id)) {\n throw new UnauthorizedException($user_id->get_error_message());\n }\n\n /** @var \\WP_User $user */\n $user = \\get_userdata($user_id);\n\n foreach ($update as $att) {\n $user->$att = $create_from[$att];\n }\n\n \\wp_update_user($user);\n\n return $this->response->ok([\n 'message' => sprintf(__('Hello %s', PMLD_TD), $user->nickname),\n 'user' => User::make($user),\n ]);\n\n }", "public function registerAction() {\n $user = new User();\n // Create new User Form.\n $form = $this->formFactory->create(UserType::class, $user);\n // Handle Request.\n $form->handleRequest($this->request);\n\n // Check if the information is valid, when form is submitted.\n if ($form->isSubmitted() && $form->isValid()) {\n $plainPassword = $form->get('password')->getData();\n $encoder = $this->container->get('security.password_encoder');\n $encoded = $encoder->encodePassword($user, $plainPassword);\n\n // Set encoded password.\n $user->setPassword($encoded);\n\n // Tell the database to watch for this object.\n $this->em->persist($user);\n\n // Insert object into database. (Create user row)\n $this->em->flush();\n\n\n return new RedirectResponse($this->router->generate('register_success', array(\n )));\n }\n\n return new Response($this->templating->render('security/register.html.twig', [\n 'form' => $form->createView()\n ]));\n }", "public function registerAction()\n {\n if (!isset($this->post['name'])) {\n return new ResponseModel(ResponseModel::ERRORMSG, \"No name was supplied\");\n }\n $name = $this->post['name'];\n if (strlen($name) < 3) {\n return new ResponseModel( ResponseModel::ERRORMSG, \"Name is too short\");\n }\n\n $session = QuizSessionService::getSession();\n $user = $this->quizService->registerUser($name);\n $session->userId = $user->id;\n return new ResponseModel(ResponseModel::USER, $user);\n }", "public function register()\n\t{\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\n\t\t\t// CakePHP automatically call $this->User->validates() for us before saving it.\n\t\t\tif ($this->User->save($this->request->data)) {\n\t\t\t\t// we set the id of our newly created User to the request->data params\n\t\t\t\t$this->request->data['User']['id'] = $this->User->id;\n\t\t\t\t// so we can log in directly. (We don't use $this->User because the password is now encrypted so it would not match).\n\t\t\t\t$this->Auth->login($this->request->data['User']);\n\t\t\t\treturn $this->redirect(array('controller' => 'messages', 'action' => 'index'));\n\t\t\t}\n\t\t}\n\t}", "public function register() {\n\n // If it is not a valid password\n if (!$this->valid_password()) {\n return \"Invalid Password. It must be six characters\";\n }\n\n // If the mobile is valid\n if (!$this->valid_mobile()) {\n return \"Mobile Number is Invalid. It must be 10 numeric digits\";\n }\n\n // If there is a user with that username\n if (User::find($this->username, 'username') !== null) {\n return \"Username already taken\";\n }\n\n // Now we create the user on the database\n if ($this->create_record()) {\n echo \"<br><br>Record Created\";\n // We update the sync the object with the database\n if ($this->update_object('username')) {\n return true;\n echo \"<br><br>Object Updated\";\n }\n }\n\n return \"Sorry, an error has ocurred. Try again later\";\n }", "public function registerNewUser()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('register', Input::all());\n\n\t\t# if we successfully register a new user\n\t\tif(isset($response['success']))\n\t\t{\n\t\t\tUser::startSession($response['success']['data']['user']);\n\n\t\t\t# grab the data array from the response\n\t\t\tSession::flash('success', $response['success']['data']);\n\n\t\t\t# show the user profile screen\n\t\t\treturn Redirect::route('profile');\n\t\t}\n\t\t# there was a problem registering the user\n\t\telse \n\t\t{\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('registration-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\n\t\t\t# ... and show the sign up form again\n\t\t\treturn Redirect::back();\n\t\t}\n\t}", "function register_action()\n {\n $login_model = $this->loadModel('Login');\n $registration_successful = $login_model->registerNewUser();\n\n if ($registration_successful == true) {\n $this->view->render('login/index');\n } else {\n $this->view->render('login/register');\n }\n }", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "function register()\n {\n \t\t$data = file_get_contents('php://input');\n \t\t$this->logservice->log($this->module_name, \"DEBUG\",\"EVENT\",$this->IP,\"$data \");\n\t\t$busData = json_decode($data ,true);\n\t\t//查找是否有重名\n\t\t$criteria = array();\n\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t$result = $this->User->count_results($criteria);\n\n\t\tif ($result > 0) {\n\t\t\t$rspData[\"userID\"] =0;\n\t\t\t$rspData[\"state\"] = \"ERRO\";\n\t\t\t$rspData[\"erroInfo\"] = \"该用户名已经被使用\";\n\n\t\t\t$rspInfo = json_encode($rspData);\n\t\t\techo $rspInfo;\n\t\t\treturn;\n\t\t}\n\t\t$data_in = array();\n\t\t$data_in[\"Role_Id\"] = 2;\n\t\t$data_in[\"Password\"] = $busData[\"password\"];\n\t\t$data_in[\"Name\"] = $busData[\"name\"];\n\t\t$data_in[\"Phone\"] = $busData[\"name\"];\n\t\t$data_in[\"UpLoad\"] = 0;\n\t\t$data_in[\"DownLoad\"] = 0;\n\t\t$data_in[\"Status\"] = 0;\n \n\t\t$result = $this->User->create($data_in);\n\t\tif ($result) {\n\t\t\t$criteria = array();\n\t\t\t$criteria[\"and\"] = array(\"Name\" => $busData[\"name\"]);\n\t\t\t$userDat = $this->User->read($criteria);\n\t\t\tif (!empty($userDat)) {\n\t\t\t\t\n\t\t\t\t$rspData[\"userID\"] =$userDat[0][\"User_Id\"];\n\t\t\t\t$rspData[\"state\"] = \"OK\";\n\t\t\t\t$rspData[\"erroInfo\"] = \"注册成功ID为\".$userDat[0][\"User_Id\"];\n\n\t\t\t\t$rspInfo = json_encode($rspData);\n\t\t\t\techo $rspInfo;\n\t\t\t}\n\n\t\t}\n }", "public function registerAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERREGISTER);\n \t$form = new User_Form_Register();\n $data = $this->_request->getPost();\n if(!$data){\n // Display empty form\n $this->view->registerForm = $form;\n return;\n }\n\n if (!$form->isValid($data) || $this->_request->getParam('emailFailure')) {\n // Display form with errors\n $this->view->registerForm = $form;\n $this->view->emailFailure = $this->_request->getParam('emailFailure', null);\n return;\n }\n\n // Parameters for email and user creation\n $params = array(\n User::COLUMN_USERNAME => $form->getValue(User::INPUT_USERNAME),\n User::COLUMN_PASSWORD => $form->getValue(User::INPUT_PASSWORD),\n User::COLUMN_EMAIL => $form->getValue(User::INPUT_EMAIL),\n //User::COLUMN_OPENID_IDENTITY => $form->getValue(User::INPUT_OPENID_IDENTITY),\n User::INPUT_AUTH_METHOD => $form->getValue(User::INPUT_AUTH_METHOD),\n );\n\n try{\n // Create user in database\n $user = $this->_createNewUser($params);\n $userId = $user->{User::COLUMN_USERID};\n\n $params['activationKey'] = $user->activationKey;\n $params['link'] = APP_URL.Globals::getRouter()->assemble(array(),'userconfirmation');\n $params['link'] .= '?'.User::COLUMN_USERID.\"=$userId&\".self::ACTIVATION_KEY_PARAMNAME.\"={$user->activationKey}\";\n $params['site'] = APP_NAME;\n } catch (Exception $e){\n \t$msg = \"Error while creating user and/or blog. \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n \t$userId = null;\n }\n\n if($userId === null){\n // Redirect to error page in case of user creation failure\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::CREATION_FAILURE));\n }\n\n try{\n // Send Email\n $emailStatus = $this->_helper->emailer()->sendEmail($params[User::COLUMN_EMAIL], $params);\n } catch (Exception $e) {\n $emailStatus = false;\n $msg = \"Email error 2 \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n }\n\n if(!$emailStatus){\n // If there was en error sending the email, delete user row, and forward to current page\n $this->_cleanupUser($userId);\n $this->_forward('register', null, null, array('emailFailure'=>1));\n return;\n }\n\n // Success !\n $this->_savePendingUserIdentity($userId);\n $this->_helper->redirectToRoute('userpending');\n }", "public function register()\n {\n echo 'User Registered';\n }", "function user_register($user_info)\n {\n }", "public function register(){\n\t\t//Better to be implemented through db table\n\t\t$userRole = array('Job Seeker'=>'Job Seeker', 'Employer'=>'Employer');\n\t\t$this->set('userRole',$userRole);\n\n\t\tif($this->request->is('post')){\n\t\t\t$this->User->create();\n\t\t\t\n\t\t\tif($this->User->save($this->request->data)){\n\t\t\t\t$this->Session->setFlash(__('You are now registered and may login'));\n\t\t\t\treturn $this->redirect(array('controller'=>'jobs','action'=>'index'));\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Unable to create new user'));\n\n\t\t\t}\n\t\t}\n\t}", "public function registerAction()\n {\n if (empty($_POST) === false) {\n if (isset($_POST['register'])) {\n //Function Checking if customer with entered \n // user name or emalil exists in Data Base.\n $message = $this->checkIfExists($_POST['userName'], $_POST['email']);\n //Message that user Already exist. \n if ($message != \"\")\n $this->regMassage($message);\n //Registrating a new Customer and Adding him to Data Base.\n else {\n $cst = $this->customerCreate();\n $this->register($cst);\n }\n }\n }\n $this->view->render('Register');\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('[email protected]', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => '[email protected]']);\n }", "public function register()\n {\n if(is_logged_in()) {\n redirect_to(url('thread/index'));\n }\n\n $user = new User;\n $page = Param::get('page_next', 'register');\n\n switch ($page) {\n case 'register':\n break;\n\n case 'register_end':\n $user->username = Param::get('username');\n $user->password = Param::get('password');\n $user->email = Param::get('email');\n\n try {\n $user->register();\n } catch (ValidationException $e) {\n $page = 'register';\n }\n break;\n\n default:\n throw new PageNotFoundExcpetion(\"{$page} not found\");\n }\n\n $this->set(get_defined_vars());\n $this->render($page);\n }", "public function register()\n {\n $name = $this->loginEntry->input('uname');\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n $this->userDetail->makeEntry($name, $email, $password);\n \n $info = $this->userDetail->getDetail($email, $password);\n \n $this->commonFunction->setSession($info->id, $info->user_name);\n \n return redirect('/dashboard');\n }", "function register(){\n\t\t\t$this->__dataDecode();\n\t\t\t\t$data = $this->data;\n\t\t\t\t$username = $data['User']['userName'];\n\t\t\t\t$response\t= array();\n\t\t\t\t$emptyuserName = $this->User->findByUsername($username);\n\t\t\t \t$emptyEmail = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\n\t\t\t \t\n\t\t\tif(isset($this->data['User']['password']))\n\t\t\t{\n\t\t\t\t$this->data['User']['confirm_password'] = $this->data['User']['password'] \t= md5($this->data['User']['password']);\n\t\t\t\t$this->data['User']['email_confirmation']\t= 1;\n\t\t\t\t$this->data['User']['status']\t\t\t= 1;\n\t\t\t\t$data = $this->data;\n\t\t\t\t$data['User']['firstname']=$this->data['User']['firstName'];\n\t\t\t\t$data['User']['lastname']=$this->data['User']['lastName'];\n\t\t\t\t$data['User']['username']=$this->data['User']['userName'];\n\t\t\t\t}\n\n\t\t\tif(!($this->__validEmail($this->data['User']['email'])) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid email.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyuserName) && !empty($data['User']['username']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'userName Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\tif(!empty($emptyEmail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\n\t\t\t}\n\t\t\tif(!empty($emptyemail) && !empty($this->data['User']['email']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'email Already Exists';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\tif(!($this->validateUSAZip($this->data['User']['zip'])) && !empty($this->data['User']['zip']))\n\t\t\t{\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['message']\t= 'Please enter a valid Zip Code.';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t \t}\n\t\t\n\t\t\telse if($this->User->save($data))\n\t\t\t{\n\t\t\t\t$message\t= \"registered successfully\";\n\t\t\t\t$response['error']\t= 0;\n\t\t\t\t$response['response']['result'] = 'success';\n\t\t\t\t$response['response']['message'] = 'registered successfully';\n\t\t\t\t$this->set('response', $response);\t\t\t\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t$response['response']['result'] = 'failure';\n\t\t\t\t$response['response']['message']\t= 'registered unsuccessfully';\n\t\t\t\t$this->set('response', $response);\n\t\t\t\techo json_encode($response);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\n\t\t\techo json_encode($response);\n\t\t\tdie();\n\t\t}", "public function register(string $username, string $password, string $email);", "public function postRegister(Request $request)\r\n { \r\n \tUser::register($request);\r\n\r\n \treturn response(array('success' => true), 201);\r\n }", "public function register_user()\n {\n \n return true;\n \n }", "public function register()\n {\n $user = new UserManager;\n $request = new Request;\n $errorMessage = '';\n $method = $request->getMethode();\n if ($method == \"POST\") {\n $mailUser = $request->getPost('mail');\n $password = $request->getPost('mdp');\n $checkPassword = $request->getPost('cmdp');\n $userName = $request->getPost('userName');\n $userData = array();\n $userData['mail'] = $mailUser;\n $userData['pass'] = $password;\n $userData['userName'] = $userName;\n $userData['role'] = 'user';\n $mailUsed = $user->checkMail($mailUser);\n $userNameUsed = $user->checkUserName($userName);\n\n //if true register user on session \n if (!$mailUsed) {\n if (!$userNameUsed) {\n if ($password == $checkPassword) {\n if (filter_var($mailUser, FILTER_VALIDATE_EMAIL)) {\n $errorMessage = 'Vous êtes connecté avec succés ';\n $request->newSession(\"user\", $userData);\n $hashPassword = hash(\"sha256\", $password);\n $user->newUser($userName, $mailUser, $hashPassword);\n } else {\n $errorMessage = 'Le format de l\\'email est incorrect ';\n }\n } else {\n $errorMessage = 'Les mots de passe ne sont pas identique ';\n }\n } else {\n $errorMessage = 'Le nom d\\'utilisateur entré n\\'est pas disponible ';\n }\n } else {\n $errorMessage = 'Cette email est déja utilisé';\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }", "public function register(Request $request) \n { \n $validator = Validator::make($request->all(), [ \n 'name' => 'required', \n 'company_name' => 'required',\n 'email' => 'required|email|unique:users', \n 'password' => 'required', \n 'c_password' => 'required|same:password', \n 'chapter' => 'required', \n ]);\n if ($validator->fails()) { \n $errors = $validator->errors();\n foreach ($errors->all() as $message) {\n return response()->json([\n 'status'=>0,\n 'base_url' => $this->base_url,\n 'message'=>$message\n ], $this->errorCode);\n }\n }\n $input = $request->all(); \n $input['password'] = $password = Hash::make($input['password']);\n $input['rnumber'] = (isset($input['rnumber']))?$input['rnumber']:'';\n $input['company_name'] = (isset($input['company_name']))?$input['company_name']:'';\n $input['user_role'] = 3;\n $input['status'] = 0;\n $user = (new Users)->createUser($input);\n $success['name'] = $user->name;\n return response()->json([\n 'status'=>1,\n 'base_url' => $this->base_url,\n 'message'=>'User registered successfully. Wait for admin verification',\n 'userDetail' => $user\n ], $this->successCode); \n }", "function user_action_user_register($env, $vars) {\n // Prepare the response object.\n $response = new stdClass();\n $user = UserFactory::requestAction($env, $vars['data']['action'], $vars['data']);\n // Check if there are validation errors.\n if (!empty($user->getData('validation_errors'))) {\n foreach ($user->getData('validation_errors') as $error) {\n new Message($env, $error, MESSAGE_WARNING);\n }\n $response->errors = Message::burnMessages();\n }\n else {\n $username = array_pop($vars['data']['name']);\n $user = UserFactory::load($env, $username);\n $user->logIn(NULL, t('Hello %user, thank you for signing up. You are now a registered member.', array('%user' => $username)), TRUE);\n $response->redirect = NodeFactory::current($env)->getName();\n }\n\n // Encode the response JSON code.\n $response_json = json_encode($response);\n\n exit($response_json);\n}", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function registerPost()\n {\n $this->response->getHeaders()->setStatusCode(302);\n\n $regForm = $this->_getRegisterForm();\n $request = $this->getRequest();\n\n $failRedirect = $this->_router->assemble(\n array('controller' => 'user', 'action' => 'register'), \n array('name' => 'default')\n );\n\n if (!$this->getRequest()->isPost() || !$regForm->isValid($request->post()->toArray())) {\n $this->_flashMessenger->addMessage($regForm);\n $this->response->getHeaders()->addHeader('Location', $failRedirect);\n return $this->response;\n }\n $user = self::$di->get('userService')->createFromForm($regForm);\n var_dump($user);\n die('success!');\n }", "public function actionRegister()\n {\n $module = Yii::$app->getModule('user');\n if (!$module->enableRegistration) {\n throw new NotFoundHttpException();\n }\n\n /** @var RegistrationForm $model */\n $model = \\Yii::createObject(RegistrationForm::className());\n $event = $this->getFormEvent($model);\n\n $this->trigger(self::EVENT_BEFORE_REGISTER, $event);\n\n $this->performAjaxValidation($model);\n\n if ($model->load(\\Yii::$app->request->post()) && $model->register()) {\n $this->trigger(self::EVENT_AFTER_REGISTER, $event);\n $result = [\n 'status' => 'success',\n 'title' => \\Yii::t('user', 'Your account has been created'),\n ];\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\n return $result;\n }\n\n $result = [\n 'status' => 'fail',\n 'model' => $model->getAttributes(),\n 'errors' => $model->getErrors(),\n ];\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\n return $result;\n }", "public function register()\n\t{\n\t\t$post = $this->input->post();\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t\t$now = date('Y-m-d H:i:s');\n\n\t\t$ins['nip'] = $post['nip'];\n\t\t$ins['nama'] = $post['nama'];\n\t\t$ins['email'] = $post['email'];\n\t\t$ins['nohp'] = $post['nohp'];\n\t\t$ins['password'] = md5($post['password']);\n\t\t$this->db->set('createtime', $now);\n\t\t$this->db->insert('mst_user', $ins);\n\t}", "public function register(RegisterRequest $request)\n {\n $newUser = User::createUser($request);\n\n if (!$newUser) {\n $error = 'Failed to create new user';\n\n return $this->toJsonResponse(500, false, $error);\n }\n\n return $this->toJsonResponse(200, $newUser, false);\n }", "public function register()\n\t{\n\t\t$view = new View();\n\t\t$view->load('user', 'register');\n\t}", "function _register()\n{\n // If already login or just login/sign up via facebook, redirect away\n $user = User::getUser();\n if($user)\n redirect('');\n \n $data['page_title'] = 'TourPackages.com.sg | Registration';\n $data['meta_description'] = 'TourPackages.com.sg | Registration';\n \n $body = View::do_fetch(VIEW_PATH.'user/register.php');\n $view = new View(VIEW_PATH.'layouts/layout.php', $data);\n $view->add('body',$body);\n $view->dump();\n}", "public function register() {\n // Check for POST\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Array bereinigen\n // INPUT_POST ruft alle POST-Variablen auf\n // FILTER_SANITIZE_STRING entfernt HTML-Tags \n // und encodiert oder entfernt Special-Chars\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n \n // Datenarray für view befüllen\n $data = [\n 'head' => 'Registrieren',\n\n 'name' => trim($_POST['name']),\n 'name_err' => '',\n\n 'email' => trim($_POST['email']),\n 'email_err' => '',\n \n 'password' => trim($_POST['password']),\n 'password_err' => '',\n\n 'confirm_password' => trim($_POST['confirm-password']),\n 'confirm_password_err' => '',\n\n 'title' => 'Register'\n ];\n\n // Namen-Validierung\n if (empty($data['name'])) {\n $data['name_err'] = \"Bitte geben sie Ihren Namen an.\";\n }\n // Email-Validierung\n if (empty($data['email'])) {\n $data['email_err'] = \"Bitte geben sie eine Email-Adresse an.\";\n } \n elseif ($this->userModel->getUserByEmail($data['email'])) {\n $data['email_err'] = \"Die Email-Adresse ist schon vergeben.\";\n }\n \n // Passwort-Validierung\n if (empty($data['password'])) {\n $data['password_err'] = \"Bitte geben sie ein Passwort an.\";\n } \n elseif (strlen($data['password']) < 6) {\n $data['password_err'] = 'Passwort muss mindestens 6 Zeichen lang sein';\n }\n \n // Passwort-Validierung\n if (empty($data['confirm_password'])) {\n $data['confirm_password_err'] = \"Bitte wiederholen Sie das Passwort.\";\n } \n elseif ($data['password'] != $data['confirm_password']) {\n $data['confirm_password_err'] = \"Die beiden Passwörter stimmen ncht überein.\";\n }\n \n // Kontrollieren ob es Fehler gibt\n if (empty($data['name_err']) &&\n empty($data['email_err']) &&\n empty($data['password_err']) &&\n empty($data['confirm_password_err'])\n ) {\n // Passwort hashen\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Nutzer registrieren\n if ($this->userModel->register($data)) {\n flash('register_success', 'Du bist registriert und kannst dich nun einloggen.');\n redirect('user/login');\n } \n else {\n die('Da ist irgendwas falsch gelaufen');\n }\n }\n else {\n // Das Formular mit den Fehlern anzeigen\n $this->view('user/register', $data);\n }\n }\n else {\n // Datenarray anlegen\n $data = [\n 'head' => 'Registrieren',\n\n 'name' => '',\n 'name_err' => '',\n\n 'email' => '',\n 'email_err' => '',\n \n 'password' => '',\n 'password_err' => '',\n\n 'confirm_password' => '',\n 'confirm_password_err' => '',\n\n 'title' => 'Register'\n ];\n // Das Formular laden\n $this->view('user/register', $data);\n } // ende if-else\n }", "public function registerUser()\n {\t\n\t\t/**\n\t\t * Our UserModel will return an error \n\t\t * if the email already exists, \n\t\t * or if the passwords do not match\n\t\t */\n\t\ttry{\n\t\t$user = new UserModel();\n\t\t$user->name = Input::get('name');\n\t\t$user->email = Input::get('email');\n\t\t$user->password = Input::get('password');\n\t\t$user->password_confirmation = Input::get('password_confirmation');\n\t\t$user->save();\t\n\t\t$this->setToken($user);\n\t\treturn $this->sendResponse('You have been registered and are logged in');\n\t\t}\n\t\tcatch(Exeption $e){\n\t\t\treturn $this->sendResponse(false, $e->getMessage());\n\n\t\t}\n }", "public function register_user()\n {\n if (isset($_POST['btnRegister'])) {\n $username = $_POST['username_reg'];\n $password = $_POST['password'];\n $role = 2;\n\n //check Username ton tai hay khong ton tai\n $checkUsername = $this->UserModel->checkUsername($username);\n if ($checkUsername == 'true') {\n header(\"Location:../Register\");\n } else {\n // 2.INSERT DATA EQUAL USERS\n $rs = $this->UserModel->InserNewUser($username,$password,$role);\n // 3.SHOW OK/FAILS ON SCREENS\n header(\"Location:../Login\");\n }\n }\n }", "public function registerAction()\n\t{\n\t\tif($this->loggedEmail){\n\t\t\t$this->_redirect('/');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//get referrer\n\t\t$ns = new Zend_Session_Namespace('referrer');\n\t\t$this->view->referby = $ns->referrer;\n\t\t\t\n\t\tif($this->getRequest()->isPost()){\n\t\t\t//Validation\n\t\t\t// Valid email address?\n\t\t\tif (! Zend_Validate::is($this->_request->getPost('email'), 'EmailAddress')\n\t\t\t\t&& $this->_request->getPost('email') != 'me2@localhost'){\n\t\t\t\t$this->view->errors[] = \"Invalid e-mail address.\";\n\t\t\t} \n\t\t\t//E-mail cannot already exist in the database\n\t\t\t$user = new Default_Model_User();\n\t\t\t$foundUser = $user->getUserByEmail($this->_request->getPost('email'));\n\t\t\tif(isset($foundUser->id)){\n\t\t\t\t$this->view->errors[] = \"Email address already in database.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Handle must be between 2-20 characters\n\t\t\t$validator = new Zend_Validate_StringLength(2, 20);\n\t\t\tif(! $validator->isValid($this->_request->getPost('handle'))){\n\t\t\t\t$this->view->errors[] = \"Handle must be between 2 and 14 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Handle must consist solely of alphanumeric characters\n\t\t\t$validHandle = new Zend_Validate_Alnum();\n\t\t\tif (! $validHandle->isValid($this->_request->getPost('handle'))) {\n\t\t\t\t$this->view->errors[] = \"Handle must consist of letters and numbers.\";\n\t\t\t} // end valid handle\n\t\t\t\n\t\t\t// Handle cannot already exist in database\n\t\t\t$foundUser = $user->getUserByHandle($this->_request->getPost('handle'));\n\t\t\tif (isset($foundUser->id)) {\n\t\t\t\t$this->view->errors[] = \"Handle already exists in database.\";\n\t\t\t}\n\t\t\t\n\t\t\t// Password must between 6 to 20 characters\n\t\t\t$validPswd = new Zend_Validate_StringLength(6,20);\n\t\t\tif (! $validPswd->isValid($this->_request->getPost('password'))) {\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t} // end valid password\n\t\t\t\n\t\t\t// First name must not be empty\n\t\t\t$validFirstName = new Zend_Validate_NotEmpty();\n\t\t\tif (! $validFirstName->isValid($this->_request->getPost('first_name'))) {\n\t\t\t\t$this->view->errors[] = \"Please provide your first name.\";\n\t\t\t} // end valid first name\n\t\t\t\n\t\t\t// Last name must not be empty\n\t\t\t$validLastName = new Zend_Validate_NotEmpty();\n\t\t\tif (! $validLastName->isValid($this->_request->getPost('last_name'))) {\n\t\t\t\t$this->view->errors[] = \"Please provide your last name.\";\n\t\t\t} // end valid last name\n\t\t\t\n\t\t\t// Valid gender?\n\t\t\tif (! Zend_Validate::is($this->_request->getPost('gender'), 'NotEmpty')) {\n\t\t\t\t$this->view->errors[] = \"Please identify your gender.\";\n\t\t\t} // end valid gender\n\t\t\t\n\t\t\t//Address not empty?\n\t\t\tif(! Zend_Validate::is($this->_request->getPost('address'), 'NotEmpty')){\n\t\t\t\t$this->view->errors[] = \"Please enter your address.\";\n\t\t\t}\n\t\t\t\n\t\t\t\t//if errors exist, prepopulate the form\n\t\t\t\tif(count($this->view->errors) > 0){\n\t\t\t\t$this->view->email = $this->_request->getPost('email');\n\t\t\t \t$this->view->handle = $this->_request->getPost('handle');\n\t\t\t \t$this->view->first_name = $this->_request->getPost('first_name');\n\t\t\t \t$this->view->last_name = $this->_request->getPost('last_name');\n\t\t\t \t$this->view->gender = $this->_request->getPost('gender');\n\t\t\t\t$this->view->address = $this->_request->getPost('address');\n\t\t\t\t}else{ //No errors, add user to the database and send confirmation e-mail\n\t\t\t\t\n\t\t\t\t//Generate random keys used for registration confirmation\n\t\t\t\t$registrationKey = $this->_helper->generator(32, 'alpha');\n\t\t\t\t\n\t\t\t\t// Prepare the data array for database insertion\n\t\t\t\t$data = array (\n\t\t\t\t\t'email' => $this->_request->getPost('email'),\n\t\t\t\t\t'password' => md5($this->_request->getPost('password')),\n\t\t\t\t\t'registration_key' => $registrationKey,\n\t\t\t\t\t'handle' => $this->_request->getPost('handle'),\n\t\t\t\t\t'first_name' => $this->_request->getPost('first_name'),\n\t\t\t\t\t'last_name' => $this->_request->getPost('last_name'),\n\t\t\t\t\t'gender' => $this->_request->getPost('gender'),\n\t\t\t\t\t'address' => $this->_request->getPost('address'),\n\t\t\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'updated_at' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'last_login' => date('Y-m-d H:i:s'),\n\t\t\t\t\t'referby' => $this->_request->getPost('referrer')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t//Create a new mail object\n\t\t\t\t try {\n\t\t\t\t\t $mail = new Zend_Mail();\n\t\t\t\t\t\n\t\t\t\t\t // Set the From, To, and Subject headers\n\t\t\t\t\t $mail->setFrom($this->config->email->from_admin);\n\t\t\t\t\t $mail->addTo($this->_request->getPost('email'),\n\t\t\t\t\t \"{$this->_request->getPost('first_name')}\n\t\t\t\t\t {$this->_request->getPost('last_name')}\");\n\t\t\t\t\t $mail->setSubject('Your game account has been created');\n\t\t\t\t\t\n\t\t\t\t\t // Retrieve the e-mail template\n\t\t\t\t\t include \"emailTemplates/_email-confirm-registration.phtml\";\n\t\t\t\t\t\n\t\t\t\t\t // Attach the e-mail template to the e-mail and send it\n\t\t\t\t\t $mail->setBodyText($email);\n\t\t\t\t\t $mail->send();\n\t\t\t\t\t\n\t\t\t\t\t $this->view->success = 1;\n\t\t\t\t\t } catch (Exception $e) {\n\t\t\t\t\t\t $this->view->errors[] = \"We were unable to send your confirmation \t\t\n\t\t\t\t\t\t e-mail.\n\t\t\t\t\tPlease contact {$this->config->email->support}.\";\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t //If succcessful at sending mail, insert into database\n\t\t\t\t if($this->view->success == 1){\n\t\t\t\t\t// Insert the registration data into the database\n\t\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t\t$user->insert($data);\n\t\t\t\t }\n\t\t\t\t\n\t\t\t\n\t\t\t\t} //end else (w/ no errors)\n\t\t} //end if isPost()\n\t}", "private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }", "public function register(Request $request)\n {\n $id = uniqid();\n\n $validator = Validator::make($request->all(),[\n 'name' => 'required',\n 'email' => 'required|email|unique:users',\n 'password' => 'required',\n 'confirm_password' => 'required|same:password'\n ]);\n\n if ($validator->fails())\n {\n $result['success'] = false;\n $result['message'] = $validator->errors();\n return response()->json($result,462);\n }\n\n //Raise event and send to function for creation\n event(new Registered(\n $user = $this->create($request->all())\n ));\n\n //Create a profile for user as well\n Profile::create([\n 'user_id' => $user->id\n ]);\n\n // $success = $this->login($request);\n $result['token'] = $user->createToken($this->tokenName . $id)->accessToken;\n $result['name'] = $user->name;\n $result['unique_id'] = $this->tokenName . $id;\n $result['profile'] = $user->profile;\n\n return response()->json($result, $this->successStatus);\n }", "public function register()\n\t{\n\t\t// validamos que existan los campos\n\t\t$errors = $this->validate( $_POST, [\n\t\t\t'name|nombre' => 'required',\n\t\t\t'username|usuario' => 'required|unique:users',\n\t\t] );\n\n\t\tif( $errors )\n\t\t{\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// validamos si existe o le definimos un valor\n\t\t$_POST['password'] = isset( $_POST['password'] ) ? $_POST['password'] : '';\n\t\t$_POST['nameE'] = isset( $_POST['nameE'] ) ? $_POST['nameE'] : '';\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$login = $this->auth->register( $_POST['name'], $_POST['username'], $_POST['password'], $_POST['nameE'], $_POST['role'] );\n\t\t// explotamos el resultado\n\t\t$login = explode(\"|\", $login);\n\t\t// validamos si se logueo o no\n\t\tif( $login[0] != 'logueado' )\n\t\t{\n\t\t\t// agregamos a las variables de error la respuesta del servidor\n\t\t\tarray_push($this->errors, $login[0]);\n\t\t\t// agregamos los errores obtenidos desde la peticion hecha al model\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t// retornamos a la vista de acceso cuando se satisfatorio el logueo\n\t\t\techo \"true|\".$login[1];\n\t\t}\n\t}", "public function actionRegister()\n {\n $this->view->title = DetailesForm::TITLE_REGISTER_FORM;\n $model = new UserInfo();\n $items = DetailesForm ::getItems();\n if (Yii::$app->request->post()) {\n $data = Yii::$app->request->post();\n $resultSave = UserInfo::setSave($model , $data);\n if ($resultSave->success)\n {\n Yii::$app->session->setFlash('success', 'ثبت با موفقیت انجام شد');\n $this->redirect( Url::to(['view','id'=> $resultSave->result['id']] ));\n }\n elseif (!$resultSave->success && !empty($resultSave->message))\n {\n $msg = '';\n foreach ($resultSave->message as $text)\n {\n $msg .= $text . \"<br>\";\n }\n Yii::$app->session->setFlash('danger', $msg);\n }\n else\n Yii::$app->session->setFlash('danger', 'عملیات ناموفق به پایین رسید');\n }\n\n return $this->render('_form',\n [\n 'model' => $model,\n 'items' => $items,\n ]);\n\n }", "public function user_can_register()\n {\n\n $this->withoutExceptionHandling();\n\n $response = $this->post(\"api/v1/auth/register\", [\n \"name\" => \"Jack Doe\",\n \"email\" => \"[email protected]\",\n \"password\" => \"password\"\n ]);\n\n $response->assertJsonStructure([\n 'token'\n ]);\n \n $response->assertStatus(200);\n\n $this->assertDatabaseCount('users', 1);\n $this->assertDatabaseHas('users', [\n 'email' => '[email protected]',\n ]);\n }", "public function actionRegister() {\n\n $categories = array();\n $categories = Category::getCategoriesList();\n\n $name = '';\n $email = '';\n $password = '';\n $result = false;\n\n if (isset($_POST['submit'])) {\n $name = $_POST['name'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n\n $errors = false;\n\n if (!User::checkName($name)) {\n $errors[] = 'Name should be at least 2 characters.';\n }\n\n if (!User::checkEmail($email)) {\n $errors[] = 'Invalid email.';\n }\n\n if (!User::checkPassword($password)) {\n $errors[] = 'Password should be at least 6 characters.';\n }\n\n if (User::checkEmailExists($email)){\n $errors[] = 'This E-mail already exists.';\n }\n\n if ($errors == false) {\n $result = User::register($name, $email, $password);\n }\n }\n\n require_once (ROOT.'/views/user/register.php');\n\n return true;\n\n }", "public function register()\n\t{\n\t\t$input = Input::All();\n\t\t\n\t\t$validation = Validator::make($input, User::$rules);\n\t\t\n\t\tif ($validation->passes() && $data['user'] = $this->repo->register($input))\n\t\t{\t\t\t\n\t\t\t$data['activationCode'] = $data['user']->getActivationCode();\n\t\t\t//Send activation code\n\t\t\t$body = View::make('emails.auth.account_activation',$data);\n\t\t\tEmailController::sendMail($data['user']->email, $data['user']->first_name.' '.$data['user']->last_name, 'Welcome to Leadcliq', $body);\n\t\t\t// Create a Milestones entry to track user's checkpoints.\n\t\t\tMilestone::create(array('user_id' => $data['user']->id));\n\t\t\t\n\t\t\treturn View::make('authentication.activation_message',$data);\t\t\t\n\t\t}\n\t\treturn Redirect::route('register')\n\t\t->withInput()\n\t\t->withErrors($validation)\n\t\t->with('message', 'There were validation errors.');\n\t}", "public function registerAction() {\n if($this->getAuthService()->hasIdentity()) {\n return $this->redirect()->toRoute(self::SUCCESS_URL);\n }\n\n $form = $this->getForm();\n $form->get('submit')->setValue('Register');\n\n $authErrors = array();\n /**\n * @var $request \\Zend\\Http\\Request\n */\n $request = $this->getRequest();\n if($request->isPost()) {\n $form->setData($request->getPost());\n\n if($form->isValid()) {\n\n $user = new User();\n $user->exchangeArray($form->getData());\n\n if($this->getUserTable()->hasUser(array('email' => $user->email))) {\n\n $authErrors[] = 'Another user has registered with this email.';\n\n } else {\n\n $this->getUserTable()->saveUser($user);\n\n //check authentication...\n $this->getAuthService()->getAdapter()\n ->setIdentity($request->getPost('email'))\n ->setCredential($request->getPost('password'));\n\n $result = $this->getAuthService()->authenticate();\n $authErrors = $result->getMessages();\n\n if($result->isValid()) {\n\n //check if it has rememberMe :\n if($request->getPost('rememberme') == 1) {\n $this->getAuthStorage()\n ->setRememberMe(1);\n //set storage again\n $this->getAuthService()->setStorage($this->getAuthStorage());\n }\n $this->getAuthService()->getStorage()->write($request->getPost('email'));\n\n $this->redirect()->toRoute(self::SUCCESS_URL);\n }\n }\n\n }\n }\n\n return new ViewModel(array(\n 'form' => $form,\n 'messages' => $authErrors\n ));\n }", "public function register(RegisterRequest $request)\n {\n User::create($request->all());\n\n return $this->responseCodes('success', 'Registered successfully, please login.');\n }", "public function registerNewUser($fullName,$email,$password);", "public function doAction() {\n if ($this->request->isPost() === false) {\n\n $this->flashSession->error('Invalid request');\n return $this->response->redirect('signup', false, 302);\n }\n\n // Validate the form\n $form = new \\Aiden\\Forms\\RegisterForm();\n if (!$form->isValid($this->request->getPost())) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n return $this->response->redirect('/#form-response', 302);\n }\n }\n\n $name = $this->request->getPost(\"name\", \"string\");\n $email = $this->request->getPost(\"email\", \"string\");\n $password = $this->request->getPost(\"password\");\n $websiteUrl = $this->request->getPost(\"websiteUrl\", \"string\");\n $companyName = $this->request->getPost(\"companyName\", \"string\");\n $companyCountry = $this->request->getPost(\"companyCountry\", \"string\");\n $companyCity = $this->request->getPost(\"companyCity\", \"string\");\n $checkfirst = \\Aiden\\Models\\Users::findFirst(array(\n \"email = ?1\",\n \"bind\" => array(\n 1 => $email,\n )));\n\n if ($checkfirst) {\n $errorMessage = 'Email is already existed, please try another.';\n $this->flashSession->error($errorMessage);\n return $this->response->redirect('signup', false, 302);\n }\n $user = new \\Aiden\\Models\\Users();\n $user->setName($name);\n $user->setEmail($email);\n $user->setWebsiteUrl($websiteUrl);\n $user->setCompanyName($companyName);\n $user->setCompanyCountry($companyCountry);\n $user->setCompanyCity($companyCity);\n $user->setPasswordHash($this->security->hash($password));\n $user->setLevel(\\Aiden\\Models\\Users::LEVEL_USER);\n $user->setCreated(new \\DateTime());\n $user->setLastLogin(new \\DateTime());\n $user->setImageUrl(BASE_URI.\"dashboard_assets/images/avatars/avatar.jpg\");\n $user->setSeenModal(0);\n $user->setPhraseDetectEmail(0);\n $user->setSubscriptionStatus('trial');\n\n if ($user->save()) {\n\n $this->session->set('auth', [\n 'user' => $user\n ]);\n\n // Log message\n $message = sprintf('User with email [%s] has successfully registered.', $email);\n $this->logger->info($message);\n\n return $this->response->redirect('leads', false, 302);\n }\n else {\n\n // Client message\n $errorMessage = 'Something went wrong, please try again.';\n $this->flashSession->error($errorMessage);\n\n // Log message\n $message = sprintf('Could not signup user [%s]. (Model error: %s)', $email, print_r($user->getMessages(), true));\n $this->logger->error($message);\n\n return $this->response->redirect('signup', false, 302);\n }\n\n }", "function facebook_user_register_post(){\n\t\t$fb_id=$this->post('fb_id');\n\t\t$fullname=$this->post('fullname');\n\t\t$email=$this->post('email');\n\t\t$username=$this->post('username');\n\t\t$this->load->model('users_model');\n\t\t$data=$this->users_model->get_by_exact_email($email);\n\t\tif($data!=null){\n\t\t\t$this->response(array('ok'=>'0'));\n\t\t}\n\t\t$data=null;\n\t\t$data=$this->users_model->get_by_exact_name($username);\n\t\tif($data!=null){\n\t\t\t$this->response(array('ok'=>'1'));\n\t\t}\n\n\t\t$data=array(\n\t\t\t'fb_id'=>$fb_id,\n\t\t\t'user_name'=>$username,\n\t\t\t'email'=>$email,\n\t\t\t'full_name'=>$fullname,\n\t\t\t'avt'=> get_facebook_avt($fb_id, 200, 200),\n\t\t\t'perm'=>USER\n\t\t\t);\n\t\t$insert_id = $this->users_model->insert($data);\n\t\tif($insert_id!=0){\n\t\t\t$this->response($this->users_model->get_by_fb_id($fb_id));\n\t\t}else{\n\t\t\t$this->response(array('ok'=>'2'));\n\t\t}\n\t\t$this->response(array('ok'=>'2'));\n\t}", "public function register(Request $request)\n {\n //validate incoming request \n $this->validate($request, [\n 'name' => 'required|string',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|confirmed',\n 'rol' => 'required|string',\n ]);\n\n try {\n\n $user = new User;\n $user->name = $request->input('name');\n $user->email = $request->input('email');\n $user->rol = $request->input('rol');\n $plainPassword = $request->input('password');\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return response()->json(['user' => $user, 'message' => 'CREATED'], 201);\n\n } catch (\\Exception $e) {\n //return error message\n return response()->json(['message' => 'User Registration Failed!'], 409);\n }\n\n }", "public function register(Request $request){\n\n $user = $this->user->create([\n 'cpf_cnpj' => $request->cpf_cnpj,\n 'nome_razaosocial' => $request->nome_razaosocial,\n 'tipo_pessoa' => $request->tipo_pessoa,\n 'password' => bcrypt($request->password),\n 'senha' => md5($request->password)\n ]);\n \n return response()->json(['status'=>true,'messagem'=>'Usuário criado com successo','data'=>$user],200);\n }", "public function register(Request $request)\n {\n $this->validate($request, [\n 'email' => 'required|email|unique:users',\n 'password' => 'required|min:6',\n ]);\n \n $user = User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => Hash::make($request->password)\n ]);\n \n $token = JWTAuth::fromUser($user);\n\n return response()->json(compact('user','token'),201);\n }", "public function register (Request $request) {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'email' => 'required|email',\n 'password' => ['required', 'confirmed', new SafePassword()],\n ]);\n if ($validator->fails())\n return response()->json(['errors'=> $validator->errors()], 400);\n if (User::where('email', $request->email)->exists())\n return response()->json(['error' => 'کاربری با این آدرس ایمیل وجود دارد'], 400);\n User::create([\n 'name' => $request->name,\n 'email' => $request->email,\n 'password' => Hash::make($request->password)\n ]);\n return response()->json(['message'=>'کاربر با موفقیت ثبت نام شد']);\n }", "public function register(Request $request){\n $message['title'] = '';\n $message['body'] = '';\n $userInfoTb = new UserInfo();\n\n // 01. validate\n $this->validate($request, [\n 'userName' => 'required',\n 'pass' => 'required',\n 'mail' => 'required',\n ]);\n $userName = $request->get('userName');\n $pass = $request->get('pass');\n $mail = $request->get('mail');\n\n // 02. check unique data\n $uniqueData['name'] = $userName;\n $uniqueData['email'] = $mail;\n $checkResult = $userInfoTb->unique($uniqueData);\n if($checkResult === \\App\\Model\\RootModel::$success){\n\n // 03. insert data\n $values = new \\stdClass();\n $values->name = $userName;\n $values->URI = \\Config::get('app.domainName').\"resource/\".str_replace(\" \", \"_\", $userName);\n $values->password = $pass;\n $values->hashPassword = \\Hash::make($values->password);\n $values->email = $mail;\n $insertResult = $userInfoTb->insertAll($values);\n\n // 04. send email or redirect\n if($insertResult === \\App\\Model\\RootModel::$success){\n $message['title'] = 'Redirect';\n $message['content'] = \\Config::get('app.domainName');\n }\n }\n else{\n $message['title'] = 'Error';\n $message['content'] = $checkResult.' had been registered, please try new one.';\n }\n\n // 05. return\n return json_encode($message);\n }", "public function register()\n\t{\n\t\t$result['status'] = 100;\n\t\t$this->load->view('register',$result);\n\t}", "public function register(Request $request)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'username' => 'required|unique:users',\n\t\t\t'password' => 'required|min:10',\n\t\t\t'options' => 'array'\n\t\t]);\n\n\t\t$user = User::make([\n\t\t\t'username' => $request->input('username'),\n\t\t\t'options' => \\json_encode($request->input('options', []))\n\t\t]);\n\t\t$user->password = Hash::make($request->input('password'));\n\t\t$user->generateToken();\n\t\t$user->save();\n\n\t\treturn response()->json([\n\t\t\t'status' => 'Account created',\n\t\t\t'token' => $user->token\n\t\t], 201);\n\t}", "public function registershop(RegisterRequest $request)\n {\n $emailVerificationRequired = config('settings.mail.email_verification') == 1 && $request->filled('email');\n $phoneVerificationRequired = config('settings.sms.phone_verification') == 1 && $request->filled('phone');\n\n // New User\n $user = new User();\n $input = $request->only($user->getFillable());\n foreach ($input as $key => $value) {\n $user->{$key} = $value;\n }\n\n $user->country_code = config('country.code');\n $user->language_code = config('app.locale');\n $user->password = Hash::make($request->input('password'));\n $user->phone_hidden = $request->input('phone_hidden');\n $user->user_type_id = $request->input('company');\n $user->ip_addr = Ip::get();\n $user->ip_addr = Ip::get();\n $user->verified_email = 1;\n $user->verified_phone = 1;\n\n // Email verification key generation\n if ($emailVerificationRequired) {\n $user->email_token = md5(microtime() . mt_rand());\n $user->verified_email = 0;\n }\n\n // Mobile activation key generation\n if ($phoneVerificationRequired) {\n $user->phone_token = mt_rand(100000, 999999);\n $user->verified_phone = 0;\n }\n\n // Save\n $user->save();\n\n // Message Notification & Redirection\n $request->session()->flash('message', t(\"Your account has been created.\"));\n $nextUrl = config('app.locale') . '/register/finish';\n\n // Send Admin Notification Email\n if (config('settings.mail.admin_notification') == 1) {\n try {\n // Get all admin users\n $admins = User::permission(Permission::getStaffPermissions())->get();\n if ($admins->count() > 0) {\n Notification::send($admins, new UserNotification($user));\n /*\n foreach ($admins as $admin) {\n Notification::route('mail', $admin->email)->notify(new UserNotification($user));\n }\n */\n }\n } catch (\\Exception $e) {\n flash($e->getMessage())->error();\n }\n }\n\n // Send Verification Link or Code\n if ($emailVerificationRequired || $phoneVerificationRequired) {\n\n // Save the Next URL before verification\n session(['userNextUrl' => $nextUrl]);\n\n // Email\n if ($emailVerificationRequired) {\n // Send Verification Link by Email\n $this->sendVerificationEmail($user);\n\n // Show the Re-send link\n $this->showReSendVerificationEmailLink($user, 'user');\n }\n\n // Phone\n if ($phoneVerificationRequired) {\n // Send Verification Code by SMS\n $this->sendVerificationSms($user);\n\n // Show the Re-send link\n $this->showReSendVerificationSmsLink($user, 'user');\n\n // Go to Phone Number verification\n $nextUrl = config('app.locale') . '/verify/user/phone/';\n }\n\n // Send Confirmation Email or SMS,\n // When User clicks on the Verification Link or enters the Verification Code.\n // Done in the \"app/Observers/UserObserver.php\" file.\n\n }\n else\n {\n\n // Send Confirmation Email or SMS\n if (config('settings.mail.confirmation') == 1) {\n try {\n $user->notify(new UserActivated($user));\n } catch (\\Exception $e) {\n flash($e->getMessage())->error();\n }\n }\n\n // Redirect to the user area If Email or Phone verification is not required\n if (Auth::loginUsingId($user->id)) {\n return redirect()->intended(config('app.locale') . '/account');\n }\n\n }\n\n // Redirection\n $success['token'] = $user->createToken('theqqaPassport')->accessToken;\n $success['name'] = $user->name;\n return response()->json([\n 'status' => 'success',\n 'data' => $success,\n ]);\n }", "public function page_register() {\n\n\t\tif(isset($_POST['submit'])) {\n\n\t\t\t$validate = new validate();\n\n\t\t\t/**\n\t\t\t * setup custom allback text\n\t\t\t */\n\t\t\t$validate->errors_text['account_action::_pwdntmatch'] = 'Password fields do not match!';\n\t\t\t$validate->errors_text['account_action::_userexists'] = 'User already exists!';\n\n\t\t\t/**\n\t\t\t* setup form validation rules\n\t\t\t*/\n\t\t\t$validate->set_rules('username', array(\n\t\t\t\t'empty', \n\t\t\t\tarray(\n\t\t\t\t\t'callback' => array(&$this, '_userexists')\n\t\t\t\t)\n\t\t\t));\n\n\t\t\t$validate->set_rules('password', array(\n\t\t\t\t'empty',\n\t\t\t\tarray(\n\t\t\t\t\t'callback' => array($this, '_pwdntmatch'),\n\t\t\t\t\t'params' => array('password_again')\n\t\t\t\t)\n\t\t\t), true);\n\n\t\t\t/**\n\t\t\t * lets attempt to save user into the database\n\t\t\t */\n\t\t\tif(!$validate->check()) {\n\n\t\t\t\t/**\n\t\t\t\t * register user\n\t\t\t\t */\n\t\t\t\tif(account_model::register()) {\n\t\t\t\t\t$this->data->message = \"Account created successful\";\n\t\t\t\t} else {\n\t\t\t\t\t$this->data->message = \"Something went wrong when attempting to create this account!\";\n\t\t\t\t}\n\n\n\t\t\t} else {\n\t\t\t\t$this->data->message = validate::errors();\n\t\t\t}\n\t\t}\n\t}", "public function post_register() {\n try {\n $i = Input::post();\n $validation = \\Fuel\\Core\\Validation::forge();\n $validation->add('email', 'Email')\n ->add_rule('required')\n ->add_rule('valid_email');\n $validation->add('username', 'Username')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n $validation->add('password', 'Password')\n ->add_rule('required')\n ->add_rule('min_length', 6)\n ->add_rule('max_length', 18);\n\n if ($validation->run()) {\n $email = $i['email'];\n if (\\Utils::isDisposableEmail($email)) throw new \\Craftpip\\Exception(\"$email is a disposable Email, please use a genuine Email-id to signup.\");\n\n $auth = new \\Craftpip\\OAuth\\Auth();\n\n $user = $auth->getByUsernameEmail($i['email']);\n if ($user) throw new \\Craftpip\\Exception('This Email-ID is already registered.');\n\n $user_id = $auth->create_user($i['username'], $i['password'], $i['email'], 1, array());\n $auth->setId($user_id);\n $auth->setAttr('verified', false);\n $auth->setAttr('project_limit', 2);\n\n\n $mail = new \\Craftpip\\Mail($user_id);\n $mail->template_signup();\n if (!$mail->send()) {\n $auth->removeUser($user_id);\n }\n }\n else {\n throw new \\Craftpip\\Exception('Something is not right. Please try again');\n }\n $response = array(\n 'status' => true\n );\n } catch (Exception $e) {\n $e = new \\Craftpip\\Exception($e->getMessage(), $e->getCode());\n $response = array(\n 'status' => false,\n 'reason' => $e->getMessage()\n );\n }\n\n echo json_encode($response);\n }", "public function register(Request $request) {\n $input = $request->all();\n $user = User::create([\n 'name' => $input['name'],\n 'phone' => $input['phone'],\n 'password' => bcrypt($input['password']),\n 'type' => 1\n ]);\n $token = $user->createToken('auth')-> accessToken;\n return response()->json(['token'=>$token,'user'=>$user]);\n }", "function action_register() {\n if(model_user::userLoggedIn()) {\n header('Location: /home/track');\n }\n $jobs = model_job::getAllJobs();\n $displayError = FALSE;\n\n if (isset($_POST['btn-register'])) {\n $user_data = array(\n 'lastname' => model_user::sanitizeInput($_POST['form']['lastname']),\n 'firstname' => model_user::sanitizeInput($_POST['form']['firstname']),\n 'email' => $_POST['form']['email'],\n 'password' => $_POST['form']['password'],\n 'confirmPassword' => $_POST['form']['confirmPass'],\n 'job' => $_POST['form']['job'],\n );\n\n $form_errors = array(\n 'emailMessage' => '',\n 'limitMessage' => '',\n 'errorEmail' => FALSE,\n 'errorPassword' => FALSE,\n 'errorConfirmPass' => FALSE,\n 'errorLastName' => FALSE,\n 'errorFirstName' => FALSE,\n 'isPasswordNotMatching' => FALSE,\n );\n\n // Check user's lastname and firstname.\n model_user::validateUserName($form_errors, $user_data, $displayError);\n\n // Check user's email.\n model_user::validateUserEmail($form_errors, $user_data, $displayError);\n\n // Check user's password and user's confirm password.\n model_user::validatePassword($form_errors, $user_data, $displayError);\n\n // If there are no errors displayed, attempt to add the user.\n if (!$displayError) {\n try {\n $user = model_user::addUser(\n $user_data['lastname'],\n $user_data['firstname'],\n $user_data['email'],\n $user_data['password'],\n $user_data['job']\n );\n header('Location: /home/login');\n } catch (Exception $e) {\n header('Location: /500/index');\n }\n }\n }\n @include_once APP_PATH . 'view/user_register.tpl.php';\n }", "public function actionRegister()\n {\n if (isset($this->request['mobile'])) {\n $mobile = $this->request['mobile'];\n $user = Users::model()->find('username = :mobile', [':mobile' => $mobile]);\n\n $code = Controller::generateRandomInt();\n if (!$user) {\n $user = new Users();\n $user->username = $mobile;\n $user->password = $mobile;\n $user->status = Users::STATUS_PENDING;\n $user->mobile = $mobile;\n }\n\n $user->verification_token = $code;\n if ($user->save()) {\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $user->id]);\n $userDetails->credit = SiteSetting::getOption('base_credit');\n $userDetails->save();\n }\n\n Notify::SendSms(\"کد فعال سازی شما در آچارچی:\\n\" . $code, $mobile);\n\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Mobile variable is required.']));\n }", "public function actionCreate()\n {\n $model = new RegisterForm();\n $model->type = User::TYPE_USER;\n $model->status = User::STATUS_ACTIVE;\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->password_hash = (new Security())->generatePasswordHash($model->password);\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function store(Requests\\UserRegisterRequest $request)\n {\n $data=array_merge($request->all(),['avatar'=>'/image/default-avatar.jpg','confirm_code'=>str_random(48)]);\n User::register($data);\n //return redirect('/');\n\n return redirect('/success');\n }", "public function test_user_can_register()\n {\n $this->withoutExceptionHandling();\n\n $user = [\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => 'password',\n 'password_confirmation' => 'password',\n ];\n\n $response = $this->post('/api/register/', $user);\n\n $response->assertStatus(200);\n $response->assertStatus(Response::HTTP_OK);\n $this->assertDatabaseHas('users', ['email' => '[email protected]']);\n }", "public function register(Request $request)\n {\n $this->validator($request->all())->validate();\n\n $user = $this->create($request->all());\n if($user && $user->id > 0)\n {\n return redirect($this->redirectPath());\n }\n else\n {\n return redirect(\"/register\");\n }\n }", "public function register(Request $request)\n {\n //\n }", "public function register(RegisterRequest $request){\n $credentials = $request->validated();\n $credentials['password'] = Hash::make($request->password);\n \n $user = User::create($credentials);\n $token = $user->createToken($credentials['device_name'] ?? $this->defaultDeviceName);\n\n return [\n 'mesage' => 'Registration successful',\n 'token' => $token->plainTextToken\n ];\n }", "public function register (){\n $msg=\"\";\n if (isset($_POST[\"register\"])) {\n if ($this->isValidInput($_POST)){\n $firstName = $_POST[\"firstName\"];\n $lastName = $_POST[\"lastName\"];\n $email = $_POST[\"email\"];\n $password = password_hash(trim($_POST[\"password\"]), PASSWORD_BCRYPT);\n $age = $_POST[\"age\"];\n $isAdmin = null;\n //if user is not empty - the email from input already exists\n $user = UserDao::getByEmail($email);\n if($user != null){\n $msg .= \"Вече съществува потребител с този email\";\n $this->triggerError($msg, 'register.tpl');\n }\n else {\n $newUser = new User(null, $firstName,$lastName,$email,$password,$age,$isAdmin);\n UserDao::addUser($newUser);\n $_SESSION[\"user\"] = $newUser;\n header(\"Location: \".BASE_PATH);\n }\n }\n else {\n $msg .= \"Въведени са невалидни данни\";\n $this->triggerError($msg, 'register.tpl');\n }\n }\n else {\n $GLOBALS[\"smarty\"]->assign('isLoggedIn', isset($_SESSION[\"user\"]));\n $GLOBALS[\"smarty\"]->assign('msg', $msg);\n $GLOBALS[\"smarty\"]->display('register.tpl');\n }\n }" ]
[ "0.7815844", "0.74200004", "0.74130434", "0.7387356", "0.72658485", "0.72625166", "0.72350025", "0.72223955", "0.7220533", "0.7193377", "0.71760166", "0.7158779", "0.71441233", "0.70691967", "0.7031413", "0.70298123", "0.7027911", "0.69663376", "0.6964116", "0.69639057", "0.69561833", "0.695541", "0.6935983", "0.69333565", "0.6932012", "0.69239897", "0.69026136", "0.69023466", "0.68849325", "0.68836683", "0.6878956", "0.68786514", "0.68780476", "0.6861917", "0.6854514", "0.684871", "0.6838862", "0.6836098", "0.6835349", "0.68316835", "0.6830112", "0.6826986", "0.68207574", "0.68132377", "0.6805809", "0.67911464", "0.67906547", "0.6768552", "0.67656803", "0.676239", "0.67546725", "0.67395926", "0.67079824", "0.6707955", "0.67035776", "0.6703104", "0.67024654", "0.6701885", "0.6695664", "0.6689057", "0.66828066", "0.6670133", "0.66524774", "0.6649469", "0.66451955", "0.6641549", "0.66210854", "0.6619898", "0.6617022", "0.66147304", "0.6605024", "0.66024166", "0.6591684", "0.6584416", "0.65806115", "0.6578677", "0.6577092", "0.65759414", "0.65703726", "0.656177", "0.6559136", "0.65532655", "0.65516627", "0.65492177", "0.6546193", "0.65414625", "0.653678", "0.6534574", "0.65291464", "0.6525133", "0.6515456", "0.6515414", "0.6513438", "0.6505921", "0.6501855", "0.6496105", "0.6489074", "0.64879787", "0.64853656", "0.6481508", "0.6480943" ]
0.0
-1
Buscamos los grupos en los que el usuario pueda estar
function buscar_grupos($tipo_musica, $edad){ $sql = "SELECT id_grupo FROM grupos WHERE tipo_musica='$tipo_musica' AND edad_min<='$edad' AND edad_max>='$edad'"; $resultado = consulta($sql); return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function leerMisGrupos($entrada) {\n $grupos = [];\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT propietario, usuario, grupo, nombre, imagen, descripcion FROM usuario_grupo, grupo WHERE usuario = '$usuario' AND usuario_grupo.grupo = grupo.nombre\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "public function getGrupos(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraGrupos\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM grupos \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM grupos LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "function leerGrupos($entrada) {\n $grupos = [];\n\n $usuario = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n\n $query = \"SELECT completa.id, completa.nombre, completa.imagen, completa.fecha_hora, completa.descripcion \"\n . \"FROM (SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`) AS completa WHERE NOT EXISTS \"\n . \"(SELECT `nombre`, `imagen`, `descripcion` FROM `grupo`, usuario_grupo WHERE `nombre`=usuario_grupo.grupo AND usuario_grupo.usuario='$usuario') \"\n . \"ORDER BY completa.fecha_hora ASC LIMIT 20\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) < 1) {\n return FALSE;\n } else {\n while ($row = mysqli_fetch_array($result)) {\n $fila = [];\n\n $fila['propietario'] = $row['propietario'];\n $fila['usuario'] = $row['usuario'];\n $fila['grupo'] = $row['grupo'];\n $fila['nombre'] = $row['nombre'];\n $fila['imagen'] = $row['imagen'];\n $fila['descripcion'] = $row['descripcion'];\n\n $grupos[] = $fila;\n }\n\n cerrarConexion($con);\n return $grupos;\n }\n}", "public function getGrupos()\n {\n return $this->grupos;\n }", "function listarRegistrosGruposInativos() {\n\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'I' \"));\n\t}", "function listarRegistrosGruposAtivos() {\n\t\treturn $this->listarRegistrosGrupos(array(\"gu_status_registro = 'A' \"));\n\t}", "function leerTodosGrupos() {\n $link = crearConexion();\n $grupos = [];\n\n $query = \"SELECT nombre, imagen, descripcion FROM grupo\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['nombre'] = $linea['nombre'];\n $fila['imagen'] = $linea['imagen'];\n $fila['descripcion'] = $linea['descripcion'];\n\n $grupos[] = $fila;\n }\n\n return $grupos;\n}", "public function getInfoGroupUser(Request $request)\n {\n $tabGroups = [];\n $gestionUser = new GestionUserInfos($request->user());\n\n // Récupération des informations groupes / users\n $tGroup = Group::query()->get();\n if($tGroup->count() > 0) {\n foreach($tGroup as $group) {\n $tabGroups['Groups'][] = [\n 'id' => $group->id,\n 'name' => $group->name,\n 'users' => $group->user()->orderBy('users.id')->pluck('users.id'),\n ];\n }\n }\n\n // Détail des users pour rapprochement groupes\n $tUser = $gestionUser->getShareUser();\n if($tUser->count() > 0) {\n foreach($tUser as $user) {\n $tabGroups['Users'][] = [\n 'id' => $user->id,\n 'name' => $user->name,\n ];\n }\n }\n\n return $tabGroups;\n }", "function GetInfogrupos(){\n\t\t\t$sql =\"SELECT G.grupo, G.salon, G.horario, C.descripcion AS carrera \n\t\t\t\tFROM grupos G INNER JOIN carreras C ON G.carrera = C.codigo;\";\n\t\t\t$this->bd->selectSQL($sql);\n\t\t\tif(!empty($this->bd->rowresult)){\n\t\t\t\treturn $this->bd->rowresult;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "function grabUsergroupInfo(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\t\t\n\t\t$app \t= JFactory::getApplication();\n\t\t$db\t= JFactory::getDbo();\n\t\t$user \t= JFactory::getUser();\n\t\t$ugid \t= $app->input->get('ugid', 0, 'int');\n\t\t\n\t\t//if the user has JoomBri profile, redirect him to the dashboard\n \t\t$hasJBProfile = JblanceHelper::hasJBProfile($user->id);\t\n \t\tif($hasJBProfile){\n \t\t\t$link = JRoute::_('index.php?option=com_jblance&view=user&layout=dashboard', false);\n \t\t\t$this->setRedirect($link);\n \t\t\treturn;\n \t\t}\n\t\n\t\t$session = JFactory::getSession();\n\t\t$session->set('ugid', $ugid, 'register');\n\t\t$session->clear('skipPlan', 'register');\t//clear or reset skip plan session if the registration is restarted.\n\t\n\t\t$freeMode = JblanceHelper::isFreeMode($ugid);\n\t\n\t\tif($freeMode){\n\t\t\t// if the user is not registered, direct him to registration page else to profile page.\n\t\t\tif($user->id == 0)\n\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=register&step=3', false);\n\t\t\telse\n\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield', false);\n\t\n\t\t}\n\t\telse {\n\t\t\t// check for skipping of plan selection for this usergroup. If skipped, set the default plan for the usergroup\n\t\t\t$userHelper = JblanceHelper::get('helper.user');\n\t\t\t$ugroup = $userHelper->getUserGroupInfo(null, $ugid);\n\t\t\t\n\t\t\tif($ugroup->skipPlan){\n\t\t\t\t\n\t\t\t\t$query = \"SELECT id FROM #__jblance_plan WHERE default_plan=1 AND ug_id=\".$db->quote($ugid);\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$defaultPlanId = $db->loadResult();\n\t\t\t\t\n\t\t\t\tif(empty($defaultPlanId)){\n\t\t\t\t\t$app->enqueueMessage(JText::_('COM_JBLANCE_NO_DEFAULT_PLAN_FOR_THE_USERGROUP', 'error'));\n\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=showfront', false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$session->set('planid', $defaultPlanId, 'register');\n\t\t\t\t\t$session->set('gateway', 'banktransfer', 'register');\n\t\t\t\t\t$session->set('skipPlan', 1, 'register');\n\t\t\t\t\t// if the user is not registered, direct him to registration page else to profile page.\n\t\t\t\t\tif($user->id == 0)\n\t\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=register&step=2', false);\n\t\t\t\t\telse \n\t\t\t\t\t\t$return = JRoute::_('index.php?option=com_jblance&view=guest&layout=usergroupfield&step=2', false);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$return\t= JRoute::_('index.php?option=com_jblance&view=membership&layout=planadd&step=2', false);\n\t\t\t}\n\t\t}\n\t\t$this->setRedirect($return);\n\t\treturn;\n\t}", "static function getUserGroups(){\n \n }", "function consultaGrupos($idTutor)\n{\n $sql=\"SELECT DISTINCT gp.id_grupo as id ,\n gp.nombre_grupo as nombre ,\n gp.clave as clave,\n gp.id_escuela as \\\"idEscuela\\\",\n gp.id_empresa as \\\"idEmpresa\\\",\n gp.tipo_grupo as \\\"tipoGrupo\\\" \n FROM rel_curso_tutor r_c_t\n JOIN rel_curso_grupo r_c_g\n ON r_c_t.id_rel_curso_grupo = r_c_g.id_rel_curso_grupo\n JOIN grupo gp\n ON gp.id_grupo = r_c_g.id_grupo \n WHERE \tgp.status = 1\n AND r_c_t.id_tutor = \".$idTutor;\n \n $consultaGrupo= new Query(\"SG\");\n $consultaGrupo->sql=$sql;\n $resultado = $consultaGrupo->select(\"obj\");\n \n return $resultado;\n}", "function getGroups($username){\r\n\t\t//SELEZIONO DAL DATABASE L'ELENCO DEI GRUPPI AI QUALI L'UTENTE APPARTIENE\r\n\t\t$sql = \"SELECT groupname FROM \".$this->schema.\".user_group WHERE username='$username'\";\r\n\t\tprint_debug($sql,null,'tabella');\r\n\t\tif($this->db->sql_query($sql)){\t\t//STRUTTURA GRUPPI GISCLIENT\r\n\t\t\t$ris=$this->db->sql_fetchlist('groupname');\r\n\t\t\tif(!$ris) {\r\n\t\t\t\t$this->error->getError(\"C001\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tforeach($ris as $g){\r\n\t\t\t\t$this->groups[]=$g;\r\n\t\t\t}\r\n\t\t\treturn $this->groups;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->error->setNote($sql);\r\n\t\t\t$this->error->getError(\"1\");\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function getSystemUserGroups()\n {\n $system_user_groups = array();\n \n // load the related System_user_group objects\n //Busca grupo para professor\n $system_user_system_user_groups = SystemGroup::where('name','like','%- Professor%')->load();\n if (isset($system_user_system_user_groups[0]))\n {\n $group_id = $system_user_system_user_groups[0];\n }\n $system_user_groups[] = new SystemGroup( $group_id->id );\n //var_dump($system_user_groups);\n return $system_user_groups;\n \n }", "public function getGroupUsersFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('users u', 'u.id = g.userId', 'LEFT');\n $results = $db->get('group_users g', NULL, 'u.*');\n // Process all users\n foreach($results as $user) {\n $user = new \\Models\\User($user['id'], $user['username'], $user['email'], $user['firstName'], $user['lastName'], $user['lastLogin']);\n $this->addUser($user);\n }\n }", "private function getGrupoSubgrupo() {\n\n $oGrupo = new stdClass();\n $oGrupo->codigo = 0;\n $oGrupo->estrutural = \"\";\n $oGrupo->descricao = \"\";\n $oGrupo->grupoPai = 0;\n $oGrupo->nivel = 1;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n $this->aGrupos = $aGrupos;\n\n if ($this->lAgruparGrupoSubgrupo) {\n\n $aGrupos = array();\n\n $oDaoGrupoSubGrupo = new cl_materialestoquegrupo();\n\n /**\n * Busca todos os grupos e subgrupos e seus respectivos grupos pais.\n */\n $sCampos = \" db121_sequencial, m65_sequencial, db121_estrutural, db121_descricao, db121_estruturavalorpai, db121_nivel \";\n $sWhere = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n $sOrdem = \" db121_estrutural \";\n $sql = $oDaoGrupoSubGrupo->sql_query(null, $sCampos, $sOrdem, $sWhere);\n $rsGrupoSubgrupo = $oDaoGrupoSubGrupo->sql_record($sql);\n\n for ($i = 0; $i < $oDaoGrupoSubGrupo->numrows; $i++) {\n\n $oGrupoAux = db_utils::fieldsMemory($rsGrupoSubgrupo, $i);\n $oGrupoMaterial = new MaterialGrupo($oGrupoAux->m65_sequencial);\n $oGrupo = new stdClass();\n $oGrupo->codigo = $oGrupoAux->m65_sequencial;\n $oGrupo->estrutural = $oGrupoAux->db121_estrutural;\n $oGrupo->descricao = $oGrupo->estrutural . \" - \" . $oGrupoAux->db121_descricao;\n $oGrupo->grupoPai = 0;\n if ($oGrupoMaterial->getEstruturaPai() != '') {\n $oGrupo->grupoPai = $oGrupoMaterial->getEstruturaPai()->getCodigo();\n }\n $oGrupo->nivel = $oGrupoAux->db121_nivel;\n $oGrupo->totalPeriodo = 0.0;\n $oGrupo->mediaPeriodo = 0.0;\n $oGrupo->itens = array();\n $oGrupo->meses = array();\n $this->processaMeses($oGrupo);\n\n $aGrupos[$oGrupo->codigo] = $oGrupo;\n }\n\n $this->aGrupos = $aGrupos;\n /**\n * Agrupamos os grupos conforme sua organizacao\n */\n foreach ($this->aGrupos as $oGrupo) {\n $this->criarGrupoPai($oGrupo);\n }\n uasort($this->aGrupos,\n function ($oGrupo, $oGrupoDepois) {\n return $oGrupo->estrutural > $oGrupoDepois->estrutural;\n }\n );\n }\n\n foreach ($this->aDepartamentos as $oDepartamento) {\n\n foreach ($this->aGrupos as $oGrupo) {\n $oDepartamento->itens[$oGrupo->codigo] = clone $oGrupo;\n }\n }\n return $this->aGrupos;\n }", "function perteneceGrupo($entrada1, $entrada2) {\n $usuario = trim(filter_var($entrada1, FILTER_SANITIZE_STRING));\n $grupo = trim(filter_var($entrada2, FILTER_SANITIZE_STRING));\n $con = crearConexion();\n\n $query = \"SELECT usuario FROM `usuario_grupo` WHERE `usuario`='$usuario' AND `grupo`='$grupo'\";\n\n $result = mysqli_query($con, $query);\n cerrarConexion($con);\n return mysqli_num_rows($result) > 0;\n}", "function fillGroups() \n\t{\n\t\t$this->groups[] = array(-1,\"<\".\"Admin\".\">\");\n\t\t$this->groupFullChecked[] = true;\n\t\t\n\t\t$trs = db_query(\"select , from `uggroups` order by \",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->groups[] = array($tdata[0],$tdata[1]);\n\t\t\t$this->groupFullChecked[] = true;\n\t\t}\n\t}", "public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}", "public function obtenerGruposController()\n\t\t{\n\t\t\t$respuesta = Datos::vistaGruposModel(\"grupo\");\n\n\t\t\t#El constructor foreach proporciona un modo sencillo de iterar sobre arrays. foreach funciona sólo sobre arrays y objetos, y emitirá un error al intentar usarlo con una variable de un tipo diferente de datos o una variable no inicializada.\n\n\t\t\tforeach($respuesta as $row => $item)\n\t\t\t{\n\t\t\t\techo'<option value='.$item[\"id_grupo\"].'>'.$item[\"nombre_grupo\"].'</option>';\n\t\t\t}\n\n\t\t}", "public function obtenerCuentaGrupos($id) {\n\t\t\n $this->db->where('account_id', $id);\n $query = $this->db->get('investorgroups_accounts');\n if ($query->num_rows() > 0)\n return $query->result();\n else\n return $query->result();\n \n }", "function getConversacionGrupal($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $conversacion = [];\n $link = crearConexion();\n $query = \"SELECT publicacion.titulo, publicacion.contenido, publicacion.fecha_hora, publicacion.censurada, usuario.username, usuario.foto FROM publicacion, usuario WHERE publicacion.grupo='\" . $grupo . \"' AND publicacion.autor=usuario.username ORDER BY publicacion.fecha_hora ASC\";\n $result = mysqli_query($link, $query);\n cerrarConexion($link);\n while ($linea = mysqli_fetch_array($result)) {\n $fila['titulo'] = $linea['titulo'];\n $fila['contenido'] = $linea['contenido'];\n $fila['fecha_hora'] = $linea['fecha_hora'];\n $fila['usuario'] = $linea['username'];\n $fila['foto'] = $linea['foto'];\n $fila['censurada'] = $linea['censurada'];\n\n $conversacion[] = $fila;\n }\n return $conversacion;\n}", "public function vistaGruposModel($id_usuario){\n\t\tif(empty($id_usuario)){ //verificar si esta vacio el id de usuario (maestro), se obtienen todos los grupos\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos\"); //preparacion de la consulta SQL\n\t\t}\n\t\telse{ //si no esta vacio, se filtra por el id mandado como parametro\n\t\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM grupos WHERE id_maestro = :id\"); //preparacion de la consulta SQL\n\t\t\t$stmt->bindParam(\":id\", $id_usuario);\n\t\t}\n\t\t$stmt->execute(); //ejecucion de la consulta\n\t\treturn $stmt->fetchAll(); //se retorna en un array asociativo el resultado de la consulta\n\t\t$stmt->close();\n\n\t}", "function obtenerGrupoAmodificar($nombreGrupo) {\n $nombre = trim(filter_var($nombreGrupo, FILTER_SANITIZE_STRING));\n $grupo = [];\n\n $con = crearConexion();\n\n $query = \"SELECT nombre, imagen, descripcion, categoria FROM grupo, grupo_categoria WHERE grupo.nombre = grupo_categoria.grupo AND grupo.nombre = '$nombre'\";\n\n $result = mysqli_query($con, $query);\n $row = mysqli_fetch_array($result);\n $grupo['imagen'] = $row['imagen'];\n $grupo['nombre'] = $row['nombre'];\n $grupo['descripcion'] = $row['descripcion'];\n $grupo['categoria'] = $row['categoria'];\n\n cerrarConexion($con);\n\n return $grupo;\n}", "function get_user_groups($customerno, $userid, $form = 'array') {\n if (isset($_SESSION['groupid']) && $_SESSION['groupid'] != 0) {\n $groups = array($_SESSION['groupid']);\n } else {\n $umanager = new UserManager();\n $groups = $umanager->get_user_groups_arr($customerno, $userid);\n if (empty($groups)) {\n $groups = array(0);\n }\n }\n if ($form == 'csv') {\n $groups = implode(',', $groups);\n }\n if ($groups == 0) {\n $groups = null;\n }\n return $groups;\n}", "public function listGroupByUser($name){\n \n $this->connect->connector();\n $ad = $this->connect->getConnector();\n \n \n $racine = \"cn=Users,dc=admc, dc=com\";\n $rechercheGroupe = ldap_search($ad, $racine, \"(&(objectclass=user)(name=\".$name.\"))\");\n $entries = ldap_get_entries($ad, $rechercheGroupe);\n $listGroup = False;\n \n for ($x=0; $x<$entries['count']; $x++){\n \n if(!empty($entries[$x]['memberof'][0])){\n //var_dump($entries[$x]['memberof']);\n for($y=0; $y< $entries[$x]['memberof']['count']; $y++){\n\n\n $listGroup[$y] = $this->getBetween($entries[$x]['memberof'][$y], \"=\", \",\");\n }\n\n }\n }\n return $listGroup;\n \n \n }", "protected function _get_usergroup_list()\n {\n $results = $this->connection->query('SELECT gid,title FROM ' . $this->connection->get_table_prefix() . 'usergroups');\n $mod_results = array();\n foreach ($results as $key => $value) {\n $mod_results[] = array('group_id' => $value['gid'], 'group_name' => $value['title']);\n }\n $results2 = collapse_2d_complexity('group_id', 'group_name', $mod_results);\n return $results2;\n }", "function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }", "public function getUsergroup() {}", "public function allupgraders(){\n // SQL statement\n $sql = \"SELECT * FROM user WHERE special = 1 AND (role = 'account' OR role = 'administrator') \";\n $result = $this->con->query($sql);\n\n // check if there is a user\n $count = $result->num_rows;\n if ($count != 0) {\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }", "function getDatosDeGrupoSolidario(){}", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.clave,u.nivel_usuario,u.status,u.ultimo_login,u.name,u.IdDepartamento,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.nivel_usuario ORDER BY u.clave ASC\";\n $result = find_by_sql($sql);\n return $result;\n}", "public function getGruppi(){\n \n if($this->azienda>0){\n $cosa=(\" azienda = \".$this->azienda.\" OR owner=-1 \");\n\n $this->db->from(\"lm_categorie_prodotti\");\n \n $this->db->where($cosa);\n\n $query=$this->db->get();\n\n //$datas=$query->result();//\n $datas = $query->result_array();\n if(count($datas)>0){\n $gruppi=array();\n foreach($datas as $g){\n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n }\n }else{\n $cosa=(\"owner = \".$this->utente.\" OR owner = -1\");\n $this->db->from(\"lm_categorie_prodotti\");\n $this->db->where($cosa);\n\n $query=$this->db->get();\n $datas = $query->result_array();\n $gruppi=array();\n foreach($datas as $g){\n \n if($g[\"foto\"]==null){\n $g[\"foto\"]=\"/public/img/noimage.jpg\";\n }\n $gruppi[$g[\"gruppo\"]][]=$g;\n \n }\n }\n \n }else{\n redirect(\"/\");\n }\n \n return $gruppi;\n }", "function compruebaMiGrupo($entrada1, $entrada2) {\n $grupo =trim(filter_var($entrada1, FILTER_SANITIZE_STRING));\n $usuario =trim(filter_var($entrada2, FILTER_SANITIZE_STRING));\n $con = crearConexion();\n\n $query = \"SELECT propietario FROM usuario_grupo WHERE grupo = '$grupo' AND usuario = '$usuario' AND propietario='1'\";\n\n $result = mysqli_query($con, $query);\n\n if (mysqli_num_rows($result) > 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n\n cerrarConexion($con);\n}", "function getGroups( $userId )\n\t{\n\t\t$query = \"SELECT DISTINCT CONCAT(units.alias,'-',holders.position,'-current')\n\t\t\t FROM holders, terms, units\n\t\t\t WHERE holders.term = terms.current_term\n\t\t\t AND holders.unitId = units.id\n\t\t\t AND holders.userid = ?;\";\n\n\t\t$groups = $this->_db->fetchAll($query, $userId);\n\t\treturn $groups;\n\t}", "public function buscarUsuarios(){\n\t\t}", "private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_groups', $where);\n $res = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)))\n {\n $res[$row['uid']] = $row;\n }\n\n $this->loadGroupIcons($res);\n\n return $res;\n }", "function _get_user_groups(){\r\n $groups = array();\r\n for($i=0; $i<get_sso_option('rules_number'); $i++){\r\n $rule = _get_rule($i);\r\n if($rule != FALSE){\r\n\t $is_group = _run_rule($rule['var'], $rule['regexp'], $rule['group']);\r\n\t if($is_group === TRUE) $groups[] = $rule['group'];\r\n }\r\n }\r\n return $groups;\r\n}", "public function getGrupo()\n {\n return $this->grupo;\n }", "function getUsersGroups($mysqli,$userID){\r\n $result = $mysqli->query(\"SELECT groups.*, group_members.isAdmin FROM `group_members` RIGHT JOIN groups ON group_members.group_ID = groups.ID WHERE Member_ID = \".$userID.\"\");\r\n $groups = array();\r\n\r\n $i=0;\r\n while($row = $result->fetch_row()){\r\n $g = new group();\r\n $g->groupID = $row[0];\r\n $g->name = $row[1];\r\n $g->description = $row[2];\r\n $g->website = $row[3];\r\n $g->private = $row[4];\r\n $g->type = $row[5];\r\n $g->sport = $row[6];\r\n $g->logoURL = $row[7];\r\n $g->city = $row[8];\r\n $g->userIsAdmin = $row[9];\r\n $groups[$i] = $g;\r\n $i++;\r\n }\r\n return $groups;\r\n }", "public function getEstudiantesGrupo($id_estudiante){\n\n return EstudianteDao::getEstudiantesGrupo($id_estudiante);\n \n }", "public function get_group($user_id){\r\n\t\r\n\t$user_id1 = ($user_id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($user_id).\"'\":'NULL';\r\n\t$sql = $this->hrm_mysql_connect->query(\"SELECT a.leave_group, b.name, b.supervisor_id, b.delegate, b.status, c.user_firstname, c.user_lastname, c.user_email FROM leave_reg a JOIN leave_groups b ON a.leave_group = b.group_id JOIN hrm_users c ON b.supervisor_id = c.user_id WHERE a.user_id=$user_id1\");\r\n\tif($sql){\r\n\t$sup = $sql->fetch_assoc();\r\n\t$g_name = $sup['name'];\r\n\t$g_deleg = $sup['delegate'];\r\n\t$g_status = $sup['status'];\r\n\tif($g_status==3 && $g_deleg!=0){\r\n\t\t$user_id2 = ($g_deleg != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($g_deleg).\"'\":'NULL';\r\n\t\t$sql2 = $this->hrm_mysql_connect->query(\"SELECT user_firstname, user_lastname, user_email FROM hrm_users WHERE user_id=$user_id2\");\r\n\t\t$sup_deleg = $sql2->fetch_assoc();\r\n\t\t$delegate = 1;\r\n\t\t$sup_id = $g_deleg;\r\n\t\t$sup_name = $sup_deleg['user_firstname'].' '.$sup_deleg['user_lastname'];\r\n\t\t$sup_email = $sup_deleg['user_email'];\r\n\t\t}else {\r\n\t$delegate = 0;\r\n\t$sup_id = $sup['supervisor_id'];\r\n\t$sup_name = $sup['user_firstname'].' '.$sup['user_lastname'];\r\n\t$sup_email = $sup['user_email'];\r\n\t\t\t}\r\n\t\t\treturn array($g_name, $sup_id, $sup_name, $sup_email, $delegate);\r\n\t}else{\r\n\t\treturn 0;\r\n\t\t}\r\n}", "public function EstudiantesGrupoMaterias($IdGrupo,$codigoperiodo,$idSubgrupo){\n\t\tglobal $userid,$db;\n\t\t\n\t\t?>\n <?PHP\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n d.codigomateria,\n e.codigocarrera,\n count(*) as totalalumnosgrupo,\n 'Todos' as nomsubgrupo \n FROM\n \tdetalleprematricula AS d\n INNER JOIN prematricula AS p ON p.idprematricula = d.idprematricula\n INNER JOIN estudiante AS e ON e.codigoestudiante = p.codigoestudiante\n INNER JOIN estudiantegeneral ON e.idestudiantegeneral = estudiantegeneral.idestudiantegeneral\n WHERE\n \t(\n \t\tp.codigoestadoprematricula LIKE '1%'\n \t\tOR p.codigoestadoprematricula LIKE '4%'\n \t)\n AND (\n \td.codigoestadodetalleprematricula LIKE '1%'\n \tOR d.codigoestadodetalleprematricula LIKE '3%'\n )\n AND d.idgrupo = \".$IdGrupo.\"\n AND p.codigoperiodo = \".$codigoperiodo.\"\";\n \n if(isset($idSubgrupo)&&($idSubgrupo!=\"\")){\n $SQL_EstudiantesGrupoMaterias=\"SELECT\n g.codigomateria,\n e.codigocarrera,\n Count(*) AS totalalumnosgrupo,\n Subgrupos.NombreSubgrupo AS nomsubgrupo,\n g.codigomateria\n FROM\n SubgruposEstudiantes AS subest\n INNER JOIN estudiantegeneral AS est ON subest.idestudiantegeneral = est.idestudiantegeneral\n INNER JOIN Subgrupos ON subest.SubgrupoId = Subgrupos.SubgrupoId\n INNER JOIN grupo AS g ON Subgrupos.idgrupo = g.idgrupo\n INNER JOIN materia AS e ON e.codigomateria = g.codigomateria\n WHERE\n subest.SubgrupoId = '\".$idSubgrupo.\"'\"; \n }\n\t\t\n\t\t\t\t//echo $SQL_EstudiantesGrupoMaterias.\"<br>\";\t\t\t\t\t\n\t\t\tif($EstudiantesGrupoMaterias=&$db->Execute($SQL_EstudiantesGrupoMaterias)===false){\n\t\t\t\t\techo 'Error en el SQL de grupo de estudiantes materias....<br><br>',$SQL_EstudiantesGrupoMaterias;\n\t\t\t\t\tdie;\n\t\t\t}\t\n\t\t\n\t\t/***************************************************************/\t\t\t\t\t\t\t\n\t\t\n\t\t\tif(!$EstudiantesGrupoMaterias->EOF){\n $i = 0;\n \t\t\twhile(!$EstudiantesGrupoMaterias->EOF){\n \t\t\t $name1 = 'FechaIngreso_'.$i;\n $name2 = 'FechaEgreso_'.$i; \n \t\t\t\t/**********************verificar si tiene alguna rotacion********************************/\n $SQL_EstudiantesRotacion=\"\n SELECT\n \tre.RotacionEstudianteId,\n \tre.FechaIngreso,\n \tre.FechaEgreso,\n \tre.TotalDias,\n \tre.EstadoRotacionId,\n \tsr.NombreServicio,\n \tui.NombreUbicacion,\n \tsc.NombreConvenio,\n \ter.NombreEstado\n FROM\n \tRotacionEstudiantes AS re\n INNER JOIN ServicioRotaciones AS sr ON re.ServicioRotacionId = sr.ServicioRotacionId\n INNER JOIN UbicacionInstituciones AS ui ON re.IdUbicacionInstitucion = ui.IdUbicacionInstitucion\n INNER JOIN siq_convenio AS sc ON re.idsiq_convenio = sc.idsiq_convenio\n INNER JOIN EstadoRotaciones AS er ON re.EstadoRotacionId = er.EstadoRotacionId\n WHERE\n \tre.idestudiantegeneral = '\".$EstudiantesGrupoMaterias->fields['idestudiantegeneral'].\"'\n AND re.codigomateria='\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\n AND re.codigoperiodo='\".$codigoperiodo.\"'\n AND re.codigocarrera='\".$EstudiantesGrupoMaterias->fields['codigocarrera'].\"'\";\n \t\t\n\t\t\t //echo $SQL_EstudiantesRotacion.\"<br>\";\t\t\t\t\t\n if($EstudiantesRotacion=&$db->Execute($SQL_EstudiantesRotacion)===false){\n \t\t\t\t echo 'Error en el SQL de rotaciones de estudiantes....<br><br>',$SQL_EstudiantesRotacion;\n \t\t\t\t\tdie;\n }\n \n \n /*************************************************/\n \t\t\t\t?>\n <tr>\n \t<td style=\"text-align: center;\"><strong><?PHP echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']?></strong><input type=\"hidden\" id=\"total_alumnos\" name=\"total_alumnos\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['totalalumnosgrupo']; ?>\" /></td>\n <td><strong><input type=\"hidden\" name=\"codcarrera_<?php echo $i?>\" id=\"codcarrera_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigocarrera']?>\" /><input type=\"hidden\" name=\"codmateria_<?php echo $i?>\" id=\"codmateria_<?php echo $i?>\" value=\"<?php echo $EstudiantesGrupoMaterias->fields['codigomateria']?>\" /><input type=\"hidden\" name=\"idsubgrupo_<?php echo $i?>\" id=\"idsubgrupo_<?php echo $i?>\" value=\"<?php echo $idSubgrupo;?>\" /><input type=\"hidden\" name=\"idgrupo_<?php echo $i?>\" id=\"idgrupo_<?php echo $i?>\" value=\"<?php echo $IdGrupo;?>\" /><?php echo $EstudiantesGrupoMaterias->fields['nomsubgrupo'] ?></strong></td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreConvenio\"])){\n echo $EstudiantesRotacion->fields[\"NombreConvenio\"];\n }else{ ?>\n <select id=\"convenio_<?php echo $i?>\" name=\"convenio_<?php echo $i?>\" onchange=\"UbicacionInstitucionesConvenio('convenio_<?php echo $i?>', 'idubicacion_<?php echo $i?>')\">\n <option value=\"null\">Seleccione:</option>\n <?php\n echo $SqlConvenios = \"select sc.idsiq_convenio, sc.NombreConvenio from grupo g join materia m on m.codigomateria = g.codigomateria join conveniocarrera cc on cc.codigocarrera = m.codigocarrera join siq_convenio sc ON sc.idsiq_convenio = cc.idconvenio where g.idgrupo = '\".$IdGrupo.\"'\";\n \n $valorconvenio = $db->execute($SqlConvenios);\n foreach($valorconvenio as $datosconvenio){\n ?>\n <option value=\"<?php echo $datosconvenio['idsiq_convenio']?>\"><?php echo $datosconvenio['NombreConvenio']?></option> \n <?php\n }\n ?> \n </select>\n <?php } ?>\n </td>\n <td>\n <?php if(isset($EstudiantesRotacion->fields[\"NombreUbicacion\"])){\n echo $EstudiantesRotacion->fields[\"NombreUbicacion\"];\n }else{ ?>\n <select id=\"idubicacion_<?php echo $i?>\" name=\"idubicacion_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n /*$sqlUbicacion= \"SELECT ui.IdUbicacionInstitucion, ui.NombreUbicacion FROM UbicacionInstituciones ui JOIN siq_convenio sc ON sc.idsiq_institucionconvenio = ui.idsiq_institucionconvenio WHERE sc.idsiq_convenio = '\".$idconvenio.\"'\";\n $valorUbicacion = $db->execute($sqlUbicacion);\n foreach($valorUbicacion as $datosUbicacion){\n ?>\n <option value=\"<?php echo $datosUbicacion['IdUbicacionInstitucion']?>\"><?php echo $datosUbicacion['NombreUbicacion']?></option>\n <?php\n }*/\n ?> \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreServicio\"])){\n echo $EstudiantesRotacion->fields[\"NombreServicio\"];\n }else{ ?><select id=\"servicio_<?php echo $i?>\" name=\"servicio_<?php echo $i?>\">\n <option value=\"null\">Seleccione:</option>\n <?php\n $sqlServicio = \"select ServicioRotacionId, NombreServicio from ServicioRotaciones where codigomateria = '\".$EstudiantesGrupoMaterias->fields['codigomateria'].\"'\";\n echo $sqlServicio;\n $valoresServicio=$db->Execute($sqlServicio);\n foreach($valoresServicio as $datosServicio)\n {\n ?>\n <option value=\"<?php echo $datosServicio['ServicioRotacionId']?>\"><?php echo $datosServicio['NombreServicio']?></option>\n <?php\n }\n ?> \n \n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaIngreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaIngreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name1?>\" name=\"<?PHP echo $name1?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name1?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\" />\n \n \n \n <?php } ?></td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo $EstudiantesRotacion->fields[\"FechaEgreso\"];\n }else{ ?><input type=\"text\" id=\"<?PHP echo $name2?>\" name=\"<?PHP echo $name2?>\" class=\"requerido\" size=\"12\" style=\"text-align:center;\" readonly=\"readonly\" value=\"<?PHP echo $value?>\" placeholder=\"<?PHP echo $Ejemplo?>\" <?PHP echo $readonly;?> onmouseover=\"$('#<?PHP echo $name2?>').datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: 'button',\n buttonImage: '../../../../css/themes/smoothness/images/calendar.gif',\n buttonImageOnly: true,\n dateFormat: 'yy-mm-dd'\n });\n \n $('#ui-datepicker-div').css('display','none');\"/>\n <?php } ?> \n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"TotalDias\"])){\n echo $EstudiantesRotacion->fields[\"TotalDias\"];\n }else{ ?><input type=\"text\" id=\"TotDias_<?php echo $i?>\" name=\"TotDias_<?php echo $i?>\" value=\"\"/><!--<a onclick=\"window.open('./Rotaciones_html.php?actionID=VwFormularioDetalleRotacion','', 'width=600, height=600 scrollbars=no channelmode=no');\" title=\"Ver detalles\">__</a>--></td>\n <?php } ?>\n <td><?php if(isset($EstudiantesRotacion->fields[\"NombreEstado\"])){\n echo $EstudiantesRotacion->fields[\"NombreEstado\"];\n }else{ ?><select id=\"estadorotacion_<?php echo $i?>\" name=\"estadorotacion_<?php echo $i?>\" />\n <option value=\"null\">Seleccione:</option>\n <option value=\"1\" selected=\"\">Activo</option>\n <option value=\"2\">Inactivo</option>\n <option value=\"3\">Bloqueado</option>\n </select>\n <?php } ?>\n </td>\n <td><?php if(isset($EstudiantesRotacion->fields[\"FechaEgreso\"])){\n echo \"No aplica\";\n }else{ ?><input type=\"checkbox\" name=\"checkestudiante_<?php echo $i?>\" id=\"checkestudiante_<?php echo $i?>\" value=\"on\"/></td>\n <?php } ?> \n </tr> \n <?PHP\n $i++;\n\t\t\t\t\t\t\t\t/******************************************************/\n\t\t\t\t\t\t\t\t$EstudiantesGrupoMaterias->MoveNext();\n\t\t\t\t\t\t\t\t}////fin while principal\n \n\t\t\t\t\t\t\t?>\n <script type=\"text/javascript\" >\n var total_rows='<?php echo $i?>';\n $(\"#total_rows\").val('esto');\n \n for(i=0;i>=<?php echo $i; ?>;i++){\n $('#FechaIngreso_'+i).datepicker({\n changeMonth: true,\n changeYear: true,\n \n dateFormat: 'yy-mm-dd'\n });\n \n $(\"#FechaEgreso_\"+i).datepicker({\n changeMonth: true,\n changeYear: true,\n //showOn: \"button\",\n buttonImage: \"../../../../css/themes/smoothness/images/calendar.gif\",\n buttonImageOnly: true,\n dateFormat: \"yy-mm-dd\"\n });\n \n \n } \n \n $('#ui-datepicker-div').css('display','none');\n \n \n \n </script>\n \n \n \t\n \n\t\t\t<?PHP\n return $i;\n\t\t\t}\n\t\t\n\t}", "function getDatosGrupo($entrada) {\n $nombre = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $link = crearConexion();\n $query = \"SELECT grupo.nombre, grupo.descripcion, grupo.imagen, grupo_categoria.categoria FROM grupo, grupo_categoria WHERE grupo.nombre=grupo_categoria.grupo AND grupo.nombre='$nombre'\";\n $result = mysqli_query($link, $query);\n $linea = mysqli_fetch_array($result);\n $datos['nombre'] = $linea['nombre'];\n $datos['imagen'] = $linea['imagen'];\n $datos['descripcion'] = $linea['descripcion'];\n $datos['categoria'] = $linea['categoria'];\n cerrarConexion($link);\n return $datos;\n}", "public static function generar_ggs($id_ggs){\n global $baseDatos;\n \n $res = $baseDatos->query(\"SELECT * FROM `gs_grupo` WHERE id_ggs = $id_ggs\"); \n\n $filas = $res->fetch_all(MYSQLI_ASSOC);\n if (count($filas) != 0){\n $gastos_unicos = array();\n\n foreach ($filas as $clave => $valor) {\n\n $id_gasto_unico = gs_gasto_unico::generar($valor['id_gasto_unico']);\n \n \n $gastos_unicos[] = $id_gasto_unico;\n\n }\n $ggs = new gs_grupo($id_ggs,$gastos_unicos);\n return $ggs;\n }\n else{\n \n return false;\n }\n \n }", "public function index()\n {\n //Vind alle groeperingen waar de gebruiker id in voor komt\n //Daarna vind het alle groepen waar de gebruiker inzit met gebruik van groupeduser\n //returned de groups waar de gebruiker in zit naar de view\n\n $user = User::find(1)->groupedusers()->where('user_id', Auth::User()->id)->get();\n dump($user);\n $newarray = array();\n for ($i = 0; $i < count($user); $i++){\n array_push($newarray, DB::table('groups')->where('id', $user[$i]->group_id)->first());\n }\n\n\n\n\n dump($newarray);\n return view('group', ['groups' => $newarray]);\n\n }", "public function view(){\r\r\n $data = $this->db->query('SELECT * FROM klanten INNER JOIN groups, user_group WHERE klanten.klant_id = user_group.klant_id AND groups.group_id = user_group.group_id AND groups.group_id != 3');\r\r\n if($data->num_rows() > 0){\r\r\n foreach($data->result() as $user){\r\r\n $users[] = $user;\r\r\n }\r\r\n return $users;\r\r\n }\r\r\n }", "public function filter_user() {\n// ----------------------------------------------\n// SELECT * FROM wp_groups_user_group rt\n// LEFT JOIN wp_user u ON rt.user_id = u.ID\n// LEFT JOIN wp_user u ON rt.user_id = u.ID\n// WHERE rt.group_id = 6\n// \n// \n// SELECT * FROM\n// (SELECT \n// rt.user_id,\n// rt.group_id AS location_id\n// FROM wp_groups_user_group rt\n// LEFT JOIN wp_users u ON rt.user_id = u.ID\n// LEFT JOIN wp_users u2 ON rt.user_id = u2.ID\n// WHERE rt.group_id = 6 ) AS rl\n// INNER JOIN\n// (SELECT \n// rt.user_id,\n// rt.group_id AS agency_id\n// FROM wp_groups_user_group rt\n// LEFT JOIN wp_users u ON rt.user_id = u.ID\n// LEFT JOIN wp_users u2 ON rt.user_id = u2.ID\n// WHERE rt.group_id = 3 ) AS ra\n// ON rl.user_id = ra.user_id\n// LEFT JOIN wp_users wu ON rl.user_id = wu.ID ORDER BY `ID` ASC\n }", "public function grupos()\n {\n return $this->belongsTo(GrupoInteres::class, 'FK_DAE_GruposInteres', 'PK_GIT_Id');\n }", "function getAll( )\n {\n $this->dbInit(); \n $user_group_array = 0;\n \n array_query( $user_group_array, \"SELECT * FROM Grp ORDER BY Name\" );\n \n return $user_group_array;\n }", "function getAllAffinityGroupsFromUser()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new AffinityGroupDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllAffinityGroupsFromUser($userID);\n }", "public function getForUserGroups()\n\t{\n##if @BUILDER.strUGConnectionID.len##\n\t\treturn $this->byId( \"##@BUILDER.strUGConnectionID s##\" );\n##else##\t\t\n\t\treturn $this->getDefault();\n##endif##\n\t}", "function selectRegistos($connectDB, $pesquisa, $grupo)\n{\n $rows = array();\n $this_user = $_SESSION['id'];\n\n $result = mysqli_query($connectDB, \"SELECT idutilizador, nome, email, numero, fotografia \n FROM utilizador \n WHERE nome LIKE '%$pesquisa%' \n OR email LIKE '%$pesquisa%'\n OR numero LIKE '%$pesquisa%'\n ORDER BY nome\");\n\n if (mysqli_num_rows($result) > 0) {\n while ($row = $result->fetch_assoc()) {\n if ($row['idutilizador'] != $this_user) {\n //--\n if (!checkIfMember($connectDB, $grupo, $row['idutilizador'])) {\n $rows[] = $row;\n }\n }\n }\n //-- print do json para ser retornado no ajax da pagina dos contactos\n print json_encode(($rows));\n } else {\n echo \"</br> Não encontrou contacto\";\n }\n}", "public function getUsers()\n\t{\n\t\t$groupUsers = new ArrayObject();\n\t\t$group = $this->getGroup();\n\t\tif ($group != null) {\n\t\t\t$users = $this->groupService->getUsersInGroup($this->getGroup(), true);\n\t\t\t\n\t\n\t foreach ($users as $user) {\n\t $groupUsers[$user->id] = $user;\n\t }\t\n\t\t}\n \n return $groupUsers;\n\t}", "static public function fetchFeGroups ()\n {\n $result = [];\n\n if (\n isset($GLOBALS['TSFE']->fe_user) &&\n isset($GLOBALS['TSFE']->fe_user->user) &&\n isset($GLOBALS['TSFE']->fe_user->user['usergroup'])\n ) {\n $result = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']); \n }\n return $result;\n }", "private function grup_sql()\n\t{\n\t\tif ($this->session->grup == 4)\n\t\t{\n\t\t\t$kf = $this->session->user;\n\t\t\t$filter_sql= \" AND a.id_user = $kf\";\n\t\t\treturn $filter_sql;\n\t\t}\n\t}", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.name,u.username,u.user_level,u.status,u.last_login,email,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.user_level ORDER BY u.name ASC\";\n $result = find_by_sql($sql);\n return $result;\n }", "function _get_usergroups($args = array()) {\n\t\treturn WP_Scoped_User_Anon::get_groups_for_user( -1 );\n\t}", "private function getAloneUsers()\n {\n $groupUser_ids = array_unique(array_pluck(GroupUser::all()->toArray(), 'user_id'));\n\n //Descartamos estos usuarios del total\n $users_ids = array_pluck(User::all()->whereNotIn('id', $groupUser_ids)->toArray(), 'id');\n\n return $users_ids;\n }", "public function grupos() {\n if ($this->isAuth()) {\n /* Guardar un grupo */\n if (array_key_exists('name_group', $_POST)) {\n \n // $isExist = $this->clientes->get_group_one($this->input->post('name_group'));\n //verificar si existe el nombre en el grupo\n $existe=$this->clientes->get_by_where_group(array('nombre'=>$this->input->post('name_group')));\n // print_r($existe); die(\"dfdfg\");\n if($existe==0){ \n $this->clientes->add_group(); \n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 1))\n );\n } else {\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 0))\n );\n //$this->session->set_flashdata('message', custom_lang('sima_client_group_created_message', 'Ya existe un grupo con este nombre'));\n //redirect('clientes/grupos'); \n }\n } else if (array_key_exists('delete_group', $_POST)) {\n\n $lista = $this->lista_precios->get_by_id($_POST['delete_group']);\n //verificar si existe el grupo\n $existe=$this->clientes->get_by_where_group(array('id'=>$_POST['delete_group']));\n \n if($existe!=0){\n //verifica es Sin grupo y no dejar eliminarlo\n $nombregrupo=strtolower($existe[0]['nombre']);\n if($nombregrupo != \"sin grupo\"){\n if (empty($lista)) {\n //$this->lista_detalle_precios->delete($lista['id']);//Eliminar detalle de la lista \n //$this->lista_precios->delete($lista['id']);//Eliminar lista\n $this->clientes->assign_default_group($_POST['delete_group']); //Cambia grupo de cliente a default = 0\n $this->clientes->delete_group($_POST['delete_group']);\n\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 1))\n );\n } else {\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 0))\n );\n }\n }else{\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 3))\n );\n }\n \n }else{\n $this->output->set_content_type('application/json')->set_output(\n json_encode(array(\"cliente\" => $this->clientes->get_group_all(), \"resp\" => 2))\n );\n }\n \n\n /* $this->clientes->assign_default_group($_POST['delete_group']);//Cambia grupo de cliente a default = 0\n $this->clientes->delete_group($_POST['delete_group']);\n\n $this->output->set_content_type('application/json')->set_output(\n json_encode($this->clientes->get_group_all())\n ); */\n } else {\n\n /* Vista index */\n $data = array();\n\n $data[\"grupo_clientes\"] = $this->clientes->get_group_all();\n\n $data['pais'] = $this->pais_provincia->get_pais();\n\n $data[\"clientes\"] = $this->clientes->get_clients_group_all(1);\n $data_empresa = $this->miempresa->get_data_empresa();\n $data[\"data\"][\"tipo_negocio\"] = $data_empresa['data']['tipo_negocio']; \n $this->layout->template('member')\n ->css(array(base_url('public/css/multiselect/multiselect.css'), base_url('public/css/loaders/loader.css')))\n ->js(array(base_url(\"/public/js/plugins/Quicksearch/jquery.quicksearch.js\"), base_url('public/js/plugins/multiselect/jquery.multi-select.js')))\n ->show('clientes/grupos', $data);\n }\n }\n }", "function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}", "function exiteGrupo($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n\n $con = crearConexion();\n $query = \"SELECT nombre FROM grupo WHERE nombre='$grupo'\";\n $result = mysqli_query($con, $query);\n\n cerrarConexion($con);\n\n return mysqli_num_rows($result) > 0;\n}", "public function all_users_profile()\n {\n $em = $this->getDoctrine()->getManager();\n $data = $em->getRepository('AppBundle:User');\n\n //ROLE_REGULAR\n $regular = $data->findBy(array('group_id'=>1));\n\n //ROLE_GOLDEN\n $golden = $data->findBy(array('group_id'=>2));\n\n //ROLE_DIAMOND\n $diamond = $data->findBy(array('group_id'=>3));\n\n //ROLE_AGENT\n $agent = $data->findBy(array('group_id'=>4));\n\n\n return $this->render('FOSUserBundle:Clients:group.html.twig',array('regular'=>$regular,'golden'=>$golden,'diamond'=>$diamond,'agent'=>$agent));\n }", "public static function obtener($id_usuario){\n global $baseDatos;\n \n $res = $baseDatos->query(\"SELECT * FROM `us_gastos` WHERE id_usuario = $id_usuario\"); \n\n $res_fil = $res->fetch_assoc();\n if (count($res_fil) != 0) {\n \n $us_ggs = us_ggs::obtener($res_fil['id_us_ggs']);\n \n $us_gastos = new us_gastos($res_fil['id_us_gasto'],$res_fil['id_usuario'],$us_ggs);\n\n \n return $us_gastos;\n }\n else{\n \n return false;\n }\n }", "public function getUserGroceries($user_id) {\n\t\t\n\t\t\n\t\t\n\t\t\t\t$query = \" \n\t\t\tselect * FROM user_grocery_list\n\t\t\tWHERE user_id = :user_id\n\t\t\t\t\"; \n\t\t\n\t\ttry \n { \n $stmt = $this->_db->prepare($query); \n\t\t\t\n\t\t\t$stmt->bindValue(':user_id',$user_id);\n\t\t\t\n $stmt->execute(); \n\t\t\n\t\t\t$result = $stmt->fetch();\n\t\t\treturn $result;\n } \n catch(PDOException $ex) \n { \n\t\t\t$h = $ex->getMessage ();\n die($h); \n }\n\n\t\t\n\t\t\n }", "function referentiel_boites_selections_users($cm, $course, $context, $mode, $referentiel_instance, $initiale=0, $userids='', $userid_filtre=0, $gusers=NULL, $select_acc=0) {\r\n// idem que referentiel_print_evalue_liste_activite()\r\n// mais specialise modification\r\n// form globale\r\n\r\nglobal $CFG;\r\nglobal $USER;\r\nstatic $istutor=false;\r\nstatic $isteacher=false;\r\nstatic $isauthor=false;\r\nstatic $iseditor=false;\r\nstatic $referentiel_id = NULL;\r\n\r\n$record_id_users=array();\r\n\r\n\t$referentiel_id = $referentiel_instance->ref_referentiel;\r\n\t$iseditor = has_capability('mod/referentiel:writereferentiel', $context);\r\n\t$isteacher = has_capability('mod/referentiel:approve', $context)&& !$iseditor;\r\n\t$istutor = has_capability('mod/referentiel:comment', $context) && !$iseditor && !$isteacher;\r\n\t$isauthor = has_capability('mod/referentiel:write', $context) && !$iseditor && !$isteacher && !$istutor;\r\n\r\n\tif (!empty($referentiel_instance->ref_referentiel)){\r\n\t\t// boite pour selectionner les utilisateurs ?\r\n\t\tif ($isteacher || $iseditor || $istutor){\r\n\t\t\tif (!empty($select_acc)){\r\n // eleves accompagnes\r\n $record_id_users = referentiel_get_accompagnements_teacher($referentiel_instance->id, $course->id, $USER->id);\r\n }\r\n\t\t\telse{\r\n // tous les users possibles (pour la boite de selection)\r\n\t\t\t\t// Get your userids the normal way\r\n $record_id_users = referentiel_get_students_course($course->id,0,0); //seulement les stagiaires\r\n\t\t\t}\r\n if ($gusers && $record_id_users){ // liste des utilisateurs du groupe courant\r\n\t\t\t\t$record_users = array_intersect($gusers, array_keys($record_id_users));\r\n\t\t\t\t// recopier\r\n\t\t\t\t$record_id_users=array();\r\n\t\t\t\tforeach ($record_users as $record_id){\r\n\t\t\t\t\t$a = new Object();\r\n\t\t\t\t\t$a->userid=$record_id;\r\n\t\t\t\t\t$record_id_users[]=$a;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Ajouter l'utilisateur courant pour qu'il voit ses activités\r\n\t\t\t$a = new Object();\r\n\t\t\t$a->userid=$USER->id;\r\n\t\t\t$record_id_users[]=$a;\r\n echo referentiel_select_users_activite_accompagnes($userid_filtre, $select_acc, $mode);\r\n echo referentiel_select_users_activite_2($record_id_users, $userid_filtre, $select_acc, $mode, $initiale);\r\n\t\t}\r\n }\r\n}", "public function grupoAsignar(){\n \n\n /*Inicia seguridad*/\n $seguridad = $this->loadModel('Seguridad');\n $carne = $this->request->getSession()->read('id');\n if($carne != ''){\n $resultado = $seguridad->getPermiso($carne,21);\n if($resultado != 1){\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n }\n else{\n return $this->redirect(['controller' => 'Inicio','action' => 'fail']);\n }\n /*Cierra la seguridad*/\n\n $semestre = $this->get_semester(); //obtiene el semestre actual\n $año = $this->get_year(); //obtiene el año actual\n $tabla = $this->Solicitudes->getGruposSinAsignar($semestre,$año); //Grupos sin asistente asignado\n $this->set(compact('tabla'));\n }", "function getGrupo_estudios()\n {\n if (!isset($this->sgrupo_estudios) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sgrupo_estudios;\n }", "public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}", "public function get_groups($data)\n {\n $sql = $this->db->get_where('grupos_usuarios', $data);\n return $sql->result();\n }", "function acf_get_grouped_users($args = array())\n{\n}", "function listeGroupes ( ) {\n // Récupération de la liste des groupes.\n $param['cw'] = \"ORDER BY nomgroupe ASC\" ;\n $req = new clResultQuery ;\n $res = $req -> Execute ( \"Fichier\", \"getGroupes\", $param, \"ResultQuery\" ) ;\n // Formatage de cette liste pour l'insérer directement dans ModeliXe.\n for ( $i = 0 ; isset ( $res['idgroupe'][$i] ) ; $i++ ) { $tab[$res['nomgroupe'][$i]] = $res['nomgroupe'][$i] ; }\n // On renvoie la liste.\n return $tab ;\n }", "function joined_groups() // pulls all the groups the user is joined but excludes school group\n {\n $user = $this->ion_auth->get_user();\n $query_string = \"SELECT group_relationships.group_id, groups.name FROM group_relationships LEFT JOIN groups ON group_relationships.group_id = groups.id \" .\n \"WHERE group_relationships.user_joined_id = ? AND groups.school_group=0\";\n $query = $this->db->query($query_string, array($user->id));\n\n $return_array = array();\n foreach ($query->result() as $row)\n {\n $return_array[] = array('id' => $row->group_id,\n 'name' => $row->name);\n }\n\n return $return_array;\n }", "public function load_group(){\n $this->_compteur = 0;\n $this->_id_list_group = null;\n $this->_statut_group = null;\n $this->_list_group=null;\n $this->_users_group = null;\n $this->_all_group = null;\n\n /* $groups = array();\n if (!session()->has('group')) {\n session(['group' => $groups]);\n }//*/\n\n\n $this->_all_group = DB::table('group')->get();\n $this->_users_group = usergroup::where('user_ID', '=', Auth::id())->where('statut','=', 'actif')->get();\n\n $_users_group2 = usergroup::where('user_ID', '=', Auth::id())->get();\n foreach ($_users_group2 as $_el){\n $this->_statut_group[''.$_el->group_ID.''] = $_el->statut;\n\n }\n\n foreach ($this->_users_group as $element){\n $this->_list_group[$this->_compteur] = group::where('id','=',$element['group_ID'])->first();\n $this->_id_list_group[$this->_compteur] = $this->_list_group[$this->_compteur]['id'];\n //$this->_statut_group[''.$this->_id_list_group[$this->_compteur].''] = $element->statut;\n\n /* if(!array_has(session('group'),$this->_compteur))\n {\n session()->push('group',$element['group_ID']);\n }//*/\n $this->_compteur++;\n session(['menu' => 'groupe']);\n\n }\n\n }", "public function devolveTodosGruposAreas() {\n\t\t$this->load->database();\n\t\t$queryResult = $this->db->select('Area.id as AreaID , Area.nome, Grupo.id as GrupoID, Grupo.tipo,')\n\t\t\t\t\t\t\t\t->from('Grupo_Area')\n\t\t\t\t\t\t\t\t->join('Area', 'Grupo_Area.area = Area.id')\n\t\t\t\t\t\t\t\t->join('Grupo', 'Grupo_Area.grupo = Grupo.id')\n\t\t\t\t\t\t\t\t->get();\n\t\t$result = $queryResult->result();\t\t\t\t\t\n\t\t\n\t\treturn $result;\n\t}", "private function _getUPGroups()\n\t{\n\t\ttry{\n\t\t\t$preferences = trim(Factory::service(\"UserPreference\")->getOption(Core::getUser(), self::PREFERENCE_PARAM_NAME));\n\t\t\t$return = ($preferences === '' ? array() : json_decode($preferences,true));\n\t\t\treturn $return;\n\t\t}\n\t\tcatch(Exception $ex){\n\t\t\treturn array();\n\t\t}\n\t}", "public function get_groups(){\n $group_users = private_party_group_user::search()->where('uid', $this->uid)->exec();\n $merged_groups = array();\n foreach($group_users as $group_user){\n /* @var $group_user private_party_group_user */\n $groups = $group_user->get_groups();\n $merged_groups = array_merge($merged_groups, $groups);\n }\n return $merged_groups;\n }", "public function getGrupo() {\n return $this->iGrupo;\n }", "function find_us(){\n global $db;\n $results = array();\n // SELECT usuarios.IdUsuario,usuarios.Clave, rol.Nombre,subdireccion.Subdireccion,departamento.Departamento FROM usuarios INNER JOIN rol ON usuarios.IdRol =rol.IdRol INNER JOIN departamento ON departamento.IdDepartamento=usuarios.IdDepartamento INNER JOIN subdireccion ON departamento.IdSubdireccion = subdireccion.id')\n $sql = \"SELECT u.id,u.clave,u.nivel_usuario,u.status,u.ultimo_login,s.Subdireccion,d.Departamento\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN departamento d \";\n $sql .=\"ON d.id=u.IdDepartamento\";\n $sql .=\"LEFT JOIN subdireccion s \";\n $sql .=\"ON s.id=u.Id ORDER BY u.clave ASC\";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.nivel_usuario ORDER BY u.clave ASC\";\n $result = find_by_sql($sql);\n return $result;\n}", "protected function readGroups() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tuser_group.*, (SELECT COUNT(*) FROM wcf\".WCF_N.\"_user_to_groups WHERE groupID = user_group.groupID) AS members\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_group user_group\n\t\t\t\tORDER BY\t\".($this->sortField != 'members' ? 'user_group.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$row['deletable'] = (!WCF::getUser()->getPermission('admin.user.canDeleteGroup') || Group::isMember($row['groupID']) || !Group::isAccessibleGroup($row['groupID']) || $row['groupType'] == Group::EVERYONE || $row['groupType'] == Group::GUESTS || $row['groupType'] == Group::USERS) ? 0 : 1;\n\t\t\t\t$row['editable'] = (WCF::getUser()->getPermission('admin.user.canEditGroup') && Group::isAccessibleGroup($row['groupID'])) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t$this->groups[] = $row;\n\t\t\t}\n\t\t}\n\t}", "public function initUserGroups() {}", "public function getUsers()\n {\n\t\treturn $this->api->listUsersOfGroup($this->getID());\n }", "public function listGunners(){\n $sql = \"SELECT j.nome AS nome, \n t.nome AS nome_time, \n j.numero AS numero , \n SUM(gol) AS gols\n FROM dados d,jogador j,time t\n WHERE j.id_jogador = d.jogador_id_jogador\n AND j.time_id_time = t.id_time\n GROUP BY jogador_id_jogador\n ORDER BY gols DESC\";\n $result = $this->connection->dataBase->Execute($sql);\n while($record = $result->FetchNextObject()){\n $gunner['playerName'] = $record->NOME;\n $gunner['teamName'] = $record->NOME_TIME;\n $gunner['amountGoals'] = $record->GOLS;\n $gunner['playerNumber'] = $record->NUMERO;\n $arrayGunner[] = $gunner;\n }\t\n return $arrayGunner;\n\t}", "function bn_auto_group_join($userid, $x = 0, $y = 0){\r\n global $wpdb, $bp, $user_id;\r\n // get the user id\r\n if ($bp->loggedin_user->id && $x !== 'myid') {\r\n $userid = $bp->loggedin_user->id ; // current user if logged in. On activation, userid sent with do_action\r\n }\r\n\r\n // All users\r\n if($all_users_group = get_option('gaj_all_users_group')) {\r\n check_and_add_to_group($userid, $all_users_group);\r\n }\r\n\r\n // get profile fields with group linking\r\n $profiles = $wpdb->get_results(\"SELECT * FROM {$bp->profile->table_name_fields} WHERE group_link = 1\");\r\n foreach ($profiles as $profile) {\r\n\r\n // see what the person has for that field\r\n $profileinfo = $wpdb->get_results(\"SELECT value FROM {$bp->profile->table_name_data} WHERE user_id = $userid AND field_id = $profile->id\");\r\n foreach ($profileinfo as $profilevalue ) {\r\n\r\n // see if we can match the group\r\n $groupmatches = $wpdb->get_results(\"SELECT * FROM {$bp->groups->table_name} WHERE name like '$profile->group_pre_regex$profilevalue->value$profile->group_post_regex'\");\r\n foreach ($groupmatches as $groupmatch) {\r\n if(!check_and_add_to_group($userid, $groupmatch->id)) {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n}", "public function searchGrupo($grupo/*Request $request*/){\n\n \n $em = $this->getDoctrine()->getManager();\n $query2= $em->getRepository('SytemSGBundle:ServidorLdap')->findAll();\n if($query2/*file_exists($file3*/){\n // $row1=file($file3); \n foreach ($query2 as $key => $value) {\n $ipservidor=$value->getIpLdap();//trim($row1[0]);\n $complemento=$value->getComplemento();//trim($row1[1]);\n $login=$value->getUsername();//trim($row1[2]);\n $senha=$value->getPassword();//trim($row1[3]);\n } \n $ldapconn = @ldap_connect($ipservidor/*\"200.239.152.140\"*/);\n if($ldapconn){\n $bind = @ldap_bind($ldapconn, $login,$senha/*\"cn=arp,dc=ufop,dc=br\",\"th0123\"*/); \n if($bind){\n $filter2 = \"(gidNumber=\".$grupo.\")\";\n $gindnumber=$grupo;\n $justthese2 = array(\"cn\"); //the attributes to pull, which is much more efficient than pulling all attributes if you don't do this\n $sr2 = ldap_search($ldapconn,\"ou=Grupos,\".$complemento/*\"dc=ufop,dc=br\"*/, $filter2, $justthese2);\n $entry = ldap_get_entries($ldapconn, $sr2); \n if($entry['count']>0){\n \n $namegrupo=$entry[0]['cn'][0];\n \n return TRUE; \n }\n else{\n return FALSE; \n }\n }\n @ldap_close($ldapconn);\n }else{\n return FALSE; \n }\n }else{\n return FALSE; \n }\n \n }", "public function listorg(Request $request)\n {\n $userGroup = UserGroup::where('id_users', Auth::user()->id_users)->pluck('id_groups'); # Auth::user()->id\n $univGroup = Groups::where('id_univ', Auth::user()->id_univ)->pluck('id_groups'); # Auth::user()->id\n\n if ($request->has('search')) {\n $string = $request->input('search');\n $searchValues = preg_split('/\\s+/', $string, -1, PREG_SPLIT_NO_EMPTY);\n $data = Groups::where(function ($q) use ($searchValues) {\n foreach ($searchValues as $value) {\n $q->where('nama', $value)\n ->orWhere('nama', 'like', \"%{$value}%\");\n }\n })->get();\n } elseif ($request->input('filter') === 'semua') {\n $data = Groups::all();\n } else {\n $data = Groups::whereIn('id_groups', $univGroup)->get();\n }\n\n\n return view('user.views.listorg', compact('data', 'userGroup'));\n }", "public function getUsersInGroup()\n\t{\n\t\tself::authenticate();\n\n\t\t$group = FormUtil::getPassedValue('group', null, 'GETPOST');\n\n\t\tif($group == null) {\n\t\t\treturn self::retError('ERROR: No group passed!');\n\t\t}\n\n\t\t$group = UserUtil::getGroups('name = \\'' . mysql_escape_string($group) . '\\'');\n\t\t$return = array();\n\t\tif(count($group) == 1) {\n\t\t\tforeach($group as $item) {\n\t\t\t\t$users = UserUtil::getUsersForGroup($item['gid']);\n\t\t\t\tforeach($users as $uid) {\n\t\t\t\t\t$return[] = UserUtil::getVar('uname', $uid);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return = array();\n\t\t}\n\n\t\treturn self::ret($return);\n\t}", "public function gruposIns(){\n return $this->hasMany(Grupo::class,'cuotainscripcion_id','id');\n }", "public function bancoGrupo($grupo)\n {\n $bancos = Banco::grupo($grupo)\n ->get()\n ->where('id_status',22);\n \n return $bancos;\n }", "function GetAllGroups($UserID){\n $Memberships=array();\n $DirectMemberships = Query(\"SELECT DISTINCT(GroupID) FROM `UserGroupMembership` WHERE UserID = \".intval($UserID));\n \n foreach($DirectMemberships as $DirectMembership){\n \n $Memberships[$DirectMembership['GroupID']]=$DirectMembership['GroupID'];\n \n $IndirectMemberships = GetGroupAncestors($DirectMembership['GroupID']);\n foreach($IndirectMemberships as $IndirectMembership){\n $Memberships[$IndirectMembership]=$IndirectMembership;\n }\n \n }\n ksort($Memberships);\n \n //The groups are in order but they are strings and some might be blank. Let's clean them up\n $CleanMemberships=array();\n foreach($Memberships as $Membership){\n $temp=trim(intval($Membership));\n if(!($temp=='')){\n $CleanMemberships[]=$temp;\n }\n }\n \n return $CleanMemberships;\n}", "public function index()\n {\n //\n return Grupos::all();\n }", "public function vistaGruposController()\n\t\t{\n\t\t\t$respuesta = Datos::vistaGruposModel(\"grupo\");\n\n\t\t\t#El constructor foreach proporciona un modo sencillo de iterar sobre arrays. foreach funciona sólo sobre arrays y objetos, y emitirá un error al intentar usarlo con una variable de un tipo diferente de datos o una variable no inicializada.\n\n\t\t\tforeach($respuesta as $row => $item){\n\t\t\techo'<tr>\n\t\t\t\t\t<td>'.$item[\"id_grupo\"].'</td>\n\t\t\t\t\t<td>'.$item[\"nombre_grupo\"].'</td>\n\t\t\t\t\t<td><div class=\"btn-group\">\n <button type=\"button\" class=\"btn btn-default dropdown-toggle\" data-toggle=\"dropdown\">\n <span class=\"fa fa-cog\"></span>\n </button>\n <div class=\"dropdown-menu\">\n <a class=\"dropdown-item\" href=\"index.php?action=editar_grupo&id='.$item[\"id_grupo\"].'\">Actualizar</a>\n <a class=\"dropdown-item\" onclick=\"confirmarDelete('.$item[\"id_grupo\"].');\" href=\"index.php?action=grupos&idBorrar='.$item[\"id_grupo\"].'\" id=\"btn'.$item[\"id_grupo\"].'\">Eliminar</a>\n </div></td>\n\t\t\t\t</tr>';\n\t\t\t}\n\n\t\t}", "public function getUsers(){\n //Gets the users inputed search first and last name\n $firstName = $_GET[\"firstName\"];\n $lastName = $_GET[\"lastName\"];\n //This function gets all the group requests that have been sent out\n $requestConnections = $this->individualGroupModel->getRequestedConnections();\n //Gets all the people who are already in the group\n $friendsList = $this->individualGroupModel->getGroupFriends();\n //Gets a search result based on the first and last name input\n $userSearch = $this->individualGroupModel->userSearch($firstName, $lastName);\n //declare empty return variables\n $returnData = [];\n \n //This runs through two for loops and comprares the search results ids and the request connection ids.\n //Anybody who has already been sent a group request does not show up in the search result\n for($j=0; $j < sizeof($userSearch); $j++){\n //Sets the trigger to check if the ids match if they dont match then the item is pushed to the created empty array\n $trigger = false;\n for($i=0; $i < sizeof($requestConnections); $i++){\n //Checks for connection\n if($requestConnections[$i]->Receiver_Id == $userSearch[$j]->User_Id){\n $trigger = true;\n break;\n }\n }\n //If trigger is false means there was no match\n if($trigger == false){\n array_push($returnData, $userSearch[$j]);\n }\n\n }\n\n //These loops do a similar thing to the two loops above the difference is this loop checks for users that have \n //already been added to the group. If they have been then the array is unset\n for($i=0; $i < sizeof($friendsList); $i++){\n for($j=0; $j < sizeof($returnData); $j++){\n if($returnData[$j]->User_Id == $friendsList[$i]->User_Id){\n unset($returnData[$j]);\n $returnData = array_values($returnData);\n break;\n }\n }\n \n }\n //echos out the result json encoded\n echo json_encode($returnData);\n }", "function graficos(){\n $professores = DB::table('professor')->get()->sortBy(\"nome\");\n //Pega os dados da disciplina no banco\n $disciplinas = DB::table('disciplina')->get()->sortBy(\"descricao\");\n\n //array professor disciplina\n $professor_disciplina = array();\n //String que vai receber os dados do grafico 1\n $string_grafico1 = \"\";\n\n //For rodando os dados de forma a pegar os dados dos professores do banco e contar quantas materias eles dão aula\n foreach($professores as $professor){\n $id = $professor->id;\n $nome = $professor->nome;\n //Comando para verificar atravez do id do professor, quantas materias eles dão aula\n $qtd_disciplina = Professor_Disciplina::Where('professor_id', $id)->count();\n\n //Comando para Adiciona os elementos no final do array\n array_push($professor_disciplina, $qtd_disciplina, $nome);\n\n //String recebe os dados formando json para o grafico\n $string_grafico1 .= \"{ 'professor' : '\" . $nome . \"', 'qtd' : \". $qtd_disciplina . \"}, \";\n \n }\n\n //array disciplina professor\n $disciplina_professor = array();\n //String que vai receber os dados do grafico 2\n $string_grafico2 = \"\";\n\n\n //For rodando os dados de forma a pegar os dados das disciplinas do banco e contar quantos professores ministram aquela disciplina\n foreach($disciplinas as $disciplina)\n {\n $id = $disciplina->id;\n $descricao = $disciplina->descricao;\n //Comando para verificar atravez do id da disciplina, quantos professores que ministram a disciplina\n $qtd_professor = Professor_Disciplina::Where('disciplina_id', $id)->count();\n //Comando para Adiciona os elementos no final do array\n array_push($disciplina_professor, $qtd_professor, $descricao);\n\n //String recebe os dados formando json para o grafico\n $string_grafico2 .=\"{ 'disciplina' : '\" . $descricao . \"', 'qtd' : \". $qtd_professor . \"}, \";\n }\n\n //retorna para view grafico, os dados de professores para grafico 1 e disciplinas para grafico 2\n return view('layouts.grafico', array('grafico2' => $string_grafico2), array('grafico' => $string_grafico1));\n }", "private function getUserGroups($userID)//this function should be moved to the UserVo\n\t{\n\t\t$db = Zend_Registry::get('db');\n\t\t\n\t\t$select = $db->select()\n\t\t\t\t\t->from(PrecurioTableConstants::USER_GROUPS,'group_id')\n\t\t\t\t\t->join(PrecurioTableConstants::GROUPS,'user_groups.group_id = groups.id','')\n\t\t\t\t\t->where('user_id= ?',$userID)\n\t\t\t\t\t->where ('active= ?',true);\n\t\t\t\t\t\n\t\t$stmt = $select->query();\n\t\t\n\t\t$stmt->setFetchMode(Zend_Db::FETCH_NUM);\n\t\t\n\t\t$userGroups = $stmt->fetchAll();\n\t\t$userGroups = Precurio_Utils::getSecondLevelArray($userGroups,0);\n\t\treturn $userGroups;\n\t}", "function getAllOtherAffinityGroupsFromUser()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new AffinityGroupDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllOtherAffinityGroupsFromUser($userID);\n }", "function get_all_groupe_user($params = array())\n {\n $this->db->order_by('id', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('groupe_user')->result_array();\n }", "function getGroupMemberships($user, $parentGroups = false)\n {\n return array();\n }", "protected function groeperingen()\n\t{\n\t\t$query = $this->connection->table('handelaars_groepering');\n\t\t$groeperingen = $query->where('handelaarid', $this->handelaarid)\n\t\t\t->get(array('groeperingid'));\n\t\t$this->groeperingen = array_map(function($item)\n\t\t{\n\t\t\treturn $item->groeperingid;\n\t\t}, $groeperingen);\n\t}", "public function getGroups() {}" ]
[ "0.6895637", "0.6854564", "0.6827048", "0.659759", "0.6573698", "0.6488114", "0.6427531", "0.6318251", "0.62719995", "0.6241651", "0.62235266", "0.6219194", "0.62026584", "0.61738455", "0.616606", "0.6119411", "0.6066926", "0.6010595", "0.60060954", "0.59975594", "0.59895134", "0.5966676", "0.59593433", "0.5950407", "0.58838034", "0.5882051", "0.5878003", "0.58498085", "0.5843345", "0.5824572", "0.582195", "0.58141327", "0.58103365", "0.58100873", "0.579821", "0.5795917", "0.57776356", "0.57393515", "0.573834", "0.57259786", "0.5725022", "0.5718167", "0.5715046", "0.5710414", "0.570697", "0.57050484", "0.56949455", "0.56892747", "0.56865466", "0.56862724", "0.5682738", "0.5667242", "0.5660978", "0.5655446", "0.56533444", "0.5652614", "0.5636892", "0.5619554", "0.5604544", "0.5601554", "0.56010336", "0.5597666", "0.55945265", "0.5587884", "0.558163", "0.5551944", "0.5550891", "0.5546056", "0.55341834", "0.55285406", "0.5528368", "0.55239785", "0.5519367", "0.5518458", "0.5515894", "0.5514146", "0.5512291", "0.55100846", "0.5509923", "0.5503396", "0.54813147", "0.54743314", "0.5473645", "0.547183", "0.5468865", "0.54623365", "0.5446239", "0.543924", "0.5437529", "0.54358864", "0.5434399", "0.5433121", "0.54274774", "0.54218525", "0.5421315", "0.5416929", "0.54134965", "0.54015046", "0.54004943", "0.5398316" ]
0.585894
27
Create a new controller instance.
public function __construct() { $this->middleware('auth'); $this->chart_js = new ChartJS(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the resource.
public function index() { $user_id = auth()->user()->id; $permissions = $this->getPermissions($user_id); $enum_category = $this->generateOptionsEnumDt(DrivingLicence::enum_category); $list_category = DrivingLicence::enum_category; $enum_country_expedition = $this->generateOptionsEnumDt(DrivingLicence::enum_country_expedition); $list_country_expedition = DrivingLicence::enum_country_expedition; $enum_state = $this->generateOptionsEnumDt(DrivingLicence::enum_state); $list_state = DrivingLicence::enum_state; $company_id = auth()->user()->company_id; $company = CompanyController::getCompanyByid($company_id); return view( 'admin.driving-licence.index', [ 'enum_category' => $enum_category, 'enum_country_expedition' => $enum_country_expedition, 'enum_state' => $enum_state, 'list_country_expedition' => $list_country_expedition, 'list_category' => $list_category, 'list_state' => $list_state, 'company_name' => ucwords(strtolower($company->company)), 'permissions' => $permissions, ] ); }
{ "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 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 actionRestList() {\n\t $this->doRestList();\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 CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function 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 index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\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 _index(){\n\t $this->_list();\n\t}", "public function index()\n {\n $this->booklist();\n }", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\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 // 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 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 showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\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 actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\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 listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236", "0.68033123", "0.6797587", "0.6795274", "0.67868614", "0.67610204", "0.67426085", "0.67303514", "0.6727031", "0.67257243", "0.67257243", "0.67257243", "0.67195046", "0.67067856", "0.67063624", "0.67045796", "0.66655326", "0.666383", "0.66611767", "0.66604036", "0.66582054", "0.6654805", "0.6649084", "0.6620993", "0.66197145", "0.6616024", "0.66077465", "0.6602853", "0.6601494", "0.6593894", "0.65878326", "0.6586189", "0.6584675", "0.65813804", "0.65766823", "0.65754175", "0.657203", "0.657202", "0.65713936", "0.65642136", "0.6563951", "0.6553249", "0.6552584", "0.6546312", "0.6536654", "0.6534106", "0.6532539", "0.6527516", "0.6526785", "0.6526042", "0.65191233", "0.6518727", "0.6517732", "0.6517689", "0.65155584", "0.6507816", "0.65048593", "0.6503226", "0.6495243", "0.6492096", "0.6486592", "0.64862204", "0.6485348", "0.6483991", "0.64789015", "0.6478804", "0.64708763", "0.6470304", "0.64699143", "0.6467142", "0.646402", "0.6463102", "0.6460929", "0.6458856", "0.6454334", "0.6453653", "0.645357", "0.6450551", "0.64498454", "0.64480853", "0.64453584" ]
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) { $data_input = $request->get('drivingLicence'); $validator = Validator::make( $data_input, [ 'licence_num' => 'required|max:255', 'country_expedition' => 'required|max:255', 'category' => 'required|max:255', 'state' => 'required|max:255', 'expedition_day' => 'required|max:255', 'expi_date' => 'required|max:255', 'driver_information_dni_id' => ['required', 'max:255', 'unique:driving_licence'] ], [ 'driver_information_dni_id.unique' => "Este conductor ya tiene una licencia asignada." ] ); $errors = $validator->errors()->getMessages(); // print_r($errors); foreach ($errors as $key => $value) { if (strpos($value[0], "conductor") !== FALSE) { $check_dni_information = DB::table('driving_licence')->select(DB::raw( 'driving_licence.licence_id, driving_licence.operation' ))->where($key, $data_input[$key])->first(); if($check_dni_information->operation != 'D'){ return response()->json(['errors' => $errors]); } $now = date("Y-m-d H:i:s"); $response = DrivingLicence::where($key, $data_input[$key])->update([ 'driver_information_dni_id' => $data_input['driver_information_dni_id'], 'licence_num' => $data_input['licence_num'], 'country_expedition' => $data_input['country_expedition'], 'category' => $data_input['category'], 'state' => $data_input['state'], 'expedition_day' => $data_input['expedition_day'], 'expi_date' => $data_input['expi_date'], 'operation' => 'U', 'date_operation' => $now, 'user_id' => auth()->id() ]); if ($response) { return response()->json(['response' => 'Información actualizada', 'errors' => []]); } else { return response()->json(['errors' => ['response' => 'No se pudo actualizar la información']]); } } } if (!empty($errors)) { return response()->json(['errors' => $errors]); } else { $driving_licence = DrivingLicence::create([ 'driver_information_dni_id' => $data_input['driver_information_dni_id'], 'licence_num' => $data_input['licence_num'], 'country_expedition' => $data_input['country_expedition'], 'category' => $data_input['category'], 'state' => $data_input['state'], 'expedition_day' => $data_input['expedition_day'], 'expi_date' => $data_input['expi_date'], 'user_id' => auth()->id() ]); if ($driving_licence->licence_num != "") { return response()->json([ 'success' => 'Información registrada.', 'errors' => $errors ]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit(form $form)\n {\n //\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", "0.68129057", "0.68083996", "0.68082106", "0.6803853", "0.67966306", "0.6794222", "0.6794222", "0.6789979", "0.67861426", "0.678112", "0.677748", "0.67702436", "0.67625374", "0.6748088", "0.67475355", "0.67475355", "0.67446774", "0.6742005", "0.67374676", "0.6727497", "0.6714345", "0.6696231", "0.6693851", "0.6689907", "0.6689746", "0.6687102", "0.66870165", "0.6684574", "0.6670877", "0.66705006", "0.6667089", "0.6667089", "0.6663205", "0.66626745", "0.66603845", "0.66593564", "0.66560745", "0.66545844", "0.66447026", "0.6633528", "0.66319114", "0.66298395", "0.66298395", "0.6622365", "0.6621021", "0.66170275", "0.661664", "0.6612467", "0.66107714", "0.6608453", "0.65979743", "0.659645", "0.6596389", "0.6592672", "0.6591205", "0.6588125", "0.6582166", "0.6581656", "0.65811247", "0.65785724", "0.65782833", "0.6576397", "0.6570971", "0.6569483", "0.6568432", "0.656811", "0.6563493", "0.6563493", "0.65622604", "0.65602434", "0.65585065", "0.6557997", "0.65574414", "0.6556701", "0.65565753", "0.6556226", "0.6556107", "0.6549118", "0.65485924", "0.65463555" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { $now = date("Y-m-d H:i:s"); $data_updated = $request->all(); $field = $data_updated['fieldch']; $value = $data_updated['valuech']; if ($field == "expi_date") { $day_expedition = strtotime($data_updated['expedition_day']); $day_expiration = strtotime($value); if ($day_expiration <= $day_expedition) { return response()->json(['error' => ['response' => 'Las fecha de vencimiento no puede ser mayor a la fecha de expedición.']]); } } $response = DrivingLicence::where('licence_id', $data_updated['licence_id'])->update([ $field => $value, 'operation' => 'U', 'date_operation' => $now, 'user_id' => auth()->id() ]); if ($response) { return response()->json(['response' => 'Información actualizada', 'error' => []]); } else { return response()->json(['error' => ['response' => 'No se pudo actualizar la información']]); } }
{ "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(Request $request) { $data_delete = $request->all(); $delete = DrivingLicence::where('licence_id', $data_delete['licence_id'])->update(['operation' => 'D']); if ($delete) { return response()->json(['response' => 'Usuario eliminado', 'error' => '']); } else { return response()->json(['error' => 'No se pudo eliminar el usuario']); } }
{ "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
FUNCIONES DEL NUEVO FORMULARIOS //
public function validateInformation(Request $request){ $data_input = $request->get('drivingLicence'); // echo '<pre> licencia'; // print_r($data_input); // die; $message_error_expi_date = 'La fecha de vencimiento no puede ser menor a la de expedición'; $validator = Validator::make( $data_input, [ 'licence_num' => 'required|max:255', 'country_expedition' => 'required|max:255', 'category' => 'required|max:255', 'state' => 'required|max:255', 'expedition_day' => 'required|max:255', 'expi_date' => [new ValidateDate($data_input['expedition_day'],$message_error_expi_date),'required','max:255'], ], [ 'driver_information_dni_id.unique' => "Este conductor ya tiene una licencia asignada.", 'licence_num.required' => "El número de licencia es obligatorio.", 'category.required' => "La categoría de la licencia es obligatoria.", 'state.required' => "El estado de la licencia es obligatoria.", 'expedition_day.required' => "La fecha de expedición es obligatoria.", 'expi_date.required' => "La fecha de vencimiento es obligatoria.", ] ); $errors = $validator->errors()->getMessages(); // print_r($errors); // die; if (!empty($errors)) { return response()->json(['errors' => $errors]); }else{ return response()->json(['response'=>'','errors' => []]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ToonFormulierAfspraak()\n{\n\n}", "public function formulario()\n {\n //\n }", "abstract public function forms();", "public function valiteForm();", "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 }", "abstract function form();", "function geraClasseValidadorFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.ValidadorFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoValidaFormularioCadastro.tpl');\n\n # abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n $aModeloFinal = array();\n \n # varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode((string)$aTabela['NOME']));\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n $objetoClasse = \"\\$o$nomeClasse\";\n\n # ==== varre a estrutura dos campos da tabela em questao ====\n $camposForm = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n # processa nome original da tabela estrangeira\n $nomeFKClasse = (string)$oCampo->FKTABELA;\n $objetoFKClasse = \"\\$o$nomeFKClasse\";\n\n $nomeCampo = $nomeCampoOriginal;\n //$nomeCampo = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n $label = ($nomeFKClasse != '') ? ucfirst(strtolower($nomeFKClasse)) : ucfirst(str_replace($nomeClasse,\"\",$nomeCampoOriginal));;\t\t\t\t\t\n $camposForm[] = ((int)$oCampo->CHAVE == 1) ? \"if(\\$acao == 2){\\n\\t\\t\\tif(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\" : \"if(\\$$nomeCampoOriginal == ''){\\n\\t\\t\\t\\$this->msg = \\\"$label invalido!\\\";\\n\\t\\t\\treturn false;\\n\\t\\t}\\t\";\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis já processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.ValidadorFormulario.php\",\"w\"); fputs($fp, $modeloFinal); fclose($fp);\n\n return true;\t\n }", "private function IndexValidacionFormulario() {\n\t\t\t$Val = new NeuralJQueryFormularioValidacion(true, true, false);\n\t\t\t$Val->Requerido('AVISO', 'Debe Ingresar el Número del Aviso');\n\t\t\t$Val->Numero('AVISO', 'El Aviso debe Ser Numérico');\n\t\t\t$Val->CantMaxCaracteres('AVISO', 10, 'Debe ingresar aviso con 10 Números');\n\t\t\t$Val->Requerido('PRIORIDAD', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('RAZON', 'Debe Seleccionar una Opción');\n\t\t\t$Val->Requerido('REGIONAL[]', 'Seleccione la Regional a Reportar');\n\t\t\t$Val->Requerido('NODO', 'Debe ingresar el Nodo al que pertenece la Matriz');\n\t\t\t$Val->Requerido('HORAFIN', 'Defina la fecha-hora que termina el Aviso');\n\t\t\t$Val->Requerido('MATRIZ', 'Debe informar el Número de la Matriz');\n\t\t\t$Val->ControlEnvio('peticionAjax(\"FormularioGuion\", \"Respuesta\");');\n\t\t\treturn $Val->Constructor('FormularioGuion');\n\t\t}", "function mostrarFormulario(){\n\n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA ALUMNOS</h2>\"; \n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n Matricula: <input type=\"text\" name=\"matricula\" value=\"<?php echo $this->matricula;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombree\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carreraa\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nameErr;?></span>\n <br><br>\n E-mail: <input type=\"text\" name=\"email\" value=\"<?php echo $this->email;?>\">\n <span class=\"error\">* <?php echo $this->emailErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefonoo\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submitt\" value=\"Submit\">\n </form>\n\n<?php\n }", "function geraClasseDadosFormulario(){\n # Abre o template da classe basica e armazena conteudo do modelo\n $modelo1 = Util::getConteudoTemplate('class.Modelo.DadosFormulario.tpl');\n $modelo2 = Util::getConteudoTemplate('metodoDadosFormularioCadastro.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n foreach($aBanco as $aTabela){\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n\n $copiaModelo1 = $modelo1;\n $copiaModelo2 = $modelo2;\n\n # varre a estrutura dos campos da tabela em questao\n $camposForm = $aModeloFinal = array();\n foreach($aTabela as $oCampo){\n # recupera campo e tabela e campos (chave estrangeira)\n $nomeCampoOriginal = (string)$oCampo->NOME;\n $nomeCampo \t = $nomeCampoOriginal;\n //$nomeCampo \t = $nomeCampoOriginal;\n\n # monta parametros a serem substituidos posteriormente\n switch ((string)$oCampo->TIPO) {\n case 'date':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n case 'datetime':\n case 'timestamp':\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = Util::formataDataHoraFormBanco(strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"]))));\";\n break;\n\n default:\n if((int)$oCampo->CHAVE == 1)\n if((string)$aTabela['TIPO_TABELA'] != 'NORMAL')\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n else\n $camposForm[] = \"if(\\$acao == 2){\\n\\t\\t\\t\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\\n\\t\\t}\";\n else\n $camposForm[] = \"\\$post[\\\"$nomeCampoOriginal\\\"] = strip_tags(addslashes(trim(\\$_REQUEST[\\\"$nomeCampoOriginal\\\"])));\";\n break;\n }\n }\n # monta demais valores a serem substituidos\n $camposForm = join($camposForm,\"\\n\\t\\t\");\n\n # substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo2 = str_replace('%%NOME_CLASSE%%', $nomeClasse, $copiaModelo2);\n $copiaModelo2 = str_replace('%%ATRIBUICAO%%', $camposForm, $copiaModelo2);\n\n $aModeloFinal[] = $copiaModelo2;\n }\n\n $modeloFinal = str_replace('%%FUNCOES%%', join(\"\\n\\n\", $aModeloFinal), $copiaModelo1);\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) \n mkdir($dir);\n\n $fp = fopen(\"$dir/class.DadosFormulario.php\",\"w\");\n fputs($fp, $modeloFinal);\n fclose($fp);\n return true;\t\n }", "function mostrarFormulario()\r\n{\r\n\tglobal $use;\r\n\tglobal $priv;\r\n\r\n\tif(!isset($_GET['num_soc']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió num_soc como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use'));\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\tif(!isset($_GET['cod_servicio']))\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se recibió cod_servicio como parametro de la función\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t\r\n\t$numero_socio = $_GET['num_soc'];\r\n\t$cod_servicio = $_GET['cod_servicio'];\r\n\r\n\t$resultado = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc = '$numero_socio'\r\n\t\t\t\t\t\t\t\t\t\tAND socios.id_persona=persona.id_persona\");\r\n\r\n\t$id_persona;\r\n\tif($resultado)\r\n\t{\r\n\t\tdate_default_timezone_set('America/Argentina/Catamarca');\r\n\t\t$fecha['year']=date(\"Y\");\r\n\t\t$fecha['mon']=date(\"m\");\r\n\t\t$fecha['mday']=date(\"d\");\r\n\t\t$fecha['hours']=date(\"H\");\r\n\t\t$fecha['minutes']=date(\"i\");\r\n\t\tforeach($resultado as $res)\r\n\t\t{\r\n\t\t\t$persona =[\r\n\t\t\t\t\t'nro'\t\t=>\t$res['numero_soc'],\r\n\t\t\t\t\t'sexo'\t\t=>\t$res['sexo'],\r\n\t\t\t\t\t'nombre'\t=>\t$res['nombre'],\r\n\t\t\t\t\t'doc' \t\t=>\t$res['numdoc'],\r\n\t\t\t\t\t'tel' \t\t=>\t$res['tel_fijo'],\r\n\t\t\t\t\t'cel'\t\t=>\t$res['tel_cel'],\r\n\t\t\t\t\t'fecha' \t=>\t$fecha,\r\n\t\t\t\t\t'dom'\t\t=>\t$res['domicilio'],\r\n\t\t\t\t\t'nro_casa'\t\t=>\t$res['casa_nro'],\r\n\t\t\t\t\t'barrio'\t\t=>\t$res['barrio'],\r\n\t\t\t\t\t'localidad'\t\t=>\t$res['localidad'],\r\n\t\t\t\t\t'cod_postal'\t\t=>\t$res['codpostal'],\r\n\t\t\t\t\t'dpmto'\t\t=>\t$res['dpmto'],\r\n\t\t\t\t\t'cod_serv'\t=>\t$cod_servicio,\r\n\t\t\t\t\t'id_persona' => $res['id_persona']\r\n\t\t\t\t\t];\r\n\t\t\tif($res['numero_soc']==$res['soc_titula'])\r\n\t\t\t{\r\n\t\t\t\t$persona['doctit'] = $res['numdoc'];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$soc_titular=$res['soc_titula'];\r\n\t\t\t\t$resultado2 = $GLOBALS['db']->select(\"SELECT * FROM socios, persona\r\n\t\t\t\t\t\t\t\t\t\tWHERE socios.numero_soc='$soc_titular'\r\n\t\t\t\t\t\t\t\t\t\tAND persona.id_persona=socios.id_persona\");\r\n\t\t\t\tforeach($resultado2 as $res2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$persona['doctit'] = $res2['numdoc'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$id_persona=$res['id_persona'];\r\n\t\t}\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$error=[\r\n\t\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t\t'descripcion'\t=>\"No se encontraron datos para el socio '$numero_socio'\"\r\n\t\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$resultado_historia = $GLOBALS['db']->select(\"SELECT * FROM historia_clinica\r\n\t\t\t\t\t\t\t\t\t\tWHERE id_persona='$id_persona'\");\r\n\tif($resultado_historia){\r\n\t\tforeach($resultado_historia as $res_historia){\r\n\t\t\t$historia =[\r\n\t\t\t\t\t'paperas'\t\t=>\t$res_historia['paperas'],\r\n\t\t\t\t\t'rubeola'\t\t=>\t$res_historia['rubeola'],\r\n\t\t\t\t\t'varicela'\t=>\t$res_historia['varicela'],\r\n\t\t\t\t\t'epilepsia' \t\t=>\t$res_historia['epilepsia'],\r\n\t\t\t\t\t'hepatitis' \t\t=>\t$res_historia['hepatitis'],\r\n\t\t\t\t\t'sinusitis'\t\t=>\t$res_historia['sinusitis'],\r\n\t\t\t\t\t'diabetes' \t=>\t$res_historia['diabetes'],\r\n\t\t\t\t\t'apendicitis'\t\t=>\t$res_historia['apendicitis'],\r\n\t\t\t\t\t'amigdalitis'\t\t=>\t$res_historia['amigdalitis'],\r\n\t\t\t\t\t'comidas'\t\t=>\t$res_historia['comidas'],\r\n\t\t\t\t\t'medicamentos'\t\t=>\t$res_historia['medicamentos'],\r\n\t\t\t\t\t'otras'\t\t=>\t$res_historia['otras'],\r\n\t\t\t\t\t];\r\n\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\telse{\r\n\t\t$historia =[\r\n\t\t\t\t'paperas'\t\t=>\t0,\r\n\t\t\t\t'rubeola'\t\t=>\t0,\r\n\t\t\t\t'varicela'\t=>\t0,\r\n\t\t\t\t'epilepsia' \t\t=>\t0,\r\n\t\t\t\t'hepatitis' \t\t=>\t0,\r\n\t\t\t\t'sinusitis'\t\t=>\t0,\r\n\t\t\t\t'diabetes' \t=>\t0,\r\n\t\t\t\t'apendicitis'\t\t=>\t0,\r\n\t\t\t\t'amigdalitis'\t\t=>\t0,\r\n\t\t\t\t'comidas'\t\t=>\t'',\r\n\t\t\t\t'medicamentos'\t\t=>\t'',\r\n\t\t\t\t'otras'\t\t=>\t'',\r\n\t\t\t\t];\r\n\t}\r\n\r\n\t$profesionales = $GLOBALS['db']->select(\"SELECT * FROM profesionales,persona_sistema\r\n\t\t\t\t\t\t\t\t\t\tWHERE profesionales.id_persona = persona_sistema.id_persona\");\r\n\r\n\tif(!$profesionales){\r\n\t\t$error=[\r\n\t\t\t'menu'\t\t\t=>\"Atenciones\",\r\n\t\t\t'funcion'\t\t=>\"mostrarFormulario\",\r\n\t\t\t'descripcion'\t=>\"No hay ningun profesional que pueda realizar la atención\"\r\n\t\t\t];\r\n\t\techo $GLOBALS['twig']->render('/Atenciones/error.html', compact('error','use','priv'));\t\r\n\t\treturn;\r\n\t}\r\n\t\r\n\r\n\techo $GLOBALS['twig']->render('/Atenciones/nueva_atencion_formulario.html', compact('persona','historia','profesionales','use','priv'));\r\n}", "public function getFormaPago();", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n //Crea una caja de texto llamada nombre y longitud 50\r\n $elemT = new FEText(\"Asunto\", FALSE, 50);\r\n //$elemT->set_style_attribute('align', 'right');\r\n //Le asignamos el id nombre y la tecla de acceso n (ctrl+n)\r\n $elemT->set_attribute(\"id\",\"asunto\");\r\n $elemT->set_attribute(\"accesskey\",\"n\"); \r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemT);\r\n\t\r\n //Creamos un Area de Texto llamada comentario\r\n $elemTA = new FETextArea(\"Comentario\", FALSE, 10, 60,\"500px\", \"100px\");\r\n $elemTA->set_attribute('wrap', 'physical');\r\n //Le asignamos el id email y la tecla de acceso c (ctrl+c) \r\n $elemTA->set_attribute(\"id\",\"comentario\");\r\n $elemTA->set_attribute(\"accesskey\",\"d\");\r\n //Añade en el contenedor formulario el elemento creado e inicializado\r\n $this->add_element($elemTA);\r\n\r\n //Añade un campo oculto llamado id. En ocasiones este campo se utiliza para indicar ciertas operaciones.\r\n //OJO!! es un punto sensible porque el usuario podría cambiar su valor de forma inexperada para el código.\r\n// $this->add_hidden_element(\"id\");\r\n\r\n //Añade un boton con la acción submit\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"miguel_Enter\"));\r\n //$submit->set_attribute('id',''); \r\n $submit->set_attribute('accesskey','e'); \r\n $this->add_element($submit); \r\n\t\t\t\t\r\n\t\t\t\t$this->add_hidden_element('status');\r\n \t\t$this->set_hidden_element_value('status', 'new');\r\n }", "public static function form(){\n $fecha = mktime(date(\"Y\"), date(\"m\"), date(\"d\"));\n $tipoAct = 'Actividad'->'id_tipo_act';\n return ['nombre' => '', 'tipo_actividad' => '','fecha_desde' =>$fecha, 'fecha_hasta' =>$fecha,\n 'instancia' => '', 'puesto_mencion' =>'','inst_referente' => '',\n 'inst_oferente' => '', 'lugar' =>'','descripcion' =>''];\n\n }", "function muestraFormularioMetas(){\n $name = $titulo = $urlfolio = \"\";\n $folio = $random = 0;\n if($this->data['folio'] != \"\"){\n $tmp=explode('-',$this->data['folio']);\n if($this->opc == 9){\n $name=\"guardaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[0]);\n $folio = $tmp[0];\n $urlfolio=$this->data['folio'];\n $titulo=CAPTURAREPORTEDEMETAS;\n $random=rand(1,10000000);\n }\n else{\n $name=\"actualizaAvance\";\n $arrayProyecto = $this->regresaDatosProyecto($tmp[1]);\n $folio = $tmp[1];\n $urlfolio=$tmp[1].\"-\".$tmp[2];\n $random=$tmp[0];\n }\n $this->arrayNotificaciones = $this->notificaciones ();\n $titulo = $arrayProyecto['proyecto'];\n $resultados = $this->consultaActividades($this->pages->limit);\n $arrayDisabled = $this->recuperaPermisos($arrayProyecto['unidadResponsable_id'],$arrayProyecto['programa_id']); \n $trimestreId = $this->obtenTrimestre($arrayDisabled);\n $arrayUnidadOperativas=$this->catalogoUnidadesOperativas($this->db);\n\t\t\t$campoTrimestre=\"estatus_avance_entrega\";\n\t\t\tif($campoTrimestre > 1){\n\t\t\t\t$campoTrimestre=\"estatus_avance_entrega\".$campoTrimestre;\n\t\t\t}\n\t\t\t\n $this->buffer=\"\n <input type='hidden' name='noAtributos' id='noAtributos' value='\".( count($resultados) + 0).\"'>\n <input type='hidden' name='valueId' id='valueId' value='\".($this->arrayAvanceMetas['id'] + 0).\"'>\n <input type='hidden' name='folio' id='folio' value='\".$folio.\"'>\n <input type='hidden' name='random' id='random' value='\".$random.\"'>\n <input type='hidden' name='trimestreId' id='trimestreId' value='\".$trimestreId.\"'>\n <div class='panel panel-danger spancing'>\n <div class='panel-heading titulosBlanco'>\".$titulo.\"</div>\n <div class='panel-body'>\n <table align='center' border='0' class='table table-condensed'>\n <tr class='active alturaComponentesA'>\n <td class='tdleft' colspan='2' width='25%'>\".PROYECTO.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayProyecto['proyecto'].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".UNIDADOPERATIVA.\"</td>\n <td class='tdleft' colspan='2'>\".$arrayUnidadOperativas[$arrayProyecto['unidadOperativaId']].\"</td>\n </tr>\n <tr class='alturaComponentesA'>\n <td class='tdleft' colspan='2' >\".TRIMESTRE.\"</td>\n <td class='tdleft' colspan='2'>\".$trimestreId.\"</td>\n </tr>\n \n </table>\n <table width='100%' class='table'>\n <tr>\n <td class='tdcenter fondotable' rowspan='2' width='30%'>\".ACTIVIDAD.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE1C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE2C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE3C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TRIMESTRE4C.\"</td>\n <td colspan='2' class='tdcenter fondotable' width='10%'>\".TOTAL.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width='14%'>\".MEDIDA.\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(PONDERACION,0,4)).\"</td>\n <td class='tdcenter fondotable' rowspan='2' width=' 8%'>\".ucfirst(substr(TIPOACT,8,3)).\"</td>\n </tr>\n <tr>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".P.\"</td>\n <td class='tdcenter fondotable' width='5%'>\".R.\"</td>\n </tr>\";\n $contadorTab1=1;\n $contadorTab2=2;\n $contadorTab3=3;\n $contadorTab4=4; \n $contadorRen = $total = $totales = $rtotal = $rtotales = 0;\n $disabled_t1 = $disabled_t2 = $disabled_t3 = $disabled_t4 = \"\";\n $fondo_t1 = 'background-color:#ffff99;';\n $fondo_t2 = 'background-color:#ffff99;';\n $fondo_t3 = 'background-color:#ffff99;';\n $fondo_t4 = 'background-color:#ffff99;';\n if($arrayDisabled[1]['dis'] + 0 == 0){\n $disabled_t1=\" readonly ='true' \";\n $fondo_t1 = '';\n }\n if($arrayDisabled[2]['dis'] + 0 == 0){\n $disabled_t2=\" readonly ='true' \";\n $fondo_t2 = '';\n }\n if($arrayDisabled[3]['dis'] + 0 == 0){\n $disabled_t3=\" readonly ='true' \";\n $fondo_t3 = '';\n }\n if($arrayDisabled[4]['dis'] + 0 == 0){\n $disabled_t4=\" readonly ='true' \";\n $fondo_t4 = '';\n }\n $arrayEditable=array(1,3,4,6,7,8,9);\n \n foreach($resultados as $id => $resul){\n $rand = rand(1,99999999999999);\n $class=\"\";\n if($contador % 2 == 0)\n $class=\"active\";\n $campo=\"estatus_avance_entrega_t\".$trimestreId; \n $idEstatusActividad =$resul[$campo] ;\n $varTemporalId = $resul['id'].\"-\".$arrayProyecto['id'].\"-\".$trimestreId;\n $varTemporalIdE = $resul ['id'] . \"-\" . $arrayProyecto['id'].\"-\".$trimestreId.\"-\".$idEstatusActividad; \n $idact= $resul['id'];\n $totales = $totales + $this->arrayDatos[$idact][5] + 0;\n $tmp=\"\";\n \n if($resul['tipo_actividad_id'] != 0){\n $this->buffer.=\"\n <tr class=' $class alturaComponentesA'>\n <td class='tdleft' rowspan='2'>\".$resul['actividad'].\"</td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][1] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' tabindex='\".$contadorTab1.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab1.\"-1-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][1] + 0).\"' style='width:35px;$fondo_t1' \".$disabled_t1.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][2] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab2.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab2.\"-2-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][2] + 0).\"' style='width:35px;$fondo_t2' \".$disabled_t2.\"> \n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][3] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab3.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab3.\"-3-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][3] + 0).\"' style='width:35px;$fondo_t3' \".$disabled_t3.\">\n </td>\n <td class='tdcenter numMetas form-control'>\".($this->arrayDatos[$idact][4] + 0).\"</td>\n <td class='tdcenter'>\n <input type='text' class='form-control validanumsMA' \".$this->disabled.\" tabindex='\".$contadorTab4.\"'\n id='r-\".$contadorRen.\"-\".$resul['id'].\"-\".$contadorTab4.\"-4-\".$resul['tipo_actividad_id'].\"' maxlength='10' value='\".($this->arrayAvanceMetas[$idact][4] + 0).\"' style='width:35px;$fondo_t4' \".$disabled_t4.\">\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='total\".$contadorRen.\"' class='totales'>\".number_format(($this->arrayDatos[$idact][1] + $this->arrayDatos[$idact][2] + $this->arrayDatos[$idact][3] + $this->arrayDatos[$idact][4] + 0),0,',','.').\"</span>\n </td>\n <td class='tdcenter' rowspan='2'>\n <span id='rtotal\".$contadorRen.\"' class='totales'>\".number_format($this->arrayAvanceMetas[$idact][1] + $this->arrayAvanceMetas[$idact][2] + $this->arrayAvanceMetas[$idact][3] +$this->arrayAvanceMetas[$idact][4],0,',','.').\"</span>\n </td>\n <td class='tdcenter'>\".$resul['medida'].\"</td>\n <td class='tdcenter'>\".$resul['ponderacion'].\"</td>\n <td class='tdcenter'>\".$resul['tipo_actividad_id'].\"</td>\n </tr>\n <tr>\n <td colspan='8' class='tdleft $class'>\".$this->regresaUltimoComentario($arrayProyecto['id'],$resul['id']).\"<br>\".$this->regresaNoAdjuntos($arrayProyecto['id'],$resul['id']).\"<span id='avance'></span></td>\";\n $rtotales = $rtotales + $this->arrayAvanceMetas[$idact][5]; \n if($this->session['rol'] == 1 || $this->session['rol'] >=3){\n $this->buffer.=\"<td class='tdcenter $class' colspan='3'>\"; \n if($this->session['rol'] == 1 || $this->session['rol'] >=4){\n $classb=\"mComentariosConsulta\";\n if(in_array($arrayProyecto[$campoTrimestre],$arrayEditable)){\n $classb=\"mComentarios\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-success btn-sm $classb' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button>\";\n }\n if($this->session['rol'] >=3){\n $this->buffer.=\"<button type='button' class='btn btn-warning btn-sm masFile' id='m-\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'>&nbsp;&nbsp;M&aacute;s</button>\";\n }\n $this->buffer.=\"</td>\";\n }\n if($this->session['rol'] == 2){\n $this->buffer.=\"\n <td class='tdcenter $class'><button type='button' class='btn btn-success btn-sm mComentariosConsulta' id='\".$resul['proyecto_id'].\"-\".$resul['id'].\"-\".$trimestreId.\"'><span class='glyphicon glyphicon-pencil'></span>&nbsp;&nbsp;Comentarios</button></td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default aprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTOAPROBADO.\"' id='aaa-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-ok'></span>\n </button>\n </td>\n <td class='tdcenter $class'>\n <button type='button' class='btn btn-default noaprobadosavances' data-toggle='tooltip' data-placement='bottom'\n title='\".PROYECTONOAPROBADO.\"' id='ann-\".$varTemporalIdE.\"'><span class='glyphicon glyphicon-remove'></span>\n </button></td>\";\n }\n \n \n $this->buffer.=\"</tr><tr><td colspan='11'>&nbsp;</td>\";\n if( ($idEstatusActividad!= 3) && ($idEstatusActividad!= 6) && ($idEstatusActividad!= 9)){\n $this->buffer .= \"<td class='tdleft' colspan='3' id='v-\".$varTemporalIdE.\"' style='background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n else{\n $this->buffer .= \"<td class='tdleft verComentariosNoAprobados' colspan='3' id='v-\".$varTemporalIdE.\"' style='cursor:pointer;background-color:\" . $this->arrayNotificaciones [$idEstatusActividad] ['color'] . \";color:#000000;' data-toggle='tooltip' data-placement='bottom' title='\" . TOOLTIPMUESTRACOMENTARIOS . \"'>\" . $this->arrayNotificaciones [$idEstatusActividad] ['nom'] . \"</td>\";\n }\n $this->buffer .= \"</tr>\";\n $contadorTab1 = $contadorTab1 + 4;\n $contadorTab2 = $contadorTab2 + 4;\n $contadorTab3 = $contadorTab3 + 4;\n $contadorTab4 = $contadorTab4 + 4;\n $contadorRen++;\n $contador++;\n }\n }\n $contadorTab4++;\n \n /*$this->buffer.=\"<tr><td colspan='8'></td>\n <td class='tdleft'>Total:</td><td class='tdcenter'><span id='totales' class='totales'>\".($totales + 0).\"</span></td>\n <td class='tdcenter'><span id='rtotales' class='totales'>\".($rtotales + 0).\"</span></td>\n <td colspan='3'>&nbsp;</td></tr></table>*/\n $this->buffer.=\"</table>\n </div>\n <div class=\\\"central\\\"><br>\"; \n if( (in_array($arrayProyecto[$campoTrimestre],$arrayEditable)) or ($this->session['rol']<=2 or $this->session['rol']<=5) ){\n \n $this->buffer.=\"<button type='button' tabindex='\".$contadorTab4.\"' class='btn btn-success btn-sm' id='\".$name.\"' name='\".$name.\"'><span class='glyphicon glyphicon-floppy-saved'></span>&nbsp;\".AGREGAREPORTEMETA.\"</button>&nbsp;&nbsp;\";\n }\n $this->buffer.=\"<button type='button' class='btn btn-primary btn-sm'\n onclick=\\\"location='\".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=0'\\\">\".REGRESA.\"</button>\n </div>\".$this->procesando(4).\"<br></div>\";\n }else{\n header(\"Location: \".$this->path.\"aplicacion.php?aplicacion=\".$this->session ['aplicacion'].\"&apli_com=\".$this->session ['apli_com'].\"&opc=1\");\n } \n }", "public function listForms();", "public function getForm();", "function defform()\n\t{\n\t\t// Definisi elemen form untuk data teman\n\t\t$noteman = array(\n\t\t\t\t\"name\"\t\t=> \"noteman\",\n\t\t\t\t\"id\"\t\t=> \"noteman\",\n\t\t\t\t\"maxlenght\"\t=> \"4\",\n\t\t\t\t\"size\"\t\t=> \"3\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:red;\"\n\t\t\t);\n\n\t\t$namateman = array(\n\t\t\t\t\"name\"\t\t=> \"namateman\",\n\t\t\t\t\"id\"\t\t=> \"namateman\",\n\t\t\t\t\"maxlenght\"\t=> \"50\",\n\t\t\t\t\"size\"\t\t=> \"35\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$notelp = array(\n\t\t\t\t\"name\"\t\t=> \"notelp\",\n\t\t\t\t\"id\"\t\t=> \"notelp\",\n\t\t\t\t\"maxlenght\"\t=> \"15\",\n\t\t\t\t\"size\"\t\t=> \"13\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cyan;\"\n\t\t\t);\n\n\t\t$email = array(\n\t\t\t\t\"name\"\t\t=> \"email\",\n\t\t\t\t\"id\"\t\t=> \"email\",\n\t\t\t\t\"maxlenght\"\t=> \"35\",\n\t\t\t\t\"size\"\t\t=> \"25\",\n\t\t\t\t\"value\"\t\t=> \"\",\n\t\t\t\t\"style\"\t\t=> \"background:cayn;\"\n\t\t\t);\n\t\t// end definisi\n\n\t\t$atableteman = [\n\t\t\t\"noteman\"\t=> $noteman,\n\t\t\t\"namateman\"\t=> $namateman,\n\t\t\t\"notelp\"\t=> $notelp,\n\t\t\t\"email\"\t\t=> $email\n\t\t];\n\n\t\treturn $atableteman;\n\t}", "public function get_form($metodo,$usuario,$form,$data=0,$ciclo=1,$codSubM=null,$cMet=\"\"){\n #traemos el formulario\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormulario($form,$usuario,$data,$ciclo,$codSubM,$this->_modulo,'\".$cMet.\"') as formulario; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) {\t\t\t\t\n $this->_formulario[] = $va;\n if($this->_formulario[0]['formulario'] == ''){\t\t\t\t\n $mensjFrm = getMenssage('danger','Ocurrio un error','No tiene permisos para acceder a esta opcion. ');\n $this->_formulario[0] = array('formulario'=>$mensjFrm);\n }\n }\n }\t\n #traemos el formulario modal\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaFormularioModal($form,$usuario) as modal; \";\n $this->get_results_from_query();\n if(count($this->rows) >= 1){\n foreach ($this->rows as $pro=>$va) { \n $this->_formulario_modal[] = $va;\n if($this->_formulario_modal[0]['modal'] == ''){ \n $mensjFrm = '';\n $this->_formulario_modal[0] = array('modal'=>$mensjFrm);\n }\n }\n } \n #traemos la ayuda del form\n $this->rows = \"\";\n $this->query = \"\";\n $this->query = \" SELECT fbArmaAyudaFormulario($form,$usuario,1) as formulario_ayuda\";\n $this->get_results_from_query();\n if (count($this->rows) >= 1) {\n foreach ($this->rows as $pro => $va) {\n $this->_formulario_ayuda[] = $va;\n if ($this->_formulario_ayuda[0]['formulario_ayuda'] == '') {\n $mensjFrm = getMenssage('info', 'Ocurrio un error', 'No hay ayuda registrada para este proceso,consulte al administrador del sistema. ');\n $this->_formulario_ayuda[0] = array('formulario_ayuda' => $mensjFrm);\n }\n }\n }\n #Traemos los botones por formulario y usuario\n ModeloFacturacion::get_boton($metodo,$usuario,$form,$cMet);\n }", "function form() \r\n {\r\n \t //El formateo va a ser realizado sobre una tabla en la que cada fila es un campo del formulario\r\n $table = &html_table($this->_width,0,2,2);\r\n $table->add_row($this->_showElement(\"Asunto\", '6', \"asunto_de_usuario\", 'Asunto', \"Asunto\", \"left\" )); \r\n $table->add_row($this->_showElement(\"Comentario\", '7', \"comentario\", 'Texto', \"Comentario\", \"left\" )); \r\n \r\n $this->set_form_tabindex(\"Aceptar\", '10'); \r\n $label = html_label( \"submit\" );\r\n $label->add($this->element_form(\"Aceptar\"));\r\n $table->add_row(html_td(\"\", \"left\", $label));\r\n \r\n return $table; \r\n }", "function mostrarFormulario(){\n \n echo \"<br><br>\";\n echo \"<h2>FORMULARIO PARA PROFESORES</h2>\";\n?>\n\n <form method=\"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n noEmpleado: <input type=\"text\" name=\"noEmpleado\" value=\"<?php echo $this->noEmpleado;?>\">\n <br><br>\n Carrera: <input type=\"text\" name=\"carrera\" value=\"<?php echo $this->carrera;?>\">\n <br><br>\n Nombre: <input type=\"text\" name=\"nombre\" value=\"<?php echo $this->nombre;?>\">\n <br><br>\n <span class=\"error\">* <?php echo $this->nombreErr;?></span>\n <br><br>\n Telefono: <input type=\"tel\" name=\"telefono\"value=\"<?php echo $this->telefono;?>\">\n <br><br>\n <input type=\"submit\" name=\"submit\" value=\"Submit\">\n </form>\n\n<?php\n }", "public function formuAction(){\t\n \t$cn = new Model_DbDatos_Datos();\n\t\t$fn = new Libreria_Pintar();\n\t\t$ar = new Libreria_ArraysFunctions();\n\n \t$codCarta = $this->_request->getParam('codCarta',''); \n\t\t\n\t\t\n\t\t//Cargando combos fiscalizadores\n\n\t\tunset($parametros);\n \t$parametros[] = array('@mquery',22);\n \t$parametros[] = array('@idCarta',$codCarta);\n\t\t$rowFicalizadores = $cn->ejec_store_procedura_sql('[SP_FISCA_CARTA_REQ]',$parametros);\n\n\t\t$fiscalizadoresCombo = $ar->RegistrosComboc($rowFicalizadores,0,1,'');\n\t\t$val[] = array('#cbNotificadores',$fn->ContenidoCombo($fiscalizadoresCombo,'[Seleccione]',''),'html');\n\t\t \t\n\n\t\t//Cargando cabecera del cargo de notificacion\t\t\n\t\tunset($parametros);\n\t\t$parametros[] = array('@mquery',20);\n \t$parametros[] = array('@idCarta',$codCarta);\n \t$rowCabecera = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\n \tif ($rowCabecera[0]) {\n \t\t$row = $rowCabecera[1][0]; \n\n \t\t$codCargoNotificacion = $row[0];\n \t\t$nroCargoNotificacion = $row[1].\" - \".$row[9];\n \t\t$codContrib = $row[2];\n \t\t$contribuyente = trim(utf8_encode( strtoupper($row[3].\" \".$row[4].\" \".$row[5])));\n \t\t$idTipoDocIdent = $row[6];\n \t\t$nroDocIdent = $row[7];\n \t\t$domicilioFiscal = strtoupper(utf8_encode( $row[8]));\n \t\t$anio = $row[9];\n \t\t$nroCartareq = $row[10].\" - \".$row[9];\n \t\n \t\t$val[] = array('#hcodCartaReq',$codCarta,'val');\n \t\t$val[] = array('#txtNroNotificacion',$nroCargoNotificacion,'val');\n \t\t$val[] = array('#hcodNotificacion',$codCargoNotificacion,'val');\n \t\t$val[] = array('#txtCodigoContribuyenteN',$codContrib,'val');\n \t\t$val[] = array('#txtContribuyenteN',$contribuyente,'val');\n \t\t$val[] = array('#hTipoDocIdent',$idTipoDocIdent,'val');\n \t\t$val[] = array('#hNroDocIdent',$nroDocIdent,'val');\n \t\t$val[] = array('#txtDomicilioFiscal',$domicilioFiscal,'val');\n \t\t$val[] = array('#txtAnioN',$anio,'val');\n \t\t$val[] = array('#txtNroCartaReqN',$nroCartareq,'val');\n\n \t\t//CARGANDO DATOS DE LA PERSONA QUIEN RECEPCIONA\n \t\tunset($parametros);\n\t\t\t$parametros[] = array('@mquery',21);\n\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t \t$rowDatosPersona = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t\n\n\t \tif ($rowDatosPersona[0]) {\n\t \t\t\n\t \t\t$row = $rowDatosPersona[1][0];\n\n\t\t\t unset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',7);\n\t\t \t$rowTDoc = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_T_DOC_IDEN]',$parametros);\n\t\t \t$row2 = $rowTDoc[1];\n\t\t \t\n\t\t \tforeach ($row2 as $f) {\n\t\t \t\tif ($f[0]==1) {\t$val[]= array('#hmaxDni',$f[2],'val');}\n\t\t \t\tif ($f[0]==5) {\t$val[]= array('#hmaxIdentidad',$f[2],'val');}\n\t\t \t\tif ($f[0]==9) {\t$val[]= array('#hmaxExtranjeria',$f[2],'val');}\n\t\t \t}\n\n\t \t\t$nomRecepciona = trim(utf8_encode($row[0]));\n\t \t\t$idTipoDocIdent = trim($row[1]);\n\t \t\t$nomTDocIden = trim(utf8_encode($row[2]));\n\t \t\t$nroDocIdent = trim($row[3]);\n\t \t\t$fechaNotifica = (!empty($row[4]) && !empty($row[5]) && !empty($row[6]))? $row[4].\"/\".$row[5].\"/\".$row[6] : '';\n\t \t\t$horaNotifica = trim($row[7]);\n\t \t\t$NegoIdentificar = trim($row[8]);\n\t \t\t$NegoFirmar = $row[9];\n\t \t\t$NegoRecibir = $row[10];\n\t \t\t$firma = $row[11];\n\t \t\t$idVinculo = $row[12];\n\t \t\t$vinculo = $row[13];\n\t \t\t$vinculo_otros = trim($row[14]);\n\n\t \t\t$val[] = array('#txtNomApeRecepciona',$nomRecepciona,'val');\n\t \t\tif($idTipoDocIdent==1){$evt[] = array('#chkDni','checked','true');}\n\t \t\tif($idTipoDocIdent==5){$evt[] = array('#chkIdentidad','checked','true');}\n\t \t\tif($idTipoDocIdent==9){$evt[] = array('#chkExtranjeria','checked','true');}\n\t \t\t$val[] = array('#txtNroDocIdent',$nroDocIdent,'val');\n\t \t\t$val[] = array('#dpFechaNotifica',$fechaNotifica,'val');\n\t \t\t$val[] = array('#txtHoraNotifica',$horaNotifica,'val');\n\t \t\tif($NegoIdentificar==1){$evt[] = array('#chkNegoIdentificar','checked','true');}\n\t \t\tif($NegoFirmar==1){$evt[] = array('#chkNegoFirmar','checked','true');}\n\t \t\tif($NegoRecibir==1){$evt[] = array('#chkNegoRecibir','checked','true');}\n\t \t\t$evt[] = array(( ($firma==1) ? \"#rdFirmaRecepcionaSi\" : \"#rdFirmaRecepcionaNo\"),\"checked\",\"true\");\n\t \t\tif($idVinculo==1){$evt[] = array('#chkTitular','checked','true');}\n\t \t\tif($idVinculo==2){$evt[] = array('#chkFamiliar','checked','true');}\n\t \t\tif($idVinculo==3){$evt[] = array('#chkVigilante','checked','true');}\n\t \t\tif($idVinculo==4){$evt[] = array('#chkEmpleado','checked','true');}\n\t \t\tif($idVinculo==5){$evt[] = array('#chkRepresentante','checked','true');}\n\t \t\tif($idVinculo==6){$evt[] = array('#chkVinculoOtros','checked','true');$val[] = array('#txtVinculoOtros',$vinculo_otros,'val');}\n\n\n\t \t\t//CARGANDO DATOS DEL CEDULON Y MOTIVOS DE NO ENTREGA\n\n\t \t\tunset($parametros);\n\t\t\t\t$parametros[] = array('@mquery',22);\n\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t \t$rowCedulonMovNoEntrega = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t \t\n\t\t \tif ($rowCedulonMovNoEntrega[0]) {\n\t\t \t\t$row = $rowCedulonMovNoEntrega[1][0]; \n\n\t\t \t\t$codCedulon = trim($row[0]);\n\t\t \t\t$PersonaIncapaz = trim($row[1]);\n\t\t \t\t$DomicilioCerrado = trim($row[2]);\n\t\t \t\t$fechaCedulon = (!empty($row[3]) && !empty($row[4]) && !empty($row[5])) ? $row[3].\"/\".$row[4].\"/\".$row[5] : '' ;\n\t\t \t\t$horaCedulon = trim($row[6]);\n\t\t \t\t$direcccionIncorrecta = trim($row[7]);\n\t\t \t\t$direccionInexistente = trim($row[8]);\n\t\t \t\t$otrosMotNoEntrega = $row[9];\n\t\t \t\t$otrosValor = trim($row[10]);\n\t\t \t\t$codInmueble = trim($row[11]);\n\t\t \t\t$nroPisos = trim($row[12]);\n\t\t \t\t$color = trim($row[13]);\n\t\t \t\t$casa = trim($row[14]);\n\t\t \t\t$edificio = trim($row[15]);\n\t\t \t\t$PuertaMadera = trim($row[16]);\n\t\t \t\t$PuertaFierro = trim($row[17]);\n\t\t \t\t$SuminElect = trim($row[18]);\n\t\t \t\t$in_Otros = trim($row[19]);\n\t\t \t\t$in_OtrosValor = trim($row[20]);\n\n\t\t \t\t$val[] = array('#hcodCedulon',$codCedulon,'val');\n\t\t \t\tif($PersonaIncapaz==1){ $evt[] = array('#chkPersonaIncapaz','checked','true');}\n\t\t \t\tif($DomicilioCerrado==1){ $evt[] = array('#chkDomicilioCerrado','checked','true');}\n\t\t \t\t$val[] = array('#dpFechaCedulon',$fechaCedulon,'val');\n\t\t \t\t$val[] = array('#txtHoraCedulon',$horaCedulon,'val');\n\t\t \t\tif($direcccionIncorrecta==1){ $evt[] = array('#chkDireccionIncorrecta','checked','true');}\n\t\t \t\tif($direccionInexistente==1){ $evt[] = array('#chkDireccionInexistente','checked','true');}\n\t\t \t\tif($otrosMotNoEntrega==1){$evt[]=array('#chkMotNoEntregaOtros','checked','true');$val[] = array('#txtNoEntregaOtros',$otrosValor,'val');}\n\t\t \t\t\n\t\t \t\t$val[] = array('#hcodInmueble',$codInmueble,'val');\n\t\t \t\t$val[] = array('#txtNroPisos',$nroPisos,'val');\n\t\t \t\t$val[] = array('#txtColor',$color,'val');\n\t\t \t\tif($casa==1){ $evt[] = array('#chkCasa','checked','true');}\n\t\t \t\tif($edificio==1){ $evt[] = array('#chkEdificio','checked','true');}\n\t\t \t\tif($PuertaMadera==1){ $evt[] = array('#chkMadera','checked','true');}\n\t\t \t\tif($PuertaFierro==1){ $evt[] = array('#chkFierro','checked','true');}\n\t\t \t\t$val[] = array('#txtSuministroElectrico',$SuminElect,'val');\n\t\t \t\tif($in_Otros==1){$evt[]=array('#chkInmuebleOtros','checked','true');$val[] = array('#txtInmuebleOtros',$in_OtrosValor,'val');}\n\t\t \t\t\n\n\n\t\t \t\t//CARGA DE DATOS DE VISITA EFECTUADA\n\t\t \t\tunset($parametros);\n\t\t\t\t\t$parametros[] = array('@mquery',23);\n\t\t\t \t$parametros[] = array('@idCargoNotFisca',$codCargoNotificacion);\n\t\t\t \t$rowVisitaEfectuada = $cn->ejec_store_procedura_sql_noparamatro2('[SP_FISCA_CARGO_NOTIFICA]',$parametros);\n\t\t\t \t\n\t\t\t \tif ($rowVisitaEfectuada[0]) {\n\t\t\t \t\t$row = $rowVisitaEfectuada[1][0]; \n\n\t\t\t \t\t$fechaVisita = (!empty($row[0]) && !empty($row[1]) && !empty($row[2])) ? $row[0].\"/\".$row[1].\"/\".$row[2] : '' ;\n\t\t\t \t\t$codNotificador = trim($row[3]);\n\t\t\t \t\t$dniNotificador = trim($row[4]);\n\t\t\t \t\t$firmaNotificador = trim($row[5]);\n\n\t\t\t \t\t$val[] = array('#dpFechaVisita',$fechaVisita,'val');\n\t\t\t \t\t$val[] = array('#cbNotificadores',$codNotificador.'-'.$dniNotificador,'val');\n\t\t\t \t\t$val[] = array('#txtdniNotificador',$dniNotificador,'val');\n\t\t\t \t\t$evt[] = array((($firmaNotificador==1) ? \"#rdFirmaNotSi\" : \"#rdFirmaNotNo\"),\"checked\",\"true\");\n\n\n\t\t\t \t}else{\n\t\t\t \t\techo utf8_encode($rowVisitaEfectuada[1]); \n\t\t\t \t}\n\n\t\t \t}else{\n\t\t\t\t\techo utf8_encode($rowCedulonMovNoEntrega[1]); \n\t\t \t} \n\n\t \t}else{\n\t \t\techo utf8_encode($rowDatosPersona[1]); \n\t \t}\n\n \t}else{\n \t\techo utf8_encode($rowCabecera[1]);\n \t}\n\n\t\t$evt[] = array('#contentBox6',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox7',\"tabs\",\"\");\t\n\t\t$evt[] = array('#contentBox8',\"tabs\",\"\");\t\t\t\t\n\t\t$evt[] = array('#tabsNotificacion',\"tabs\",\"\");\n\t\t$evt[] = array('#radioFirmaRecep',\"buttonset\",\"\");\n\t\t$evt[] = array('#radioFirmaNot',\"buttonset\",\"\");\n\t\t\n\t\t\n\n\t\t$fn->PintarEvento($evt);\n\t\t$fn->PintarValor($val);\n }", "function mostrarFormularioProyecto(){\n include_once($this->configuracion[\"raiz_documento\"] . $this->configuracion[\"clases\"] . \"/html.class.php\");\n $html = new html();\n $this->verificar = \"seleccion_valida(\".$this->formulario2.\",'cod_proyecto')\";\n \n //$cod_proyecto = $this->proyecto[0][0]; \n //$nom_proyecto = $this->proyecto[0][1];\n $tmp_proyectos = $this->consultarProyectos();\n for($i=0;$i<count($tmp_proyectos);$i++) {\n $proyectos[$i][0]=$tmp_proyectos[$i]['CRA_COD'];\n $proyectos[$i][1]=$tmp_proyectos[$i]['NOMBRE'];\n }\n $_REQUEST['cod_proyecto']=isset($_REQUEST['cod_proyecto'])?$_REQUEST['cod_proyecto']:'';\n \n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario2 ?>'>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES PENDIENTES POR PROYECTO CURRICULAR \"; ?></b></div><hr>\n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Proyecto Curricular</th>\n </thead>\n <tr >\n <td width=\"20%\" class='cuadro_plano centrar'>\n <?\n $mi_cuadro = $html->cuadro_lista($proyectos, \"cod_proyecto\", $this->configuracion,$_REQUEST['cod_proyecto'], 0, FALSE, 1, \"\",400);\n echo $mi_cuadro ;\n ?>\n <input type=\"hidden\" name=\"opcion\" value=\"consultarProyecto\">\n <input type=\"hidden\" name=\"pagina\" value=\"<? echo $this->formulario2 ?>\">\n \n </td>\n \n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Homologar\" onclick=\"if(<? echo $this->verificar; ?>){document.forms['<? echo $this->formulario2?>'].submit()}else{false}\"> </td>\n </tr>\n </table>\n </form>\n<?\n\n }", "function form();", "public function listforms()\n {\n\t\t\n }", "abstract function getForm();", "function get_data_form(){\n\n\n\t$IdGrupo = '';\n\t$IdFuncionalidad = '';\n\t$IdAccion = '';\n\t$NombreGrupo = '';\n\t$NombreFuncionalidad = '';\n\t$NombreAccion = '';\n\t$action = '';\n\n\tif(isset($_REQUEST['IdGrupo'])){\n\t$IdGrupo = $_REQUEST['IdGrupo'];\n\t}\n\tif(isset($_REQUEST['IdFuncionalidad'])){\n\t$IdFuncionalidad = $_REQUEST['IdFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['IdAccion'])){\n\t$IdAccion = $_REQUEST['IdAccion'];\n\t}\n\tif(isset($_REQUEST['action'])){\n\t$action = $_REQUEST['action'];\n\t}\n\tif(isset($_REQUEST['NombreGrupo'])){\n\t$NombreGrupo = $_REQUEST['NombreGrupo'];\n\t}\n\tif(isset($_REQUEST['NombreFuncionalidad'])){\n\t$NombreFuncionalidad = $_REQUEST['NombreFuncionalidad'];\n\t}\n\tif(isset($_REQUEST['NombreAccion'])){\n\t$NombreAccion = $_REQUEST['NombreAccion'];\n\t}\n\n\t$PERMISOS = new PERMISO_Model(\n\t\t$IdGrupo, \n\t\t$IdFuncionalidad, \n\t\t$IdAccion,\n\t\t$NombreGrupo,\n\t\t$NombreFuncionalidad,\n\t\t$NombreAccion);\n\n\treturn $PERMISOS;\n}", "function mostrarFormulario(){\r\n $this->consultaFacultades();\r\n }", "abstract function builder_form(): string;", "function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc,$pefedi,$pefeli){\n\t\t$mempresa = new mempresa();\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= '<td>';\n\t\t\t\t$txt .= '<form id=\"formfil\" name=\"frmfil\" method=\"GET\" action=\"'.$arc.'\" class=\"txtbold\">';\n\t\t\t\t$txt .= '<input name=\"pg\" type=\"hidden\" value=\"'.$pg.'\" />';\n\t\t\t$txt .= '<input class=\"search-box\" type=\"text\" name=\"filtro\" value=\"'.$filtro.'\" placeholder=\"Nombre De Empresa\"\n\t\t\t\t\tonChange=\"this.form.submit();\">';\n\t\t\t\t\t$txt .= '<label for=\"search-box\"><span class=\"glyphicon fas fa-search search-icon\"></span></label>';\n\t\t\t\t$txt .= '</form>';\n\t\t\t$txt .= '</td>';\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mempresa->sel_empresa($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\t\n\t\tif($result){\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%; \">';\n\t\t\t$txt .= '<table1 width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t\t\t\t$txt .= \"<table class='table table-hover'>\";\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Foto';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Empresa';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\n\t\t\t\t\t$txt .= '<img src=\"'.$f['logemp'].'\" width=\"25px\" />';\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= \"<td class='active lefi'>\";\n\t\t\t\t\t$txt .= \"<span style='font-size: 20px;'><strong>\".$f['nitemp'].\" - \".$f['razsocialemp'].\"</strong></span>\";\n\t\t\t\t\t$txt .= \"<br><strong>Sede: </strong>\".$f['sedecentemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Email: </strong>\".$f['emailemp'];\n\t\t\t\t\t$txt .= \"<br><strong>Telefono: </strong>\".$f['telemp'];\n\t\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t\t$txt .= \"<td class='warning' align='center'>\";\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&idemp=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-pen' title='Actualizar'></i></li></ul></a>\";\n\t\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t\t$txt .= \"<a href='home.php?pg=002&del=\".$f['idemp'].\"'><ul class='social-icons icon-circle icon-zoom list-unstyled list-inline'><li><i class='fas fa-times' title='Eliminar'></i></li></ul></td></a>\";\t\n\t\t\t\t\t\t$txt .= \"</td>\";\n\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t\t\t\t$txt .= '<BR>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt .= '<div class=\"cuad\" style=\"width: 90%;\">';\n\t\t$txt .= '<h3>No existen datos registrado en la base de datos...</h3>';\n\t\t$txt .= '</div>';\t\t\n\t}\n\t\techo $txt;\n\t}", "function form_mostrar($conp,$nreg,$pg,$bo,$filtro,$arc){\n\t\t$mtipo_documento = new mtipo_documento();\n\t\t //Instanciamos en [$pa] la clase mpagina\n\t\t$pa = new mpaginacion();\n\t\t$txt = '';\n\t\t//Creamos el cuadro de buscar (filtros-Busquedas)\n\t\t$txt .= \"<table>\";\n\t\t\t//Una Fila\n\t\t\t$txt .= \"<tr>\";\n\t\t\t\t//1ra Columna - Formulario buscar\n\t\t\t\t$txt .= \"<td>\";\n\t\t\t\t\t$txt .= \"<form name='forfil' method='GET' action='\".$arc.\"'>\";\n\t\t\t\t\t\t$txt .= \"<input type='hidden' name='pg' value='\".$pg.\"' />\";\n\t\t\t\t\t\t//Campo de texto para escribir el dato a buscar\n\t\t\t\t\t\t$txt .= \"Buscar:<input type='text' name='filtro' value='\".$filtro.\"' placeholder='Ingrese El Nombre Del Empleado' onChange= 'this.form.submit();' />\";\n\t\t\t\t\t$txt .= \"</form>\";\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t\t//2da Columna control de paginacion\n\t\t\t\t$txt .= \"<td align='right' style='padding-left: 10px;'>\";\n\t\t\t\t\t$bo = \"<input type='hidden' name='filtro' value='\".$filtro.\"' />\";\n\t\t\t\t\t//Llamamos el metodo de contar la cantida de paginas\n\t\t\t\t\t$txt .= $pa->spag($conp,$nreg,$pg,$bo,$arc);\n\t\t\t\t\t//Llamar los datos para completar la paginacion\n\t\t\t\t\t$result = $mtipo_documento->sel_tipo_documento($filtro,$pa->rvalini(),$pa->rvalfin());\n\t\t\t\t$txt .= \"</td>\";\n\t\t\t//Cierre Fila\n\t\t\t$txt .= \"</tr>\";\n\t\t$txt .= \"</table>\";\n\t\tif ($result) {\n\n\t\t$txt .= '<div class=\"cuad1\" style=\"width: 90%;\">';\n\t\t\t$txt .= '<table width=\"100%\" cellspacing=\"0px\" align=\"center\">';\n\t\t\t\t//Inicio de la (Cabecera_Tb)\t\t\t\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'id_tpdoc(s)';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'Tipo de Documento';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th>';\n\t\t\t\t\t\t$txt .= 'extencion';\n\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t\t$txt .= '<th></th>';\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre de la (Cabecera_Tb)\n\t\t\t\tforeach ($result as $f) {\n\t\t\t\t//Inicio ROW - Datos de la tabla\n\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"id_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"nom_tpdoc\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t$txt .= '<td align=\"center\">';\t\n\t\t\t\t\t\t$txt .= $f[\"extencion\"];\n\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//ICONOS-MOdificar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&id_tpdoc='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/actua.png\" title=\"Actualizar\"</a></td>';\n\t\t\t\t\t//ICONOS-Eliminar (Boton)\n\t\t\t\t\t$txt .= '<td align=\"center\"><a href=\"home.php?pg=010&del='.$f[\"id_tpdoc\"].'\">\n\t\t\t\t\t\t<img src=\"img/elemi.png\" title=\"Eliminar\"</a></td>';\n\t\t\t\t//Cierre ROW - Datos de la tabla\n\t\t\t\t$txt .= '</tr>';\n\t\t\t\t}\n\t\t\t$txt .= '</table>';\n\t\t$txt .= '</div>';\n\t\t}else{\n\t\t$txt.= '<div class=\"cuad\" style=\" width\": 90%;\">';\n\t\t $txt.= '<h3> No existen datos registrado en la base de datos...</h3>';\n\t\t $txt.='</div>';\n }\n\t\techo $txt;\n\t}", "function maquetador_buscador ( $controlador, $accion, $i='i') { \n if ( $value= limpiaRequest ($i) ){ \n $value = \"value='$value'\";\n }\n \n return \"<form>\" . t(\"Buscar\") .\": <input name='$i' type='text' $value>\" .\n \"<input type='hidden' name='c' value='$controlador'>\\n\". \n \"<input type='hidden' name='a' value='$accion'>\\n\".\n \"</form>\";\n}", "function cargar_formulario($datos_necesarios){\n if(isset($datos_necesarios['acta'])){\n $ar = array();\n \n $ar[0]['votos'] = $datos_necesarios['acta']['total_votos_blancos'];\n $ar[0]['id_nro_lista'] = -1;\n $ar[0]['nombre'] = \"VOTOS EN BLANCO\";\n \n $ar[1]['votos'] = $datos_necesarios['acta']['total_votos_nulos'];\n $ar[1]['id_nro_lista'] = -2;\n $ar[1]['nombre'] = \"VOTOS NULOS\";\n \n $ar[2]['votos'] = $datos_necesarios['acta']['total_votos_recurridos'];\n $ar[2]['id_nro_lista'] = -3;\n $ar[2]['nombre'] = \"VOTOS RECURRIDOS\";\n\n //obtener los votos cargados, asociados a este acta\n $votos = $this->dep('datos')->tabla($datos_necesarios['tabla_voto'])->get_listado_votos($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($votos) > 0){//existen votos cargados\n $ar = array_merge($votos, $ar);\n \n }\n else{//no existen votos cargados\n $listas = $this->dep('datos')->tabla($datos_necesarios['tabla_listas'])->get_listas_a_votar($datos_necesarios['acta']['id_acta']);\n \n if(sizeof($listas)>0)//Existen listas\n $ar = array_merge($listas, $ar); \n \n }\n \n return $ar;\n }\n }", "function mostrarFormulario($tipo){\n $cod_proyecto = $this->proyecto[0][0]; \n $nom_proyecto = $this->proyecto[0][1]; \n $indice=$this->configuracion[\"host\"].$this->configuracion[\"site\"].\"/index.php?\";\n $ruta=\"pagina=admin_homologacionTransferenciaInterna\";\n $ruta.=\"&opcion=realizarHomologacionTransferenciaInterna\";\n $ruta.=\"&cod_proyecto=\".$cod_proyecto;\n \n\n ?>\n <script src=\"<? echo $this->configuracion[\"host\"]. $this->configuracion[\"site\"]. $this->configuracion[\"javascript\"] ?>/funciones.js\" type=\"text/javascript\" language=\"javascript\"></script>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario ?>'>\n \n <div align=\"center\" ><b><?echo \"HOMOLOGACIONES POR TRANSFERENCIA INTERNA - \".$cod_proyecto.\" \".$nom_proyecto; ?></b></div><hr>\n <table>\n <tr id=\"fila\" >\n <td class=\"sigma centrar\" colspan=\"6\" width=\"100%\">Seleccione el n&uacute;mero de estudiantes:\n <select id=\"filas\" name=\"filas\" onchange=\"removeLastRow(),nuevaFila(document.getElementById('filas').value-1,<?echo $_REQUEST['cod_proyecto']?>)\">\n <?$opciones=1?>\n <option selected class=\"boton\" value=\"1\" onClick=\"removeLastRow(),nuevaFila(0,<?echo $_REQUEST['cod_proyecto']?>)\">1</option>\n <?for($opciones=5;$opciones<=50;$opciones+=5){?>\n <option id=\"<?echo $opciones-1?>\" class=\"boton\" value=\"<?echo $opciones?>\"><?echo $opciones?></option>\n <?}?>\n </select>&nbsp;&nbsp;\n <?//opciones para agregar 1 estudiante y opcion para borrar todas las filas?>\n <input type=\"button\" value=\"Adicionar filas\" onClick=\"nuevaFila(1,<?echo $_REQUEST['cod_proyecto']?>)\" alt=\"Adicionar\">\n <input type=\"button\" value=\"Reiniciar filas\" onClick=\"removeLastRow()\" alt=\"Remover\">\n <input type=\"button\" value=\"Borrar fila\" onClick=\"removeLastestRow()\" alt=\"Remover\">\n </td>\n </tr></table>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n \n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > Código Actual</th>\n <th class='niveles centrar' > Estudiante</th>\n <th class='niveles centrar' > Código Proyecto Curricular Anterior</th>\n <th class='niveles centrar' > Proyecto Curricular Anterior</th>\n </thead>\n <tr >\n <td width=\"13%\" class='cuadro_plano centrar'>\n 1 <input type=\"text\" id=\"codEstudiante0\" name=\"codEstudiante[0]\" size=\"11\" onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreEstudiante(document.getElementById('codEstudiante0').value,0,<? echo $cod_proyecto;?>)\">\n <input type=\"hidden\" name=\"opcion\" value=\"registrar\">\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\n <input type=\"hidden\" name=\"tipo_homologacion\" value=\"estudiantes\">\n <input type=\"hidden\" name=\"cod_proyecto\" value=\"<? echo $cod_proyecto; ?>\">\n </td>\n <td width=\"20%\" class='cuadro_plano centrar'>\n <div id=\"div_nombreEstudiante0\" ></div>\n </td>\n <td width=\"17%\" class='cuadro_plano centrar'>\n <input type=\"text\" id=\"codProyectoAnt0\" name=\"codProyectoAnt[0]\" size=\"11\" maxlength='3' onKeyPress=\"return solo_numero(event)\" onBlur=\"xajax_nombreProyecto(document.getElementById('codProyectoAnt0').value,0)\">\n </td>\n \n </td>\n <td width=\"30%\" class='cuadro_plano centrar'>\n <div id=\"div_proyectoAnt0\" ></div>\n </td>\n\n </tr>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Registrar\" onclick=\"if(verificarFormulario(<?echo $this->formulario?>)){document.forms['<? echo $this->formulario?>'].submit()}else{false}\">\n </td>\n </tr>\n </table>\n </form>\n<?\n \n }", "function form_karta($form_data,$dct) {\n\t\n\t$formPole1 = '\n\t\t\t<input type=\"checkbox\" CHECK name=\"N___hidden[###hid]\" value=\"1\" class=\"f10\" style=\"margin-right: 40px;\">\n\t\t\t<input type=\"text\" name=\"N___poradi[###por]\" value=\"###porV\" style=\"width: 25px;\" class=\"f10\">\n\t\t\t<input type=\"text\" name=\"N___parametr[###par]\" value=\"###parV\" style=\"width: 190px;\" class=\"f10\">\n\t\t\t<input type=\"text\" name=\"N___jednotka[###jed]\" value=\"###jedV\" style=\"width: 30px;\" class=\"f10\">\n\t\t\t';\n\t\n\t$dParametr = '<input type=\"checkbox\" name=\"delete[###del]\" value=\"###del\" class=\"f10\">odstranit<br />\n\t';\n\t\n\t$formPole='';\n\t$poradi = 0;\n\t\n\t\n\tif(!empty($form_data['id'])) { // editace existujiciho\n\t\n\t\t$form_data['deletebutton'] = button('button','Zrušit vzor produktového listu','class=\"butt_red\" onclick=\"return del()\"');\n\t\t\n\t\t\n\t\t// id nazev lang pozn\n\t\t$query = \"SELECT nazev, pozn \n\t\tFROM \".T_PARAMETRY1.\" WHERE id = \".$form_data['id'].\" LIMIT 0,1\";\n\t\t$v = my_DB_QUERY($query,__LINE__,__FILE__);\n\t\twhile ($z = mysql_fetch_array($v)) {\n\t\t\n\t\t\t$form_data['nazev'] = $z['nazev'];\n\t\t\t$form_data['pozn'] = $z['pozn'];\n\t\t\n\t\t}\n\t\t\n\t\t// id id_karta nazev jednotka poradi\n\t\t$query = \"SELECT id, nazev, hidden, jednotka, poradi \n\t\tFROM \".T_PARAMETRY2.\" WHERE id_karta = \".$form_data['id'].\" ORDER BY poradi\";\n\t\t$v = my_DB_QUERY($query,__LINE__,__FILE__);\n\t\t\n\n\t\t\n\t\twhile ($z = mysql_fetch_array($v)) {\n\t\t\n\t\t\t$id = $z['id'];\n\t\t\t$parametr = $z['nazev'];\n\t\t\t$jednotka = $z['jednotka'];\n\t\t\t$poradi = $z['poradi'];\n\t\t\t$check = $z['hidden'];\n\t\t\t\n\t\t\tif($check==1)$check='checked=\"checked\"';\n\t\t\telse $check=''; \n\t\t\t\n\t\t\t$trans = array('###hid'=>$id,'CHECK'=>$check,'###del'=>$id,'N___'=>'','###por'=>$id,'###porV'=>$poradi,'###par'=>$id,'###parV'=>$parametr,'###jed'=>$id,'###jedV'=>$jednotka);\n\t\t\t$formPole .= strtr($formPole1, $trans);\n\t\t\t$formPole .= strtr($dParametr, $trans);\n\t\t\n\t\t}\n\t\n\t}\n\t\n\t\n\t\n\tfor ($i = $poradi + 1; $i <= $poradi + 10; $i++) {\n\t\n\t\t$trans = array('###por'=>$i,'CHECK'=>'','###porV'=>$i,'###par'=>$i,'###parV'=>'','###jed'=>$i,'###jedV'=>'');\n\t\t$formPole .= strtr($formPole1, $trans).'<br />';\n\t\n\t}\n\t\n\t\n\t$formPole .= '<br />Další parametry můžete přidat později.';\n\t\n\t\n\t\n\t\n\tif(empty($_GET['P']))$_GET['P']='';\n\t\n\t$form = \"\n\t\n\t<SCRIPT LANGUAGE=\\\"JavaScript\\\">\n\t<!--\n\t\n\t\n\tfunction validate(form1) {\n\t\n\t\tif (form1.nazev.value == \\\"\\\") { alert(\\\"Vyplňte název produktového listu\\\"); form1.nazev.focus(); return false; }\n\t\t// else if (form1.id_parent.value == \\\"0\\\") { alert(\\\"Musíte vybrat některou z vnořených úrovní\\\"); form1.id_parent.focus(); return false; }\n\t\t// else if (form1.dph.value == \\\"\\\") { alert(\\\"Zatrhněte výši DPH\\\"); form1.dph.focus(); return false; }\n\t\telse return true;\n\t\n\t}\n\t\n\t// odstraneni zaznamu\n\tfunction del() {\n\t\n\t\tif (!confirm(\\\"Opravdu zrušit vzor produktového listu?\\\"))\n\t\t\treturn false;\n\t\telse\n\t\t\tlocation = \\\"\".MAIN_LINK.\"&f=products_parameters&deleteT=\".$form_data['id'].\"&P=\".$_GET['P'].\"\\\";\n\t\n\t}\n\t\n\t\n\t\n\t// -->\n\t</SCRIPT>\n\t\n\t\n\t<br /><br />\n\t\n\t\n\t<form action=\\\"\\\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\" \n\t\tonSubmit=\\\"return validate(this)\\\">\n\t\n\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$form_data['id'].\"\\\">\n\t\n\t\n\t<table class='admintable nobg' border=\\\"0\\\" cellspacing=\\\"5\\\" cellpadding=\\\"0\\\">\n\t\n\t\n\t<tr>\n\t\t<td>\n\t\t\tNázev<br />\n\t\t\t<span class=\\\"f10i\\\">(max. 255 znaků)</span></td>\n\t\t<td>\n\t\t\t<input type=\\\"text\\\" name=\\\"nazev\\\" value=\\\"\".$form_data['nazev'].\"\\\" \n\t\t\tstyle=\\\"width: 100%;\\\" class=\\\"f10\\\"></td>\n\t</tr>\n\t\n\t\n\t<tr>\n\t\t<td>Poznámka</td>\n\t\t<td>\n\t\t\t<textarea name=\\\"pozn\\\" style=\\\"width: 100%; height: 60px;\\\" title=\\\"\\\">\".$form_data['pozn'].\"</textarea></td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td><br /><br /></td>\n\t\t<td><br /><br />nezobrazovat veřejně na detailu produktu</td>\t\t\n\t</tr> \t\n\t\n\t<tr>\n\t\t<td valign=\\\"top\\\">Pořadí - parametr - měrná jednotka<br /><br />\n\t\t\t<span class=\\\"f10\\\">např.<br />1 - délka - mm<br />2 - šířka - mm<br />3 - hmotnost - kg</span></td>\n\t\t<td>$formPole</td>\n\t</tr>\n\t\n\t\n\t<tr>\n\t\t<td colspan=\\\"2\\\"><br /><br /><br />\n\t\t\t\n\t\t\t\".SAVE_BUTTON.\"\n\t\t\t\n\t\t\t\".$form_data['deletebutton'].\"\n\n\t\t</td>\n\t</tr>\n\t\n\t</table>\n\t\n\t</form>\";\n\t\n\treturn $form;//\n\n}", "function validar() {\n leerClase('Formulario');\n Formulario::validar('login' , $this->login , 'texto', 'El Nombre de Usuario');\n Formulario::validar('clave', $this->clave, 'texto', 'Contraseña');\n \n }", "private function viewFormulario()\n {\n if (count($camposDefinidos = array_map('trim', explode(';', $this->camposForm))) > 0) {\n $campo_formulario = File::get(base_path($this->templates['campo']));\n $form = File::get(base_path($this->templates['form']));\n $stringCampos = \"\";\n foreach ($camposDefinidos as $c) {\n if (count($c_ = array_map('trim', explode(':', $c))) == 2) {\n $stringCampos .= $campo_formulario;\n $stringCampos = str_replace('[{campo}]', $c_[0], $stringCampos);\n $stringCampos = str_replace('[{label}]', $c_[1], $stringCampos);\n $stringCampos = str_replace('[{tabela}]', $this->tabela, $stringCampos);\n } else {\n echo \"#FORMULARIO# Campo {$c} ignorado, por nao estar descrito corretamente... forma correta -> campo:label\\n\";\n }\n }\n\n $form = str_replace('[{campos_formulario}]', $stringCampos, $form);\n $form = str_replace('[{route_as}]', $this->routeAs, $form);\n $form = str_replace('[{tabela}]', $this->tabela, $form);\n File::put(base_path('resources/views/' . $this->tabela . \"/form.blade.php\"), $form);\n }\n }", "abstract public function getForm() : void;", "function validarFormulario()\n\t\t{\n\t\t}", "public function valorpasaje();", "function _GetFrm(){\n\t\t// Valido\n\t\tif(!isset($_POST['diagramacion']) || $_POST['diagramacion'] == 0){\n\t\t\t$this->Error .= \"Es requerido seleccionar una diagramación.\\n\";\n\t\t}\n\t\tif(trim($_POST['titulo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un título de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['copete']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto inicial de noticia.\\n\";\n\t\t}\n\t\tif(trim($_POST['cuerpo']) == \"\"){\n\t\t\t$this->Error .= \"Es requerido especificar un texto principal de noticia.\\n\";\n\t\t}\n\t\tif($this->Error == \"\"){\n\t\t\t// Cargo desde el formulario\n\t\t\t$this->Registro['id_noticia'] = $_POST['id_noticia'];\n\t\t\t$this->Registro['diagramacion'] = addslashes($_POST['diagramacion']);\n\t\t\t$this->Registro['titulo'] = addslashes($_POST['titulo']);\n\t\t\t$this->Registro['copete'] = addslashes($_POST['copete']);\n\t\t\t$this->Registro['cuerpo'] = stripslashes($_POST['cuerpo']);\n\t\t\t$this->Registro['visible'] = $_POST['visible'] ? 1 : 0;\n\t\t\tif($this->Registro['id_noticia'] == \"\"){\n\t\t\t\t$this->Registro['fecha_creacion'] = date('Y').\"-\".date('m').\"-\".date('d').\" \".date('H').\":\".date('i').\":00\";\n\t\t\t}\n\t\t}\n\t}", "function realizarHomologacionPendientes(){ \n $this->mostrarFormularioProyecto();\n }", "function frmUsuario() {\n\tif (isset($_POST[selGerencia]) && $_POST[selGerencia]==100) {\n\t\t\t$_POST[selDivision]=100;\n\t\t\t$_POST[selDepartamento]=100;\n\t}\n\trequire_once \"conexionsql.php\";\n\t\t$conCargo=\"select id_cargo,cargo from cargo where status_activo=1 order by cargo \";\n\t\t$conSitio=\"select id_sitio,sitio from sitio where status_activo=1 order by sitio\";\n\t\t$conGerencia=\"select id_gerencia,gerencia from gerencia where status_activo=1 order by gerencia\";\n\t\t$conDivision=\"select id_division,division from division where id_gerencia='$_POST[selGerencia]' and status_activo=1 order by division\";\n\t\t$conDepartamento=\"select id_departamento, departamento from departamento where id_division='$_POST[selDivision]' and status_activo=1 ORDER BY departamento\";\n\n\t\t$ficha= new campo(\"txtFicha\",\"text\",\"formularioCampoTexto\",\"$_POST[txtFicha]\",\"8\",\"8\",\"onKeyPress\",\"if (event.keyCode > 47 && event.keyCode > 58) event.returnValue = false;\");\n\t\t$txtFicha=$ficha->retornar();\n\n\t\t$cedula= new campo(\"txtCedula\",\"text\",\"formularioCampoTexto\",\"$_POST[txtCedula]\",\"8\",\"8\",\"onKeyPress\",\"if (event.keyCode > 47 && event.keyCode > 58) event.returnValue = false;\");\n\t\t$txtCedula=$cedula->retornar();\n\n\t\t$nombres= new campo(\"txtNombres\",\"text\",\"formularioCampoTexto\",\"$_POST[txtNombres]\",\"30\",\"30\");\n\t\t$txtNombres=$nombres->retornar();\n\n\t\t$apellidos= new campo(\"txtApellidos\",\"text\",\"formularioCampoTexto\",\"$_POST[txtApellidos]\",\"30\",\"30\");\n\t\t$txtApellidos=$apellidos->retornar();\n\n\t\t$cargo= new campoSeleccion(\"selCargo\",\"formularioCampoSeleccion\",\"$_POST[selCargo]\",\"\",\"\",$conCargo,\"--CARGO--\",\"\");\n\t\t$selCargo=$cargo->retornar();\n\n\t\t$sitio= new campoSeleccion(\"selSitio\",\"formularioCampoSeleccion\",\"$_POST[selSitio]\",\"\",\"\",$conSitio,\"--UBICACION--\",\"\");\n\t\t$selSitio=$sitio->retornar();\n\n\t\t$gerencia= new campoSeleccion(\"selGerencia\",\"formularioCampoSeleccion\",\"$_POST[selGerencia]\",\"onChange\",\"cambiarSeleccion()\",$conGerencia,\"--GERENCIA--\",\"\");\n\t\t$selGerencia=$gerencia->retornar();\t\t\n\n\t\t$division= new campoSeleccion(\"selDivision\",\"formularioCampoSeleccion\",\"$_POST[selDivision]\",\"onChange\",\"cambiarSeleccion()\",$conDivision,\"--DIVISION--\",\"\");\n\t\t$selDivision=$division->retornar();\n\n\t\t$departamento= new campoSeleccion(\"selDepartamento\",\"formularioCampoSeleccion\",\"$_POST[selDepartamento]\",\"onChange\",\"cambiarSeleccion()\",$conDepartamento,\"--DEPARTAMENTO--\",\"\");\n\t\t$selDepartamento=$departamento->retornar();\t\t\n\n\t\t$extension= new campo(\"txtExtension\",\"text\",\"formularioCampoTexto\",\"$_POST[txtExtension]\",\"30\",\"30\");\n\t\t$txtExtension=$extension->retornar();\n\t\t\n\t\t$email= new campo(\"txtEmail\",\"text\",\"formularioCampoTexto\",\"$_POST[txtEmail]\",\"30\",\"50\");\n\t\t$txtEmail=$email->retornar();\n\t\t\n\techo \"<form name=\\\"frmUsuario\\\" method=\\\"post\\\" action=\\\"\\\">\";\n\techo \"<input name=\\\"funcion\\\" type=\\\"hidden\\\" value=\\\"1\\\">\";\n\n\techo \"<table class=\\\"formularioTabla\\\"align=center width=\\\"200\\\" border=\\\"0\\\">\";\n\t\techo \"<tr>\";\n\t\t\techo \"<td class=\\\"tituloPagina\\\" colspan=\\\"2\\\">ADMINCAU - NUEVO USUARIO</td>\n \t\t\t\t</tr>\";\n\t\techo \"<tr>\";\n\t\t\techo \"<td class=\\\"formularioTablaTitulo\\\">DATOS DEL USUARIO</td>\n \t\t\t\t</tr>\n\t\t<tr>\n \t\t<td valign=top class=\\\"formularioCampoTitulo\\\">FICHA<br>\n\t\t\t$txtFicha<br>\n\t\t\tCEDULA<br>$txtCedula<br>\n\t\t\tNOMBRES<br>$txtNombres<br>\n\t\t\tAPELLIDOS<br>$txtApellidos<br>\n\t\t\tCARGO<br>$selCargo<br>\n\t\t\tUBICACION<br>$selSitio<br>\n\t\t\tGERENCIA<br>$selGerencia<br>\n\t\t\tDIVISION<br>$selDivision<br>\n\t\t\tDEPARTAMENTO<br>$selDepartamento<br>\n\t\t\tEXTENSION<br>$txtExtension<br>\n\t\t\tCORREO<br>$txtEmail<br>\n\t\t\t</td>\n\t\t</tr>\";\n\t \techo \"<tr>\";\n\t\t\techo \"<td class=\\\"formularioTablaBotones\\\" colspan=\\\"2\\\"><input name=\\\"btnLimpiar\\\" type=\\\"button\\\" value=\\\"LIMPIAR\\\" onclick=\\\"location.href='index2.php?item=23'\\\">\n\t\t\t<input name=\\\"btnGuardar\\\" type=\\\"submit\\\" value=\\\"GUARDAR\\\"></td>\n \t\t\t\t</tr>\";\n\techo \"</table>\";\n\techo \"</form>\";\t\n\t\n\t}", "function ValidarFormularioNuevaReserva($DatosFotmulario = array()){\n\t\t$resultado = array();\n\n\t\t//Creaar un objeto de validacion\n\t\t$campo1 = new stdClass();\n\t\t$campo1->estado = false;\n\t\t$campo1->valor = '';\n\n\t\t$campo2 = new stdClass();\n\t\t$campo2->estado = false;\n\t\t$campo2->valor = '';\n\n\t\t$campo3 = new stdClass();\n\t\t$campo3->estado = false;\n\t\t$campo3->valor = '';\n\n\t\t$campo4 = new stdClass();\n\t\t$campo4->estado = false;\n\t\t$campo4->valor = '';\n\n\t\t$campo5 = new stdClass();\n\t\t$campo5->estado = false;\n\t\t$campo5->valor = '';\n\n\t\t$campo6 = new stdClass();\n\t\t$campo6->estado = false;\n\t\t$campo6->valor = '';\n\n\t\t$campo7 = new stdClass();\n\t\t$campo7->estado = false;\n\t\t$campo7->valor = '';\n\t\n\n\t\t//fechaInicio\n\t\tif($DatosFotmulario['fechaInicio'] != '')\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$campo1->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio'];\n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo1->estado = false; //ok\n\t\t\t\t$campo1->valor = $DatosFotmulario['fechaInicio']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaInicio'] = $campo1; \n\t\t\t}\n\n\n\t\t//fechaFin\n\t\tif($DatosFotmulario['fechaFin'] != '')\n\t\t\t{\n\t\t\t\t$campo2->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin'];\n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo2->estado = false; //ok\n\t\t\t\t$campo2->valor = $DatosFotmulario['fechaFin']; //guarda el valor vacio \n\t\t\t\t$resultado['fechaFin'] = $campo2; \n\t\t\t}\t\n\t\t\t \n\n\t\t//cantPersonas\n\t\tif($DatosFotmulario['cantPersonas'] != '')\n\t\t\t{\n\t\t\t\t$campo3->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas'];\n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo3->estado = false; //ok\n\t\t\t\t$campo3->valor = $DatosFotmulario['cantPersonas']; //guarda el valor vacio \n\t\t\t\t$resultado['cantPersonas'] = $campo3; \n\t\t\t}\n\n\t\t//nombreT\n\t\tif($DatosFotmulario['nombreT'] != '')\n\t\t\t{\n\t\t\t\t$campo4->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT'];\n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo4->estado = false; //ok\n\t\t\t\t$campo4->valor = $DatosFotmulario['nombreT']; //guarda el valor vacio \n\t\t\t\t$resultado['nombreT'] = $campo4; \n\t\t\t}\n\n\t\t//numHab\n\t\tif($DatosFotmulario['numHab'] != '')\n\t\t\t{\n\t\t\t\t$campo5->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab'];\n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo5->estado = false; //ok\n\t\t\t\t$campo5->valor = $DatosFotmulario['numHab']; //guarda el valor vacio \n\t\t\t\t$resultado['numHab'] = $campo5; \n\t\t\t}\n\n\t\t//precioPorNoche\n\n\t\t\t\n\t\tif($DatosFotmulario['precioPorNoche'] != '' )\n\t\t\t{\n\t\t\t\t$campo6->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo6->valor = $DatosFotmulario['precioPorNoche'];\n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \t\t\t\t\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$campo6->estado6 = false; //ok\n\t\t\t\t$campo6->valor6 = $DatosFotmulario['precioPorNoche']; //guarda el valor vacio \n\t\t\t\t$resultado['precioPorNoche'] = $campo6; \n\t\t\t}\n\n\t\t//documento\n\t\tif($DatosFotmulario['documento'] != '')\n\t\t\t{\n\t\t\t\t$campo7->estado = true; //ok, el campo esta cargado \n\t\t\t\t$campo7->valor = $DatosFotmulario['documento'];\n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\t\t\t\n\t\telse\n\t\t\t{\n\t\t\t\t$campo7->estado = false; //ok\n\t\t\t\t$campo7->valor = $DatosFotmulario['documento']; //guarda el valor vacio \n\t\t\t\t$resultado['documento'] = $campo7; \n\t\t\t}\n\t\t\t\n $cont = 0;\n foreach ($resultado as $e){ \n if ($e->estado == false)\n $cont++;\n }\n\n if ($cont > 0) //Faltan campos\n return $resultado;\n else\n return array(); // Formulario OK \t\t\t\n\t}", "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 recuperar_datos() {\n\t\tglobal $nombre, $tipo ;\n\t\t\n\t\t\t$pers_id =(isset($_POST['id_marcas']) && !empty($_POST['id_marcas']))? $_POST['id_marcas']:\"\";\n\t\t\t$tipo =(isset($_POST['tipo']) && !empty($_POST['tipo']))? $_POST['tipo']:\"A\"; \t\n\n\t\t\t$nombre=(isset($_POST[\"nombre\"]) && !empty($_POST[\"nombre\"]))? $_POST[\"nombre\"]:\"\";\t\t\t\n\t\n\t\t}", "function nuovoordine () {\r\n?>\r\n<tr>\r\n <form method=\"POST\" name=\"nuovo_record_SODL\"> <!-- QUI INIZIA LA FORM -->\r\n <input type=\"hidden\" name=\"percorso\" value=\"insertORDINE\">\r\n <td><!-- SODL -->\r\n <input type=\"text\" name=\"nsodl\" id=\"txtst\" class=\"btW\" size=\"3\" value=\"<?=$sodlval?>\"></td>\r\n <td><!-- NORD --> <input type=\"text\" name=\"nord\" id=\"nord_txt\" class=\"btW\" size=\"6\"></td>\r\n <td><!-- F.P. --> <input type=\"checkbox\" name=\"fp\" id=\"fp_check\" class=\"btW\"></td>\r\n <td><!-- CLIE --> \r\n <input type=\"hidden\" name=\"clie[]\" id=\"clie_hid\">\r\n <input type=\"text\" name=\"clie[]\" id=\"clie_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('clie')\">\r\n <div id=\"clie_list\"></div> \r\n </td>\r\n <td><!-- PROD --> \r\n <input type=\"hidden\" name=\"prod[]\" id=\"prod_hid\">\r\n <input type=\"text\" name=\"prod[]\" id=\"prod_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('prod')\">\r\n <div id=\"prod_list\"></div> \r\n </td>\r\n <td><!-- PEZ. --> \r\n <input type=\"hidden\" name=\"pez[]\" id=\"pezz_hid\">\r\n <input type=\"text\" name=\"pez[]\" id=\"pezz_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('pezz')\" size=\"4\">\r\n <div id=\"pezz_list\"></div> \r\n </td>\r\n <td><!-- LAVO --> \r\n <input type=\"hidden\" name=\"lavo[]\" id=\"lavo_hid\">\r\n <input type=\"text\" name=\"lavo[]\" id=\"lavo_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('lavo')\" size=\"8\">\r\n <div id=\"lavo_list\"></div> \r\n </td>\r\n <td><!-- COMM --> <input type=\"text\" name=\"testo[]\" id=\"txtst\" class=\"btW\" size=\"10\"></td>\r\n <td><!-- T.PA --> \r\n <input type=\"hidden\" name=\"tpa[]\" id=\"tpal_hid\">\r\n <input type=\"text\" name=\"tpa[]\" id=\"tpal_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('tpal')\" size=\"7\">\r\n <div id=\"tpal_list\"></div> \r\n </td>\r\n <td><!-- IMBA -->\r\n <input type=\"hidden\" name=\"imba[]\" id=\"imba_hid\">\r\n <input type=\"text\" name=\"imba[]\" id=\"imba_txt\" class=\"btW\" autocomplete=\"off\" onkeyup=\"autocomplet('imba')\" size=\"8\">\r\n <div id=\"imba_list\"></div> \r\n </td>\r\n <td><!-- COLL --> <input type=\"text\" name=\"colli\" id=\"txtst\" class=\"btW\" size=\"4\"></td>\r\n <td><!-- STIV --> <input type=\"text\" name=\"stive\" id=\"txtst\" class=\"btW\" size=\"4\"></td>\r\n <td><!-- MISU --> <input type=\"text\" name=\"misura\" id=\"txtst\" class=\"btW\" size=\"6\"></td>\r\n <td><!-- OPAR --> \r\n <select name=\"OraP\">\r\n <option value=\"\">scegli</option>\r\n <option value=\"00:00\">00:00</option>\r\n <option value=\"00:30\">00:30</option>\r\n <option value=\"01:00\">01:00</option>\r\n <option value=\"01:30\">01:30</option>\r\n <option value=\"02:00\">02:00</option>\r\n <option value=\"02:30\">02:30</option>\r\n <option value=\"03:00\">03:00</option>\r\n <option value=\"03:30\">03:30</option>\r\n <option value=\"04:00\">04:00</option>\r\n <option value=\"04:30\">04:30</option>\r\n <option value=\"05:00\">05:00</option>\r\n <option value=\"05:30\">05:30</option>\r\n <option value=\"06:00\">06:00</option>\r\n <option value=\"06:30\">06:30</option>\r\n <option value=\"07:00\">07:00</option>\r\n <option value=\"07:30\">07:30</option>\r\n <option value=\"08:00\">08:00</option>\r\n <option value=\"08:30\">08:30</option>\r\n <option value=\"09:00\">09:00</option>\r\n <option value=\"09:30\">09:30</option>\r\n <option value=\"10:00\">10:00</option>\r\n <option value=\"10:30\">10:30</option>\r\n <option value=\"11:00\">11:00</option>\r\n <option value=\"11:30\">11:30</option>\r\n <option value=\"12:00\">12:00</option>\r\n <option value=\"12:30\">12:30</option>\r\n <option value=\"13:00\">13:00</option>\r\n <option value=\"13:30\">13:30</option>\r\n <option value=\"14:00\">14:00</option>\r\n <option value=\"14:30\">14:30</option>\r\n <option value=\"15:00\">15:00</option>\r\n <option value=\"15:30\">15:30</option>\r\n <option value=\"16:00\">16:00</option>\r\n <option value=\"16:30\">16:30</option>\r\n <option value=\"17:00\">17:00</option>\r\n <option value=\"17:30\">17:30</option>\r\n <option value=\"18:00\">18:00</option>\r\n <option value=\"18:30\">18:30</option>\r\n <option value=\"19:00\">19:00</option>\r\n <option value=\"19:30\">19:30</option>\r\n <option value=\"20:00\">20:00</option>\r\n <option value=\"20:30\">20:30</option>\r\n <option value=\"21:00\">21:00</option>\r\n <option value=\"21:30\">21:30</option>\r\n <option value=\"22:00\">22:00</option>\r\n <option value=\"22:30\">22:30</option>\r\n <option value=\"23:00\">23:00</option>\r\n <option value=\"23:30\">23:30</option>\r\n <option value=\"24:00\">24:00</option>\r\n <option value=\"24:30\">24:30</option>\r\n </select> \r\n </td>\r\n <td><!-- S... --> <input type=\"checkbox\" name=\"testo[]\" id=\"s_check\" class=\"btW\"></td>\r\n <td><!-- OP.. --> <button type=\"submit\" name=\"bt\" class=\"btG\" value=\"A\">INS</button><!--<button type=\"submit\" name=\"btR\" class=\"btY\" value=\"C\">M</button>&nbsp;<button type=\"submit\" name=\"btR\" class=\"btR\" value=\"C\">C</button> \r\n <br><button name=\"bt\">PVIS</button><button name=\"bt\">PLIN</button><button name=\"bt\">ASPE</button><button name=\"bt\">CARI</button>--></td>\r\n</form>\r\n</tr>\r\n<?\r\n}", "private function camposObligatorios()\n {\n $this->setRequiredField(\"mascara\");\n $this->setRequiredField(\"etiqueta\");\n/*\n $this->setRequiredField(\"id_padre\");\n*/\n $this->setRequiredField(\"posicion\");\n $this->setRequiredField(\"visible\");\n $this->setRequiredField(\"nivel_acceso\");\n/*\n $this->setRequiredField(\"accion\");\n*/\n\n return;\n }", "public function createForm();", "public function createForm();", "public function form(){\n\n }", "public static function renderProductos()\n {\n //Se verifica si hay una opcion de busqueda\n if(isset($_POST[\"formulario\"]))\n {\n //se verifica que el formulario no este vacio\n if(!empty($_POST))\n {\n //Se verifica si ha ingresado un parametro de busqueda\n if($_POST[\"busqueda\"] != \"\")\n {\n //se declaran las variables del formulario\n $busqueda = trim($_POST[\"buscar\"]);\n $orden = $_POST[\"orden\"];\n\n //Se crea un switch para el orden en el que se mostrara\n switch ($orden)\n {\n //Aqui se buscara en orden predeterminado\n case 0:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Seleccionar(\"productos\", \"producto\", array($busqueda), 1, 1);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui se buscara en orden de lo mas economico\n case 1:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Buscar(\"productos\", \"producto\", array($busqueda), 1, 1, 1);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui se buscara en orden de lo mas costoso\n case 2:\n //Variable con los datos parametrisados\n $datos_productos = Sentencias::Buscar(\"productos\", \"producto\", array($busqueda), 1, 1, 0);\n\n //Verifica que existan productos con ese nombre para mostrarlos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n \n default:\n # code...\n break;\n }\n } \n\n //Aqui solo se ordenara cuando no hayan aprametros de busqueda\n else\n {\n $busqueda = null;\n $orden = $_POST[\"orden\"];\n\n switch ($orden) \n {\n //Aqui es el orden predeterminado\n case 0:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Seleccionar(\"productos\", null, null, null, null);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui es orden de lo mas economico\n case 1:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Buscar(\"productos\", null, null, null, null, 1);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n\n //Aqui es orden de lo mas costoso\n case 2:\n //Variable con los datos ordenados de forma predeterminada\n $datos_productos = Sentencias::Buscar(\"productos\", null, null, null, null, 0);\n\n //Verifica que existan productos\n if($datos_productos != null)\n {\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n\n }\n break;\n \n default:\n # code...\n break;\n }\n } \n }\n }\n\n else\n {\n //variable con los datos de todos los productos\n $datos_productos = Sentencias::Seleccionar(\"productos\", null, null, null, null);\n\n //se verifica que existan productos\n if($datos_productos != null)\n {\n //Se renderizan todos los registros de la tabla productos\n foreach($datos_productos as $row_productos)\n {\n self::Tarjeta($row_productos);\n }\n }\n\n else\n {\n \n }\n }\n }", "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 formularioNuevo(){\n\t\t$template = file_get_contents('tpl/proyecto_form_tpl.html');\n\t\t$tipos = $this->listaTipos();\n\t\t$tipos_proy = '<select name=\"tipo_proyecto\" size=\"1\" size=\"10\" id=\"tipo_proyecto\">';\n\t\tforeach($tipos as $key => $tipo){\n\t\t\t$tipos_proy = $tipos_proy.'<option value=\"'.utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_COD']).'\">'.\n\t\t\t\t\t\t utf8_encode($tipo['gral_param_propios']['GRAL_PAR_PRO_DESC']).'</option>';\n\t\t}\n\t\t$tipos_proy = $tipos_proy.'</select >';\n\t\t$template = str_replace('{proyecto_tipo}', $tipos_proy, $template);\n print($template);\n\t}", "abstract protected function getForm();", "public function valordelospasajesplus();", "function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}", "function readForm() {\n\t\t$this->FiscaalGroepID = $this->formHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->formHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->formHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->formHelper(\"GewijzigdOp\", \"\");\n\t}", "function campos_formulario( $fields) {\n\n //Variables necesarias básicas como que el email es obligatorio\n $commenter = wp_get_current_commenter();\n $req = get_option( 'require_name_email' );\n\t$aria_req = ( $req ? \" aria-required='true'\" : '' );\n\t\n // campos por defecto del formulario que vamos a introducir con nuestros cambios\n $fields = array(\n\t\t\n // NOMBRE\n 'author' =>\n\t'<input id=\"author\" placeholder=\"Nombre\" \n\tclass=\"nombre\" name=\"author\" type=\"text\" value=\"' . esc_attr( $commenter['comment_author'] ) . \n\t'\" size=\"30\"' . $aria_req . ' />',\n\n // EMAIL\n 'email' =>\n\t'<input id=\"email\" placeholder=\"Email\" \n\tclass=\"email\" name=\"email\" type=\"email\" value=\"' . esc_attr( $commenter['comment_author_email'] ) . '\" size=\"30\"' . $aria_req . ' />',\n\t);\n\t\n\treturn $fields;\n }", "public function listaAction() \n { \n \n $form = new Formulario(\"form\");\n // valores iniciales formulario (C)\n $id = (int) $this->params()->fromRoute('id', 0);\n $form->get(\"id\")->setAttribute(\"value\",$id); \n // Niveles de aspectos\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $o=new \\Nomina\\Model\\Entity\\Turnos($this->dbAdapter);\n $arreglo='';\n $turnos = $o->getRegistro(); \n foreach ($turnos as $dat){\n $idc=$dat['id'];$nom=$dat['codigo'];\n $arreglo[$idc]= $nom;\n } \n $form->get(\"tipo\")->setValueOptions($arreglo); \n $form->get(\"tipo1\")->setValueOptions($arreglo); \n $form->get(\"tipo2\")->setValueOptions($arreglo); \n $form->get(\"idCar\")->setValueOptions($arreglo); \n \n $d = new AlbumTable($this->dbAdapter);\n \n $valores=array\n (\n \"titulo\" => $this->tfor,\n \"form\" => $form,\n 'url' => $this->getRequest()->getBaseUrl(),\n 'id' => $id,\n 'datos' => $d->getGeneral1(\"select * from n_turnos_g where id =\".$id), \n \"lin\" => $this->lin\n ); \n // ------------------------ Fin valores del formulario \n \n if($this->getRequest()->isPost()) // Actulizar datos\n {\n $request = $this->getRequest();\n if ($request->isPost()) {\n// print_r($_POST);\n \n // Zona de validacion del fomrulario --------------------\n $album = new ValFormulario();\n $form->setInputFilter($album->getInputFilter()); \n $form->setData($request->getPost()); \n $form->setValidationGroup('nombre'); // ------------------------------------- 2 CAMPOS A VALDIAR DEL FORMULARIO (C) \n // Fin validacion de formulario ---------------------------\n if ($form->isValid()) {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u = new TurnosG($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $data = $this->request->getPost();\n // INICIO DE TRANSACCIONES\n $connection = null;\n try \n {\n $connection = $this->dbAdapter->getDriver()->getConnection();\n $connection->beginTransaction(); \n\n $id = $u->actRegistro($data);\n $d = new AlbumTable($this->dbAdapter);// ------------------------------------------------- 3 FUNCION DENTRO DEL MODELO (C) \n $connection->commit();\n return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);// El 1 es para mostrar mensaje de guardado\n }// Fin try casth \n catch (\\Exception $e) \n {\n if ($connection instanceof \\Zend\\Db\\Adapter\\Driver\\ConnectionInterface) \n {\n $connection->rollback();\n echo $e;\n } \n /* Other error handling */\n }// FIN TRANSACCION // return $this->redirect()->toUrl($this->getRequest()->getBaseUrl().$this->lin);\n }\n }\n //exit(); \n return new ViewModel($valores);\n \n }else{ \n if ($id > 0) // Cuando ya hay un registro asociado\n {\n $this->dbAdapter=$this->getServiceLocator()->get('Zend\\Db\\Adapter');\n $u=new TurnosG($this->dbAdapter); // ---------------------------------------------------------- 4 FUNCION DENTRO DEL MODELO (C) \n $datos = $u->getRegistroId($id);\n $n = $datos['nombre'];\n // Valores guardados\n $form->get(\"nombre\")->setAttribute(\"value\",\"$n\"); \n \n \n } \n return new ViewModel($valores);\n }\n }", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台规则')->rules('required');\n }", "public function populateForm() {}", "public function CreateForm();", "public function getElementos();", "function presentInputForm($id, $matr, $cargo, $agrup, $eaf, $ecom, $epp, $n_ref, $ref, $tipo, $obs,$ano, $fcnLetter)\n {\n global $BD3;\n global $BD1;\n global $ANO_REF;\n switch ($fcnLetter)\n {\n case \"E\":\n case \"A\":\n break;\n default: \n print \"<p><h1>Letra de funcao ilegal ($fcnLetter) in presentInputForm()<p>\\n\";\n print \"<p><a href=\\\"cadastra.php\\\">Volte para selecionar </a>\";\nreturn;\n break;\n }\n\n echo \"<font class=corpo><b>Cadastramento</b></font> <br><br>\";\n print \"<form action=\\\"cadastra.php\\\" method=\\\"POST\\\">\\n\";\n\n $res_sql_nome= sql($BD1,\"select $BD1.empregados.nome from $BD1.empregados where $BD1.empregados.matr='$matr'\");\n $res_nome= mysql_result($res_sql_nome,0,\"nome\");\n\n switch ($fcnLetter)\n {\n case \"E\": //don't allow editing of key value\n echo \" $id\\n\";\n echo \" - \";\n echo \" $res_nome\\n\";\n\n $rec_nome=sql($BD1,\"SELECT matr,nome \n FROM empregados\n WHERE empregados.tipo='e'\n AND empregados.situacao='a'\n ORDER BY nome;\");\n\n print \"<input type=\\\"hidden\\\" name=\\\"HILid\\\" value=\\\"$id\\\">\\n<br>\";\n print \"<input type=\\\"hidden\\\" name=\\\"TImatr\\\" value=\\\"$matr:::$res_nome\\\">\\n<br>\";\n break;\n case \"A\":\n $rec_nome=sql($BD1,\"SELECT $BD1.empregados.matr, $BD1.empregados.nome\n FROM $BD1.empregados\n WHERE $BD1.empregados.tipo = 'e'\n AND $BD1.empregados.situacao = 'a'\n AND $BD1.empregados.matr NOT IN ( SELECT matr FROM $BD3.final WHERE ano=$ANO_REF)\n ORDER BY $BD1.empregados.nome;\");\n\n echo \"<br>Matricula: \";\n break;\n }\n \n if ($fcnLetter ==\"A\")\n {\n echo \"<SELECT NAME=\\\"TImatr\\\">\\n\";\n while ($lista4=mysql_fetch_row($rec_nome))\n {\n if ($lista4[0]== $matr)\n {\n echo \"<OPTION SELECTED>\";\n echo \"$lista4[0]\".\":::\".\"$lista4[1]\";\n }\n else\n {\n echo \"<OPTION>\";\n echo \"$lista4[0]\".\":::\".\"$lista4[1]\";\n }\n }\n echo \"</SELECT>\\n\";\n }\n echo \"<br>\";\n echo \"<br><i>Atencao:Utilize pontos nas casas decimais</i>\";\n echo \"<br>\";\n print \"<br>EAF: \";\n print \"<input type=\\\"text\\\" name=\\\"TIeaf\\\" value=\\\"$eaf\\\" size=10 maxlength=10>\\n<br>\";\n\n print \"<br>ECOM: \";\n print \"<input type=\\\"text\\\" name=\\\"TIecom\\\" value=\\\"$ecom\\\" size=10 maxlength=10>\\n<br>\";\n\n print \"<br>EPP: \";\n print \"<input type=\\\"text\\\" name=\\\"TIepp\\\" value=\\\"$epp\\\" size=10 maxlength=10>\\n<br>\";\n/*\n print \"<br>Classificacao no agrupamento: \";\n print \"<input type=\\\"text\\\" name=\\\"TIclass\\\" value=\\\"$class\\\" size=2 maxlength=2>\\n<br>\";\n*/\n\n print \"<br>Numero de Referencias : \";\n print \"<input type=\\\"text\\\" name=\\\"TIn_ref\\\" value=\\\"$n_ref\\\" size=2 maxlength=2>\\n<br>\";\n\n print \"<br>Nova referencia: \";\n print \"<input type=\\\"text\\\" name=\\\"TIref\\\" value=\\\"$ref\\\" size=5 maxlength=5>\\n<br>\";\n\n# print \"<br>Tipo (e-elegivel n-Nao elegivel): \";\n# print \"<input type=\\\"text\\\" name=\\\"TItipo\\\" value=\\\"$tipo\\\" size=2 maxlength=2>\\n<br>\";\n\n echo \"<br>\";\n echo \"<br>\";\n echo \"<INPUT TYPE=RADIO NAME=\\\"TItipo\\\" VALUE=\\\"e\\\"\";\n if ($tipo==\"e\")\n {\n echo \" checked>Elegivel\";\n }\n else\n {\n echo \" >Elegivel\";\n }\n echo \"<INPUT TYPE=RADIO NAME=\\\"TItipo\\\" VALUE=\\\"n\\\"\";\n if ($tipo==\"t\")\n {\n echo \" checked>Nao elegivel\";\n }\n else\n {\n echo \" >Nao elegivel\";\n }\n\n echo \"<br>\";\n echo \"<br>\";\n\n print \"<br>Observacaoes: \";\n print \"<input type=\\\"text\\\" name=\\\"TIobs\\\" value=\\\"$obs\\\" size=50 maxlength=200>\\n<br>\";\n print \"<input type=\\\"HIDDEN\\\" name=\\\"TIano\\\" value=\\\"$ANO_REF\\\">\\n<br>\";\n\n\n //**** PLACE FUNCTION LETTER IN BUTTON NAMES TO CONVEY STATE ****\n print \" <p><input type=\\\"submit\\\" name=\\\"B\" . $fcnLetter;\n print \"Submit\\\" value=\\\"Submit\\\">\\n\";\n print \"&nbsp;&nbsp;\\n\";\n\n print \"<input type=\\\"submit\\\" name=\\\"B\" . $fcnLetter;\n print \"Cancel\\\" value=\\\"Cancel\\\">\\n\";\n print \"</form>\\n\";\n\n }", "function get_data_form(){\n\n $IdTrabajo= $_REQUEST['IdTrabajo']; //Variable para el id del trabajo\n $NombreTrabajo = $_REQUEST['NombreTrabajo']; //Variable para el nombre del trabajo\n $FechaIniTrabajo = $_REQUEST['FechaIniTrabajo']; //Variable para la fecha de inicio del trabajo\n $FechaFinTrabajo = $_REQUEST['FechaFinTrabajo']; //Variable para la fecha de finalizacion del trabajo\n $PorcentajeNota = $_REQUEST['PorcentajeNota']; //Variable para el porcentaje de la nota\n $action = $_REQUEST['action']; //Variable action para la accion a realizar\n\n //crea un trabajo\n $TRABAJO = new TRABAJO_Model(\n $IdTrabajo,\n $NombreTrabajo,\n $FechaIniTrabajo,\n $FechaFinTrabajo,\n $PorcentajeNota);\n\n return $TRABAJO;\n }", "protected function createComponentNastaveniUraduForm()\n {\n\n $client_config = GlobalVariables::get('client_config');\n $Urad = $client_config->urad;\n $stat_select = Subjekt::stat();\n\n\n $form1 = new Form();\n $form1->addText('nazev', 'Název:', 50, 100)\n ->setValue($Urad->nazev)\n ->addRule(Nette\\Forms\\Form::FILLED, 'Název úřadu musí být vyplněn.');\n $form1->addText('plny_nazev', 'Plný název:', 50, 200)\n ->setValue($Urad->plny_nazev);\n $form1->addText('zkratka', 'Zkratka:', 15, 30)\n ->setValue($Urad->zkratka)\n ->addRule(Nette\\Forms\\Form::FILLED, 'Zkratka úřadu musí být vyplněna.');\n\n $form1->addText('ulice', 'Ulice:', 50, 100)\n ->setValue($Urad->adresa->ulice);\n $form1->addText('mesto', 'Město:', 50, 100)\n ->setValue($Urad->adresa->mesto);\n $form1->addText('psc', 'PSČ:', 12, 50)\n ->setValue($Urad->adresa->psc);\n $form1->addSelect('stat', 'Stát:', $stat_select)\n ->setValue($Urad->adresa->stat);\n\n $form1->addText('ic', 'IČ:', 20, 50)\n ->setValue($Urad->firma->ico);\n $form1->addText('dic', 'DIČ:', 20, 50)\n ->setValue($Urad->firma->dic);\n\n $form1->addText('telefon', 'Telefon:', 50, 100)\n ->setValue($Urad->kontakt->telefon);\n $form1->addText('email', 'E-mail:', 50, 100)\n ->setValue($Urad->kontakt->email);\n $form1->addText('www', 'URL:', 50, 150)\n ->setValue($Urad->kontakt->www);\n\n\n $form1->addSubmit('upravit', 'Uložit')\n ->onClick[] = array($this, 'nastavitUradClicked');\n $form1->addSubmit('storno', 'Zrušit')\n ->setValidationScope(FALSE)\n ->onClick[] = array($this, 'stornoClicked');\n\n return $form1;\n }", "protected function generaCamposFormulario($datosIniciales)\n\t\t{\n\t\t\tif(empty($datosIniciales)){\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend>Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" required>';\n\t\t\t\t$html.= ' Apellidos: <input type=\"text\" name=\"apellido\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" required></p>';\n\t\t\t\t$html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$html = '<fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos para finalizar su compra: </legend>';\n\t\t\t\t$html.= '<p>Nombre: <input type=\"text\" name=\"nombre\" value=\"'.$datosIniciales['nombre'].'\" required>';\n\t\t\t\t$html.= ' Apellido: <input type=\"text\" name=\"apellido\" value=\"'.$datosIniciales['apellido'].'\" required></p>';\n\t\t\t\t$html.= '<p>País: <input type=\"text\" name=\"pais\" value=\"'.$datosIniciales['pais'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección: <input type=\"text\" name=\"direccion\" value=\"'.$datosIniciales['direccion'].'\" required>';\n\t\t\t\t$html.=' Código postal: <input type=\"text\" name=\"cp\" value=\"'.$datosIniciales['cp'].'\" required></p>';\n\t\t\t\t$html.= '<p>Localidad/Ciudad: <input type=\"text\" name=\"localidad\" value=\"'.$datosIniciales['localidad'].'\" required>';\n\t\t\t\t$html.= ' Provincia: <input type=\"text\" name=\"provincia\" value=\"'.$datosIniciales['provincia'].'\" required></p>';\n\t\t\t\t$html.= '<p>Teléfono: <input type=\"text\" name=\"telefono\" value=\"'.$datosIniciales['telefono'].'\" required></p>';\n\t\t\t\t$html.= '<p>Dirección de correo electrónico: <input type=\"text\" name=\"correo\" value=\"'.$datosIniciales['correo'].'\" required></p>';\n\t\t\t $html.= '</fieldset>';\n\t\t\t\t$html .= '<div id=\"fc\"><fieldset>';\n\t\t\t\t$html.= '<legend> Rellene los datos de pago: </legend>';\n\t\t\t\t$html .='<p><input type=\"checkbox\" id=\"tipoV\" name=\"tipoT\" value=\"Visa\" >';\n\t\t\t\t$html .='<img src=\"img/visa.jpg\" class=\"visa\" style=\"width:8%; height:6%;\"/>';\n\t\t\t\t$html .='<input type=\"checkbox\" id=\"tipoMC\" name=\"tipoT\" value=\"MasterCard\" >';\n\t\t\t\t$html .='<img src=\"img/mastercard.png\" class=\"MasterCard\" style=\"width:5%; height:3%;\"/></p>';\n\t\t\t\t$html .='<p>Numero de tarjeta: <input type=\"text\" name=\"tarjeta\" required></p>';\n\t\t\t\t$html .='<p>Fecha de caducidad: <input type=\"text\" name=\"mesC\" required> / <input type=\"text\" name=\"añoC\" required> </p>';\n\t\t\t\t$html .='<p>CVV: <input type=\"text\" name=\"cvv\" required></p>';\n\t\t\t\t$html .='<?php echo \"La cantidad total a pagar es \"'. $_SESSION[\"totalCompra\"] .'\"€.\" ?>';\n\t\t\t\t$html.= '<p><input type=\"submit\" name=\"aceptar\" value=\"PAGAR\"></p>';\n\t\t\t $html.= '</fieldset></div>';\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "function formularioRelleno($numCampos){\n \n //Si la variable %_POST tiene menos de 8 campos es que el form no esta relleno\n if(count($_POST)<$numCampos){\n return false;\n }\n else{\n foreach ($_POST as $valor) {\n //Si alguno de los campos esta vacio tampoco cuenta como relleno,\n //esto es para evitar que se manden campos de texto vacios\n if (empty($valor)){\n return false;\n }\n }\n }\n \n return true;\n}", "protected function procesaFormulario($datos) {\n // ToDo: Validar los datos recibidos para crear una nueva oferta\n $result = Oferta::creaOferta($datos);\n if (is_array($result)) {\n $result[] = array();\n $result[] = 'La oferta no es válida';\n }\n else\n $result = \\es\\ucm\\aw\\internprise\\Aplicacion::getSingleton()->resuelve('/dashboard.php');\n return $result;\n }", "function formulario(){\n\t\tglobal $main_menu, $usuarioid, $username, $ruta, $controller, $funcion, $subfuncion, $modulos_totales;\n\n\t\t$main_view=false;\n\t\t$data['username']=$username;\n\t\t$data['usuarioid']=$usuarioid;\n\t\t$data['modulos_totales']=$modulos_totales;\n\t\t$data['colect1']=$main_menu;\n\t\t$data['title']=$this->accion->get_title(\"$subfuncion\");\n\t\t$accion_id=$this->accion->get_id(\"$subfuncion\");\n\t\t$row=$this->usuario->get_usuario($usuarioid);\n\t\t$grupoid=$row->grupo_id;\n\t\t$puestoid=$row->puesto_id;\n\t\t$data['ruta']=$ruta;\n\t\t$data['controller']=$controller;\n\t\t$data['funcion']=$funcion;\n\t\t$data['subfuncion']=$subfuncion;\n\t\t$data['permisos']=$this->usuario_accion->get_permiso($accion_id, $usuarioid, $puestoid, $grupoid);\n\n\t\t//Validacion del arreglo del menu, usuarioid y permisos especificos\n\t\tif(is_array($data['colect1']) and $usuarioid>0 and $data['permisos']!= false and $this->session->userdata('logged_in') == TRUE){\n\n\t\t\t$main_view=true;\n\t\t\tif ($subfuncion==\"rep_general_recetas\"){\n\t\t\t\t//Cargar los datos para el formulario\n\t\t\t\t$data['frames']=1;\n\t\t\t\t$data['recetas'] = $this->receta->get_recetas_pdf();\n\t\t\t\tif ($data['recetas']){\n\t\t\t\t\t$this->load->view(\"produccion/rep_general_recetas_pdf\", $data);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\techo \"<html> <script>alert(\\\"No hay aun Registros de Recetas en la Base de Datos favor de verificar.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/produccion/menu';</script></html>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($subfuncion==\"rep_etiquetas_codigo_barras\"){\n\t\t\t\t$data['principal']=$ruta.\"/\".$subfuncion;\n\t\t\t\t$data['title']=\"Impresi�n de Etiquetas con C�digo de Barras\";\n\t\t\t\t$data['productos']=$this->producto->get_cproductos_etiquetas();\n\t\t\t}\n\t\t}\n\t\tif($main_view){\n\t\t\t//Llamar a la vista\n\t\t\t$this->load->view(\"ingreso\", $data);\n\t\t} else {\n\t\t\tredirect(base_url().\"index.php/inicio/logout\");\n\t\t}\n\t}", "function getElementosPlus() {\t\n\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\n\t\t\n\t\t//Y GUARDANDO OS DATOS EN VARIABLES\n\t\tif (isset($_REQUEST['hora_inicio'])) {\n\t\t\t$hora_inicio = $_REQUEST['hora_inicio'];\n\t\t\t$minuto_inicio = $_REQUEST['minuto_inicio'];\n\t\t\t$hora_termino = $_REQUEST['hora_termino'];\n\t\t\t$minuto_termino = $_REQUEST['minuto_termino'];\n\t\t}else{\n\t\t\t$hora_termino = '23';\n\t\t\t$minuto_termino = '59';\n\t\t\t$hora_inicio = '00';\n\t\t\t$minuto_inicio = '00';\n\t\t}\n\n\t\tif (isset($_REQUEST['nodo_filtro'])) {\n\t\t\t$nodo_filtro = $_REQUEST['nodo_filtro'];\n\t\t\t$isset = 1;\n\t\t}else{\n\t\t\t$nodo_filtro = -1;\n\t\t\t$isset = 0;\n\t\t}\n\n\n\t\t//SE GUARDA DIA MES Y AÑO EN VARIABLE Y SE LE AGREGA LA HORA QUE SE PASA POR POST POR LOS INPUTS DEL FILTRO\n\t\t$fechainicioSinHora = date(\"Y-m-d\", strtotime($this->timestamp->getInicioPeriodo()));\n\t\t$fecha_inicio_filtro = $fechainicioSinHora.' '.$hora_inicio.':'.$minuto_inicio.':00';\n\t\t$fechaTerminoSinHora = date(\"Y-m-d\", strtotime($this->timestamp->getInicioPeriodo()));\n\t\t$fecha_termino_filtro = $fechaTerminoSinHora.' '.$hora_termino.':'.$minuto_termino.':59';\n\n\t\t//SI SE ACTIVA EL FILTRO SE GUARDA FECHA PASADA POR POST SINO LA FECHA ES LA DEL CALENDARIO\n\t\tif (isset($_REQUEST['hora_inicio'])) {\n\t\t\t$fecha_inicial = $fecha_inicio_filtro;\n\t\t\t$fecha_termino = $fecha_termino_filtro;\n\t\t}else{\n\t\t\t$fecha_inicial = $this->timestamp->getInicioPeriodo();\n\t\t\t$fecha_termino = $this->timestamp->getTerminoPeriodo();\n\t\t}\n\t\t$h1=($hora_inicio);\n\t\t$m1=($minuto_inicio);\n\t\t$h2=($hora_termino);\n\t\t$m2=($minuto_termino);\n\t\t//EN CASO DE HABER PAGINADO EL MONITOR SOLO SE CARGA LA FUNCIÓN getDetalleElementosPlus()\n\t\tif (isset($this->extra[\"monitor_id\"]) and isset($this->extra[\"pagina\"])) {\n\t\t\t$this->resultado = $this->resultado = $this->getDetalleElementosPlus($this->extra[\"monitor_id\"], $this->extra[\"pagina\"], 1, $fecha_inicial, $fecha_termino, $isset=1,$h1, $m1, $h2, $m2);\n\t\t\treturn;\n\t\t}\n\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT titulo, foo.nodo_id FROM (\".\n\t\t\t \"SELECT DISTINCT unnest(_nodos_id) AS nodo_id FROM _nodos_id(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\",'\".\n\t\t\t\tpg_escape_string($fecha_inicial).\"','\".\n\t\t\t\tpg_escape_string($fecha_termino).\"')) AS foo, nodo n \".\n\t\t\t \"WHERE foo.nodo_id=n.nodo_id ORDER BY orden\";\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$datos_nodo = array();\n\t\twhile ($row = $res->fetchRow()) {\n\t\t\t$dato_nodo = ($row[\"titulo\"]);\n\t\t\t$datos_nodo[$row[\"nodo_id\"]] = $dato_nodo;\n\t\t}\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'contenedor_tabla_filtro.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_CONTENEDORES', 'lista_contenedores');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PATRONES_SCRIPT', 'lista_patrones_script');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_NODOS_FILTRO', 'lista_nodos_filtro');\n\t\t$T->setBlock('tpl_tabla', 'VALORES_FILTRO', 'valores_filtro');\n\t\t$T->setBlock('tpl_tabla', 'VALORES_SLIDER', 'valores_slider');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_MONITOREOS', 'bloque_monitoreos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_MONITOREOS_SCRIPT', 'bloque_monitoreos_script');\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\t$slider_inicio = ($hora_inicio * 60) + $minuto_inicio;\n\t\t$slider_termino = ($hora_termino * 60) + $minuto_termino;\n\n\t\t$new = (isset($_GET['new'])) ? $_GET['new'] : true;\n\n\t\t$T->setVar('__item_id', $this->__item_id);\n\n\t\t//SE PASAN LAS VARIABLES AL FILTRO QUE SE PASARON POR POST AL HACER EL FILTRADO\n\t\t$T->setVar('__nodo_selected', $nodo_filtro);\n\t\t$T->setVar('__isset', $isset);\n\n\t\t$T->setVar('valores_slider', '');\n\t\t$T->setVar('__valor_slider_inicio', $slider_inicio);\n\t\t$T->setVar('__valor_slider_termino', $slider_termino);\n\t\t$T->parse('valores_slider', 'VALORES_SLIDER', true);\n\n\t\t$T->setVar('valores_filtro', '');\n\t\t$T->setVar('__hora_inicio', $hora_inicio);\n\t\t$T->setVar('__minuto_inicio', $minuto_inicio);\n\t\t$T->setVar('__hora_termino', $hora_termino);\n\t\t$T->setVar('__minuto_termino', $minuto_termino);\n\t\t$T->parse('valores_filtro', 'VALORES_FILTRO', true);\n\n\t\t$T->setVar('lista_nodos_filtro', '');\n\t\tforeach ($datos_nodo as $nodo_id => $titulo_nodo) {\n\t\t\tif ($nodo_id != 0) {\n\t\t\t$T->setVar('__nodo_filtro', $titulo_nodo);\n\t\t\t$T->setVar('__nodoid_filtro', $nodo_id);\n\t\t\t}else{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$T->parse('lista_nodos_filtro', 'LISTA_NODOS_FILTRO', true);\n\t\t}\n\n\n\t\t$orden = 1;\n\t\t$cuenta_nodos = 0;\n\t\tforeach ($datos_nodo as $nodo_id => $titulo_nodo) {\n\t\t\tif (!isset($_REQUEST['nodo_filtro']) || $_REQUEST['nodo_filtro'] == -1) {\n\t\t\t\t$nodo_id_filtro = $nodo_id;\n\t\t\t\t$T->setVar('__contenido_id', 'elem_'.$nodo_id_filtro);\n\t\t\t\t$T->setVar('__display_filtro', $this->__item_id);\n\t\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleElementosPlus($nodo_id_filtro, 1, $orden, $fecha_inicial, $fecha_termino, $isset,$h1, $m1, $h2, $m2, $cuenta_nodos));\n\t\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t\t$orden++;\n\t\t\t}else{\n\t\t\t\tif ($_REQUEST['nodo_filtro'] == $nodo_id) {\n\t\t\t\t\t$nodo_id_filtro = $_REQUEST['nodo_filtro'];\n\t\t\t\t\t$T->setVar('__contenido_id', 'elem_'.$nodo_id_filtro);\n\t\t\t\t\t$T->setVar('__display_filtro', $this->__item_id);\n\t\t\t\t\t$T->setVar('__contenido_tabla', $this->getDetalleElementosPlus($nodo_id_filtro, 1, $orden, $fecha_inicial, $fecha_termino, $isset,$h1, $m1, $h2, $m2, $cuenta_nodos));\n\t\t\t\t\t$T->parse('lista_contenedores', 'LISTA_CONTENEDORES', true);\n\t\t\t\t\t$orden++;\n\t\t\t\t}else{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cuenta_nodos++;\n\t\t}\n\t\t\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function formGenerate($action){\n $form=\"<form class='form-group' name='formularz' action='$action' method='post'>\";\n $form.=\"<fieldset><legend>Podgląd rezerwacji</legend>\";\n $form.=\"<label class='col-form-label' for='data'>Data:</label>\";\n $form.=\"<input type='date' name='data' id='data' min='2010-01-01' max='2020-12-31' value='\".date('Y-m-d').\"' required class='form-control' onchange='show_reservations_by_color()' onclick='show_reservations_by_color()'>\";\n $form.=\"</fieldset></form>\";\n return $form;\n}", "function mostrarEstudiantesProyecto($estudiantes,$codEstudiante){\n $cod_proyecto= $_REQUEST['cod_proyecto'];\n \n?>\n <form enctype='tipo:multipart/form-data,application/x-www-form-urlencoded,text/plain' method='POST' action='index.php' name='<? echo $this->formulario2 ?>'>\n <table id=\"tabla\" class=\"contenidotabla\" width=\"100%\">\n <div align=\"center\" ><b><?echo \"Estudiantes a Homologar por Pendientes - Cod. Proyecto \".$cod_proyecto; ?></b></div><hr>\n <?//opciones para agregar 5,10,15...50 estudiantes?>\n\n <thead class='sigma'>\n <th class='niveles centrar' > No.</th>\n <th class='niveles centrar' > Código Actual</th>\n <th class='niveles centrar' > Nombre</th>\n </thead>\n <?\n for($i=0;$i<count($estudiantes);$i++){\n $cod_estudiante = isset($estudiantes[$i]['COD_ESTUDIANTE'])?$estudiantes[$i]['COD_ESTUDIANTE']:''; \n $nombre = isset($estudiantes[$i]['NOMBRE'])?$estudiantes[$i]['NOMBRE']:''; \n ?>\n\n <tr >\n <td width=\"5%\" class='cuadro_plano centrar'><? echo $i+1;?></td>\n <td width=\"20%\" class='cuadro_plano centrar'><? echo $cod_estudiante;?></td>\n <td width=\"50%\" class='cuadro_plano'><? echo $nombre;?></td>\n </td>\n </tr>\n <?\n }\n ?>\n </table>\n <table width=\"100%\">\n <tr>\n <td align=\"center\">\n <input type=\"button\" value=\"Homologar\" onclick=\"document.forms['<? echo $this->formulario2?>'].submit()\"> \n <input type=\"hidden\" name=\"opcion\" value=\"registrar\">\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->formulario ?>\">\n <input type=\"hidden\" name=\"tipo_homologacion\" value=\"estudiantes\">\n <input type=\"hidden\" name=\"cod_proyecto\" value=\"<? echo $cod_proyecto; ?>\">\n </td>\n </tr>\n </table>\n </form>\n\n <?\n }", "function sevenconcepts_formulaire_charger($flux){\n $form=$flux['args']['form'];\n if($form=='inscription'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=''; \n if(isset($value['options']['obligatoire']))$flux['data']['obligatoire'][$value['options']['nom']]='on';\n }\n $flux['data']['nom_inscription']='';\n $flux['data']['mail_inscription']='';\n }\n \n return $flux;\n}", "function form_registro($id_tpdoc){\n\t $mtipo_documento = new mtipo_documento();\n\t //Listamos nuetros perfiles(modulo)\n\t\t$result1 = $mtipo_documento->sel_tipo_documento_act($id_tpdoc);\n\n\t\t$txt = '';\n\t\t$txt .= '<div class=\"cuad\">';\n\t\t\t$txt .= '<form name=\"frm1\" action=\"#\" method=\"POST\">';\n\t\t\t\t$txt .= '<table>';\n\t\t\t\t\t//1raFilas (<tr>)\n\t\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t\t//1ra Cabeceras Negrita (<th>)\n\t\t\t\t\t\t$txt .= '<th align=\"left\">';\n\t\t\t\t\t\t\t$txt .= 'Id:';\n\t\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t\t//2da Cabecera normal (<td>)\n\t\t\t\t\t\t$txt .= '<td>';\n\t\t\t\t\t\t\t$txt .= '<input type=\"number\" name=\"id_tpdoc\" max=\"999999999999\" value=\"'.$id_tpdoc.'\"/>';\n\t\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//1ra Fila Cierre\n\t\t\t\t\t$txt .= '</tr>';\n\n\n\t\t\t\t\t//2da Filas (<tr>)\n\t\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t\t//1ra Cabeceras Negrita (<th>)\n\t\t\t\t\t\t$txt .= '<th align=\"left\">';\n\t\t\t\t\t\t\t$txt .= 'Tipo Documento:';\n\t\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t\t//2da Cabecera normal (<td>)\n\t\t\t\t\t\t$txt .= '<td>';\n\t\t\t\t\t\t\t$txt .= '<input type=\"text\" name=\"nom_tpdoc\" maxlength=\"50\" value=\"';\n\t\t\t\t\t\tif ($id_tpdoc)\n\t\t\t\t\t\t$txt .= $result1[0][\"nom_tpdoc\"];\n\t\t\t\t\t\t$txt .= '\"/>';\n\t\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//2da Fila Cierre\n\t\t\t\t\t$txt .= '</tr>';\n\n\t\t\t\t\t//3ra Filas (<tr>)\n\t\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t\t//1ra Cabeceras Negrita (<th>)\n\t\t\t\t\t\t$txt .= '<th align=\"left\">';\n\t\t\t\t\t\t\t$txt .= 'extencion:';\n\t\t\t\t\t\t$txt .= '</th>';\n\t\t\t\t\t\t//2da Cabecera normal (<td>)\n\t\t\t\t\t\t$txt .= '<td>';\n\t\t\t\t\t\t\t$txt .= '<input type=\"text\" name=\"extencion\" maxlength=\"50\" value=\"';\n\t\t\t\t\t\tif ($id_tpdoc)\n\t\t\t\t\t\t$txt .= $result1[0][\"extencion\"];\n\t\t\t\t\t\t$txt .= '\"/>';\n\t\t\t\t\t\t$txt .= '</td>';\n\t\t\t\t\t//3ra Fila Cierre\n\t\t\t\t\t$txt .= '</tr>';\t\t\t\n\t\t\t\t\t//Insertamos el Boton Centrado\n\t\t\t\t\t$txt .= '<tr>';\n\t\t\t\t\t$txt .= '<th colspan=\"2\" style=\"text-align: center;\">';\n\t\t\t\t\t\t$txt .= '<input type=\"submit\" name=\"operacion\" value=\"';\n\t\t\t\t\t\tif ($id_tpdoc)\n\t\t\t\t\t\t\t$txt .= 'Actualizar';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$txt .= 'Insertar';\n\t\t\t\t\t$txt .= '\" />';\n\t\t\t\t\t//Cierre Boton\n\t\t\t\t\t$txt .= '</tr>';\n\t\t\t\t//Cierre Tabla\t\n\t\t\t\t$txt .= '</table>';\n\t\t\t//Cierre Formulario\t\n\t\t\t$txt .= '</form>';\n\t\t//Cierre Etiqueta DIV\t\n\t\t$txt .= '</div>';\n\t\t//Imprimimos el Formulario(Vista)\n\t\techo $txt;\n\t}", "protected function generaCamposFormulario($datosIniciales){\n \t$html = '<div class=\"form\">';\n \t$html .= '<p>¿Cuál es su nombre?</p>';\n \t$html .= '<input type=\"text\" name=\"name\" placeholder=\"Nombre\">';\n $html .= '<p>¿Cuál es la fecha de nacimiento?</p>';\n $html .= '<input type=\"date\" name=\"birthDate\" placeholder=\"Fecha de nacimiento\">';\n \t$html .= '<button type=\"submit\" name=\"pd-insert\">Insertar</button>';\n \t$html .= '</div>';\n \treturn $html;\n }", "function evt__validar_datos()\r\n\t{}", "public static function form_fields(){\n\n \treturn [\n [\n \t'id'=> 'description',\n \t'name'=> 'description', \n \t'desc'=> 'Description', \n \t'val'=>\tnull, \n \t'type'=> 'text',\n \t'maxlength'=> 255,\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'rate',\n \t'name'=> 'rate', \n \t'desc'=> 'Discount Rate', \n \t'val'=>\tnull, \n \t'type'=> 'number',\n \t'min'=> 0,\n \t'max'=> 100,\n \t'step'=> '0.01',\n \t'required'=> 'required',\n ],\n\n [\n \t'id'=> 'stat',\n \t'name'=> 'stat', \n \t'desc'=> 'isActive', \n \t'val'=>1, \n \t'type'=> 'checkbox',\n ],\n ];\n\n }", "abstract public function getFormDesc();", "abstract protected function getFormIntroductionFields();", "public function buildForm()\n {\n }", "function aggiungiAllegato($pratica,$documento){\n \n}", "protected function procesaFormulario($datos)\n\t\t{\n\t\t\t\n\t\t\t$erroresFormulario = array();\n\t\t\t\n\t\t\t$nombre = htmlspecialchars(trim(strip_tags($_POST[\"nombre\"])));\n\t\t\t$apellido = htmlspecialchars(trim(strip_tags($_POST[\"apellido\"])));\n\t\t\t$pais = htmlspecialchars(trim(strip_tags($_POST[\"pais\"])));\n\t\t\t$dir = htmlspecialchars(trim(strip_tags($_POST[\"direccion\"])));\n\t\t\t$cp = htmlspecialchars(trim(strip_tags($_POST[\"cp\"])));\n\t\t\t$ciudad = htmlspecialchars(trim(strip_tags($_POST[\"localidad\"])));\n\t\t\t$provincia = htmlspecialchars(trim(strip_tags($_POST[\"provincia\"])));\n\t\t\t$telefono = htmlspecialchars(trim(strip_tags($_POST[\"telefono\"])));\n\t\t\t$correo = htmlspecialchars(trim(strip_tags($_POST[\"correo\"])));\n\t\t\t$mesC=htmlspecialchars(trim(strip_tags($_POST[\"mesC\"])));\n\t\t\t$añoC=htmlspecialchars(trim(strip_tags($_POST[\"añoC\"])));\n\n\t\t\tif(isset($_SESSION[\"login\"]) && isset($_SESSION[\"ocarrito\"])){\n\t\t\t\t$ok=true;\n\t\t\t\t$fecha=getdate();\n\t\t\t\t$dia=$fecha['mday'];\n\t\t\t\t$mes=$fecha['mon'];\n\t\t\t\t$año=$fecha['year'];\n\t\t\t\t$fecha_hoy = $año.\"-\".$mes.\"-\".$dia;\n\t\t\t\t\n\t\t\t\t#comprobamos que la tarjeta de credito no esta caducada\n\t\t\t\tif($añoC < $año ){\n\t\t\t\t\t$ok=false;\n\t\t\t\t\t$erroresFormulario[]=\"la tarjeta esta caducada por años\";\n\t\t\t\t}\n\t\t\t\telse if($añoC == $año)\n\t\t\t\t{ \n\t\t\t\t\tif ($mesC < $mes)\n\t\t\t\t\t{\n\t\t\t\t\t$ok=false;\n\t\t\t\t\t$erroresFormulario[]=\"la tarjeta esta caducada por meses\";\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif($ok){ #si no esta caducada podremos realizar la venta\n\n\t\t\t\t\t$total=$_SESSION[\"totalCompra\"];\n\t\t\t\t\t$user=$_SESSION[\"usuario\"];\n\t\t\t\t\t\n\t\t\t\t\t$ventaDAO = new VentaDAO();\n\t\t\t\t\t$ventaproductoDAO = new VentaProductoDAO();\n\t\t\t\t\t$id_venta = $ventaDAO->getNumVentas()+1;\n\t\t\t\t\t$ventaDAO->insert($id_venta, $fecha_hoy, $total, $user);\n\t\t\t\t\t$productoDAO = new ProductoDAO();\n\t\t\t\t\t\n\t\t\t\t\t$num_productos=$_SESSION[\"ocarrito\"]->numElems();\n\t\t\t\t\tfor ($i=0; $i < $num_productos; $i++){\n\t\t\t\t\t\t$idproducto = $_SESSION[\"ocarrito\"]->getIdProd($i);\n\t\t\t\t\t\t$unidades = $_SESSION[\"ocarrito\"]->getCantProd($i);\n\t\t\t\t\t\t$ventaproductoDAO->insert($id_venta, $idproducto, $unidades);\n\t\t\t\t\t\t$p= $productoDAO->getProducto($idproducto);\n\t\t\t\t\t\t$stock = $p->getStockDisponible();\n\t\t\t\t\t\t$nuevo_stock = $stock - $unidades;\n\t\t\t\t\t\t$p->setStockDisponible($nuevo_stock);\n\t\t\t\t\t\t$productoDAO->update($p);\n\t\t\t\t\t}\n\t\t\t\t\t//return \"confirmacionCompra.php?dir=$dir&cp=$cp&provincia=$provincia&pais=$pais&ciudad=$ciudad\";\n\t\t\t\t\t//$html='<div id=\"contenedor\">';\n\t\t\t\t\t$html= '<div id=\"CC\">';\n\t\t\t\t\t$html.= '<p><b> Su compra se ha realizado correctamente, muchas gracias por confiar en REPREME </p>';\n\t\t\t\t\t$html.= '<p> Total pagado:'. $total.' € </p>';\n\t\t\t\t\t$html.= '<p> Fecha de la compra:' .$fecha_hoy. '</p>';\n\t\t\t\t\t$html.= '<p> Direccion de envio: '. $dir .', '. $cp .', '. $provincia .', '. $ciudad . ', '. $pais. '</p>';\n\t\t\t\t\t$html.= '<p> Para cualquier duda acerca de su pedido por favor contacta con nosotros </b></p>';\n\t\t\t\t\treturn $html;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$ok=false;\n\t\t\t\t$erroresFormulario[]=\"No existe usuario logueado\";\n\t\t\t}\n\t\t\treturn $erroresFormulario;\n\t\t}", "public static function getForm();", "protected function Campos()\n {\n $select = [\n ['value' => 'id1', 'text' => 'texto1'],\n ['value' => 'id2', 'text' => 'texto2']\n ];\n $this->text('unInput')->Validator(\"required|maxlength:20\");\n $this->text('unSelect')->Validator(\"required\")->type('select')->in_options($select);\n $this->date('unDate')->Validator(\"required\");\n }", "function validaCampos()\n {\n $this->form_validation->set_rules(\"producto\", \"Producto\", \"trim|required\");\n\t\t$this->form_validation->set_rules(\"plazo\", \"Plazo\", \"trim|required\");\n $this->form_validation->set_rules(\"fechaInicio\", \"Fecha Inicio\", \"trim|required\");\n $this->form_validation->set_rules(\"fechaFinal\", \"Fecha Final\", \"trim|required\");\n $this->form_validation->set_rules(\"tasaInteres\", \"Tasa Interes\", \"trim|required\");\n $this->form_validation->set_rules(\"capital\", \"Capital\", \"trim|required\");\n $this->form_validation->set_rules(\"deuda\", \"Deuda\", \"trim|required\");\n\t\t$this->form_validation->set_rules(\"tipo\", \"Tipo\", \"callback_select_tipo\");\n\t\t$this->form_validation->set_rules(\"estado\", \"Estado\", \"callback_select_estado\");\n /*$this->form_validation->set_rules(\"distrito\", \"Distrito\", \"callback_select_distrito\");\n $this->form_validation->set_rules(\"provincia\", \"Provincia\", \"callback_select_provincia\");\n $this->form_validation->set_rules(\"departamento\", \"Departamento\", \"callback_select_departamento\");\n $this->form_validation->set_rules(\"telefono\", \"Telefono\", \"trim|required\");\n $this->form_validation->set_rules(\"sexo\", \"Sexo\", \"callback_select_sexo\");\n $this->form_validation->set_rules(\"oficinaAfiliacion\", \"OficinaAfiliacion\", \"callback_select_oficina\");*/\n }", "function generate_form_from_table($tb,$item_id=0)\t{\n\n\tglobal $Form,$dbSwitch,$outPut,${$tb},$customInserts,$customPrints;\n\t\n\t\n//\tprint_r($_POST);\n\t\n\t\n\t\n//\t\tse quel tipo di form ha bisogno di una variabile per creare una nuova voce\n//\t\tin caso di assenza di questa variabile restituisco messaggio e back.\n\t\n\t\n\tif\t(\t(\tpreg_match(\t\"/\".$tb.\"\\[/\",\tREQUEST_MANDATORY_VALUES)\t)\t&&\t(\t!$_REQUEST[item_id]\t)\t)\t:\n\t\n\t\t$value\t=\tpreg_replace(\t\"/.*\".$tb.\"\\[([A-Za-z0-9_]*)\\].*/\",\"$1\",\tREQUEST_MANDATORY_VALUES\t);\n\t\t\n\t\tif\t(\t!$_REQUEST[$value]\t)\t:\t\t\n\t\t\t\n\t\t\t$form\t.=\t$Form->open(\"clarify\",FORM_ACTION,'POST',true,'Associazione');\n\t\t\t\n\t\t\t\n\t\t\t\n\t//\t\t$sql\t=\t\"SELECT \".$value.\" FROM \".find_primary_key_parent($value);\t###CONTROLLARE###\n\t\t\t\n\t//\t\t$data_list\t=\t$dbSwitch->select($sql);\n\t\t\t\n\t\t\t$form\t.=\t$Form->dynamic_select(codice_cliente,CLIENTI,ragione_sociale,cliente);\n\t\t\t\n\t\t\t$form\t.=\t$Form->submit(\"avanti\");\n\t\t\t\n\t\t\t$form\t.=\t$Form->close(true);\n\t\t\t\n\t\t\treturn\t$form;\t\t\t\n\t\t\n\t\tendif;\n\t\n\tendif;\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\tif\t(\t!$item_id\t)\t:\t$item_id\t=\t$_GET[item_id];\tendif;\n\n\n\t//definisco i tipi di campi\n\t$fields\t=\tfield_types($tb);\n\t\n\t\n\n\n\n\n\n\n\n\n\n\n//------- SE E' STATO POSTATO IL FORM IN QUESTIONE AGGIORNO -------//\n\n\tif\t(\t$_POST[$tb.'_is_sent']\t)\t:\n\t\n\t\t\n\t\tif\t(\tform_is_correct(\t$tb,\t$fields\t)\t)\t:\t\n\t\t\n\t\t\n\t\t\n\t\t\t\t//definisco il tipo di query\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif\t(\t$item_id\t)\t:\n\t\t\t\t\t\n\t\t\t\t\t\t$action\t=\t\"UPDATE \"; $where\t=\t\" WHERE \".primary_key($tb).\"='\".$item_id.\"'\";\n\t\t\t\t\t\n\t\t\t\t\telse:\n\t\t\t\t\t\n\t\t\t\t\t\t$action\t=\t\"INSERT INTO \";\n\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//preparo i pezzi di query\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfor\t(\t$i=0;\t$i\t<\tcount($fields);\t$i++\t)\t:\n\t\t\t\t\t\n\t\t\t\t\t\n#************\t\t\t//COMBO INSERT da rivedere!!!!!!!!!!!!!!!!!!!!!! (3 variabili)\n\t\t\t\t\t\n\t\t\t\t\t\tif\t(\tpreg_match(\t\"/\".$fields[$i][Field].\"/\",\tCOMBO_INSERTS\t)\t)\t:\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\tATTENZIONE LA LISTA DELLE ATTREZZATURE ASSOCIATE VANNO PRESE DALLA TABELLA PRODOTTI SPECIFICI!\t*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$ins_funct\t=\tpreg_replace(\"/.*\".$fields[$i][Field].\"\\[([^\\[\\]$]*)\\].*/\",\"$1\",COMBO_INSERTS\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$sets\t.=\t$ins_funct($fields[$i][Field],$tb,$item_id);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//SPECIAL INSERT (1 variabile)\n\t\t\t\t\t\telseif\t(\tpreg_match(\t\"/\".$fields[$i][Field].\"/\",\tSPECIAL_INSERTS\t)\t):\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$ins_funct\t=\tpreg_replace(\"/.*\".$fields[$i][Field].\"\\[([^\\[\\]$]*)\\].*/\",\"$1\",SPECIAL_INSERTS\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$toPost\t=\t$ins_funct($_POST[$fields[$i][Field]]);\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$sets.=\" \".$fields[$i][Field].\"='\".$toPost.\"', \";\n\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\n\t\t\t\t\t\t//NORMAL INSERT\n\t\t\t\t\t\telse:\n\t\t\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\tif\t(\t$_POST[$fields[$i][Field]]\t!=\t$_POST['PRE_'.$fields[$i][Field]]\t)\t:\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$sets.=\" \".$fields[$i][Field].\"='\".trim($_POST[$fields[$i][Field]]).\"', \";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tendfor;\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\t\t\n\t\t//se è stato immesso/modificato almeno un campo metto insieme la query\n\t\t\n\t\t\t\t\n\t\t\t\tif\t(\t$sets\t)\t:\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t//preparo gli aggiornamenti di data e ora\n\t\t\t\t\t\n\t\t\t\t\t$time=time();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif\t(\thas_date_to_be_updated($fields)\t)\t:\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tif\t(\t!$_POST[mod]\t)\t:\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$update_entry_date=\", entry_date=\".$time;\t//data inserimento\n\t\t\t\t\t\t\n\t\t\t\t\t\tendif;\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$update_mod_date=\", mod_date=\".$time;\t\t\t\t//data modifica\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif\t(\tisClosing()\t)\t:\n\t\t\t\t\t\n\t\t\t\t\t\t$update_close_date=\", close_date=\".$time;\t\t//data chiusura\n\t\t\t\t\t\n\t\t\t\t\tendif;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t$sql=$action.$tb.\" SET \".substr($sets,-strlen($sets),strlen($sets)-2).$update_entry_date.$update_mod_date.$update_close_date.$where;\n\t\t\t\t\t\n\t\t\t\t\t\n#\t\t\t\t\tprint $sql;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$form\t.=\t$dbSwitch->insert($sql);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tunset($sets,$sql);\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tendif;\n\n\n\n\n\n\t\t\t\t\t//------se è stato fatto salva e chiudi ed il form è corretto \n\t\t\t\t\t//porto di nuovo all'elenco della categoria in questione-------//\n\t\t\t\t\t\n\t\t\t\t\tif\t(\t$_POST['salva-e-chiudi']\t)\t:\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\theader(\"Location: \".ROOT.\"?cat=\".$_REQUEST[cat]);\n\t\t\t\t\t\n\t\t\t\t\tendif;\t\t\n\n\t\n\t\t\t\n\t\t\n\t\tendif;//fine se il form è corretto\n\t\n\t\n\tendif;//fine se c'è post\n\n//------- FINE AGGIORNAMENTO DATI IN PRESENZA DI POST -------//\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//apro il form\n\t$form\t.=\t$Form->open($tb);\n\n\n\n\n\n//Se è stato specificato l'item ID vado ad aprire la voce\n\t\n\tif\t(\t$item_id\t)\t:\n\t\n\t\t$dati\t=\t$dbSwitch->select(\t\"SELECT * FROM \".$tb.\" WHERE \".primary_key($tb).\"='\".$item_id.\"'\"\t);\n\t\t\n\t\tif\t(\t!is_array($dati)\t)\t:\t\t$_SESSION[err_mess]\t.= $dati;\tendif;\n\t\t\n\t\tif\t(\t!count($dati)\t\t)\t:\t\t$_SESSION[err_mess]\t.= \"non sono state trovate le informazioni.<br/>\";\tendif;\n\t\t\n\t\t$form\t.=\t$Form->hidden(\t\"mod\"\t,\t$item_id\t);\n\t\t\n\t\t\t\n\t\t\n\tendif;\n\t\n\n\n\n\n//per ogni campo creo l'apposito campo form\n\n\n\tfor\t(\t$i=0;\t$i\t<\tcount($fields);\t$i++\t)\t:\n\t\n\t\n\t\t//se il value va convertito lo converto ora\t\t\n\t\t$dati[0][$fields[$i][Field]]\t=\tdisplay_converted_form_value($fields[$i][Field],$dati[0][$fields[$i][Field]]);\n\t\t\n\t\t\t\n\t\n\t//definisco il fieldset al quale aqppartiene questo specifico campo\n\n\t\n\t\n\tforeach (${$tb}[fieldsets] as $k => $v) {\n\t\t\n\t\tif\t(\tpreg_match(\t\"/\".$fields[$i][Field].\"/\", $v)\t)\t:\t$fieldset=$k; endif;\n\t\t\n\t}\n\t\n\tif\t(\t!$fieldset\t)\t:\t$fieldset=\"altro\";\tendif;\n\t\n\t\n\t$FORM[$fieldset]\t.=\t\"\\n<div class='\".$fields[$i][Field].\"'>\\n\";\n\t\n\t\n\t\n\t\t//-- stampo eventuali messaggi e stili di errore --//\n\t\t\n\t\tif\t(\t$_POST[$tb.'_is_sent']\t&&\t!is_valid(\t$tb,$fields[$i][Field],true\t)\t)\t:\t\n\t\t\n\t\t\t$class=\" class='error'\";\n\t\t\n\t\tendif;\n\t\t\n\t\t//-- fine eventuali messaggi e stili di errore--//\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t//se il campo è da trattare in modo speciale\n\t\tif\t(\tis_special_field($fields[$i][Field])\t)\t:\n\t\t\n\t\t\t//richiamo l'apposita funzione dalla classe form\n\t\t\t$FORM[$fieldset]\t.=\t$Form->$fields[$i][Field]($dati[0][$fields[$i][Field]],$err_mess);\n\t\t\n\t\t\n\t\t//se viene specificato un fieldtype diverso\n\t\telseif\t(\tis_custom_field_type(\t$fields[$i][Field]\t)\t)\t:\n\t\t\n\t\t\t//richiamo l'apposita funzione dalla classe form\n\t\t\t\n\t\t\t//print get_custom_field_type(\t$fields[$i][Field]\t);\n\t\t\t\n\t\t\t$function=get_custom_field_type(\t$fields[$i][Field]\t);\n\t\t\t\n\t\t\t//se il campo personalizzato ha bisogno di variabili immetto fino alle prima 6 variabili presenti dopo la prima voce, separate da virgole nel file formconfig.php\n\t\t\t\n\t\t\t$FORM[$fieldset]\t.=\t$Form->$function[0]($fields[$i][Field],$function[1],$function[2],$function[3],$function[4],$function[5],$function[6]);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\telse:\t//altrimenti se è un campo normale\n\t\t\n\t\t\t\t\n\t\t\t//se è varchar o smallint\n\t\t\tif\t(\tpreg_match('/varchar/',\t$fields[$i][Type]\t)\t||\n\t\t\t\t\tpreg_match('/smallint/',\t$fields[$i][Type]\t)\t||\n\t\t\t\t\tpreg_match('/int/',\t$fields[$i][Type]\t)\n\t\t\t\t)\t:\n\t\t\t\n\t\t\t\t$maxlength\t=\tpreg_replace('/[a-z]+\\(([0-9]+)\\)/','$1',$fields[$i][Type]);\n\t\t\t\t\n\t\t\t\t$FORM[$fieldset]\t.=\t$Form->input($fields[$i][Field],$dati[0][$fields[$i][Field]],$maxlength,$class,$err_mess);\n\t\t\t\n\t\t\t\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t\t//----------\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//se SET o ENUM\n\t\t\tif\t(\tpreg_match('/set/',\t$fields[$i][Type]\t)\t||\tpreg_match('/enum/',\t$fields[$i][Type]\t)\t)\t:\n\t\t\t\n\t\t\t\n\t\t\t$labels\t=\tpreg_replace('/\\'/','',$fields[$i][Type]);\n\t\t\t$labels\t=\tpreg_replace('/set\\((.*)\\)/','$1',$labels);\n\t\t\t$labels\t=\tpreg_replace('/enum\\((.*)\\)/','$1',$labels);\n\t\t\t$labels\t=\texplode(\",\", $labels); //metto tutti i valori in un array\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$FORM[$fieldset]\t.=\t$Form->select($fields[$i][Field],$labels,$dati[0][$fields[$i][Field]]);\n\t\t\t\n\t\t\t\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t\t//----------\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//se TEXT\n\t\t\tif\t(\t$fields[$i][Type] === \"text\"\t)\t:\n\t\t\t\n\t\t\t$FORM[$fieldset]\t.=\t$Form->textarea($fields[$i][Field],$dati[0][$fields[$i][Field]]);\n\t\t\t\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t\t//----------\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\tendif;\t//fine se il campo non speciale\n\t\t\n\t\t\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\t//$FORM[$fieldset]\t.= is_valid($tb,$dati[0][$fields[$i][Field]]);\n\t\t\n\t\t\n\t\t\n\t\t$FORM[$fieldset]\t.=\t$_SESSION[err_mess][$fields[$i][Field]];\n\t\t\n\t\tunset($_SESSION[err_mess]);\n\t\t\n\t\t$FORM[$fieldset]\t.=\t\"</div>\\n\\n\";\n\t\n\t\n\t\n\t\n\t\n\t//se c'è un'inserto da mettere dopo questo fieldset lo metto\n//\tprint \"preg_match(\\\"/\".$fieldset.\"/\".${$tb}[custom_inserts].\")\";\n\t\t\t\n\tif(\t(\tpreg_match(\"/\".$fieldset.\"/\",${$tb}[custom_inserts])\t)\t&&\t(\t!$FORM[custom_field]\t)\t):\n\t\n\t$custom_field\t=\tpreg_replace(\"/.*\".$fieldset.\"\\[([^\\[\\]$]*)\\].*/\",\"$1\",${$tb}[custom_inserts]\t)\t;\n\t\n\t$FORM[$custom_field]\t=\t$customInserts->$custom_field();\n\t\n\tendif;\n\t\n\t\n\t\n\t\n\t\n\tunset($fieldset,$class, $err_mess);\n//\t\tprint $fields[$i][Field].$i.$tb;\n\tendfor;\n\t\n\t\n\t\n\nprint_r($FORM);exit;\n\n\nforeach ($FORM as $key => $value) {\n \n\t$FIELDSET[$key]\t.=\t\"\\n\\n<fieldset id='\".$key.\"'>\\n\";\t\n\t$FIELDSET[$key]\t.=\t\"\\n<legend>\";\n\t$FIELDSET[$key]\t.=\t$outPut->label($key);\n\t$FIELDSET[$key]\t.=\t\"</legend>\\n\";\n\t$FIELDSET[$key]\t.=\t$value;\n\t$FIELDSET[$key]\t.=\t\"\\n</fieldset>\\n\\n\";\n\t\n}\n\n\n//se non è stato stabilito l'ordine dei fieldset seguo l'ordine di apparizione da DB\n\nif\t(\t!trim(${$tb}[fieldset_order])\t\t)\t:\n\n\tforeach ($FIELDSET as $key => $value) :\n\t\t\n\t\t$form\t.=\t$FIELDSET[$key];\n\t\t\n\tendforeach;\n\t\n\t\nelse:\n\n\tforeach (explode(\" \",${$tb}[fieldset_order]) as $value) :\n\t\t\n\t\t$form\t.=\t$FIELDSET[$value];\n\t\t\n\tendforeach;\n\t\n\nendif;\n\n\n\n\n\n\n\n$form\t.=$Form->tripleSubmit();\n\n\n$form\t.=$Form->close();\n\n\n\n\n\n\n\n\n\n\n\n\n//aggiungo eventuale lista correlata\nif\t(\tpreg_match(\t\"/\".$tb.\"\\[[^\\[\\]]*\\]/\",FORM_RELATED_LISTS\t)\t)\t:\n\t\t\t\t\n\t$related_list\t=\tpreg_replace(\t\"/.*\".$tb.\"\\[([^\\[\\]]*)\\].*/\",\"$1\",FORM_RELATED_LISTS\t);\n\t\n\t$form\t.=\tlist_($related_list,\" WHERE \".primary_key($tb).\"='\".$_GET[item_id].\"'\",1,1,'scroll');\t\n\t\nendif;\n\n//print_r($_POST);\n\nreturn $form;\n\n\n}", "public static function publicFields($modo, elemento $objeto = null, Iusuario $usuario = null, $tab = false){\n\n if( $usuario instanceof usuario && $empresa = $usuario->getCompany() ){\n $camposExtra = $empresa->obtenerCamposDinamicos(1);\n }\n\n\n $arrayCampos = new FieldList();\n\n if ($modo != self::PUBLIFIELDS_MODE_PARTNER){\n $arrayCampos[\"nombre\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n }\n\n if ($modo != self::PUBLIFIELDS_MODE_PARTNER) {\n\n $editCIF = ($modo == elemento::PUBLIFIELDS_MODE_EDIT && $usuario instanceof usuario && $usuario->esStaff()) || ($modo != elemento::PUBLIFIELDS_MODE_EDIT);\n\n if ($editCIF) {\n $arrayCampos[\"cif\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n } else {\n $arrayCampos[\"cif\"] = new FormField(array(\"tag\" => \"span\", \"type\" => \"text\"));\n }\n\n }\n\n switch( $modo ) {\n case elemento::PUBLIFIELDS_MODE_ENDEVE:\n $arrayCampos = new FieldList;\n $arrayCampos[\"endeve_id\"]= new FormField(array(\"blank\" => false));\n return $arrayCampos;\n break;\n\n case elemento::PUBLIFIELDS_MODE_SEARCH:\n $arrayCampos['nombre_comercial']= new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n return $arrayCampos;\n break;\n\n case elemento::PUBLIFIELDS_MODE_SYSTEM:\n $arrayCampos['date_last_summary']= new FormField(array());\n $arrayCampos['updated']= new FormField(array());\n $arrayCampos['is_transfer_pending']= new FormField(array());\n return $arrayCampos;\n break;\n\n case elemento::PUBLIFIELDS_MODE_EDIT: case elemento::PUBLIFIELDS_MODE_NEW: case elemento::PUBLIFIELDS_MODE_INIT:\n if ($modo == elemento::PUBLIFIELDS_MODE_INIT) {\n $arrayCampos[\"cif\"][\"className\"] = 'needcheck';\n }\n\n $arrayCampos['nombre_comercial'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n $arrayCampos['representante_legal'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n $arrayCampos[\"uid_pais\"] = new FormField(array(\"tag\" => \"select\", 'default' => 'Seleccionar',\"data\" => pais::obtenerTodos(), \"objeto\" => \"pais\" ));\n $arrayCampos['uid_provincia'] = new FormField( array('tag' => 'select',\n 'default' => 'Seleccionar',\n 'data' => provincia::obtenerTodos(),\n \"objeto\" => \"provincia\",\n \"depends\" => array(\"uid_pais\", pais::SPAIN_CODE) ));\n\n $arrayCampos['uid_municipio'] = new FormField(array('tag' => 'select',\n 'default' => 'Seleccionar',\n 'data' => municipio::obtenerTodos(),\n 'objeto' => 'municipio',\n \"depends\" => array(\"uid_pais\", pais::SPAIN_CODE) ));\n\n $arrayCampos[\"direccion\"] = new FormField(array(\"tag\" => \"textarea\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"cp\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"organizacion_preventiva[]\"] = new FormField(array(\"tag\" => \"select\", \"data\" => organizacionPreventiva::getAll(), \"objeto\" => \"organizacionPreventiva\", \"depends\" => array(\"uid_pais\", pais::SPAIN_CODE)));\n $arrayCampos[\"requirements_origin_company_cloneables\"] = new FormField(array(\"tag\" => \"input\", \"innerHTML\" => \"requirements_origin_company_cloneables\", \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\"));\n\n if ($modo == elemento::PUBLIFIELDS_MODE_EDIT) {\n if ($usuario instanceof usuario && $objeto instanceof self && $usuario->getCompany()->compareTo($objeto)) {\n $arrayCampos['kind'] = new FormField(array(\n 'tag' => 'select',\n 'default' => _(\"Choose one\"),\n 'data' => self::getKindsSelect()\n ));\n\n if ($usuario instanceof usuario && $usuario->esStaff()){\n $arrayCampos['uid_referrer'] = new FormField([\n 'tag' => 'select',\n 'data' => self::getReferrersSelect()\n ]);\n }\n }\n\n $convenios = empresa::obtenerConvenios();\n if ( $convenios && is_traversable($convenios) ){\n $convenio = array(\"tag\" => \"select\", \"type\" => \"text\", \"data\" => $convenios, \"others\" => true, \"default\" => \"Seleccionar\");\n } else {\n $convenio = array(\"tag\" => \"input\", \"type\" => \"text\");\n }\n $arrayCampos[\"convenio\"] = new FormField($convenio);\n\n if ( $usuario instanceof usuario && $usuario->esStaff() ){\n $arrayCampos['skin'] = new FormField(array(\"tag\" => \"span\" ));\n $arrayCampos['pago_aplicacion'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\" ));\n\n if ($objeto instanceof empresa && !$objeto->perteneceCorporacion()) {\n $arrayCampos['activo_corporacion'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\"));\n }\n\n $arrayCampos['receive_summary'] = new FormField(array('tag' => 'input', 'type' => 'checkbox', 'className' => 'iphone-checkbox'));\n }\n\n }\n\n if ($modo == elemento::PUBLIFIELDS_MODE_NEW && $modo != elemento::PUBLIFIELDS_MODE_INIT) {\n $arrayCampos['created'] = new FormField(array(\"tag\" => \"span\", \"date_format\" => \"%d/%m/%Y\"));\n $arrayCampos['kind'] = new FormField(array());\n $arrayCampos['prevention_service'] = new FormField(array());\n }\n\n\n // No mostramos campos de la propia empresa si no somos nosotros mismos\n if ($modo == elemento::PUBLIFIELDS_MODE_EDIT && $usuario instanceof usuario && $objeto instanceof self){\n $empresa = $usuario->getCompany();\n if (!$empresa->getStartList()->contains($objeto)) {\n $arrayCampos = new FieldList;\n }\n }\n\n if ($modo != elemento::PUBLIFIELDS_MODE_INIT && $modo != elemento::PUBLIFIELDS_MODE_NEW) {\n if (isset($camposExtra) && is_traversable($camposExtra) && count($camposExtra)) {\n foreach($camposExtra as $campoExtra){\n $arrayCampos[ $campoExtra->getFormName() ] = new FormField(array(\n \"tag\" => $campoExtra->getTag(),\n \"type\" => $campoExtra->getFieldType(),\n \"uid_campo\" => $campoExtra->getUID(),\n \"data\" => $campoExtra->getData(),\n \"blank\" => $campoExtra->obtenerDato(\"obligatorio\") ? false : true\n ));\n }\n }\n }\n\n if ($usuario instanceof usuario && $usuario->esStaff() && $modo != elemento::PUBLIFIELDS_MODE_NEW) {\n $economics = $usuario->configValue(\"economicos\");\n $admin = $objeto instanceof empresa && $usuario->esAdministrador();\n\n // --- solo si no pertenece a corporacion\n if ($objeto instanceof empresa && !$objeto->perteneceCorporacion()) {\n if ($economics) {\n $arrayCampos[\"pago_no_obligatorio\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\"));\n }\n\n if ($modo == elemento::PUBLIFIELDS_MODE_EDIT && $usuario->esStaff()) {\n $arrayCampos[\"is_enterprise\"] = new FormField(array(\"tag\" => \"input\", \"value\" => 1, \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\"));\n }\n }\n\n\n\n if ($admin) {\n $arrayCampos['pay_for_contracts'] = new FormField(array('tag' => 'input', 'type' => 'checkbox', 'className' => 'iphone-checkbox', \"info\" => true));\n $arrayCampos['is_validation_partner'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\", \"value\" => 1));\n $arrayCampos[\"has_custom_login\"] = new FormField(array(\"tag\" => \"input\", \"value\" => 1, \"type\" => \"checkbox\", \"className\" => \"iphone-checkbox\"));\n }\n\n if ($economics) {\n $arrayCampos[\"invoice_periodicity\"] = new FormField(array(\"tag\" => \"slider\", \"type\" => \"text\", \"match\" => \"^([0-6])$\", \"count\" => \"6\" , \"info\" => true, \"hr\" => true));\n }\n }\n\n break;\n case elemento::PUBLIFIELDS_MODE_QUERY:\n $arrayCampos[\"nombre\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"uid_empresa\"] = new FormField(array(\"tag\" => \"span\"));\n case elemento::PUBLIFIELDS_MODE_FOLDER:\n break;\n\n case elemento::PUBLIFIELDS_MODE_TAB:\n if ($objeto instanceof empresa) {\n $pais = ($pais = $objeto->obtenerPais()) ? $pais->getUserVisibleName() : \"\";\n $provincia = ($provincia = $objeto->obtenerProvincia()) ? $provincia->getUserVisibleName() : \"\";\n $municipio = ($municipio = $objeto->obtenerMunicipio()) ? $municipio->getUserVisibleName() : \"\";\n\n\n $arrayCampos[\"direccion\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n $arrayCampos[\"uid_municipio\"] = new FormField(array(\"tag\" => \"input\", \"innerHTML\" => utf8_decode($municipio), \"nodb\" => true));\n $arrayCampos[\"uid_provincia\"] = new FormField(array(\"tag\" => \"input\", \"innerHTML\" => utf8_decode($provincia), \"nodb\" => true));\n $arrayCampos[\"cp\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"uid_pais\"] = new FormField(array(\"tag\" => \"input\", \"innerHTML\" => utf8_decode($pais), \"nodb\" => true));\n }\n\n $arrayCampos['created'] = new FormField(array(\"tag\" => \"span\", \"date_format\" => \"%d/%m/%Y\"));\n\n break;\n case elemento::PUBLIFIELDS_MODE_IMPORT:\n $arrayCampos[\"localidad\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"provincia\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"direccion\"] = new FormField(array(\"tag\" => \"textarea\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos[\"cp\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n break;\n\n case elemento::PUBLIFIELDS_MODE_DELTA:\n $arrayCampos = array('cif','nombre','direccion','uid_provincia','uid_municipio','cp');\n\n break;\n\n case self::PUBLIFIELDS_MODE_LICENSE:\n $arrayCampos[\"license\"] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\", \"blank\" => false));\n $arrayCampos['is_transfer_pending'] = new FormField(array());\n break;\n\n case self::PUBLIFIELDS_MODE_PARTNER: case self::PUBLIFIELDS_MODE_PARTNER_EDIT:\n $arrayCampos['partner_validation_price'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n $arrayCampos['partner_validation_price_urgent'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n $arrayCampos['validation_languages[]'] = new FormField(array(\n \"tag\" => \"select\", \"data\" => system::getLanguages(), \"list\" => true\n ));\n $arrayCampos['cost'] = new FormField(array(\"tag\" => \"input\", \"type\" => \"text\"));\n\n break;\n }\n\n return $arrayCampos;\n }", "public function getAddForm();", "function process_form(){\n\t\n\tglobal $nombre;\n\tglobal $apellido;\n\t$nombre = $_POST['Nombre'];\n\t$apellido = $_POST['Apellidos'];\n\t\n\tprint(\"<table align='center' width='auto'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=3 class='BorderInf'>\n\t\t\t\t\t\tDATOS DEL USUARIO\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right' width=110px>\n\t\t\t\t\t\tID:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['id'].\n\t\t\t\t\t\"</td>\n\t\t\t\t\t<td rowspan='5' align='right' width='120px'>\n\t<img src='../Gch.Img.Admin/\".$_POST['myimg'].\"' height='120px' width='90px' />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tNivel:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['Nivel'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tReferencia:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['ref'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tNombre:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['Nombre'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tApellidos:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['Apellidos'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tDocumento:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left'>\"\n\t\t\t\t\t\t.$_POST['doc'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tN&uacute;mero:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['dni'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tControl:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['ldni'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\t\t\t\t\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tMail:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Email'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tUsuario:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Usuario'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tPassword:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Password'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tDirecci&oacute;n:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Direccion'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tTel&eacute;fono 1:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Tlf1'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tTel&eacute;fono 2:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['Tlf2'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tLast IN:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['lastin'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tLast Out:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['lastout'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='right'>\n\t\t\t\t\t\tNº Visitas:\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align='left' colspan='2'>\"\n\t\t\t\t\t\t.$_POST['visitadmin'].\n\t\t\t\t\t\"</td>\n\t\t\t\t</tr>\n\t\t\t\t\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=3 align='right' class='BorderSup'>\n\t<form name='closewindow' action='$_SERVER[PHP_SELF]' onsubmit=\\\"window.close()\\\">\n\t\t\t\t\t\t\t\t\t\t\t<input type='submit' value='CERRAR VENTANA' />\n\t\t\t\t\t\t\t\t\t\t\t<input type='hidden' name='oculto2' value=1 />\n\t\t\t</form>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\"); \n\n\t\t}", "function consultaProyectos() {\r\n if(!isset($_REQUEST['facultad'])||$_REQUEST['facultad']<0)\r\n {\r\n echo \"No se seleccionó facultad. Por favor regrese y seleccione una opci&oacute;n\";exit;\r\n }\r\n $facultad=$_REQUEST['facultad'];\r\n include_once($this->configuracion[\"raiz_documento\"].$this->configuracion[\"clases\"].\"/html.class.php\");\r\n $this->html = new html();\r\n $proyectos=$this->consultarProyectos($facultad);\r\n $registro[0][0]=10000+$facultad;\r\n $registro[0][1]=\"TODOS LOS PROYECTOS DE LA FACULTAD\";\r\n foreach ($proyectos as $key=>$proyecto) {\r\n $registro[$key+1][0]=$proyecto['COD_PROYECTO'];\r\n $registro[$key+1][1]=$proyecto['COD_PROYECTO'].\" - \".$proyecto['NOMBRE_PROYECTO'];\r\n }?>\r\n\t\t<form enctype='multipart/form-data' method='POST' action='index.php' name='<? echo $this->formulario?>'>\r\n <table width=\"100%\" align=\"center\" border=\"1\" cellpadding=\"10\" cellspacing=\"0\" >\r\n <tr>\r\n <td>Seleccione El Proyecto: \r\n <?$mi_cuadro=$this->html->cuadro_lista($registro,'codProyecto',$this->configuracion,-1,\"\",FALSE,\"\",\"codProyecto\");\r\n echo $mi_cuadro;?>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\">\r\n <input type=\"hidden\" name=\"opcion\" value=\"consultaEstudiantes\">\r\n <input type=\"hidden\" name=\"action\" value=\"<? echo $this->bloque ?>\">\r\n <input class=\"boton\" type=\"button\" value=\"Ejecutar Proceso\" onclick=\"document.forms['<? echo $this->formulario?>'].submit()\">\r\n </td>\r\n </tr>\r\n </table>\r\n\t\t</form>\t\r\n <?\r\n \r\n \r\n }", "public function __construct\n (\n $clientes_array = array(),\n $productosvariante_array = array(),\n $productos_generales_array = array()\n )\n {\n parent::__construct('PedidoMayoristaForm');\n $this->setAttribute('method', 'post');\n \n $this->add(array(\n 'name' => 'idpedido',\n 'type' => 'Hidden',\n ));\n \n\n\n $this->add(array(\n 'name' => 'pedidomayorista_fechasolicitud',\n 'type' => 'Date',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>1,\n\n ),\n ));\n\n $this->add(array(\n 'name' => 'pedidomayorista_fechaentrega',\n 'type' => 'Date',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>2,\n\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'pedidomayorista_nota',\n 'type' => 'TextArea',\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' => 5\n ),\n ));\n\n\n\n $this->add(array(\n 'name' => 'pedidomayorista_estatus',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => array(\n 'pendiente' => 'Pendiente',\n 'solicitado' => 'Solicitado',\n 'completado' => 'Completado',\n 'transito' => 'En tránsito',\n 'cancelado' => 'Cancelado',\n\n ),\n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>4,\n\n ),\n ));\n\n\n $this->add(array(\n 'name' => 'idcliente',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $clientes_array,\n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n 'tabindex' =>3,\n ),\n ));\n\n\n \n\n\n $this->add(array(\n 'name' => 'idproductovariante[]',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $productosvariante_array, \n ),\n 'attributes' => array(\n 'required' => false,\n 'class' => '',\n \n\n \n ),\n ));\n\n $this->add(array(\n 'name' => 'productos_generales',\n 'type' => 'Select',\n 'options' => array(\n \n 'value_options' => $productos_generales_array, \n ),\n 'attributes' => array(\n 'required' => true,\n 'class' => 'form-control infput-thick',\n\n\n \n ),\n ));\n \n\n \n }", "private function generate()\n\t{\n//\t\t$arrContrato = $contrato->getContratoPorTipoDeObjeto(true, 'P');\n\n\t\t$unidade = new Unidade();\n\t\t$arrUnidade = $unidade->getUnidade(true);\n\t\t\n\t\t$this->setName('projeto_previsto');\n\t\t$this->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'span-14'));\n\n\t\t$cd_contrato = new Base_Form_Element_Select('cd_contrato_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$cd_contrato->setLabel(Base_Util::getTranslator('L_VIEW_CONTRATO').':')\n\t\t->addDecorator('Label', array('class'=>'float-l span-3 right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n//\t\t$cd_contrato->addMultiOptions($arrContrato);\n\n\t\t$cd_unidade = new Base_Form_Element_Select('cd_unidade_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$cd_unidade->setLabel(Base_Util::getTranslator('L_VIEW_UNIDADE').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n\t\t$cd_unidade->addMultiOptions($arrUnidade);\n\t\t\n\t\t$cd_projeto_previsto = new Base_Form_Element_Hidden('cd_projeto_previsto');\n\t\t$tx_projeto_previsto = new Base_Form_Element_Text('tx_projeto_previsto', array('class'=>'span-10 float-l'));\n\t\t$tx_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_PROJETO_PREVISTO').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRequired(true)\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\n\n\t\t$ni_horas_projeto_previsto = new Base_Form_Element_SoNumero('ni_horas_projeto_previsto', array('class'=>'span-2 float-l'));\n\t\t$ni_horas_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_UNID_METRICA_PREVISTA').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRequired(true)\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\n\n\t\t$objDefinicaoMetrica = new DefinicaoMetrica();\n\t\t$arrSiglaMetrica\t = $objDefinicaoMetrica->getComboSiglaDefinicaoMetrica(true);\n\n\t\t$cd_metrica_unidade_prevista_projeto_previsto = new Base_Form_Element_Select('cd_metrica_unidade_prevista_projeto_previsto', array('class'=>'float-l span-3'));\n\t\t$cd_metrica_unidade_prevista_projeto_previsto->addMultiOptions($arrSiglaMetrica)\n\t\t->setLabel('&nbsp;')\n\t\t->addDecorator('Label', array('class'=>'float-l right lb_combo_sigla_metrica_unidade_prevista_projeto_previsto', 'style'=>'margin-left: 5px;'))\n\t\t->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'float-l', 'style'=>'height:27px;'))\n\t\t->setRequired(true)\n ->setRegisterInArrayValidator(false);\n\n\t\t$arrProjetoPrevisto = array();\n\t\t$arrProjetoPrevisto['0'] = Base_Util::getTranslator('L_VIEW_COMBO_SELECIONE');\n\t\t$arrProjetoPrevisto['E'] = Base_Util::getTranslator('L_VIEW_COMBO_EVOLUTIVO');\n\t\t$arrProjetoPrevisto['N'] = Base_Util::getTranslator('L_VIEW_COMBO_NOVO');\n\t\t\n\t\t$st_projeto_previsto = new Base_Form_Element_Select('st_projeto_previsto', array('class'=>'span-5 float-l'));\n\t\t$st_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_TIPO_PROJETO').':')\n\t\t->addDecorator('Label', array('class'=>'span-3 float-l clear-l right'))\n\t\t->setRegisterInArrayValidator(false)\n\t\t->setRequired(true);\n\t\t$st_projeto_previsto->addMultiOptions($arrProjetoPrevisto);\n\t\t\n\t\t$tx_descricao_projeto_previsto = new Base_Form_Element_Textarea('tx_descricao_projeto_previsto', array('class'=>'span-14 height-4 float-l'));\n\t\t$tx_descricao_projeto_previsto->setLabel(Base_Util::getTranslator('L_VIEW_DESCRICAO').':')\n\t\t->addDecorator('Label', array('class'=>'float-l span-3 right'))\n\t\t->addDecorator('HtmlTag', array('tag'=>'div', 'class'=>'span-22 float-l clear gap-1'))\n\t\t->addFilter('StripTags')\n\t\t->addFilter('StringTrim')\n\t\t->addValidator('NotEmpty');\t\t\t\t\t\t\n\t\t\n\t\t$this->addElements(array(\n\t\t\t\t\t\t\t\t$cd_projeto_previsto, \n\t\t\t\t\t\t\t\t$cd_contrato, \n\t\t\t\t\t\t\t\t$cd_unidade, \n\t\t\t\t\t\t\t\t$st_projeto_previsto,\n\t\t\t\t\t\t\t\t$tx_projeto_previsto, \n\t\t\t\t\t\t\t\t$ni_horas_projeto_previsto,\n\t\t\t\t\t\t\t\t$cd_metrica_unidade_prevista_projeto_previsto,\n\t\t\t\t\t\t\t\t$tx_descricao_projeto_previsto));\n\t}", "protected function generaCamposFormulario($datosIniciales)\r\n {\r\n $string= '<label>Reto:</label> <input type=\"text\" name=\"nombre\" />';\r\n $string.= '<label>Descripcion:</label> <textarea name=\"descripcion\" rows=\"10\" cols=\"40\"></textarea>';\r\n $string.= '<p><button type=\"submit\" name=\"registro\" value=\"\">Registrar</button></p>';\r\n return $string;\r\n }", "public function form() {\n\t\treturn array();\n\t}", "public function createComponentEditForm(){\n $frm = $this->formFactory->create();\n $listingID = $this->hlp->sess(\"listing\")->listingID;\n \n //query database for listing type\n $FE = $this->listings->isFE($listingID);\n $MS = $this->listings->isMultisig($listingID);\n \n //checkbox value rendering logic\n $checkVal = array();\n \n if ($MS){\n $checkVal[\"ms\"] = \"ms\";\n }\n \n if ($FE){\n $checkVal[\"fe\"] = \"fe\";\n }\n \n $this->lHelp->constructCheckboxList($frm)->setValue($checkVal);\n \n //discard option array\n unset($checkVal);\n\n $cnt = count ($this->postageOptions); \n $session = $this->hlp->sess(\"postage\");\n\n \n for ($i = 0; $i<$cnt; $i++){\n\n $frm->addText(\"postage\" . $i, \"Doprava\");\n $frm->addText(\"pprice\" . $i, \"Cena dopravy\");\n\n }\n \n //additional postage textboxes logic\n $counter = $session->counterEdit;\n $values = $session->values;\n \n if (!is_null($counter)){\n \n $frm->addGroup(\"Postage\");\n \n for ($i =0; $i<$counter; $i++){\n $frm->addText(\"postage\" .$i. \"X\", \"Doprava\"); \n $frm->addText(\"pprice\" .$i. \"X\", \"Cena\");\n }\n }\n \n $frm->addSubmit(\"submit\", \"Upravit\");\n $frm->addSubmit(\"add_postage\", \"Přidat dopravu\")->onClick[] = \n \n function() use($listingID) {\n \n //inline onlclick handler, that counts postage options\n $session = $this->hlp->sess(\"postage\");\n $counter = &$session->counterEdit;\n \n if ($counter <= self::MAX_POSTAGE_OPTIONS){\n $counter++;\n } else {\n $this->flashMessage(\"Dosáhli jste maxima poštovních možností.\");\n }\n \n $form = $this->getComponent(\"editForm\");\n $session->values = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:editListing\", $listingID);\n };\n \n $this->lHelp->fillForm($frm, $values); \n $frm->onSuccess[] = array($this, 'editSuccess');\n $frm->onValidate[] = array($this, 'editValidate');\n \n return $frm; \n }", "public function createForm()\n {\n }", "public function dodajformAction()\n {\n $this->params->tryb='Dodawanie';\n $this->template='admin/rabat/form.html.twig';\n $this->params->rabaty=$this->model->lista();\n $this->params->samochody=$this->loadModel('Samochod')->lista();\n }", "static function build_form_standard($form) {\n if (!isset($_REQUEST['value'])) {\n $_REQUEST['value'] = \"\";\n }\n if (!isset($_REQUEST['option'])) {\n $_REQUEST['option'] = \"\";\n }\n if (!isset($_REQUEST['queryStatus'])) {\n $_REQUEST['queryStatus'] = false;\n }\n if (!isset($_REQUEST['oldsubaction'])) {\n $_REQUEST['oldsubaction'] = \"\";\n }\n if (!isset($form['unableInsert'])) {\n $form['unableInsert'] = false;\n }\n if (!isset($form['unableQuery'])) {\n $form['unableQuery'] = false;\n }\n if (!isset($form['unableUpdate'])) {\n $form['unableUpdate'] = false;\n }\n if (!isset($form['unableDelete'])) {\n $form['unableDelete'] = false;\n }\n if (!isset($form['unableBrowse'])) {\n $form['unableBrowse'] = false;\n }\n if (!isset($form['unableReport'])) {\n $form['unableReport'] = false;\n }\n if (!isset($form['fieldsPerRow'])) {\n $form['fieldsPerRow'] = 1;\n }\n if (!isset($form['show_not_nulls'])) {\n $form['show_not_nulls'] = false;\n }\n if (!isset($form['msj_not_null'])) {\n $form['msj_not_null'] = \"* Campos Requeridos!\";\n }\n if (!isset($form['buttons'])) {\n $form['buttons'] = array();\n $form['buttons'][\"insert\"] = \"Adicionar\";\n $form['buttons'][\"query\"] = \"Consultar\";\n $form['buttons'][\"browse\"] = \"Visualizar\";\n $form['buttons'][\"report\"] = \"Reporte\";\n \n } else {\n \tif (!isset($form['buttons'][\"insert\"])) {\n \t\t$form[\"buttons\"][\"insert\"] = \"Adicionar\";\n \t}\n \tif (!isset($form['buttons'][\"query\"])) {\n \t\t$form[\"buttons\"][\"query\"] = \"Consultar\";\n \t}\n \tif (!isset($form['buttons'][\"browse\"])) {\n \t\t$form[\"buttons\"][\"browse\"] = \"Visualizar\";\n \t}\n \tif (!isset($form['buttons'][\"report\"])) {\n \t\t$form[\"buttons\"][\"report\"] = \"Reporte\";\n \t}\n }\n $controller = Dispatcher::get_controller();\n $controller_name = Router::get_controller();\n if (!array_key_exists('dataRequisite', $form)) {\n $form['dataRequisite'] = 1;\n }\n if (!$form['dataRequisite']) {\n Generator::forms_print(\"<font style='font-size:11px'><div align='center'><i><b>No hay datos en consulta</b></i></div></font>\");\n } else {\n Generator::forms_print(\"<center>\");\n if ($_REQUEST['oldsubaction'] == 'Modificar') {\n $_REQUEST['queryStatus'] = true;\n }\n if ($controller->view != 'browse') {\n if (!$_REQUEST['queryStatus']) {\n if (!$form['unableInsert']) {\n $caption = $form['buttons']['insert'];\n Generator::forms_print(\"<input type='button' class='controlButton' id='adiciona' value='$caption' lang='Adicionar' onclick='enable_insert(this)'>&nbsp;\");\n }\n if (!$form['unableQuery']) {\n $caption = $form['buttons']['query'];\n Generator::forms_print(\"<input type='button' class='controlButton' id='consulta' value='$caption' lang='Consultar' onclick='enable_query(this)'>&nbsp;\\r\\n\");\n }\n $ds = \"disabled='disabled'\";\n } else {\n $query_string = get_kumbia_url(\"$controller_name/fetch/\");\n Generator::forms_print(\"<input type='button' id='primero' class='controlButton' onclick='window.location=\\\"{$query_string}0/&amp;queryStatus=1\\\"' value='Primero'>&nbsp;\");\n Generator::forms_print(\"<input type='button' id='anterior' class='controlButton' onclick='window.location=\\\"{$query_string}\" . ($_REQUEST['id'] - 1) . \"/&amp;queryStatus=1\\\"' value='Anterior'>&nbsp;\");\n Generator::forms_print(\"<input type='button' id='siguiente' class='controlButton' onclick='window.location=\\\"{$query_string}\" . ($_REQUEST['id'] + 1) . \"/&amp;queryStatus=1\\\"' value='Siguiente'>&nbsp;\");\n Generator::forms_print(\"<input type='button' id='ultimo' class='controlButton' onclick='window.location=\\\"{$query_string}last/&amp;queryStatus=1\\\"' value='Ultimo'>&nbsp;\");\n $ds = \"\";\n }\n //El Boton de Actualizar\n if ($_REQUEST['queryStatus']) {\n if (!$form['unableUpdate']) {\n if (isset($form['buttons']['update'])) {\n $caption = $form['buttons']['update'] ? $form['buttons']['update'] : \"Modificar\";\n } else {\n $caption = \"Modificar\";\n }\n if (isset($form['updateCondition'])) {\n if (strpos($form['updateCondition'], '@')) {\n ereg(\"[\\@][A-Za-z0-9_]+\", $form['updateCondition'], $regs);\n foreach($regs as $reg) {\n $form['updateCondition'] = str_replace($reg, $_REQUEST[\"fl_\" . str_replace(\"@\", \"\", $reg) ], $form['updateCondition']);\n }\n }\n $form['updateCondition'] = \" \\$val = (\" . $form['updateCondition'] . \");\";\n eval($form['updateCondition']);\n if ($val) {\n Generator::forms_print(\"<input type='button' class='controlButton' id='modifica' value='$caption' lang='Modificar' $ds onclick=\\\"enable_update(this)\\\">&nbsp;\");\n }\n } else {\n Generator::forms_print(\"<input type='button' class='controlButton' id='modifica' value='$caption' lang='Modificar' $ds onclick=\\\"enable_update(this)\\\">&nbsp;\");\n }\n }\n //El de Borrar\n if (!$form['unableDelete']) {\n if (isset($form['buttons']['delete'])) {\n $caption = $form['buttons']['delete'] ? $form['buttons']['delete'] : \"Borrar\";\n } else {\n $caption = \"Borrar\";\n }\n Generator::forms_print(\"<input type='button' class='controlButton' id='borra' value='$caption' lang='Borrar' $ds onclick=\\\"enable_delete()\\\">\\r\\n&nbsp;\");\n }\n }\n if (!$_REQUEST['queryStatus']) {\n if (!$form['unableBrowse']) {\n $caption = $form['buttons']['browse'];\n Generator::forms_print(\"<input type='button' class='controlButton' id='visualiza' value='$caption' lang='Visualizar' onclick='enable_browse(this, \\\"$controller_name\\\")'>&nbsp;\\r\\n\");\n }\n }\n //Boton de Reporte\n if (!$_REQUEST['queryStatus']) {\n if (!$form['unableReport']) {\n $caption = $form['buttons']['report'];\n Generator::forms_print(\"<input type='button' class='controlButton' id='reporte' value='$caption' lang='Reporte' onclick='enable_report(this)'>&nbsp;\\r\\n\");\n }\n } else {\n Generator::forms_print(\"<br /><br />\\n<input type='button' class='controlButton' id='volver' onclick='window.location=\\\"\" . get_kumbia_url(\"$controller_name/back\") . \"\\\"' value='Atr&aacute;s'>&nbsp;\\r\\n\");\n }\n Generator::forms_print(\"</center><br />\\r\\n\");\n Generator::forms_print(\"<table align='center'><tr>\\r\\n\");\n $n = 1;\n //La parte de los Componentes\n Generator::forms_print(\"<td align='right' valign='top'>\\r\\n\");\n foreach($form['components'] as $name => $com) {\n switch ($com['type']) {\n case 'text':\n Component::build_text_component($com, $name, $form);\n break;\n case 'combo':\n Component::build_standard_combo($com, $name);\n break;\n case 'helpText':\n Component::build_help_context($com, $name, $form);\n break;\n case 'userDefined':\n Component::build_userdefined_component($com, $name, $form);\n break;\n case 'time':\n Component::build_time_component($com, $name, $form);\n break;\n case 'password':\n Component::build_standard_password($com, $name);\n break;\n case 'textarea':\n Component::build_text_area($com, $name);\n break;\n case 'image':\n Component::build_standard_image($com, $name);\n break;\n //Este es el Check Chulito\n \n case 'check':\n if ($com['first']) {\n Generator::forms_print(\"<b>\" . $com['groupcaption'] . \"</b></td><td><table cellpadding=0>\");\n }\n Generator::forms_print(\"<tr><td>\\r\\n<input type='checkbox' disabled name='fl_$name' id='flid_$name' style='border:1px solid #FFFFFF'\");\n if ($_REQUEST['fl_' . $name] == $com['checkedValue']) {\n Generator::forms_print(\" checked='checked' \");\n }\n if ($com[\"attributes\"]) {\n foreach($com[\"attributes\"] as $nitem => $item) {\n Generator::forms_print(\" $nitem='$item' \");\n }\n }\n Generator::forms_print(\">\\r\\n</td><td>\" . $com['caption'] . \"</td></tr>\");\n if ($com[\"last\"]) Generator::forms_print(\"</table>\");\n break;\n //Textarea\n \n case 'textarea':\n Generator::forms_print(\"<b>\" . $com['caption'] . \" :</br></td><td><textarea disabled='disabled' name='fl_$name' id='flid_$name' \");\n foreach($com['attributes'] as $natt => $vatt) {\n Generator::forms_print(\"$natt='$vatt' \");\n }\n Generator::forms_print(\">\" . $_REQUEST['fl_' . $name] . \"</textarea>\");\n break;\n //Oculto\n \n case 'hidden':\n if (!isset($_REQUEST['fl_' . $name])) {\n $_REQUEST['fl_' . $name] = \"\";\n }\n Generator::forms_print(\"<input type='hidden' name='fl_$name' id='flid_$name' value='\" . (isset($com['value']) ? $com['value'] : $_REQUEST['fl_' . $name]) . \"'/>\\r\\n\");\n break;\n }\n if ($form['show_not_nulls']) {\n if ($com['type'] != 'hidden') {\n if (isset($com['notNull']) && $com['valueType'] != 'date') {\n Generator::forms_print(\"*\\n\");\n }\n }\n }\n if ($com['type'] != 'hidden') {\n Generator::forms_print(\"</td>\");\n if ($com['type'] == 'check') {\n if ($com['last']) {\n if (!($n % $form['fieldsPerRow'])) {\n Generator::forms_print(\"</tr><tr>\\r\\n\");\n }\n $n++;\n Generator::forms_print(\"<td align='right' valign='top'>\");\n }\n } else {\n if (!($n % $form['fieldsPerRow'])) {\n Generator::forms_print(\"</tr><tr>\\r\\n\");\n }\n $n++;\n Generator::forms_print(\"<td align='right' valign='top'>\");\n }\n }\n }\n if ($form['show_not_nulls']) {\n Generator::forms_print(\"</td></tr><tr><td colspan='2' align='center'><i class='requerido'>\" . $form['msj_not_null'] . \"</i></tr></td>\");\n }\n Generator::forms_print(\"<br /></td></tr><tr>\n\t\t\t\t<td colspan='2' align='center'>\n\t\t\t\t<div id='reportOptions' style='display:none' class='report_options'>\n\t\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t<td align='right'>\n\t\t\t\t<b>Formato Reporte:</b>\n\t\t\t\t\t<select name='reportType' id='reportType'>\n\t\t\t\t\t\t<option value='pdf'>PDF</option>\n\t\t\t\t\t\t<option value='xls'>EXCEL</option>\n\t\t\t\t\t\t<option value='doc'>WORD</option>\n\t\t\t\t\t\t<option value='html'>HTML</option>\n\t\t\t\t\t</select>\n\t\t\t\t</td>\n\t\t\t\t<td align='center'>\n\t\t\t\t<b>Ordenar Por:</b>\n\t\t\t\t\t<select name='reportTypeField' id='reportTypeField'>\");\n reset($form['components']);\n for ($i = 0;$i <= count($form['components']) - 1;$i++) {\n if (!isset($form['components'][key($form['components']) ]['notReport'])) {\n $form['components'][key($form['components']) ]['notReport'] = false;\n }\n if (!$form['components'][key($form['components']) ]['notReport']) {\n if (isset($form['components'][key($form['components']) ]['caption'])) {\n Generator::forms_print(\"<option value ='\" . key($form['components']) . \"'>\" . $form['components'][key($form['components']) ]['caption'] . \"</option>\");\n }\n }\n next($form['components']);\n }\n Generator::forms_print(\"</select>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<br />\n\t\t\t\t</td>\n\t\t\t\t</tr>\");\n Generator::forms_print(\"</table><br />\\r\\n\");\n } else {\n /**\n * @see Browse\n */\n require_once \"library/kumbia/generator/browse.php\";\n Browse::formsBrowse($form);\n }\n //Todos los Labels\n Generator::forms_print(\"<script type='text/javascript'>\\nvar Labels = {\");\n $aLabels = \"\";\n foreach($form['components'] as $key => $com) {\n if (isset($com['caption'])) {\n $aLabels.= $key . \": '\" . $com['caption'] . \"',\";\n } else {\n $aLabels.= $key . \": '$key',\";\n }\n }\n $aLabels = substr($aLabels, 0, strlen($aLabels) - 1);\n Generator::forms_print(\"$aLabels};\\r\\n\");\n //Todos los campos\n Generator::forms_print(\"var Fields = [\");\n reset($form['components']);\n for ($i = 0;$i <= count($form['components']) - 1;$i++) {\n Generator::forms_print(\"'\" . key($form['components']) . \"'\");\n if ($i != (count($form['components']) - 1)) Generator::forms_print(\",\");\n next($form['components']);\n }\n Generator::forms_print(\"];\\r\\n\");\n //Campos que no pueden ser nulos\n Generator::forms_print(\"var NotNullFields = [\");\n reset($form['components']);\n $NotNullFields = \"\";\n for ($i = 0;$i <= count($form['components']) - 1;$i++) {\n if (!isset($form['components'][key($form['components']) ]['notNull'])) {\n $form['components'][key($form['components']) ]['notNull'] = false;\n }\n if (!isset($form['components'][key($form['components']) ]['primary'])) {\n $form['components'][key($form['components']) ]['primary'] = false;\n }\n if ($form['components'][key($form['components']) ]['notNull'] || $form['components'][key($form['components']) ]['primary']) {\n $NotNullFields.= \"'\" . key($form['components']) . \"',\";\n }\n next($form['components']);\n }\n $NotNullFields = substr($NotNullFields, 0, strlen($NotNullFields) - 1);\n Generator::forms_print(\"$NotNullFields];\\r\\n\");\n Generator::forms_print(\"var DateFields = [\");\n $dFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (isset($value['valueType'])) {\n if ($value['valueType'] == 'date') $dFields.= \"'\" . $key . \"',\";\n }\n }\n $dFields = substr($dFields, 0, strlen($dFields) - 1);\n Generator::forms_print(\"$dFields];\\r\\n\");\n //Campos que no son llave\n Generator::forms_print(\"var UFields = [\");\n $uFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (!$value['primary']) {\n $uFields.= \"'\" . $key . \"',\";\n }\n }\n $uFields = substr($uFields, 0, strlen($uFields) - 1);\n Generator::forms_print(\"$uFields];\\r\\n\");\n //Campos E-Mail\n Generator::forms_print(\"var emailFields = [\");\n $uFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (isset($value['valueType'])) {\n if ($value['valueType'] == 'email') {\n $uFields.= \"'\" . $key . \"',\";\n }\n }\n }\n $uFields = substr($uFields, 0, strlen($uFields) - 1);\n Generator::forms_print(\"$uFields];\\r\\n\");\n //Campos Time\n Generator::forms_print(\"var timeFields = [\");\n $uFields = \"\";\n foreach($form['components'] as $key => $value) {\n if ($value['type'] == 'time') {\n $uFields.= \"'\" . $key . \"',\";\n }\n }\n $uFields = substr($uFields, 0, strlen($uFields) - 1);\n Generator::forms_print(\"$uFields];\\r\\n\");\n //Campos Time\n Generator::forms_print(\"var imageFields = [\");\n $uFields = \"\";\n foreach($form['components'] as $key => $value) {\n if ($value['type'] == 'image') {\n $uFields.= \"'\" . $key . \"',\";\n }\n }\n $uFields = substr($uFields, 0, strlen($uFields) - 1);\n Generator::forms_print(\"$uFields];\\r\\n\");\n //Campos que son llave\n Generator::forms_print(\"var PFields = [\");\n $pFields = \"\";\n foreach($form['components'] as $key => $value) {\n if ($value['primary']) {\n $pFields.= \"'\" . $key . \"',\";\n }\n }\n $pFields = substr($pFields, 0, strlen($pFields) - 1);\n Generator::forms_print(\"$pFields];\\r\\n\");\n //Campos que son Auto Numericos\n Generator::forms_print(\"var AutoFields = [\");\n $aFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (isset($value['auto_numeric'])) {\n if ($value['auto_numeric']) {\n $aFields.= \"'\" . $key . \"',\";\n }\n }\n }\n $aFields = substr($aFields, 0, strlen($aFields) - 1);\n Generator::forms_print(\"$aFields];\\r\\n\");\n Generator::forms_print(\"var queryOnlyFields = [\");\n $rFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (!isset($value['valueType'])) {\n $value['valueType'] = \"\";\n }\n if (!isset($value['queryOnly'])) {\n $value['queryOnly'] = false;\n }\n if ($value['valueType'] != 'date') {\n if ($value['queryOnly']) {\n $rFields.= \"'\" . $key . \"',\";\n }\n }\n }\n $rFields = substr($rFields, 0, strlen($rFields) - 1);\n Generator::forms_print(\"$rFields];\\r\\n\");\n Generator::forms_print(\"var queryOnlyDateFields = [\");\n $rdFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (!isset($value['valueType'])) $value['valueType'] = \"\";\n if (!isset($value['queryOnly'])) $value['queryOnly'] = false;\n if ($value['valueType'] == 'date') {\n if ($value['queryOnly']) {\n $rdFields.= \"'\" . $key . \"',\";\n }\n }\n }\n $rdFields = substr($rdFields, 0, strlen($rdFields) - 1);\n Generator::forms_print(\"$rdFields];\\r\\n\");\n Generator::forms_print(\"var AddFields = [\");\n $aFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (!isset($value['auto_numeric'])) {\n $value['auto_numeric'] = false;\n }\n if (!isset($value['attributes']['value'])) {\n $value['attributes']['value'] = false;\n }\n if ((!$value['auto_numeric']) && (!$value['attributes']['value'])) {\n $aFields.= \"'\" . $key . \"',\";\n }\n }\n $aFields = substr($aFields, 0, strlen($aFields) - 1);\n Generator::forms_print(\"$aFields];\\r\\n\");\n Generator::forms_print(\"var AutoValuesFields = [\");\n $aFields = \"\";\n foreach($form['components'] as $key => $value) {\n if (!isset($value['auto_numeric'])) {\n $value['auto_numeric'] = false;\n }\n if ($value['auto_numeric']) {\n $aFields.= \"'\" . $key . \"',\";\n }\n }\n $aFields = substr($aFields, 0, strlen($aFields) - 1);\n Generator::forms_print(\"$aFields];\\r\\n\");\n Generator::forms_print(\"var AutoValuesFFields = [\");\n $aFields = \"\";\n if (!isset($db)) {\n $db = db::raw_connect();\n }\n foreach($form['components'] as $key => $value) {\n if (!isset($value['auto_numeric'])) $value['auto_numeric'] = false;\n if ($value['auto_numeric']) {\n ActiveRecord::sql_item_sanizite($key);\n ActiveRecord::sql_item_sanizite($form['source']);\n $q = $db->query(\"select max($key)+1 from \" . $form['source']);\n $row = $db->fetch_array($q);\n $aFields.= \"'\" . ($row[0] ? $row[0] : 1) . \"',\";\n }\n }\n $aFields = substr($aFields, 0, strlen($aFields) - 1);\n Generator::forms_print(\"$aFields];\\r\\n\");\n if (!isset($_REQUEST['param'])) {\n $_REQUEST['param'] = \"\";\n }\n Generator::forms_print(\"\\nnew Event.observe(window, \\\"load\\\", function(){\\n\");\n if ($controller->keep_action) {\n Generator::forms_print(\"\\tkeep_action('\" . $controller->keep_action . \"');\\n\");\n }\n Generator::forms_print(\"\\tregister_form_events()\\n})\\n</script>\\n\");\n if ($controller->view != 'browse') {\n Generator::forms_print(\"<center><input type='button' class='controlButton' id='aceptar' value='Aceptar' disabled='disabled' onclick='form_accept()' />&nbsp;\");\n Generator::forms_print(\"<input type='button' class='controlButton' id='cancelar' value='Cancelar' disabled='disabled' onclick='cancel_form()' />&nbsp;</center>\");\n Generator::forms_print(\"<input type='hidden' id='actAction' value='' />\\n\n\t\t\t\t</form>\n <form id='saveDataForm' method='post' action='' style='display:none' enctype=\\\"multipart/form-data\\\"></form>\");\n }\n }\n }" ]
[ "0.7364065", "0.7265128", "0.71202123", "0.7035374", "0.6787507", "0.6729539", "0.66477644", "0.66382617", "0.66353154", "0.6630302", "0.6581236", "0.6545987", "0.6515746", "0.6477283", "0.6455043", "0.64368755", "0.64358157", "0.6431236", "0.6409139", "0.63840854", "0.63788545", "0.6362141", "0.63315994", "0.63237196", "0.63180566", "0.63134193", "0.63067126", "0.62976974", "0.6289198", "0.6259219", "0.6248306", "0.62423486", "0.6230162", "0.6219851", "0.62129813", "0.6206261", "0.6196861", "0.618668", "0.61844486", "0.61823803", "0.6181961", "0.61755013", "0.6173975", "0.6172984", "0.61521804", "0.6138246", "0.61332303", "0.61197615", "0.6111316", "0.6111316", "0.61088693", "0.61057615", "0.6101394", "0.60938996", "0.6091918", "0.6091407", "0.6081053", "0.60795915", "0.607955", "0.6074554", "0.6067422", "0.60404676", "0.603815", "0.60302985", "0.6028238", "0.6025271", "0.60243404", "0.6011022", "0.6010274", "0.60062236", "0.6005143", "0.5999009", "0.59952676", "0.5986033", "0.59841156", "0.5983275", "0.598284", "0.597531", "0.5966089", "0.59611356", "0.5957398", "0.59555584", "0.5945861", "0.5942849", "0.5940209", "0.59384316", "0.5934637", "0.5933991", "0.59335667", "0.59223235", "0.59222114", "0.5916827", "0.5915341", "0.5912214", "0.59118664", "0.59117967", "0.59058857", "0.5897787", "0.58956784", "0.58896255", "0.58895177" ]
0.0
-1
Autoload function, invoked by CSpeed extension
private function autoload($className) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "public static function AutoLoad(){\n spl_autoload_register(function ($file_name){\n $name = preg_replace('~(.*[\\\\\\\\]([A-Z]\\w+))~im', '$2', $file_name);\n MyAutoload::loadControllers($name);//'HomeController'\n MyAutoload::loadModules($name);//'Controller'\n MyAutoload::loadModules($name);//'Model'\n MyAutoload::loadModules($name);//'Config'\n MyAutoload::loadModels($name);//'Tasks'\n MyAutoload::loadRoutes();//'Tasks'\n });\n }", "public function registerAutoLoad() {\n spl_autoload_register(array($this, \"load\"), true, true);\n }", "public function RegisterAutoload()\n {\n spl_autoload_register(array(__CLASS__,'autoload'));\n }", "public static function load() {\n self::initialLoad();\n self::vendor();\n self::loadLibs();\n //registra o SLP AUTO LOAD\n spl_autoload_register(array('\\wow\\Loader','autLoad'));\n }", "function clientAutoload() {\n\t\n\tforeach ($this->config->item('client_autoload') as $call=>$fileNames) {\n\t if (method_exists($this,$call) && count($fileNames)) {\n\t\tforeach ($fileNames as $f) {\n\t\t $this->$call($f);\n\t\t}\n\t }\n\t}\n\t\n }", "function __auto_load($epath)\n{\n //$epath = empty($epath)?SITE_ROOT:$epath;\n $r = $epath . 'Runtime/';\n $end_fun_file = $r . '~fun.php';\n if (!is_file($end_fun_file)) {\n $data = '';\n $dir = $epath . 'Common';\n $path = read_dir($dir, true);\n $filelist = array();\n foreach ($path as $file) {\n $file = $file['full'];\n $ext = trim(substr($file, -8, 8));\n if ($ext == '.fun.php') {\n $filelist[] = $file;\n }\n }\n if ($filelist) {\n foreach ($filelist as $e)\n $data .= __parse($e);\n mkdirs_a($r);\n if (!file_put_contents($end_fun_file, '<?php ' . $data))\n exit('please check the web root path is can write!');\n }\n unset($data, $filelist);\n }\n !function_exists('require_cache') ? require_once $end_fun_file : require_cache($end_fun_file);\n}", "function do_autoload() {\n\tinit_files();\n}", "private function autoload_scripts() {\n\t\t\n\t}", "public static function autoload()\n {\n spl_autoload_register(array(__CLASS__,'load'));\n }", "function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}", "function glu_class_autoloader($c) {\n include dirname(__FILE__). DIRECTORY_SEPARATOR . strtolower($c) . '.php';\n}", "public static function registerAutoloader(){\n\t\tspl_autoload_register(__NAMESPACE__ . \"\\\\Jolt::autoload\");\n\t}", "function MyAutoload($className){\n $className=str_replace(\"\\\\\",\"/\",$className);\n $className=str_replace(\"App/\",\"\",$className);\n $class=\"{$className}.php\";\n include_once($class);\n}", "static function PageAutoload()\r\n\t{\r\n\t\t\r\n\t}", "function __autoload( $c ) {\r\n\tinclude( __DIR__.'/'.$c.'.php' );\r\n}", "static function _shfw_autoloader()\n {\n\t\tinclude_once(BASEPATH.'config'.DIRECTORY_SEPARATOR.'autoload.php');\n\n\t\tif ( ! isset($autoload))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Autoload helpers.\n\t\tforeach ($autoload['helper'] as $type)\n\t\t{\t\t\t\n\t\t\tself::loadHelper($type);\n\t\t}\n\n\t\t// Autoload core components.\n\t\tforeach ($autoload['core'] as $type)\n\t\t{\t\t\t\n\t\t\tself::initCoreComponent($type);\n\t\t}\n\n\t\t/*\n\t\tif(SHIN_Core::$_benchmark){\n\t\t\tSHIN_Core::$_benchmark->mark('code_start');\n\t\t}\n\t\t*/\n\t\t\n\t\t// Autoload libraries.\n\t\tforeach ($autoload['libraries'] as $type)\n\t\t{\n\t\t\tself::loadLibrary($type, TRUE);\n\t\t}\n\n\t\t// Autoload models.\n\t\tforeach ($autoload['models'] as $type)\n\t\t{\n\t\t\tself::loadModel($type, TRUE);\n\t\t}\n\t}", "private static function libAutoload(): void\n {\n \\spl_autoload_register('self::autoload');\n }", "function autoload($name) {\r\n require strtolower($name) . '.php';\r\n}", "function __autoload($nome_classe){\n require_once '../libs/' . $nome_classe . '.php';\n}", "static function AjaxAutoload()\r\n\t{\r\n\t\t\r\n\t}", "public static function register_autoloader()\n {\n }", "function __autoload( $c ) {\n\tinclude( dirname(__FILE__).'/'.$c.'.php' );\n}", "function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}", "function autoLoad() {\n\t$path = dirname(__FILE__);\n\n\t// Autoload manual important files\n\t$Autoload = array();\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Utils' . DIRECTORY_SEPARATOR . 'lexa-xml-serialization.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Builder' . DIRECTORY_SEPARATOR . 'PartyBuilder.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'ServiceConnection.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'ServiceConnection' . DIRECTORY_SEPARATOR . 'Communication.php';\n\t$Autoload[] = $path . DIRECTORY_SEPARATOR . 'Client' . DIRECTORY_SEPARATOR . 'Party.php';\n\n\n\tforeach ($Autoload as &$a) {\n\t\tif (file_exists($a)) {\n\t\t\trequire_once($a);\n\t\t}\n\t}\n\n\n\t$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);\n\tforeach ($objects as $name => $object) {\n\t\tif (substr($object->getBasename(), strpos($object->getBasename(), \".\")) == '.php') {\n\t\t\tif (!stristr($object->getBasename(), 'test')) {\n\t\t\t\trequire_once($object->getPath() . DIRECTORY_SEPARATOR . $object->getBasename());\n\t\t\t}\n\t\t}\n\t}\n}", "function classAutoload($class_name) {\n if (file_exists( __DIR__ . '/includes/classes/' . $class_name . '.php')) {\n require_once __DIR__ . '/includes/classes/' . $class_name . '.php';\n }\n}", "function __autoload($className){\n if (file_exists(\"core/$className.php\")){\n include_once \"core/$className.php\";\n }\n}", "function miAutoload($class_name) {\r\n\tif(file_exists('controllers/' . $class_name . '.php')){\r\n\t\trequire_once 'controllers/' . $class_name . '.php';\r\n\t}else if(file_exists('models/' . strtolower($class_name) . 'Model.php')){\t\t\t\r\n\t\trequire_once 'models/'. strtolower($class_name) .'Model.php';\r\n\t}else echo \"No se puede cargar la clase \".$class_name;\r\n}", "function helper_autoloader($class)\n {\n\n }", "function __autoload($class){\n require_once($class.'.inc');\n}", "function __autoload($pClassName) {\r\n if (file_exists($pClassName.'.php')) {\r\n require_once($pClassName.'.php');\r\n return true;\r\n } else if (file_exists('wrapper/'.$pClassName.'.php')) {\r\n require_once('wrapper/'.$pClassName.'.php');\r\n return true;\r\n }\r\n return false; \r\n}", "public function __load();", "function __autoload($class_name) {include $class_name . '.php';}", "private function setAutoLoader() {\n \n spl_autoload_register(array('self', 'autoLoader'));\n \n }", "function __mashineAutoload($class_name)\n{\n if (preg_match(\"/([a-zA-Z0-9]*)ApiController$/\", $class_name, $matches)) {\n $api_path = preg_replace(\"/plugins.*/\", \"controllers\".DS.\"api\", __FILE__);\n\n $file = $api_path.DS.strtolower($matches[1]).\".php\";\n if (is_file($file)) {\n include $file;\n }\n }\n}", "private function registerAutoloader() {\n\t\t\t// register autoloader\n\t\t\tspl_autoload_extensions(EXT);\n\t\t\tspl_autoload_register(array($this, 'autoload'));\n\t\t}", "function SuperheroServiceAutoload($class){\n require_once $class . '.php';\n}", "public function auto_load() {\n\n spl_autoload_register(function ($class) {\n\n // Getting the file path for checking if it exists.\n\n require_once ROOT . '/app/controllers/' . $class . '.php';\n\n });\n }", "function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}", "public static function registerAutoload()\n\t{\n\t\tspl_autoload_register(array('AgileProfiler', 'autoload'));\n\t}", "function include_wbf_autoloader(){\n\t$wbf_path = get_wbf_path();\n\n\tif(!is_dir($wbf_path)){\n\t\t$wbf_path = ABSPATH.\"wp-content/plugins/wbf\";\n\t}\n\n\t//Require the base autoloader\n\t$wbf_base_autoloader = $wbf_path.\"/wbf-autoloader.php\";\n\tif(is_file($wbf_base_autoloader)){\n\t\trequire_once $wbf_base_autoloader;\n\t}\n}", "function autoload($name) {\n\trequire_once(ROOT.'inc/class.'.strtolower($name).'.php');\n}", "public function registerAutoloaders()\n {\n }", "function my_autoloader($class_name) \n\t{\n \tinclude '../classes/' . $class_name . '.class.php';\n\t}", "static function getAutoload() {\n\t\treturn systemAutoload::getInstance();\n\t}", "function __autoload($className)\n{\n require_once \"webcore.reflection.php\";\n \n ClassLoader::loadClass($className);\n}", "function __autoload($class) {\n include './libs/class_'.$class.'.php';\n}", "function __autoload($className){\n\t\t$path = str_replace('\\\\','/',$className).'.class.php';\n\t\tinclude 'libs/'.$path;\n\t}", "function __autoload($class_name) {\n include_once $_SERVER['DOCUMENT_ROOT'].'/core/classes/class.' . $class_name . '.inc.php';\n}", "public function autoLoad($name){\n\t\t$path = NULL;\n\t\t$namespaceParts = explode('\\\\', $name);\n\t\t$pathTail = implode(DIRECTORY_SEPARATOR, $namespaceParts) . '.php';\n\t\t\n\t\t$tryPath = $this->rootPath . '/' . $pathTail;\n\t\t\n\t\tif(is_readable($tryPath)){\n\t\t\t$path = $tryPath;\n\t\t}\n\t\t\n\t\t// this must not throw an exception or do any kind of error as if it does\n\t\t// then when you use class_exists it will error instead of returning false\n\t\tif ($path) {\n\t\t\trequire_once($path); \n\t\t}\n\t}", "public function setupAutoload()\n {\n static::$autoload or spl_autoload_register(\n $this->psr4LoaderFor(__NAMESPACE__, __DIR__),\n true,\n true\n );\n\n static::$autoload = true;\n }", "function __autoload($name) {\n $file = str_replace(\"\\\\\", \"/\", $name);\n $file = ROOT . '/' . $file . '.php';\n\n if (!file_exists($file)) {\n return;\n }\n\n require_once $file;\n}", "function onAutoload($cls) {\n $base = dirname(__FILE__);\n $lower = strtolower($cls);\n $files = array(\n \"$base/classes/$cls.php\",\n \"$base/lib/$lower.php\"\n );\n if (substr($lower, -6) == 'action') {\n $files[] = \"$base/actions/\" . substr($lower, 0, -6) . \".php\";\n }\n foreach ($files as $file) {\n if (file_exists($file)) {\n include_once $file;\n return false;\n }\n }\n return true;\n }", "function loadAkademiKuLib($class_name) \n{\n Mod::inc($class_name.\".lib\",'',__DIR__.\"/inc/lib/\");\n}", "public static function load()\n {\n spl_autoload_register(array('AutoLoader', 'autoloadGenericClasses'));\n spl_autoload_register(array('AutoLoader', 'autoloadPhpdocx'));\n spl_autoload_register(array('AutoLoader', 'autoloadLog4php'));\n spl_autoload_register(array('AutoLoader', 'autoloadZetaComponents'));\n spl_autoload_register(array('AutoLoader', 'autoloadTcpdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadPdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadDompdf'));\n spl_autoload_register(array('AutoLoader', 'autoloadMht'));\n }", "function __autoload($name){\n require_once './class/' . $name . \".class.php\";\n}", "function class_autoloader($class) {\r\n require make_url(\"class/$class.php\");\r\n}", "static public function autoload() {\n spl_autoload_register(array(__CLASS__, 'loader'));\n }", "protected function registerAutoload()\n {\n spl_autoload_register(function($class)\n {\n foreach ($this->foldersToAutoload as $folder)\n {\n if (file_exists(getcwd() . \"/$folder/$class.php\"))\n {\n /** @noinspection PhpIncludeInspection */\n require_once getcwd() . \"/$folder/$class.php\";\n }\n }\n });\n }", "public static function init_autoload() {\n spl_autoload_register(function ($class) {\n self::autoload_path($class);\n });\n }", "public static function LOADER(){\n spl_autoload_register(array(__CLASS__, \"requireClass\"));\n }", "public function registerAutoload()\n {\n return spl_autoload_register(array('Proem\\Loader', 'load'));\n }", "protected function _initAutoload() {\r\n// \t\t\t'basePath' => APPLICATION_PATH,\r\n// \t\t\t'namespace' => '',\r\n// \t\t\t'resourceTypes' => array(\r\n// \t\t\t\t'model' => array(\r\n// \t\t\t\t\t'path' => 'models/',\r\n// \t\t\t\t\t'namespace' => 'Model_'\r\n// \t\t\t\t)\r\n// \t\t\t)\r\n// \t\t));\r\n\r\n\t\tZend_Loader::loadFile('Respon.php', LIBRARY_PATH . '/Base');\r\n\r\n\t}", "public static function Autoload($AutoLoadArray){\r\n $load= Loader::Instance();\r\n $load->Modules($AutoLoadArray['MODULES']);\r\n $load->Helpers($AutoLoadArray['HELPERS']);\r\n $load->Extensions($AutoLoadArray['EXTENSIONS']);\r\n }", "function __autoload($className)\r\n{\r\n require_once $className . '.php';\r\n}", "function autoLoad($class){\r\n\r\n $class = str_replace(\"\\\\\",SEPARATOR,$class);\r\n include_once(BASEDIR. SEPARATOR. $class. \".class.php\");\r\n \r\n}", "function zgAutoload( $class )\r\n{\r\n\t$debug = zgDebug::init( );\r\n\t$message = zgMessages::init( );\r\n\r\n\t$debug->guard( );\r\n\r\n\tif ( file_exists( APPLICATION_ROOTDIRECTORY . 'modules/' . $class . '/' . $class . '.module.php' ) )\r\n\t{\r\n\t\trequire_once( APPLICATION_ROOTDIRECTORY . 'modules/' . $class . '/' . $class . '.module.php' );\r\n\t\t$debug->unguard( 'Class ' . APPLICATION_ROOTDIRECTORY . 'modules/' . $class . '/' . $class . '.module.php loaded' );\r\n\t\treturn;\r\n\t}\r\n\r\n\t$debug->write( 'Error autoloading class: Class ' . $class . ' not found', 'warning' );\r\n\t$message->setMessage( 'Error autoloading class: Class ' . $class . ' not found', 'warning' );\r\n\r\n\t$debug->unguard( false );\r\n}", "function __autoload($className) {\n\tglobal $_CLASS_MANIFEST;\n\tif(($pos = strpos($className,'_')) !== false) $className = substr($className,0,$pos);\n\tif(isset($_CLASS_MANIFEST[$className])) include_once($_CLASS_MANIFEST[$className]);\n}", "function supernova_autoloader($className){\r\n\t\t$root_path = ROOT . DS;\r\n\t\t$app_path=$root_path.'application' . DS;\r\n\t\t$library_path=$root_path.'library' . DS . 'extensions' . DS;\r\n\t\t$str = $className;\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n\t\t$strName = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$name = strtolower($strName);\r\n\t\t$file = $library_path.$name.'.class.php';\r\n\t\t$controllerFile = $app_path. 'controllers' . DS . $name . '.php';\r\n\t\t$modelFile = $app_path. 'models' . DS . $name . '.php';\r\n\t\t$appFile = $app_path.'app'.'.controller.php';\r\n\t\tif (file_exists($file)){\r\n\t\t\trequire_once($file);\r\n\t\t}else if (file_exists($controllerFile)){\r\n\t\t\trequire_once($controllerFile);\r\n\t\t}else if (file_exists($modelFile)){\r\n\t\t\trequire_once($modelFile);\r\n\t\t}else if (file_exists($appFile)){\r\n\t\t \trequire_once($appFile);\r\n\t\t}\r\n\t}", "protected function loadAutoloader()\n {\n new Autoloader();\n }", "function myautoload($name){\n \n $name= str_replace(\"\\\\\",\"/\",$name);\n require $name.\".php\";\n \n }", "function autoloader()\n {\n spl_autoload_register(function ($className) {\n\n # DIRECTORY SEPARATORS varies in various platforms\n $ds = DIRECTORY_SEPARATOR;\n\n # Current Working Directory\n $dir = __DIR__;\n\n # replace namespace separator with directory separator (prolly not required)\n $className = str_replace('\\\\', $ds, $className);\n\n # get full name of file containing the required class\n $file = \"{$dir}{$ds}{$className}.php\";\n\n # get file if it is readable\n if (is_readable($file)) {\n require_once $file;\n }\n });\n }", "public function loadInit() {}", "public static function registerAutoloader() {\n spl_autoload_register(__NAMESPACE__ . \"\\\\Framework::autoload\");\n }", "public static function registerAutoloader()\n\t{\n\t\tspl_autoload_register(__NAMESPACE__.'\\\\Core::autoload');\n\t}", "function autoload($class)\n{\n require dirname($_SERVER['SCRIPT_FILENAME']) . '//..//..//' . str_replace('\\\\', '/', $class) . '.php';\n}", "function __autoload($class_name)\n{\t\n require_once Conf::$DIRS['LIBS'].'class/'.$class_name.'.class.php';\t\n}", "function my_autoloader($classname)\n{\n\tchdir('challenge/are_you_serial');\n\trequire_once './'.str_replace('.', '', $classname).'.php';\n\tchdir('../../');\n}", "public static function __autoload()\n\t{\n\t\tself::$FPATH = dirname(__DIR__);\n\t\tself::$APATH = self::detect_project();\n\n\t\tspl_autoload_register(array(__CLASS__, 'load'));\n\n\t\tself::cache_files();\n\t\tself::import_initializers();\n\t}", "function autoloader_perso($className)\n{\n //var_dump($className);\n require_once($className . '.php');\n //die('Test autoloader');\n}", "function __autoload($className) {\n include \"src/\" . $className . '.php';\n}", "function autoload($class_name)\n{\n $exp_arr = explode('_', $class_name);\n if (count($exp_arr) === 1) {\n $folder = 'core';\n } else {\n $n = array_pop($exp_arr);\n $folder = $n . ($n[strlen($n) - 1] == 's' ? 'es' : 's');\n }\n switch($folder) {\n case \"controllers\":\n $arr = explode('_', $class_name);\n $sub_folder = array_shift($arr);\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $sub_folder . DS . $class_name . '.php';\n break;\n case \"helpers\":\n case \"templates\":\n $class_file = PROTECTED_DIR . $folder . DS . PROJECT . DS . $class_name . '.php';\n break;\n default:\n $class_file = PROTECTED_DIR . $folder . DS . $class_name . '.php';\n break;\n }\n if (file_exists($class_file)) {\n require_once($class_file);\n }\n}", "function __autoload($class_name){\n require_once \"../cls/\".$class_name.'.php';\n}", "function __autoload($class){\nrequire LIBS.$class.\".php\";\n}", "function __autoload($className)\n\t{\n\t\t// Load class using Loader\n\t\tLoad($className);\n\t}", "function __autoload($nomClasse) {\r\n\trequire_once $nomClasse.'.class.php';\r\n}", "function __autoload($classname)\n{\n $classpart = explode('\\\\',$classname);\n if (false==strpos('//',$classname)):\n $classpart = explode('\\\\',$classname);\n if ('App' == $classpart[0]):\n unset($classpart[0]);\n $load = __DIR__ . '/' . implode('/', $classpart) . '.php';\n echo $load . '<br>';\n require $load;\n endif;\n endif;\n}", "function medialib_autoloader($class_name)\n{\n $class_name = str_replace('\\\\', '/', $class_name) . '.php';\n require_once $class_name;\n}", "function __autoload($class_name) {\n\n require_once $class_name . '.class.php';\n\t\n}", "function __autoload($class)\n {\n require_once('core/'.$class.'.php');\n }", "function my_autoloader($class) {\n if ( $class != \"ACF\" )\n include 'classes/' . $class . '.class.php';\n }", "function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}", "function __autoload($className) {\n \trequire_once 'config.inc.php';\n require_once ROOT_PATH . '/includes/'. ucfirst($className) .'.class.php'; //自动加载 class 文件 \n}", "function my_custom_autoloader($class_name) {\n $file = __DIR__ . \"/includes/\" . $class_name . \".php\";\n\n if (file_exists($file)) {\n require_once $file;\n }\n}", "function __autoload($class_name) {\n\t\t$class_name = strtolower($class_name);\n\t $path = LIB_PATH.DS.\"{$class_name}.php\";\n\t if(file_exists($path)) {\n\t\trequire_once($path);\n\t } else {\n\t\t\tdie(\"The file {$class_name}.php could not be found.\");\n\t\t}\n\t}", "function __autoload($class_name) {\r\n\t/*\r\n\tLast chance for PHP script to call a class name\r\n\t */\r\n\t$class_name = ($class_name == 'OutgoingTranslation' || $class_name == 'IncomingTranslation') ? 'Translate' : $class_name;\r\n\trequire_once $_SERVER['DOCUMENT_ROOT']. \"/includes/$class_name.php\";\r\n}", "function __autoload($classPupa){\n\n require 'class/'.$classPupa.'.php';\n \n}", "function __autoload($class) {\n require ($class . '.php');\n}", "function __autoload($class_name) {\n include_once strtolower($class_name) . '.php';\n }", "function __autoload($class) {\n if ($class == \"uploader\")\n require \"core/uploader.php\";\n elseif ($class == \"browser\")\n require \"core/browser.php\";\n elseif (file_exists(\"core/types/$class.php\"))\n require \"core/types/$class.php\";\n elseif (file_exists(\"lib/class_$class.php\"))\n require \"lib/class_$class.php\";\n elseif (file_exists(\"lib/helper_$class.php\"))\n require \"lib/helper_$class.php\";\n}" ]
[ "0.77101", "0.75406206", "0.7396098", "0.7188045", "0.7158466", "0.7143164", "0.71152085", "0.7078386", "0.7049809", "0.7031795", "0.70269996", "0.70244336", "0.70203644", "0.7018349", "0.70131475", "0.7012806", "0.70007074", "0.6991195", "0.69249076", "0.6922115", "0.69007146", "0.6898954", "0.6894903", "0.6892578", "0.6870314", "0.6862677", "0.6862077", "0.68594795", "0.683272", "0.6832439", "0.6819917", "0.6810702", "0.6804827", "0.680467", "0.6798332", "0.6785277", "0.6784954", "0.6784081", "0.6783381", "0.6762018", "0.6759935", "0.67514575", "0.6739053", "0.67269135", "0.6724174", "0.67230034", "0.67224777", "0.67141587", "0.6709528", "0.6704753", "0.66954714", "0.66881347", "0.6663094", "0.66624975", "0.664033", "0.6632695", "0.6625221", "0.66248006", "0.6619839", "0.66190106", "0.6616996", "0.6609341", "0.66062295", "0.6597066", "0.6595398", "0.6591394", "0.65912586", "0.65909594", "0.6586728", "0.6583242", "0.65717256", "0.656649", "0.6541857", "0.65416783", "0.6536134", "0.6529859", "0.65272367", "0.65237737", "0.652145", "0.65173703", "0.65065426", "0.65028507", "0.65008587", "0.6494937", "0.64904195", "0.6489647", "0.6486362", "0.6485524", "0.648528", "0.6484784", "0.6479363", "0.64788556", "0.6472514", "0.6463711", "0.6463556", "0.6461812", "0.6459603", "0.64574516", "0.6440955", "0.6440389" ]
0.6482788
90
Setting the alias which you want let the CSpeed to load the class file automatically
function setAlias($aliasKey, $aliasFullPath) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function classAlias() {}", "public function alias( $class, $alias );", "function alias();", "public function using($alias);", "public function setAlias($alias);", "public function setAlias(string $alias);", "public function getAlias()\n {\n return 'import';\n }", "public function buildClassAliasMapFile() {}", "public function registerAliases() : void\n {\n // AliasLoader::getInstance()->alias('Module', \\Nwidart\\Modules\\Facades\\Module::class);\n }", "function alias($name = '')\n {\n }", "function getAlias();", "public function getAlias() : string;", "public function loadAliases() {\n\t\t $aliases = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n\n\t\t$aliases->alias('Purifier', 'Mews\\Purifier\\Facades\\Purifier::class');\n\t\t$aliases->alias(\"Twitter\", 'Thujohn\\Twitter\\Facades\\Twitter::class');\n\t\t$aliases->alias('DotenvEditor', 'Brotzka\\DotenvEditor\\DotenvEditorFacade');\n\n\n\t\t/*\n\t\t* Dev resources\n\t\t */\n\n\t\tif ($this->app->environment() !== \"production\") {\n\n\n\t\t}\n\n\n\t}", "function glu_class_autoloader($c) {\n include dirname(__FILE__). DIRECTORY_SEPARATOR . strtolower($c) . '.php';\n}", "public static function import($alias, $forceInclude = false, $ext = '.php') {\n if (isset(self::$_imports[$alias])) return self::$_imports[$alias];\n if(class_exists($alias,false) || interface_exists($alias,false))\n return self::$_imports[$alias] = $alias;\n\n\n if(($pos=strrpos($alias,'\\\\'))!==false) // a class name in PHP 5.3 namespace format\n {\n $alias = ltrim($alias,'\\\\');\n foreach (self::$_namespaces as $ns => $path) {\n if (strpos($alias, $ns .'\\\\') === 0) {\n if (file_exists($f = $path .DIRECTORY_SEPARATOR .str_replace('\\\\', DIRECTORY_SEPARATOR, $alias).'.php')) {\n require $f;\n return $alias;\n }\n }\n }\n\n $namespace=str_replace('\\\\','.',ltrim(substr($alias,0,$pos),'\\\\'));\n\n if(($path=self::getPathOfAlias($namespace))!==false)\n {\n $classFile=$path.DIRECTORY_SEPARATOR.substr($alias,$pos+1).$ext;\n if($forceInclude)\n {\n if(is_file($classFile))\n require($classFile);\n else\n throw new Exception(\"Loader: Alias \\\"{$alias}\\\" is invalid. Make sure it points to an existing PHP file and the file is readable.\");\n self::$_imports[$alias]=$alias;\n }\n else\n self::$classMap[$alias]=$classFile;\n return $alias;\n }\n else\n throw new Exception(\"Loader: Alias \\\"{$alias}\\\" is invalid. Make sure it points to an existing directory.\");\n }\n if(($pos=strrpos($alias,'.'))===false) // a simple class name\n {\n if($forceInclude && self::loadClass($alias))\n self::$_imports[$alias]=$alias;\n return $alias;\n }\n $className=(string)substr($alias,$pos+1);\n $isClass=$className!=='*';\n if($isClass && (class_exists($className,false) || interface_exists($className,false)))\n return self::$_imports[$alias]=$className;\n\n if(($path=self::getPathOfAlias($alias))!==false)\n {\n if($isClass)\n {\n if($forceInclude)\n {\n if(is_file($path.$ext))\n require($path.$ext);\n else\n throw new Exception(\"Loader: Alias \\\"{$alias}\\\" is invalid. Make sure it points to an existing PHP file and the file is readable.\");\n self::$_imports[$alias]=$className;\n }\n else\n self::$classMap[$className]=$path.$ext;\n return $className;\n }\n else // a directory\n {\n if(self::$_includePaths===null)\n {\n self::$_includePaths=array_unique(explode(PATH_SEPARATOR,get_include_path()));\n if(($pos=array_search('.',self::$_includePaths,true))!==false)\n unset(self::$_includePaths[$pos]);\n }\n array_unshift(self::$_includePaths,$path);\n if(self::$enableIncludePath && set_include_path('.'.PATH_SEPARATOR.implode(PATH_SEPARATOR,self::$_includePaths))===false)\n self::$enableIncludePath=false;\n return self::$_imports[$alias]=$path;\n }\n }\n else {\n throw new Exception(\"Loader: Alias \\\"{$alias}\\\" is invalid. Make sure it points to an existing directory or file.\");\n }\n }", "protected function setupClassAliases()\n {\n $aliases = [\n 'admin.router' => \\Encore\\Admin\\Routing\\Router::class,\n ];\n\n foreach ($aliases as $key => $alias) {\n $this->app->alias($key, $alias);\n }\n }", "protected function registerAliases()\n {\n $loader = AliasLoader::getInstance();\n foreach ($this->aliases as $alias => $class) {\n $loader->alias($alias, $class);\n }\n }", "function my_autoloader($class) {\r\n\t require_once ($class.'.php');\r\n\t}", "public function setAlias()\n\t{\n\t\tif(empty($this->alias)){\n $this->alias = Amputate::rus2route(Amputate::getLimb($this->title, 20, ''));\n }\t\n\t}", "public function registerAliases()\n\t{\n\n\t}", "public function getAlias(): string;", "function my_autoloader($class_name) \n\t{\n \tinclude '../classes/' . $class_name . '.class.php';\n\t}", "public function getAlias();", "public function getAlias();", "public function getAlias();", "public function getAlias();", "public function proxy( $class_name, $alias ) {\n\n\t\t$this->proxies[ $class_name ] = $alias;\n\t}", "protected function registerOptimusAsAlias(){\n\t\t$this->app->singleton(FakeIdEngine::class, function ($app){\n\t\t\treturn new FakeIdEngine(\n\t\t\t\t$app['config'][SELF::SHORT_NAME . '.prime'],\n\t\t\t\t$app['config'][SELF::SHORT_NAME . '.inverse'],\n\t\t\t\t$app['config'][SELF::SHORT_NAME . '.random']\n\t\t\t);\n\t\t});\n\t}", "function my_autoloader($class) {\n if ( $class != \"ACF\" )\n include 'classes/' . $class . '.class.php';\n }", "function class_autoloader($class) {\r\n require make_url(\"class/$class.php\");\r\n}", "function helper_autoloader($class)\n {\n\n }", "function medialib_autoloader($class_name)\n{\n $class_name = str_replace('\\\\', '/', $class_name) . '.php';\n require_once $class_name;\n}", "public function registerDefaultAliases()\n\t{\n\t\tparent::registerDefaultAliases();\n\t\t\\Yii::$aliases['@www'] = dirname($_SERVER['SCRIPT_FILENAME']);\n\t}", "public function namespaceAlias() {}", "public function setAlias($alias)\n {\n $this->alias = $alias;\n }", "public function getAlias($alias);", "function Syllable_autoloader($class) {\n\t\tif (!class_exists($class) && is_file(dirname(__FILE__). '/' . $class . '.php')) {\n\t\t\trequire dirname(__FILE__). '/' . $class . '.php';\n\t\t}\n\t}", "function my_autoloader($class) {\r\n require 'libs/' . $class . '.php';\r\n}", "static function addAlias()\n\t{\n\t\tPie_Config::set('pie', 'aliases', '', APP_WEB_DIR);\n\t}", "function googleMapsToolsAutoload($class) {\n $data = explode('\\\\', $class);\n if ($data[0] == 'GoogleMapsTools') {\n $file = implode('/', $data) . '.php';\n if (file_exists($file)) {\n require_once($file);\n }\n }\n}", "public static function alias(string $alias, string $class, string $name = '')\n {\n static::getContainer()->alias($alias, $class, $name);\n }", "function Load($alias, $attribs) {\n\t\t$CI =& get_instance();\n\t\tswitch ($attribs['type']) {\n\t\t\tcase 'model':\n\t\t\t\tif (!class_exists('CI_Model')) // First load of a model\n\t\t\t\t\tload_class('Model', 'core'); // This is useless but does bring in the CI_Model correctly - we still need to load the class\n\t\t\t\t$CI->$alias =& load_class(strtolower($alias), 'models', '');\n\t\t\t\tbreak;\n\t\t\tcase 'library':\n\t\t\t\t$CI->$alias =& load_class($alias, 'libraries');\n\t\t\t\tbreak;\n\t\t\tcase 'helper':\n\t\t\t\tload_class($alias, 'helper');\n\t\t\t\tbreak;\n\t\t\tcase 'spark':\n\t\t\t\t$CI->load->spark(\"$alias/{$attribs['version']}\");\n\t\t\t\tif (!class_exists($alias)) { // Sparks didn't load the requested module up from config/autoload\n\t\t\t\t\tswitch ($attribs['sub-type']) { // Special cases for Sparks which needs to load things using the standard loader\n\t\t\t\t\t\tcase 'model': // A sparks model\n\t\t\t\t\t\t\tif (!class_exists('CI_Model')) // First load of a model\n\t\t\t\t\t\t\t\tload_class('Model', 'core');\n\t\t\t\t\t\t\t$CI->load->model(strtolower($alias));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'library':\n\t\t\t\t\t\t\t$CI->load->library($alias);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'helper':\n\t\t\t\t\t\t\t$CI->load->helper($alias);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function getAlias()\n {\n return 'test';\n }", "function loadAkademiKuLib($class_name) \n{\n Mod::inc($class_name.\".lib\",'',__DIR__.\"/inc/lib/\");\n}", "public static function alias($name = 'path')\n {\n eval('namespace { function ' .$name. '($key = \"\", $filepath = \"\"){ return pathconfig\\PathConfig::instance()->get($key, $filepath); } }');\n }", "public function autoload($class) {\n if (isset(static::$map[$class])){\n $pathInfo = static::$map[$class];\n Yaf_Loader::import(sprintf('%s%s',$pathInfo[0], $pathInfo[1]));\n } else if (strpos($class, 'Builder') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/views/builder/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Pagelet') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/pagelets/%s.php', APPLICATION_PATH, $class));\n } else if (strpos($class, 'Halo') === 0){\n Yaf_Loader::import(sprintf('%s/halo/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Util') == strlen($class) - 4 || strpos($class, 'Utils') == strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/utils/%s.php',LIB_PATH,$class));\n } else if (strpos($class, 'Model') === strlen($class) - 5){\n Yaf_Loader::import(sprintf('%s/application/models/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'Service') === strlen($class) - 7){\n Yaf_Loader::import(sprintf('%s/application/service/%s.php',APPLICATION_PATH,$class));\n } else if (strpos($class, 'HTMLPurifier') !== false){\n Yaf_Loader::import(sprintf('%s/htmlpurifier/HTMLPurifier.safe-includes.php',LIB_PATH));\n }else if (strpos($class, 'Api') === strlen($class) - 3){\n Yaf_Loader::import(sprintf('%s/application/Api/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'Object') === strlen($class) - 6){\n Yaf_Loader::import(sprintf('%s/application/objects/%s.php',APPLICATION_PATH,$class));\n }else if (strpos($class, 'MemCache') === 0){\n// var_dump('================');\n// /Users/worker/php/wk/wcontact_cache/lib/wcontact/MemCacheBase.php\n Yaf_Loader::import(sprintf('%s/wzhaopin/%s.php',LIB_PATH, $class));\n }\n }", "public static function makeAlias($filepath, $originClassName, $aliasClassName) {\n\t\tif (!is_file($filepath)) return false;\n\t\t$code = file_get_contents($filepath);\n\t\t$code = str_replace('class ' . $originClassName, 'class ' . $aliasClassName, $code);\n\t\teval('?>'. $code);\n\t\treturn true;\n\t}", "public static function registerAlias(array $aliases)\n {\n foreach($aliases as $shortName=>$className) {\n class_alias($className, $shortName, false);\n }\n }", "public function __construct(string $alias)\n\t{\n\t\t$this->alias = $alias;\n\t}", "function MyAutoload($className){\n $className=str_replace(\"\\\\\",\"/\",$className);\n $className=str_replace(\"App/\",\"\",$className);\n $class=\"{$className}.php\";\n include_once($class);\n}", "function supernova_autoloader($className){\r\n\t\t$root_path = ROOT . DS;\r\n\t\t$app_path=$root_path.'application' . DS;\r\n\t\t$library_path=$root_path.'library' . DS . 'extensions' . DS;\r\n\t\t$str = $className;\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"_\" . strtolower($c[1]);');\r\n\t\t$strName = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$name = strtolower($strName);\r\n\t\t$file = $library_path.$name.'.class.php';\r\n\t\t$controllerFile = $app_path. 'controllers' . DS . $name . '.php';\r\n\t\t$modelFile = $app_path. 'models' . DS . $name . '.php';\r\n\t\t$appFile = $app_path.'app'.'.controller.php';\r\n\t\tif (file_exists($file)){\r\n\t\t\trequire_once($file);\r\n\t\t}else if (file_exists($controllerFile)){\r\n\t\t\trequire_once($controllerFile);\r\n\t\t}else if (file_exists($modelFile)){\r\n\t\t\trequire_once($modelFile);\r\n\t\t}else if (file_exists($appFile)){\r\n\t\t \trequire_once($appFile);\r\n\t\t}\r\n\t}", "function __autoload($class) {\r\n \r\n $class = strtolower($class);\r\n\r\n\t//if call from within assets adjust the path\r\n $classpath = 'classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t}\r\n\t\r\n\t//if call from within admin adjust the path\r\n $classpath = '../../classes/class.'.$class . '.php';\r\n if ( file_exists($classpath)) {\r\n require_once $classpath;\r\n\t} \t\t\r\n\t \r\n}", "function my_autoloader($class)\n{\n $filename = BASE_PATH . '/'. str_replace('\\\\', '/', $class) . '.php';\n include($filename);\n}", "public function getAlias()\n {\n return 'initialize';\n }", "public static function alias_core_classes()\n\t{\n\t\tforeach (self::$classes as $class) {\n\t\t\t$exploded = explode('\\\\', $class);\n\t\t\t$class = array_pop($exploded);\n\t\t\t$namespace = implode('\\\\', $exploded);\n\t\t\tself::alias_to_namespace($class, $namespace);\n\t\t}\n\t}", "public function getAlias()\n {\n return 'imagine';\n }", "public function getAlias()\n {\n return 'imagine';\n }", "function autoLoad($class){\r\n\r\n $class = str_replace(\"\\\\\",SEPARATOR,$class);\r\n include_once(BASEDIR. SEPARATOR. $class. \".class.php\");\r\n \r\n}", "function class_autoloader($class_name) {\n include 'classes/' .$class_name . '.php';\n}", "function yap_autoloader($class) {\n $directories = array(LIB_DIR, MODEL_DIR);\n\n foreach($directories as $directory) {\n if(!@include(\"$directory/$class.php\"))\n @include($directory.strtolower($class).\".php\");\n }\n}", "function autoload($name) {\n\trequire_once(ROOT.'inc/class.'.strtolower($name).'.php');\n}", "function __autoload($className){\n\t\t$path = str_replace('\\\\','/',$className).'.class.php';\n\t\tinclude 'libs/'.$path;\n\t}", "public function aliases();", "function __autoload($class_name) {\n include_once strtolower($class_name) . '.php';\n }", "public function useAlternativeName(): void\n {\n $this->useAlternateName = true;\n }", "public function setAlias(string $alias) {\n throw new Exception('Not implemented yet');\n }", "function _autoload($class)\r {\r $class = str_replace(\"\\\\\", \"/\", $class);\r $class = str_replace('yqn/sdkmiddle/', 'src/', $class);\r $file = __DIR__ . '/../' . $class . '.php';\r require_once $file;\r }", "function my_autoloader($class) {\n require_once './../../classes/' . $class . '.php';\n}", "function ntp_loader($class_name) {\n include(str_replace('\\\\', DIRECTORY_SEPARATOR, $class_name) . '.php');\n}", "function __autoload($class) {\n include './libs/class_'.$class.'.php';\n}", "function serviceAutoloader($class) {\r\n $class = strtolower($class);\r\n switch (substr($class, 0, 2)) {\r\n case 'm_' : {\r\n include_once APPLICATION_MODEL_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n case 'v_' : {\r\n include_once APPLICATION_VIEW_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n case 'c_' : {\r\n include_once APPLICATION_CONTROLLER_PATH . $class . \".class.php\";\r\n }\r\n break;\r\n default : {\r\n if (file_exists(APPLICATION_EXTENSION_PATH . $class . \"/\" . $class . \".class.php\")) {\r\n include_once (APPLICATION_EXTENSION_PATH . $class . \"/\" . $class . \".class.php\");\r\n }\r\n }\r\n break;\r\n }\r\n}", "function _getAlias($n) {\n}", "function myAutoLoader($class) {\n\t$path = TRITON_INSTALL_PATH . \"/src/{$class}/{$class}.php\";\n\tif(is_file($path)) {\n\t\tinclude($path);\n\t} else {\n\t\tthrow new Exception(\"Classfile '{$class} does not exist.\");\n\t}\n}", "function myAutoLoader($class) {\n\t$path = TRITON_INSTALL_PATH . \"/src/{$class}/{$class}.php\";\n\tif(is_file($path)) {\n\t\tinclude($path);\n\t} else {\n\t\tthrow new Exception(\"Classfile '{$class} does not exist.\");\n\t}\n}", "static function autoload($class){\n\n require BASEDIR.'\\\\'.str_replace('\\\\', '/', $class).'.php';\n\t}", "public static function alias($alias)\n { \n self::routeCompiler($alias, '/'.self::$raw_current_route, self::$current_param); \n self::$current_param['alias'] = $alias;\n self::$routes[self::$current_route] =self::$current_param; \n }", "function SuperheroServiceAutoload($class){\n require_once $class . '.php';\n}", "function __autoload($class_name) {include $class_name . '.php';}", "private function autoload($className)\r\n {\r\n }", "function my_autoloader($classname)\n{\n\tchdir('challenge/are_you_serial');\n\trequire_once './'.str_replace('.', '', $classname).'.php';\n\tchdir('../../');\n}", "abstract protected static function autoload($class);", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "function autoloader($classname){\n $lastSlash = strpos($classname, '\\\\') + 1;\n $classname = substr($classname, $lastSlash);\n $directory = str_replace('\\\\' , '/' , $classname);\n $filename = __DIR__ . '/' . $directory . '.php';\n\n require_once $filename;\n }", "function atkuse($type, $name)\n{\n\tinclude_once(atkgetinclude($type, $name));\n}", "function __autoload($className) {\n if (Inform8Context::getClassRegistry()->getClass($className) != NULL) { \n include Inform8Context::getClassRegistry()->getClass($className); \n }\n }", "public function hasAliased()\n {\n $this->assertTrue($this->app->isAlias(\"Bhekor\\LaravelFlutterwave\\Flutterwave\"));\n $this->assertEquals('laravelflutterwave', $this->app->getAlias(\"Bhekor\\LaravelFlutterwave\\Flutterwave\"));\n }", "public static function getAlias(): string\n {\n return static::$alias;\n }", "function __autoload ( $class_name )\n {\n include '../' . $class_name . '.php';\n }", "function smarty_class_autoload($class_name)\n{\n\t$class_name = strtolower($class_name);\n\t\n\tif ($class_name == 'smarty' OR $class_name == 'smartybc')\n\t{\n\t\t$dir = Kohana::$config->load('smarty.smarty_dir');\n\t\t\n\t\t$file = ($class_name == 'smarty') ? 'Smarty' : 'SmartyBC';\n\t\t\n\t\tinclude_once Kohana::find_file($dir, $file.'.class');\n\t\t\n\t\t// We do not need this anymore\n\t\tspl_autoload_unregister('smarty_class_autoload');\n\t}\n}", "function autoloader($className)\n{\n include_once str_replace(\"\\\\\",\"/\",$className).'.php';\n}", "public function loadClassWithAlias($className)\n {\n $originalClassName = $this->getOriginalClassName($className);\n\n return $originalClassName\n ? $this->loadOriginalClassAndSetAliases($originalClassName)\n : $this->loadClass($className);\n }", "function wp_simplepie_autoload($class)\n {\n }", "function __autoload($class_name) {\r\n include '../class/' . $class_name . '.php';\r\n}", "function __autoload($class_name)\n{\t\n require_once Conf::$DIRS['LIBS'].'class/'.$class_name.'.class.php';\t\n}", "function __autoload($name){\n require_once './class/' . $name . \".class.php\";\n}", "static function alias(string $class, array $config = null)\n {\n return new self('alias', $class, $config);\n }", "private function getAlias()\n {\n $stub = '';\n $prefix = '';\n\n if ($this->extractForce) {\n $prefix = '$dir/';\n }\n\n if ($this->web) {\n $stub .= 'Phar::webPhar(' . $this->arg($this->alias);\n\n if ($this->index) {\n $stub .= ', ' . $this->arg($prefix . $this->index, '\"');\n\n if ($this->notFound) {\n $stub .= ', ' . $this->arg($prefix . $this->notFound, '\"');\n\n if ($this->mimetypes) {\n $stub .= ', ' . var_export(\n $this->mimetypes,\n true\n );\n\n if ($this->rewrite) {\n $stub .= ', ' . $this->arg($this->rewrite);\n }\n }\n }\n }\n\n $stub .= ');';\n } else {\n $stub .= 'Phar::mapPhar(' . $this->arg($this->alias) . ');';\n }\n\n return $stub;\n }", "function autoload($name) {\r\n require strtolower($name) . '.php';\r\n}", "function set_aliases($ary){\n \t$this->ary_alias = $ary;\n \t\tif($this->bolDebug == 1){echo \"FUNCTION set_aliases()<br>&nbsp; &nbsp; \\$this->ary_aliases=\"; print_r($this->ary_alias); echo $this->strDebugNewLine;}\n }", "static function autoload($class){\n require 'sources/dao/' . $class . '.class.php';\n require 'sources/dao/' . $class . '.model.class.php';\n require 'sources/controller/' . $class . '.controller.class.php';\n require 'sources/template/' . $class . '.template.php';\n }" ]
[ "0.7188206", "0.6968787", "0.66238093", "0.6570893", "0.64654356", "0.6434902", "0.6394989", "0.6382437", "0.63796896", "0.63678664", "0.62667835", "0.61643785", "0.61308163", "0.61300904", "0.61241716", "0.61151403", "0.61131465", "0.60710233", "0.60516363", "0.6046759", "0.60408837", "0.5996558", "0.59840447", "0.59840447", "0.59840447", "0.59840447", "0.5949234", "0.5936243", "0.59298635", "0.58973837", "0.5893745", "0.58632934", "0.58589846", "0.58566064", "0.58331805", "0.58325976", "0.5831294", "0.5816893", "0.58000267", "0.5743405", "0.5729486", "0.57234836", "0.57188976", "0.57101464", "0.56913835", "0.5691092", "0.5666575", "0.56542814", "0.5653708", "0.564043", "0.5639433", "0.5630553", "0.5613962", "0.5613725", "0.56012696", "0.5596123", "0.5596123", "0.55951995", "0.55898714", "0.55750763", "0.55681646", "0.55680627", "0.556753", "0.5549068", "0.553481", "0.5526189", "0.55225605", "0.5518157", "0.5505323", "0.550147", "0.5501389", "0.5498474", "0.5495174", "0.5495174", "0.54931086", "0.54856503", "0.5471739", "0.5468384", "0.5462663", "0.54484123", "0.5445648", "0.54436207", "0.54411143", "0.5436362", "0.5435096", "0.5426256", "0.5423965", "0.5420871", "0.5419212", "0.5417612", "0.5384699", "0.5377702", "0.537306", "0.5371744", "0.53693104", "0.5367726", "0.53652465", "0.536217", "0.53583455", "0.53559" ]
0.550313
69
Run the WEB MVC process
function run() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run(){\n $this->session->start();\n $this->request->prepareUrl();\n $this->file->require('App/index.php');\n list($controller,$method,$arguments) = $this->route->getProperRoute();\n }", "public function run()\r\n\t{\r\n\t\t$this->loadModule();\r\n\t\r\n\t\t$this->loadController();\r\n\t\r\n\t\t// this can be overwritten by user in controller\r\n\t\t$this->loadDefaultView();\r\n\t}", "public function execute()\n\t{\t\n\t\t$this->controller = new Controller($this->path);\n\t\t$this->static_server = new StaticServer($this->path);\n\t\t\n\t\tCurrent::$plugins->hook('prePathParse', $this->controller, $this->static_server);\n\t\t\n\t\tif ( $this->static_server->isFile() )\n\t\t{\n\t\t\tCurrent::$plugins->hook('preStaticServe', $this->static_server);\n\t\t\t\n\t\t\t// Output the file\n\t\t\t$this->static_server->render();\n\t\t\t\n\t\t\tCurrent::$plugins->hook('postStaticServe', $this->static_server);\n\t\t\t\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Parse arguments from path and call appropriate command\n\t\tCowl::timer('cowl parse');\n\t\t$request = $this->controller->parse();\n\t\tCowl::timerEnd('cowl parse');\n\t\n\t\tif ( COWL_CLI )\n\t\t{\n\t\t\t$this->fixRequestForCLI($request);\n\t\t}\n\t\t\n\t\t$command = new $request->argv[0];\n\t\t\n\t\t// Set template directory, which is the command directory mirrored\n\t\t$command->setTemplateDir(Current::$config->get('paths.view') . $request->app_directory);\n\t\t\n\t\tCurrent::$plugins->hook('postPathParse', $request);\n\t\t\n\t\tCowl::timer('cowl command run');\n\t\t$ret = $command->run($request);\n\t\tCowl::timerEnd('cowl command run');\n\t\t\n\t\tCurrent::$plugins->hook('postRun');\n\t\t\n\t\tif ( is_string($ret) )\n\t\t{\n\t\t\tCowl::redirect($ret);\n\t\t}\n\t}", "public final function run()\n\t{\n\t\t$controllerClass = ucfirst(App::request()->getControllerName());\n\t\t$actionName = App::request()->getActionName().Request::ACTION_SUFFIX;\n\n\t\t$this->_execute($controllerClass, $actionName);\n\t}", "public static function run()\n {\n static::$app->run();\n }", "public function run(): void\n {\n // missing routing\n // missing proper controller/model system\n // missing middleware framework\n // hacks incoming :)\n\n self::$config['httpMethod'] = $_SERVER['REQUEST_METHOD'];\n self::$config['uri'] = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n echo $this->handleRequest(self::$config['uri'] === '/' ? '/site/index' : self::$config['uri']);\n }", "public static function run() {\n if(self::$_init) {\n $route = static::requestRoute();\n if($route && $controller = static::createController($route['controller'])) {\n /** session started */\n App::sessionStart();\n /** running application */\n try {\n /* @var Controller $controller */\n $controller->run($route['action']);\n } catch (\\Exception $e) {\n static::error500('', \"Exception: [{$e->getMessage()}] in {$e->getFile()} at #{$e->getLine()}.\");\n }\n /** on success */\n static::end();\n } else {\n static::error404('Requested invalid resource.');\n }\n } else {\n static::error500('Application was not set up.');\n }\n }", "protected static function runController()\n {\n $msg = new MoovicoRequestMessage(self::$route);\n self::$response = self::doRunController($msg);\n }", "public function run() {\r\n\t\tYii::app()->clientScript->registerCoreScript(\"jquery\");\r\n\t\tYii::app()->clientScript->registerCoreScript(\"jquery.ui\");\r\n\t\tif (YII_DEBUG) {\r\n\t\t\t$files = $this->listFiles();\r\n\t\t\t$time = $_SERVER['REQUEST_TIME'];\r\n\t\t\tforeach ($files as $filename => $url) {\r\n\t\t\t\tYii::app()->clientscript->registerScriptFile($url.\"?v=\".$time,CClientScript::POS_END); \r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tYii::app()->clientScript->registerScriptFile($this->applicationUrl.\"/compiled.js\",CClientScript::POS_END);\r\n\t\t}\r\n\t\r\n\t\t$script = \"Yii.createApplication('Application',appConfig);\";\r\n\t\t$script .= \"Yii.app().getRequest()._csrfToken = '\". Yii::app()->request->csrfToken . \"';\\n\";\r\n\t\t$script .= \"Yii.app().run()\";\r\n\t\tYii::app()->clientScript->registerScript(\"YiiJS:run()\",$script,CClientScript::POS_END);\r\n\t\t\r\n\t\t\r\n\t}", "public function run()\n\t{\n\n\t\t//excute request routing\n\t\t$this->request = new Request($this);\n\n\t\t$module = $this->load_module();\n\n\t\tif ($module !== false) {\n\n\t\t\t$className = $this->load_controller($module);\n\n\t\t\tif ($className !== false) {\n\n\t\t\t\t$controller = new $className();\n\t\t\t\t$response = $this->call_function($controller);\n\t\t\t\tif (is_array($response)) {\n\t\t\t\t\tResponse::show($response);\n\t\t\t\t} else {\n\t\t\t\t\tResponse::show(array(\n\t\t\t\t\t\t\t$response\n\t\t\t\t\t\t));\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tResponse::show(array(\n\t\t\t\t\t\t'status'\t=> false,\n\t\t\t\t\t\t'message'\t=> 'Application controller required.'\n\t\t\t\t\t), 404);\n\t\t\t}\n\n\t\t} else {\n\t\t\tResponse::show(array(\n\t\t\t\t\t'status'\t=> false,\n\t\t\t\t\t'message'\t=> 'Application module required.'\n\t\t\t\t), 404);\n\t\t}\n\n\t}", "public function run(){\n $this->app->run();\n }", "public function launch()\r\n {\r\n // Extract data to be usable inside the view file\r\n extract($this->data);\r\n\r\n // Expected view file format is\r\n // viewfolder.viewfile\r\n $view_file = str_replace(\".\", \"/\", $this->view_file);\r\n\r\n // Require view\r\n require path('app').'/views/'.$view_file.'.php';\r\n }", "public function run()\n {\n $this->run_configuration();\n\n $this->request->plugins = $this->pluggins;\n\n $app = $this;\n\n $this->router->start($app);\n }", "public function run()\r\n\t{\r\n\t\t// function http_build_query ($query_data, $numeric_prefix = null, $arg_separator = null, $enc_type = PHP_QUERY_RFC1738);\r\n\t\t/**\r\n\t\t * @link http://php.net/manual/en/function.http-build-query.php\r\n\t\t */\r\n\t\t$url = '/' . ((isset($_GET['param'])) ? $_GET['param'] : '');\r\n\t\t$params = array();\r\n\r\n\t\tif (!empty($url) && $url != '/') {\r\n\r\n\t\t\t$url = explode('/', $url);\r\n\t\t\tarray_shift($url);\r\n\r\n\t\t\t$currentController = $url[0] . 'Controller';\r\n\t\t\tarray_shift($url);\r\n\r\n\t\t\tif (isset($url[0])) {\r\n\t\t\t\t$currentAction = $url[0];\r\n\t\t\t\tarray_shift($url);\r\n\t\t\t} else {\r\n\t\t\t\t$currentAction = 'index';\r\n\t\t\t}\r\n\r\n\t\t\tif (count($url) > 0) {\r\n\t\t\t\t$params = $url;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (empty($url) || $url == '/') {\r\n\t\t\t$currentController = 'homeController';\r\n\t\t\t$currentAction = 'index';\r\n\t\t}\r\n\r\n\t\trequire_once __DIR__ . 'core/Controller.php';\r\n\r\n\t\t$instanceController = new $currentController();\r\n\r\n\t\t$arrayControllerAndAction = array($instanceController, $currentAction);\r\n\r\n\t\tcall_user_func_array($arrayControllerAndAction, $params);\r\n\t}", "public function run()\n {\n $routeInfo = $this->foundRoute();\n\n if (isset($routeInfo['middleware'])) {\n $middleware = $this->gatherMiddlewareClassNames($routeInfo['middleware']);\n $this->runMiddleware($middleware);\n }\n $response = $this->callControllerAction($routeInfo);\n\n $this->sendRequest($this->response ?: $response);\n\n }", "public function run($args) {\n Env::instance()->setStage(getenv($this->getAppName()));\n \n // $args = $this->getArgs();\n // execute action on controller\n $dispatcher = new Dispatcher();\n \n\n $this->preRun();\n $viewVals = $dispatcher->dispatch($args);\n $this->postRun();\n \n $viewPath = $dispatcher->getViewPath();\n require_once($viewPath);\n }", "public function run(){\n\n try{\n //get the resource form route service\n $resource = $this->app['route']->match($_SERVER, $_POST); \n\n if(is_array($resource)){\n if(isset($resource['handler']))\n call_user_func_array($resource['handler'], [$resource['args'], $this->app]);\n else\n $this->controllerDispatcher($resource);\n }\n else\n throw new \\Exception(\"route not match\"); \n }\n catch(\\Exception $e){\n if($this->app->environment('PRODUCTION'))\n $this->app['view']->view('error',['message'=>$e->getMessage()]);\n else\n throw $e;\n }\n }", "function Execute()\n\t\t{\n\t\t\t$controller = new $this->CONTROLLER();\n\t\t\t$controller->Initialise($this->get, $this->post, $this->files);\n\t\t\t$controller->StartFilters();\n\t\t\t$controller->{$this->ACTION}();\n\t\t\t$controller->StopFilters();\n\t\t}", "public function run()\n {\n if ($this->match()) {\n $path = 'AlDente\\controllers\\\\' . ucfirst($this->params['controller']) . 'Controller';\n if (class_exists($path)) {\n $action = $this->params['action'] . 'Action';\n if (method_exists($path, $action)) {\n $controller = new $path($this->params);\n $controller->$action();\n } else {\n View::errorCode(404);\n }\n } else {\n View::errorCode(404);\n }\n } else {\n View::errorCode(404);\n }\n }", "private function launcher() {\n \n $controller = $this->controller;\n $task = $this->task;\n \n if (!isset($controller)) {\n $controller = 'IndexController';\n }\n else {\n $controller = ucfirst($controller).'Controller';\n }\n \n if (!isset($task)) {\n $task = 'index';\n }\n \n $c = new $controller();\n \n call_user_func(array($c, $task));\n \n Quantum\\Output::setMainView($this->controller, $task);\n \n\n }", "public function run()\n \t{\n \t\t$controller = $this->factoryController();\n\n \t\t$action = $this->_currentAction;\n\n \t\t$controller->$action();\n \t}", "public function run()\n {\n if (isset($_SERVER[\"PATH_INFO\"]))\n {\n $requestPath = $_SERVER[\"PATH_INFO\"];\n }\n else\n {\n $requestPath =\"/\";\n }\n\n $router = Router::getInstance();\n $requestRoute = $router->getRoute($requestPath);\n\n $controllerName=$requestRoute[\"controller\"].\"Controller\";\n $controller = new $controllerName();\n $methodName=$requestRoute[\"method\"].\"Action\";\n\n if (method_exists($controller, $methodName))\n {\n $this->viewData = array_merge($this->viewData, (array)$controller->$methodName());\n $this->renderResponse();\n }\n else\n {\n throw new ErrorException(\"methode \\\" $methodName\\\" inconnue dans \\\" $controllerName\\\"\") ;\n }\n\n\n }", "public function run()\n { \n $output = (string) $this->get('router')->dispatch();\n $response = $this->get('response');\n $response->setBody($output);\n $response->send();\n\n }", "public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}", "public function run()\n {\n\t\t// Check for request forgeries.\n\t\tJSession::checkToken() or die(JText::_('JINVALID_TOKEN'));\n\n\t\t// Get items to remove from the request.\n\t\t$cid = $this->input->get('cid', array(), 'array');\n\n\t\t// Initialise variables.\n\t\t$values\t= array('runall' => 1, 'run' => 0);\n\t\t$task\t= $this->getTask();\n\t\t$value\t= JArrayHelper::getValue($values, $task, 0, 'int');\n \n // If we want to process everything, then reset the $cid array.\n if ($value)\n {\n $cid = array();\n }\n\n\t\t// Get the document object.\n\t\t$document\t= JFactory::getDocument();\n\t\t$vName\t\t= 'processes';\n\t\t$vFormat\t= 'html';\n\n\t\t// Get and render the view.\n\t\tif ($view = $this->getView($vName, $vFormat))\n\t\t{\n\t\t\t// Get the model for the view.\n\t\t\t$model = $this->getModel($vName);\n\n\t\t\t// Push the model into the view (as default).\n\t\t\t$view->setModel($model, true);\n\n\t\t\t// Push document object into the view.\n\t\t\t$view->document = $document;\n\n\t\t\t$view->run($cid);\n\t\t}\n }", "public function run()\n {\n $routes = new Routes($this->router);\n $routes->start();\n $this->router->start();\n }", "public function run()\n {\n $route = $this->route->mapRoute();\n\n $className = $this->controllerNamespace.$route[0];\n\n $action = $route[1];\n\n $controller = call_user_func([$className, 'getInstance']);\n\n $controller->$action();\n }", "public function run() \n\t{\n\t\tcall_user_func_array(array(new $this->controller, $this->action), $this->params);\t\t\n\t}", "public function run()\n {\n\n // Base path of the API requests\n $basePath = trim($this->settings['application.path']);\n if( $basePath != '/' ){\n $basePath = '/'.trim($basePath, '/').'/';\n }\n\n // Setup dynamic routing\n $this->map($basePath.':args+', array($this, 'dispatch'))->via('GET', 'POST', 'HEAD', 'PUT', 'DELETE', 'OPTIONS');\n\n //Invoke middleware and application stack\n $this->middleware[0]->call();\n\n //Fetch status, header, and body\n list($status, $header, $body) = $this->response->finalize();\n\n //Send headers\n if (headers_sent() === false) {\n\n //Send status\n header(sprintf('HTTP/%s %s', $this->config('http.version'), \\Slim\\Http\\Response::getMessageForCode($status)));\n\n //Send headers\n foreach ($header as $name => $value) {\n $hValues = explode(\"\\n\", $value);\n foreach ($hValues as $hVal) {\n header(\"$name: $hVal\", true);\n }\n }\n }\n\n // Send body\n echo $body;\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function run()\n {\n $seed = new MyController();\n $seed->get();\n // $this->call(UsersTableSeeder::class);\n }", "public function run() {\n\n\t\t// Add the admin page.\n\t\t$admin_page = new AdminPage();\n\t\t$admin_page->init();\n\n\t\t// Log frontend visits.\n\t\t$log = new Log();\n\t\t$log->run();\n\n\t\t$cloverly = new PaymentAPICloverly();\n\t\t$cloverly->init();\n\t}", "public function main()\n {\n $di = $this->getDI();\n\n if (self::$isCli) {\n global $argv;\n\n $arguments = array();\n foreach ($argv as $k => $arg) {\n if ($k == 1) {\n $arguments['task'] = $arg;\n } elseif ($k == 2) {\n $arguments['action'] = $arg;\n } elseif ($k >= 3) {\n $arguments['params'][] = $arg;\n }\n }\n\n // define global constants for the current task and action\n define('CURRENT_TASK', (isset($argv[1]) ? $argv[1] : null));\n define('CURRENT_ACTION', (isset($argv[2]) ? $argv[2] : null));\n\n $this->console->handle($arguments);\n\n } else {\n // Get the 'router' service\n $this->router->handle();\n\n\n // Pass the processed router parameters to the dispatcher\n $this->dispatcher->setNamespaceName($this->router->getNamespaceName());\n $this->dispatcher->setControllerName($this->router->getControllerName());\n $this->dispatcher->setActionName($this->router->getActionName());\n $this->dispatcher->setParams($this->router->getParams());\n\n // Dispatch the request\n $controller = $this->dispatcher->dispatch();\n\n // Find the name space added directory\n $namespaceExtension = explode('Controllers\\\\', $this->router->getNamespaceName());\n $namespaceDirectory = strtolower($namespaceExtension[count($namespaceExtension)-1]);\n\n if ($namespaceDirectory != '') {\n $namespaceDirectory .= '/';\n }\n\n // Start the view\n $view = $controller->view;\n $view->start();\n\n // Render the related views\n $view->render(\n $namespaceDirectory.$this->dispatcher->getControllerName(),\n $this->dispatcher->getActionName(),\n $this->dispatcher->getParams()\n );\n\n // Finish the view\n $view->finish();\n\n $response = $controller->response;\n\n // Pass the output of the view to the response\n $response->setContent($view->getContent());\n\n // Send the request headers\n $response->sendHeaders();\n\n // Print the response\n echo $response->getContent();\n\n }\n\n exit;\n\n\n }", "public function run()\n {\n //\n $adminUser = new AdminUser();\n $adminUser->fill([\n 'avatar' => '/uploads/avatar/admin.jpg',\n 'nickname' => '超级管理员',\n 'account' => 'admin',\n 'password' => '123456',\n ]);\n $adminUser->save();\n\n $adminRole = new AdminRole();\n $adminRole->fill([\n 'name' => '超级管理员',\n 'description' => '系统最高权限',\n ]);\n\n $adminUser->roles()->save($adminRole);\n\n $routes = (new Collection(app()->routes->getRoutes()))\n ->filter(function ($route) {\n $actions = $route->getAction();\n return isset($actions['as']) && $actions['as'] === 'rbac';\n })\n ->map(function ($route) {\n return $route->uri;\n });\n $adminPerm = new AdminPermission();\n $adminPerm->fill([\n 'name' => '所有权限',\n 'routes' => $routes,\n ]);\n\n $adminRole->permissions()->save($adminPerm);\n }", "public static function run()\n {\n $self = self::getInstance();\n \n // Register autoloader\n $autoloader = new Autoloader(null, $self->basePath);\n $autoloader->register();\n \n $controller = $self->getControllerToRun();\n $method = $self->getMethodToRun($controller);\n \n // First run optional functions\n if (method_exists($controller, 'beforeRun'))\n $controller->beforeRun();\n \n if (method_exists($controller, 'beforeMethodRun'))\n $controller->beforeMethodRun();\n \n // If response was set in \"before\" functions, output it instead of method return value\n if (! $controller->getResponse()->isEmpty()) {\n return $self->outputContent($controller->getResponse());\n }\n \n $self->normalizeMethodArguments($controller, $method);\n // Get content\n $content = call_user_func_array(array($controller,$method), $self->methodArguments);\n \n // After running optional functions\n if (method_exists($controller, 'afterRun'))\n $controller->afterRun();\n \n $self->outputContent($content);\n }", "public function execute()\n {\n $controllerClassName = $this->requestUrl->getControllerClassName();\n $controllerFileName = $this->requestUrl->getControllerFileName();\n $actionMethodName = $this->requestUrl->getActionMethodName();\n $params = $this->requestUrl->getParams();\n \n if ( ! file_exists($controllerFileName))\n {\n exit('controlador no existe');\n }\n\n require $controllerFileName;\n\n $controller = new $controllerClassName();\n\n $response = call_user_func_array([$controller, $actionMethodName], $params);\n \n $this->executeResponse($response);\n }", "public function run()\n {\n\n if (isset($this->request[\"p\"])) {\n switch ($this->request[\"p\"]) {\n\n case \"new_task\":\n case \"tasks\":\n $taskController = new TasksController();\n $taskController->run();\n $this->content = $taskController->getTaskById();\n break;\n\n case \"login\":\n\n $login = new Login();\n $login->validateInput($this->request);\n\n break;\n\n case \"logout\":\n Login::logout();\n break;\n\n case \"register\":\n if (isset($this->request[\"register\"][\"submit\"])) {\n $input = new Input();\n $user = $input->validateRegister($this->request[\"register\"]);\n $reg = new Register();\n if ($user !== false) {\n $reg->saveRegistration($user);\n }\n }\n\n break;\n\n case \"user-admin\":\n if (isset($_SESSION[\"active_user\"]) && $_SESSION[\"active_user\"]->getRole() == __ADMIN__) {\n try {\n (new UserController())->run();\n } catch (\\Exception $e) {\n Notice::set(\"error\", $e->getMessage());\n }\n } else {\n header(\"Location: ?p=home\");\n exit();\n }\n break;\n\n case \"news\":\n case \"news-admin\":\n if (isset($_SESSION[\"active_user\"]) && $_SESSION[\"active_user\"]->getRole() == __ADMIN__) {\n try {\n $news = new NewsController();\n $news->run();\n\n $this->content = $news->getUploadedImages();\n } catch (\\Exception $e) {\n Notice::set(\"error\", $e->getMessage());\n }\n } else {\n header(\"Location: ?p=home\");\n exit();\n }\n break;\n\n case \"contact\":\n $input = new Input();\n if (isset($this->request[\"contact\"][\"submit\"])) {\n $input->validateContact($this->request[\"contact\"]);\n }\n break;\n\n }\n }\n }", "public function run()\n {\n /*Add ru language supporting*/\n Language::create(['name' => Config::get('app.locale'), 'code' => Config::get('app.locale')]);\n\n /*Home page*/\n Page::create(['url' => '/', 'menu_id' => 1])\n ->translate()\n ->create(['name' => 'Главная страница', 'language_id' => 1]);\n /*Contacts*/\n Page::create(['url' => 'contacts', 'module' => 'feedback', 'menu_id' => 1])\n ->translate()\n ->create(['name' => 'Контакты', 'language_id' => 1]);\n /*Sitemap*/\n Page::create(['url' => 'sitemap', 'module' => 'sitemap', 'menu_id' => 1])\n ->translate()\n ->create(['name' => 'Карта сайта', 'language_id' => 1]);\n }", "public function execute()\n {\n //echo __('Hello Webkul Team.');\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }", "protected function _run()\n\t{\n\t\t$this->_oBootstrap->beforeRoute(self::$_oInstance, $this->_oDispatcher);\n\t\t//Begin Route\n\t\tRouter::BeginRoute($this->_oRequest);\n\t\t//After Route\n\t\t$this->_oBootstrap->afterRoute(self::$_oInstance, $this->_oDispatcher);\n\n\t\t//Dispatcher Initialize\n\t\t$this->_oDispatcher = Dispatcher::GetInstance();\n\n\n\t\t//Prepare to Begin Dispatch\n\t\t$this->_oBootstrap->beforeDispatch(self::$_oInstance, $this->_oDispatcher);\n\t\t//Dispatch\n\t\t$this->_oDispatcher->dispatch();\n\t\t//After Dispatch\n\t\t$this->_oBootstrap->afterDispatch(self::$_oInstance, $this->_oDispatcher);\n\n\t\t//Output Result\n\t\t$this->_oDispatcher->outputResult();\n\t}", "public function run() {\n //fire off any events that are a associated with this event\n $event = new Event(KernelEvents::REQUEST_START);\n\n $this->container->get('EventDispatcher')->dispatch('all', KernelEvents::REQUEST_START, $event);\n\n $this->container->get('EventDispatcher')->dispatch($this->httpRequest->getRequestParams()->getYmlKey(), KernelEvents::REQUEST_START, $event);\n\n //initialize the MVC\n $nodeConfig = $this->httpRequest->getNodeConfig();\n \n $cmd = $this->getKernelRunner();\n\n\n $result = $cmd->execute($nodeConfig);\n\n $this->httpResponse->setAttribute('result', $result['data']);\n\n //file_put_contents('/var/www/glenmeikle.com/logs/db-debug.log', print_r($this->httpRequest, true), FILE_APPEND);\n // echo \"node filters\\r\\n\";\n runFilters($this->httpRequest->getSiteParams()->getSitePath(). DIRECTORY_SEPARATOR . $this->httpRequest->getNodeConfig()['componentPath'] . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'filters.yml', $this->httpRequest->getRequestParams()->getYmlKey(),FilterEvents::FILTER_REQUEST_FORWARD);\n // echo \"all filters\\r\\n\";\n runFilters($this->httpRequest->getSiteParams()->getConfigPath() . 'filters.yml', 'all',FilterEvents::FILTER_REQUEST_FORWARD);\n\n \n $event = new Event(KernelEvents::RESPONSE_END, $result);\n $this->container->get('EventDispatcher')->dispatch('all', KernelEvents::RESPONSE_END, $event);\n $this->container->get('EventDispatcher')->dispatch($this->httpRequest->getRequestParams()->getYmlKey(), KernelEvents::RESPONSE_END, $event);\n\n /**\n * now we dump the response to the page\n */\n renderResult($result, $this->httpResponse->getHeaders(), $this->httpResponse->getCookies());\n }", "function run() {\n $this->model->run();\n }", "public function run()\r\n {\r\n $this->slim->run();\r\n }", "function run() {\n global $url;\n session_start();\n\n if (class_exists('AppHelper')) {\n $url = AppHelper::validate_and_authorize($url);\n } else {\n error_log ('this app has no AppHandler defined, hence no secutiy ');\n }\n\n # Parse our 3 part URL\n # Format: controller[/action[.type][/query_string]] \n # Example: login/get/3\n # Example: login/listall.json\n list($controller, $action, $content_type, $query_string) = parse_rest_url($url);\n\n $controller = ucwords($controller).'Controller';\n $dispatch = new $controller($action, $content_type);\n\n if ((int)method_exists($controller, $action)) {\n call_user_func_array(array($dispatch,$action),array($query_string));\n } else {\n AppHelper::not_found($dispatch, $url); \n }\n}", "public function run(){\t\t\n\t\t/* this startup function for any controller */\n\t\t\n\t\t//$data = $this->db->DB_Fetch_Grid(\"users\");\n\t\t//return $this->json($data);\n\n\t\treturn $this->json([\"test\"=>\"done\",\"response\"=>2244234,\"route\"=>\"users\"]);\n\t\n\t}", "public function execute() {\n\n $this->parseRequestHeaders();\n\n $uri = $this->loadUrl(); // Loads the called URL\n String::arrayTrimNumericIndexed($uri); // Trim the URL array indexes\n\n /**\n * When server is running as a RESTful server\n */\n if (RESTFUL == '1') {\n RestServer::runRestMethod($uri);\n $this->terminate();\n }\n\n /**\n * When the request is not running over ajax,\n * then call the home for full page rendering\n * before calling the requested method\n */\n if (!$this->isAjax()) {\n\n $this->controller = $this->requireHome();\n $this->controller->itStarts($uri);\n $this->terminate();\n }\n\n /**\n * Normal Ajax Request, call the method only\n */\n $this->runMethod($uri);\n $this->terminate();\n }", "public function run()\n {\n call_user_func_array(array(new $this->controller, $this->action), $this->params);\n }", "public function run ()\n\t\t{\n\t\t\t$uri = $this->getURI ();\n\t\t\t\n\t\t\tforeach ($this->routes as $uriPattern => $path) \n\t\t\t{\n\n\t\t\t\tif ( preg_match ( \"~$uriPattern~\", $uri) )\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$internalRoute = preg_replace(\"~$uriPattern~\", $path, $uri);\n\n\t\t\t\t\t//Определяем контроллер, action(действие), параметры\n\t\t\t\t\t$segments = explode ( '/', $internalRoute );\n\n\t\t\t\t\t$controllerName = array_shift ( $segments ) . 'Controller';\n\t\t\t\t\t$controllerName = ucfirst ( $controllerName );\n\n\t\t\t\t\t$actionName = 'action' . ucfirst ( array_shift ( $segments ) );\n\n\t\t\t\t\t$parameters = $segments;\n\t\t\t\t\t\n\n\t\t\t\t\t$controllerFile = ROOT . '/controllers/' . \n\t\t\t\t\t\t$controllerName . '.php';\n\n\t\t\t\t\t\n\t\t\t\t\tif ( file_exists ( $controllerFile ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once ( $controllerFile );\n\t\t\t\t\t}\n\n\t\t\t\t\t//Create new obj, that is call need method (that is action)\n\n\t\t\t\t\t$controllerObject = new $controllerName;\n\n\t\t\t\t\t// echo $controllerName.\" \".$actionName;\n\t\t\t\t\t/**\n\t\t\t\t\t * Calling need method ($actionName) a certain class ($contollerObject)\n\t\t\t\t\t * with given ($paramets) параметрами\n\t\t\t\t\t */\n\t\t\t\t\tif(method_exists($controllerObject, $actionName)) {\n\t\t\t\t\t\t$result = call_user_func_array (\n\t\t\t\t\t\t\t array ( $controllerObject, $actionName ), \n\t\t\t\t\t\t\t $parameters \n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\trequire_once ROOT . '/views/error/error404.html';\n\t\t\t\t\t}\t\n\t\t\t\n\n\t\t\t\t\t//if method of controller is successeful, finish working router\n\t\t\t\t\tif ( $result != null )\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t} \n\n\t\t\t}\n\n\t\t}", "public function run()\n\t{\n\t\t$_controller = $this->getController();\n\t\t\n\t\tif ( ! ( $_controller instanceof IXLRest ) )\n\t\t{\n\t\t\t$_controller->missingAction( $this->getId() );\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\tCall the controllers dispatch method...\n\t\t$_controller->dispatchRequest( $this );\n\t}", "public function run()\n {\n $parameters = array();\n if(isset($_GET['page']))\n {\n $url = htmlentities(addslashes($_GET['page']));\n }\n // -- cai nessa condicao se tiver alguma info na url dps do dominio --\n if(!empty($url))\n {\n $url = explode('/', $url); //Delimita e separa os parametros\n $controller = $url[0].'Controller';\n array_shift($url); //Salvou o valor da posicao 0 e agr reordena como 0 e 1 dnv o que restou, tirando posicao 2\n \n if(isset($url[0]) && !empty($url[0])) //condicao se tiver metodo na url\n { \n $metodo = $url[0];\n array_shift($url);//reordena de novo\n } else //sem metodo na url, apenas a classe\n { \n $metodo = 'index';\n }\n //agora verifica se tem parametros, se tem mais alguma coisa sobrando no array/url\n /*if(count($url) > 0)\n {\n $parametros = $url\n }*/\n } else //cai aqui se nao tem informacao nenhuma na url, só o dominio\n { \n $controller = 'homeController';\n $metodo = 'index';\n }\n\n // -- Tratativa caso passarem na url uma pagina que nao existe --\n $caminho = 'php-gerenciador-canil/Controllers/'.$controller.'.php';\n\n if(!file_exists($caminho) && !method_exists($controller, $metodo))\n {\n $controller = 'homeController';\n $metodo = 'index';\n }\n \n $c = new $controller; //instancia o que estiver dentro de controller\n \n call_user_func_array(array($c, $metodo), $parameters);\n }", "public function run()\n {\n try\n {\n $this->viewData('app', $this);\n $this->oUser = $this->generateUser();\n }\n catch (\\Exception $e)\n {\n echo $e->getMessage() . \"\\n\";\n }\n\n $this->viewData('currentUser', $this->oUser);\n die($this->render());\n }", "function run() {\n\n // TODO: URL aliases and url_for method\n $routes = [\n // TODO NEXT VERSIONS: use url aliases so not hardcode URLs in templates but write like <a href = \"url_for('posts:new')>\"\n // TODO NEXT VERSIONS: use Slim for routing\n '/' => 'posts_index',\n '/posts/new' => 'posts_new',\n // TODO NEXT VERSIONS: handle ULRs with params like '/posts/<id>/edit'\n ];\n\n // TODO:\n // - incapsulate routing code to a function\n // - this function should not echo and die (it's a mess!!), but return HTTP code and HTTP response body to\n\n // TODO NEXT VERSIONS: make an exception system:\n // - catch PHP's fatal errors (which can arise when executing controller ) and render beatufil page instead of PHP's ugly output\n // - make our own errors system.\n // It's needed 'cause errors have types: incorrect user input and internal errors and\n // we should handle them in different ways:\n // - for user errors we show full messages\n // - for internal errors we show some standard message like 'Sorry, some error occured. Try again later'\n\n foreach($routes as $url_template => $controller) {\n if ($url_template == $_SERVER[\"REQUEST_URI\"]) {\n try {\n $method = 'Controllers\\\\'.$controller;\n $response = $method();\n if (!is_array($response)) {\n $response = ['code' => 200, 'body' => $response];\n }\n }\n catch (\\Exception $e) {\n // TODO: log 500 errors\n $body = (ENV == 'dev') ? \"<pre>\".$e->getMessage().\"\\n\".$e->getTraceAsString().\"</pre>\" : 'Sorry, some error occured';\n $response = ['code' => 500, 'body' => $body];\n }\n\n return $response;\n }\n }\n\n // TODO:\n // - return 404 HTTP code render\n // - custom 404 page\n return ['code' => 404, 'body' => '404 Not Found'];\n}", "public static function run(){\n //App_Registry::instance();\n //App_Registry::set('Controller_Abstract', new Controller_Abstract());\n\n\t\t//Load Front controller to match url\n\n //echo self::getConfig()->is_installed;\n\n if(self::getConfig()->is_installed == '0'){\n\n echo \" Running Setup \";\n new Setup();\n //echo self::getConfig()->is_installed;\n }\n\n $front = new Controller_Front();\n $frontArray = Controller_Front::match();\n }", "private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }", "public function run()\n {\n Bouncer::allow('administrator')->everything();\n Bouncer::allow('shop-manager')->to('view', Order::class);\n Bouncer::allow('shop-manager')->to('view', Product::class);\n\n }", "public function run(): void\n {\n try {\n $content = $this->handleRequest();\n } catch (\\Exception $e) {\n if (DEBUG_MODE) {\n ob_start();\n include __DIR__ . '/../views/error/error.php';\n $content = ob_get_clean();\n } else {\n $content = self::$config['error_message'];\n }\n }\n\n echo self::$view->renderPage($content);\n }", "public function run()\n {\n $this['events']->applyHook('before');\n\n if ($this['env'] !== 'console') {\n ob_start('mb_output_handler');\n }\n\n $this->boot();\n\n // Invoke middleware and application stack\n try {\n $this['middleware'][0]->call();\n } catch (\\Exception $e) {\n $this['response']->write($this['exception']->handleException($e), true);\n }\n\n // Finalize and send response\n $this->finalize();\n\n $this['events']->applyHook('after');\n }", "public function run()\n {\n $this->get('/', array($this, 'dispatchController'));\n $this->map('(/:module(/:controller(/:action(/:params+))))', array($this, 'dispatchController'))\n ->via('GET', 'POST')\n ->name('default');\n parent::run();\n }", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(pessoaFisica::class);\n $this->call(cursos::class);\n $this->call(alunos::class);\n $this->call(funcoes::class);\n $this->call(professores::class);\n $this->call(funcaoProfessor::class);\n $this->call(modalidades::class);\n $this->call(tipoAtividade::class);\n }", "public function launch()\r\n\t{\r\n\t\t// Corrige le nom du controller.\r\n\t\t// ajoute le namespace et met la 1er lettre en majuscule\r\n\t\t$controller = \"\\\\application\\\\controllers\\\\\";\r\n\t\t$controller .= ucfirst($this->controller);\r\n\r\n\t\t// si la classe existe\r\n\t\tif(class_exists($controller))\r\n\t\t\t$controller = new $controller;\r\n\r\n\t\t// Si la class $controller n'existe pas\r\n\t\telse\r\n\t\t{\r\n\t\t\t// transformation en page d'erreur\r\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\r\n\r\n\t\t\t// alors le controller d'erreur est instancé\r\n\t\t\t$controller = new \\application\\controllers\\Error;\r\n\r\n\t\t\t// appel la method index du controller d'erreur\r\n\t\t\treturn $controller->index();\r\n\t\t}\r\n\r\n\t\t// Si la variable restfull est fause\r\n\t\tif(!$controller->restful)\r\n\t\t\t$method = \"action_\".$this->method;\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\t// alors peu être appelé par le type de request\r\n\t\t\t// ex: get_index(), post_index(), put_index() or delete_index()\r\n\t\t\t$method = strtolower($_SERVER['REQUEST_METHOD']).\"_\" .$this->method;\r\n\t\t}\r\n\r\n\t\t// Vérifie que la method existe dans le controller\r\n\t\tif(method_exists($controller, $method))\r\n\t\t\t// Appel la method du controller en lui passant des parametres\r\n\t\t\treturn call_user_func_array(array($controller, $method), array($this->args));\r\n\r\n\t\telse\r\n\t\t{\r\n\t\t\t// transformation en page d'erreur\r\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\r\n\r\n\t\t\t// alors le controller d'erreur est instancé\r\n\t\t\t$controller = new \\application\\controllers\\Error;\r\n\r\n\t\t\t// appel la method index du controller d'erreur\r\n\t\t\treturn $controller->index();\r\n\t\t}\r\n\t}", "public function run() : void\n {\n $passwordsArray = [];\n $dataParams = $this->dataValidation();\n //validation ok\n if( $dataParams['page'] === \"resultPage\") {\n $page = $dataParams['page']; \n $passwordsArray = $this->generatePassword($dataParams);\n //invalid validation\n } else {\n $page = $dataParams['page'];\n }\n\n $page = $dataParams['page'];\n //passing parameters to View\n $this->view->render($page, $dataParams, $passwordsArray);\n }", "public function run()\n {\n $this->server->start();\n }", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function run() {\n\t\t$url = explode('index.php', $_SERVER['PHP_SELF']);\n\t\t$url = end($url); // pega o último registro após a explosão\n\t\t//\n\t\t// $url = substr($_SERVER['PHP_SELF'], 25); // Pega o que o usuário digitou pela url\n\t\t$params = array(); // definido para receber os parametros\n\n\t\tif (!empty($url)) { // é o que separa o que é controller e o que é action.\n\t\t\t$url = explode('/', $url); // remove a barra da url\n\t\t\tarray_shift($url); // depois que explode, o array 0 ficará como objeto vazio, então se usa o array_shift para remover a primeira chave\n\t\t\t$currentController = $url[0].'Controller'; // seta o controller\n\t\t\tarray_shift($url); // remove o array 0 que já foi utilizado\n\n\t\t\t\tif(isset($url[0])){\n\t\t\t\t\t$currentAction = $url[0]; // define a ação padrão, caso tenha sido setada\n\t\t\t\t\tarray_shift($url); // remove novamente, já que já foi utilizado... o que importa é o que restar, se torne parâmetros...\n\t\t\t\t} else {\n\t\t\t\t\t$currentAction = 'index'; // se não, será a padrão, index\n\t\t\t\t}\n\t\t\t\t if (count($url) > 0) { // se existir mais algum registro, vai se tornar parâmetros\n\t\t\t\t \t$params = $url; // caso haja parametros, todos serão preenchidos\n\t\t\t\t }\n\n\t\t} else {\n\t\t\t$currentController ='homeController'; // se o usuário não digitou nada, tudo deverá ser padrão\n\t\t\t$currentAction = 'index'; // ação padrão\n\t\t}\n\t\t\n\t\trequire_once 'core/controller.php'; // inicia a classe abstrata, que não pode ser instanciada. o autoload não consegue chamar a classe\n\t\t $c = new $currentController(); // inicia o controller\n\t\tcall_user_func_array(array($c, $currentAction),$params);\n\t}", "public function actionWebbuild()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$this->render('webbuild/index');\n\t}", "public function run()\n {\n //$list = MytodoList::findOrFail(1);\n $item1 = new MyTodoItem();\n $item1->mytodo_list_id = 1;\n $item1->content = \"Belajar View\";\n $item1->save();\n\n $item2 = new MyTodoItem();\n $item2->mytodo_list_id = 1;\n $item2->content = \"Belajar Controller\";\n $item2->save();\n }", "public function perform()\n {\n // template var with charset used for the html pages\n $this->viewVar['charset'] = $this->config->getModuleVar('common', 'charset');\n $this->viewVar['cssFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->config->getModuleVar('common', 'styles_folder');\n $this->viewVar['urlBase'] = $this->router->getBase(); \n $this->viewVar['loggedUserRole'] = $this->controllerVar['loggedUserRole'];\n $this->viewVar['isUserLogged'] = $this->controllerVar['isUserLogged'];\n $this->viewVar['adminWebController'] = $this->config->getVar('default_module_application_controller'); \n \n $this->viewVar['text'] = array();\n\n // get text for the front page\n $this->model->action('misc','getText', \n array('id_text' => 1,\n 'result' => & $this->viewVar['text'],\n 'fields' => array('body'))); \n \n // get result of the header and footer controller\n // \n $this->viewVar['header'] = $this->controllerLoader->header(); \n $this->viewVar['footer'] = $this->controllerLoader->footer(); \n $this->viewVar['rightBorder'] = $this->controllerLoader->rightBorder(); \n }", "public function run()\n {\n echo \"run\";\n }", "public function run() {\r\n\t\tif (isset($_GET['action'])) {\r\n\t\t\t$action = strtolower($_GET['action']);\r\n\t\t} else {\r\n\t\t\t$action = 'index';\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->checkAccess($action)) {\r\n\t\t\t$action = \"action\" . ucwords($action);\r\n\t\t} else {\r\n\t\t\t$action = \"actionNotAllowed\";\r\n\t\t}\r\n\t\t\r\n\t\tif (method_exists($this, $action)) {\r\n\t\t\t$this->$action();\r\n\t\t} else {\r\n\t\t\t$this->invalidAction($action);\r\n\t\t}\r\n\t}", "static public function run() {\n\n $session = Application::getInstance(\"session\");\n\n /**\n * Check if this is an API Call\n */\n $request = explode('/', trim(array_key_exists(\"PATH_INFO\",$_SERVER) ? $_SERVER[\"PATH_INFO\"] : \"\",'/'));\n $isAPICall = ($request[0] == \"api\");\n $basicAuth = false;\n\n if ($isAPICall) {\n\n if ($session->isAuth || isset($_SERVER['PHP_AUTH_USER'])) {\n\n if (isset($_SERVER['PHP_AUTH_USER'])) {\n\n $basicAuth = true;\n\n $email = $_SERVER['PHP_AUTH_USER'];\n $password = $_SERVER['PHP_AUTH_PW'];\n\n if (!$session->auth($email, $password)) {\n http_response_code(401);\n return;\n }\n\n }\n\n $api = Application::getInstance(__NAMESPACE__ . \"\\\\API\");\n $api->call();\n\n if ($basicAuth) {\n $session->closeMySession();\n }\n } else {\n http_response_code(403);\n return;\n }\n\n } else {\n $page = Application::getInstance(\"page\");\n\n $page->init();\n $page->work();\n $page->render();\n\n }\n\n\n }", "function run()\r\n{\r\n $arrViewData = array();\r\n $arrViewData['reservas'] = obtenerTodasReservas();\r\n\r\n renderizar('mantenimientos/reservas', $arrViewData);\r\n}", "public function run()\n\t{\n\t\t$response = $this->dispatch($this['request']);\n\n\t\t$response->send();\n\n\t\t$this->callFinishMiddleware($response);\n\t}", "public function run()\n {\n // if the pattern does not match with the route then\n // set the flag value to false\n $flag = true;\n\n // The relative path excluding the host name\n $path = substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'],'index.php'));\n\n // RequestURL excluding the script file[index.php]\n $request = $this->getURL();\n\n if(SITE_URL === $path) {\n\n $realRoute = (stripos($request, $path) !== false) ?\n (string) substr($request, strlen(SITE_URL)) : \"\";\n\n\n\n foreach ($this->routes as $urlPattern => $path) {\n\n if (preg_match(\"~$urlPattern~\", $realRoute)) {\n\n $internalRoute = preg_replace(\"~$urlPattern~\", $path, $realRoute, 1);\n $internalRoute = trim($internalRoute,'/');\n $parts = explode('/', $internalRoute);\n\n $controllerName = 'ShopApp\\\\Controllers\\\\' . ucfirst(array_shift($parts)) . 'Controller';\n $actionName = 'action' . ucfirst(array_shift($parts));\n $urlParams = $parts;\n\n if (class_exists($controllerName)) {\n\n $ref = new \\ReflectionClass($controllerName);\n\n if ($ref->hasMethod($actionName)) {\n\n if ($ref->isInstantiable()) {\n $controller = $ref->newInstance();\n $action = $ref->getMethod($actionName);\n\n $callAction = $action->invokeArgs($controller, $urlParams);\n break;\n }\n }\n else{\n $flag = false;\n }\n }\n\n }\n }\n } else {\n try {\n throw new \\Exception('<p style=\"color:red\">Не правильный адресс сайта.</p>');\n } catch (\\Exception $e) {\n echo $e->getMessage();\n exit();\n }\n }\n\n if(!$flag) {\n\n throw new ContrExeption(\n '<p style=\"color:red\">\n Неверно заданы маршруты\n в конфигурационном файле\n </p>'\n );\n }\n }", "public function run() {\n $this->load_dependencies();\n $this->load_localization();\n $this->load_admin();\n $this->load_public();\n }", "public function run()\n\t{\n\t\tsession_start();\n\t\tDB::connect();\n\t\n\t\tLoginManager::assert_auth_level(LoginManager::$AUTH_READ_ONLY);\t//CHANGE required authorization level for this page, ADMIN is the strictest\n\t\n\t\t$this->get_input(); \n\t\t\n\t\t$this->verify_input();\n\t\t\n\t\t$this->process_input();\n\t\t\n\t\t$this->show_output();\n\t}", "public function run()\n {\n \t$router = Injector::call('\\Nanozen\\Providers\\CustomRouting\\CustomRoutingProvider');\n \t\n \t// Setting up the routes.\n\t\t$this->setupRoutes($router);\n\n // Invoking the router.\n $router->invoke();\n }", "public function start(){\n\n $this->callView();\n\n }", "public function run() {\n // 1. Getting the request string\n $uri = $this->getURI();\n $uri_arr = explode('/', $uri);\n if ($uri_arr !== false) {\n $flag = false;\n foreach ($uri_arr as $key=>$item) {\n if (($item === 'articles' or $item === 'auth') and $key > 0) {\n define('FOLDER_NAME', $uri_arr[$key - 1]);\n $flag = true;\n }\n }\n if (!$flag) {\n define('FOLDER_NAME', '');\n }\n }\n\n // 2. Checking if the request exists in routes\n foreach ($this->routes as $req=>$act) {\n // 3. If getting match then define the controller and action\n if (preg_match('@'.$req.'@', $uri)) {\n // 4. Importing file of chosen controller\n if ($req !== '') {\n $internal = preg_replace('@' . $req . '@', $act, $uri);\n }\n else {\n $internal = $act;\n }\n $matches = array();\n preg_match('@(articles/.*$|main/.*$|auth/.*$)@', $internal, $matches);\n $internal = $matches[0];\n $full_request = explode('/', $internal);\n $controller = ucfirst($full_request[0].'Controller');\n $action = 'action'.explode('?', ucfirst($full_request[1]))[0];\n $params = array();\n for ($i = 2; $i < count($full_request); $i++) {\n $params[$i - 2] = $full_request[$i];\n }\n $file = ROOT.'/controllers/'.$controller.'.php';\n if (file_exists($file)) {\n include_once($file);\n }\n // 5. Creating object and doing action\n try {\n $chosenController = new $controller;\n $is_done = call_user_func_array(array($chosenController, $action), $params);\n }\n catch (TypeError $e) {\n header(\"HTTP/1.0 404 Not Found\");\n $is_done = false;\n }\n if ($is_done) break;\n }\n }\n\n }", "public function run()\n {\n $pages = Pages::create(\n [\n 'name' => 'Customers', \n 'url' => '/customers/',\n ],\n [\n 'name' => 'Users', \n 'url' => '/users/',\n ],\n [\n 'name' => 'Roles', \n 'url' => '/roles/',\n ],\n );\n }", "public function run()\n {\n $this->executeStaticRoutes();\n $this->executeGroupRoutes();\n }", "public function run()\n {\n $this->runAction();\n\n $this->view->setTemplate($this->request->getRequestedResource() . DIRECTORY_SEPARATOR . $this->getTemplateName() . '.twig');\n }", "public function run()\n {\n //\n\n $new = new Admin;\n $new->username = 'admin';\n $new->password = '827ccb0eea8a706c4c34a16891f84e7b';\n $new->status = '1';\n $new->save();\n }", "public function run()\n\t{\n\n\t\t$finded = false;\n\n\t\t$method = $this->request->getMethod();\n\n\t\tforeach((array)$this->reg[ $method ] as $route=>$opts)\n\t\t{\n\t\n\t\t\t$pattern = \"/^\" . str_replace(array(\"/\", \"*\", \"%any\", \"%part\", \"%num\"), array(\"\\/\", \".*\", \"(.*)\", \"([^\\/]*)\", \"([0-9]+)\"), $route) . \"\\/?$/\";\n\n\t\t\t// echo $this->request->path();\n\t\t\t\n\t\t\tif( preg_match($pattern, $this->request->path(), $m) )\n\t\t\t{ \n\n\t\t\t\tcall_user_func_array($opts['function'], array_slice($m, 1));\n\n\t\t\t\t// TODO: implementar execucao de middlewares\n\t\t\t\tif( array_key_exists('middleware', $opts) )\n\t\t\t\t{\n\n\t\t\t\t\tforeach($opts['middleware'] as $middle_name)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$refl = new \\ReflectionClass(\"\\Coupe\\Middleware\\\\\" . $middle_name);\n\n\t\t\t\t\t\t$inst = $refl->newInstanceArgs(array($this->request));\n\n\t\t\t\t\t\t$inst();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$finded = true;\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// TODO: fazer redirect para pagina de erro 404\n\t\tif( ! $finded )\n\t\t{\n\t\t\tthrow new \\Exception(\"Caminho não encontrado.\", 1);\n\t\t}\n\n\t\tparent::run();\n\t\t\n\t\texit(0);\n\n\t}", "public function launch() {\n\t\t$controller = ucfirst($this->getController());\n\t\t$method = $this->getMethod();\n\t\t\n\t\tif (file_exists(APPPATH . 'modules/' . $controller . '.php') === FALSE)\n\t\t\tshowError($this->lang->line('syserr_notfound'), 404);\n\t\t\n\t\tinclude_once(APPPATH . 'modules/' . $controller . '.php');\n\t\t\n\t\tif (class_exists($controller) === FALSE)\n\t\t\tshowError($this->lang->line('syserr_notfound'), 404);\n\n\t\t$app = new $controller();\n\t\t\n\t\tif (method_exists($app, $method) === FALSE)\n\t\t\tshowError($this->lang->line('syserr_notfound'), 404);\n\t\t\n\t\t\n\t\t$app->$method();\n\t}", "public function run()\n {\n $this->welcome();\n }", "protected function run($url){\n\n\t\t//Primeiro recuperar o Path que é o route\n\t\tforeach ($this->getRoutes() as $path => $route) {\n\t\t\tif ($url == $route['route']) {\n\n\t\t\t\t//Segundo istanciando o IndexController de forma dinamica\n\t\t\t\t$class = \"App\\\\Controllers\\\\\".ucfirst($route['controller']);\n\t\t\t\t$controller = new $class;\n\n\t\t\t\t//Terceiro a action de forma dinamica\n\t\t\t\t$action = $route['action'];\n\n\t\t\t\t//Disparando de forma dinamica\n\t\t\t\t$controller->$action();\n\n\t\t\t}\n\t\t}\n\n\t}", "function run() {\n\t\t$view = new View();\n\t\t\n\t\t$students = new Student();\n\t\tif ($view->students_tbl = $students->get_students_as_tbl_arr() ) {\n\t\t\t$view->error = $students->get_error();\n\t\t}\n\n\t\t$view->student_desc = $students->get_student_desc();\n\t\t$view->render('main_page.php');\n\t}", "public function Run() {\n\t\tif(!$this->IfDebug()) {\n\t\t\t$this->PageViewSetErrorStatus(404, 'NO Twig-TPL-DEBUG Service has been activated on this server ...');\n\t\t\treturn;\n\t\t} //end if\n\t\t//--\n\n\t\t//--\n\t\t$tpl = $this->RequestVarGet('tpl', '', 'string');\n\t\t//--\n\n\t\t//--\n\t\t$this->PageViewSetCfg('rawpage', true);\n\t\t//--\n\t\t$this->PageViewSetVar(\n\t\t\t'main',\n\t\t\t(string) SmartMarkersTemplating::render_file_template(\n\t\t\t\t'lib/core/templates/debug-profiler-util.htm',\n\t\t\t\t[\n\t\t\t\t\t'CHARSET' \t=> Smart::escape_html(SmartUtils::get_encoding_charset()),\n\t\t\t\t\t'TITLE' \t=> '{{ Twig-TPL }} Template Debug Profiling',\n\t\t\t\t\t'MAIN' \t\t=> (string) (new \\SmartModExtLib\\TplTwig\\Templating())->debug($tpl)\n\t\t\t\t],\n\t\t\t\t'no'\n\t\t\t)\n\t\t);\n\t\t//--\n\n\t}", "function executeController()\r\n{\r\n\t// Uri and figure out the path to the controller.\r\n\t$request = trim($_GET['request'], \"/ \");\r\n\t\r\n\tif ($request != '') {\r\n\t // Using the URL segments, construct the name of the class.\r\n\t // Note: The class name is mapped to the directory structure.\r\n\t $reqSegments = explode(\"/\", $request);\r\n\t}\r\n\t\r\n\t$controllerName = 'App_Pages_';\r\n\t$controllerName .= ($reqSegments[0])?$reqSegments[0]:'Index';\r\n\t$controllerName .= '_Controller';\r\n\t\r\n\t$actionName = ($reqSegments[1])?$reqSegments[1]:'index';\r\n\r\n\tif (class_exists($controllerName)) {\r\n\t\tif (method_exists($controllerName, $actionName)) {\r\n\t\t\t$controller = new $controllerName();\r\n\t\t\t$controller->$actionName();\r\n\t\t} else {\r\n\t\t\tdie('Page not found');\r\n\t\t}\r\n\t} else {\r\n\t\tdie('Page not found');\r\n\t}\r\n}", "public static function start()\n {\n $controller_name = 'Login';\n $action_name = 'Index';\n\n $routes = explode('/', $_SERVER['REQUEST_URI']);\n \n //getting controller name from requested url\n if (!empty($routes[2]) && $routes[2] != 'index.php') {\n $controller_name = $routes[2];\n }\n \n //getting action name from requested url\n if (!empty($routes[3])) {\n $action_name = $routes[3];\n }\n\n //adding prefixes\n $model_name = 'BwtTest\\Models\\Model'.ucfirst($controller_name);\n $controller_name = 'BwtTest\\Controllers\\Controller'.ucfirst($controller_name);\n $action_name = 'action'.ucfirst($action_name);\n \n // creating model\n $model = null;\n if (class_exists($controller_name)) {\n $controller = new $controller_name($model);\n }\n if (method_exists($controller, $action_name)) {\n // вызываем действие контроллера\n $controller->$action_name();\n } else {\n // здесь также разумнее было бы кинуть исключение\n Route::errorPage404();\n }\n }", "private function run()\n {\n $dispatcher = $this->getDispatcher(self::getConfigSection('routes'));\n\n $routeInfo = $dispatcher->dispatch(self::getRequest('method'), self::getRequest('path'));\n\n switch ($routeInfo[0]) {\n case \\FastRoute\\Dispatcher::NOT_FOUND:\n $this->errorNotFound();\n break;\n case \\FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $this->error405();\n break;\n case \\FastRoute\\Dispatcher::FOUND:\n $this->actionParams = $routeInfo[2];\n $handler = explode('.', $routeInfo[1]);\n $this->controllerName = 'app\\controllers\\\\' . ucfirst($handler[0]) . 'Controller';\n $controllerFile = ucfirst($handler[0]) . 'Controller.php';\n $this->actionName = 'action' . ucfirst($handler[1]);\n $this->actionSlug = $handler[0] . '.' . $handler[1];\n if (!file_exists(self::$request['root_path'] . '/app/controllers/' . $controllerFile) ||\n !method_exists($this->controllerName, $this->actionName)) {\n //there is not a controller file or action name == index\n if (App::getConfig('app.debug')) {\n echo 'There is not a controller file \"' . $controllerFile . '\" or action name == index';\n }\n $this->errorNotFound();\n }\n if (isset($handler[2])) {\n //part of hangler for checking permissions\n if ($handler[2] == 'auth') {\n //need login and not logged\n if (App::isGuest()) {\n $this->redirect(App::getConfig('app.login_url'));\n }\n } else {\n //check permission for $handler[2]\n $auth = self::getComponent('auth');\n $user = self::getUser();\n $checkUser = $user ? $auth->hasAccessTo($user->email, $handler[2]) : false;\n if (!$checkUser) {\n //user does not exists or user does not have a permission\n $this->error405();\n }\n }\n }\n break;\n }\n $this->startAction();\n }", "public function run()\n {\n // 重置角色和权限的缓存\n app()['cache']->forget('spatie.permission.cache');\n\n // 创建权限\n Permission::create(['name' => 'edit/class']);\n Permission::create(['name' => 'edit/user']);\n Permission::create(['name' => 'edit/web']);\n Permission::create(['name' => 'edit/file']);\n\n // 创建角色并赋予权限\n $role = Role::create(['name' => 'master']);\n $role->givePermissionTo('edit/class');\n $role->givePermissionTo('edit/user');\n $role->givePermissionTo('edit/web');\n $role->givePermissionTo('edit/file');\n \n $role = Role::create(['name' => 'admin']);\n $role->givePermissionTo('edit/class');\n $role->givePermissionTo('edit/user');\n $role->givePermissionTo('edit/file');\n\n\n\n }", "public function run()\n {\n\n $user = new AdminModel();\n $user->name = 'Aufree';\n $user->email = '[email protected]';\n $user->password = bcrypt('admin');\n $user->save();\n }", "public function run()\n {\n \t// untuk run factory user\n \tfactory(App\\User::class, 50)->create();\n \t// untuk run user seeder\n // $this->call(UserSeeder::class);\n }", "public function run(): void\n {\n\n Router::processAllRoutes();\n\n (new ControlResponseCode(ObjectInitializer::$response))->trackResponseStatus();\n\n $this->toolbarInit(ObjectInitializer::$frameworkConfiguration);\n\n }", "private static function proccess()\n {\n $files = ['Process', 'Command', 'Translator', 'Migrations', 'Links', 'Tag', 'Model', 'View', 'Controller', 'Seeds', 'Router', 'Exception', 'Events', 'Alias', 'Middleware', 'Helper', 'Tests', 'Mail', 'Query'];\n $folder = static::$root.'Processes'.'/';\n\n self::call($files, $folder);\n\n $files = ['TranslatorFolderNeededException', 'TranslatorManyFolderException'];\n $folder = static::$root.'Processes/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function run()\n {\n // create admin and user\n \\App\\User::insert([\n ['id' => 1, 'name' => 'Admin', 'email' => '[email protected]', 'password' => Hash::make('password')],\n ['id' => 2, 'name' => 'User', 'email' => '[email protected]', 'password' => Hash::make('password')]\n ]);\n // create admin role\n $role = \\Spatie\\Permission\\Models\\Role::create(['name' => 'admin', 'guard_name' => 'web']);\n // assign admin role\n \\App\\User::find(1)->assignRole($role);\n }", "public function run()\n {\n SystemModule::truncate();\n SystemModule::create([\n 'name' => 'Field Reporting System',\n 'alias' => 'FRS',\n 'controller_namespace' => 'App\\Http\\Controllers\\Admin\\Frs\\/',\n 'model_namespace' => 'App\\Models\\Frs\\/',\n 'view_namespace' => 'views\\admin\\frs/',\n 'route_name' => 'admin.frs',\n 'description' => 'Partisipa Field Reporting System',\n ]);\n SystemModule::create([\n 'name' => 'Online Leave Aplication',\n 'alias' => 'FRS',\n 'controller_namespace' => 'App\\Http\\Controllers\\Admin\\Ola\\/',\n 'model_namespace' => 'App\\Models\\Ols\\/',\n 'view_namespace' => 'views\\admin\\ola/',\n 'route_name' => 'admin.ola',\n 'description' => 'Partisipa Online Leave Application',\n ]);\n SystemModule::create([\n 'name' => 'Online Timesheet Aplication',\n 'alias' => 'OTA',\n 'controller_namespace' => 'App\\Http\\Controllers\\Admin\\Ota\\/',\n 'model_namespace' => 'App\\Models\\Ota\\/',\n 'view_namespace' => 'views\\admin\\ota/',\n 'route_name' => 'admin.ota',\n 'description' => 'Partisipa Online Timesheet',\n ]\n );\n }", "public function run()\n {\n if (! \\App::environment(['production'])) {\n Model::unguard();\n\n Reservation::create([\n \t'name'=>'Mohammed Khalf',\n 'age'=>'27',\n 'phone_number'=>'01094356579',\n 'clinic_id'=>'1',\n 'price'=>'50'\n ]);\n Model::reguard();\n\t }\n }", "public function IndexAction() {\r\n $this->ExecuteView();\r\n }" ]
[ "0.7249254", "0.7087634", "0.70035666", "0.69698536", "0.6889921", "0.6860667", "0.6826756", "0.67993367", "0.6777337", "0.67622477", "0.67355067", "0.6728066", "0.6697686", "0.66827214", "0.6667218", "0.66598463", "0.6659179", "0.66485757", "0.6634652", "0.66341853", "0.66251385", "0.6599823", "0.6551957", "0.6541601", "0.64943606", "0.64680326", "0.6456004", "0.64244336", "0.6390067", "0.63835907", "0.63823265", "0.63666016", "0.6364503", "0.63544285", "0.63404834", "0.6335441", "0.6330596", "0.63270855", "0.63193125", "0.6312326", "0.6304878", "0.6302994", "0.62584394", "0.6247812", "0.62477076", "0.62451214", "0.62312835", "0.6231264", "0.62231165", "0.6215136", "0.62018377", "0.6201631", "0.61982864", "0.6197574", "0.6193391", "0.61872715", "0.61868954", "0.6179016", "0.61626697", "0.6159551", "0.61580807", "0.6155222", "0.6150782", "0.6145813", "0.61405015", "0.61329234", "0.61317647", "0.6120022", "0.61059827", "0.6096836", "0.6090508", "0.60883415", "0.60803634", "0.60683686", "0.60611653", "0.6057241", "0.60524386", "0.6045793", "0.60350984", "0.60337734", "0.60331583", "0.6028755", "0.6027303", "0.6021932", "0.60199445", "0.60104835", "0.60019946", "0.59994644", "0.5999374", "0.59915555", "0.59800404", "0.5977475", "0.5975551", "0.59635055", "0.59630483", "0.5962904", "0.59549433", "0.59548634", "0.59504086", "0.59434694", "0.5932249" ]
0.0
-1
To use the Composer loade
function setComposerLoader($file) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getComposer();", "private static function composerAutoload(): void\n {\n self::require(ROOT . '/vendor/autoload.php');\n }", "function wp_default_packages_vendor($scripts)\n {\n }", "function wp_cli_app_basic_composer( $args, $assoc_args ) {\n\n\t//Check Composer is installed in System\n\tif ( CLI::command_exists( \"composer\" ) === false ) {\n\t\tCLI::error( \"Composer Package Manager is not active in your system, read more : https://getcomposer.org/doc/00-intro.md\" );\n\t\treturn;\n\t}\n\n\t//Check Active Workspace\n\tWorkSpace::is_active_workspace();\n\t$workspace = WorkSpace::get_workspace();\n\n\t//Create Custom Composer Cli\n\t$arg = array();\n\tfor ( $x = 0; $x <= 3; $x ++ ) {\n\t\tif ( isset( $args[ $x ] ) and ! empty( $args[ $x ] ) ) {\n\t\t\t$arg[] = $args[ $x ];\n\t\t}\n\t}\n\n\t//Run command\n\tCLI::run_composer( $workspace['path'], $arg );\n}", "public function getComposerPath(): string;", "function rcomposer() {\n\t\t$this->checkOnce();\n\t\t$deployPath = $this->getVersionPath();\n\t\t//$this->ssh_exec($this->composerCommand.' clear-cache');\n\t\t$this->ssh_exec($this->composerCommand.' config -g secure-http false');\n\t\t$remoteCmd = 'cd '.$deployPath.' && '.$this->composerCommand.' install --ignore-platform-reqs';\n\t\t$this->ssh_exec($remoteCmd);\n\t}", "public function getComposerRequires(): array;", "public function getComposerDependencies(): array;", "public function install() {\r\n \r\n }", "protected function configure()\n {\n parent::configure();\n\n $this->composer = new Composer($this->preset->filesystem(), $this->preset->basePath());\n }", "public function get_name() {\n\treturn 'composer';\n}", "public function install(){\r\n\t\t\r\n\t}", "function install(){}", "public static function install(){\n\t}", "public function install() {\n\n\n }", "private function get_composer() {\n\n\t\t$this->set_composer_json_path( WP_CLI\\Utils\\find_file_upward( 'composer.json', WP_CLI_ROOT ) );\n\t\n\t\t// Composer's auto-load generating code makes some assumptions about where\n\t\t// the 'vendor-dir' is, and where Composer is running from.\t\n\t\t// Best to just pretend we're installing a package from ~/.composer or similar\n\t\tchdir( pathinfo( $this->get_composer_json_path(), PATHINFO_DIRNAME ) );\n\n\t\ttry {\n\t\t\t$composer = Factory::create( new NullIO, $this->get_composer_json_path() );\n\t\t} catch( Exception $e ) {\n\t\t\tWP_CLI::error( $e->getMessage() );\n\t\t}\n\n\t\t$this->composer = $composer;\n\t\treturn $this->composer;\n\t}", "private function load_dependencies() {\n\n /**\n * The class responsible for defining options functionality\n * of the plugin.\n */\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup.php';\n include plugin_dir_path(dirname(__FILE__)) . 'envato_setup/envato_setup_init.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/class-form-fields.php';\n // common functions file\n include plugin_dir_path(dirname(__FILE__)) . 'includes/common-functions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/careerfy-detail-pages.php';\n \n include plugin_dir_path(dirname(__FILE__)) . 'includes/careerfyframe-end-jsfile.php';\n\n // redux frameworks extension loader files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/redux-ext/loader.php';\n\n // icons manager\n include plugin_dir_path(dirname(__FILE__)) . 'icons-manager/icons-manager.php';\n\n // visual composer files\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-actions.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-support/vc-shortcodes.php';\n // visual icon files\n include plugin_dir_path(dirname(__FILE__)) . 'includes/vc-icons/icons.php';\n // Mailchimp\n include plugin_dir_path(dirname(__FILE__)) . 'includes/mailchimp/vendor/autoload.php';\n include plugin_dir_path(dirname(__FILE__)) . 'includes/mailchimp/mailchimp-functions.php';\n\n // post types\n include plugin_dir_path(dirname(__FILE__)) . 'includes/post-types/faq.php';\n\n // meta box file\n include plugin_dir_path(dirname(__FILE__)) . 'admin/meta-boxes.php';\n\n // Custom Typography\n include plugin_dir_path(dirname(__FILE__)) . 'includes/custom-typography.php';\n\n // twitter oauth\n include plugin_dir_path(dirname(__FILE__)) . 'includes/twitter-tweets/twitteroauth.php';\n // maintenace mode\n include plugin_dir_path(dirname(__FILE__)) . 'includes/maintenance-mode/maintenance-mode.php';\n\n // redux frameworks files\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/class-redux-framework-plugin.php';\n include plugin_dir_path(dirname(__FILE__)) . 'admin/ReduxFramework/careerfy-options/options-config.php';\n\n include plugin_dir_path(dirname(__FILE__)) . 'admin/user/user-custom-fields.php';\n\n // instagram admin actions\n include plugin_dir_path(dirname(__FILE__)) . 'admin/instagram.php';\n // load Elementor Extension\n require plugin_dir_path(dirname(__FILE__)) . 'includes/class-careerfy-elementor.php';\n\n }", "protected static function updateComposer()\n {\n $packages = json_decode(file_get_contents(base_path('composer.json')), true);\n $packages['require'] = static::updateComposerArray($packages['require']);\n ksort($packages['require']);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "public function run()\n {\n passthru('cd ' . realpath($this->basedir) . ' && git pull origin master && curl -sS https://getcomposer.org/installer | php && php composer.phar install && git remote update && cd -');\n }", "public function install()\n {\n }", "public function install()\n {\n }", "protected function install(){ return true;}", "public function collectInstalledComposerJson()\r\n {\r\n $this->collectFiles(\r\n $this->site_root.\"/vendor/composer\",\r\n array(\"json\")\r\n );\r\n }", "function dev_missing_dependencies() { ?>\n\t<div class=\"error\">\n <p><?php printf( __( 'Awesome Support dependencies are missing. The plugin can’t be loaded properly. Please run %s before anything else. If you don’t know what this is you should <a href=\"%s\" class=\"thickbox\">install the production version</a> of this plugin instead.', 'awesome-support' ), '<a href=\"https://getcomposer.org/doc/00-intro.md#using-composer\" target=\"_blank\"><code>composer install</code></a>', esc_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'awesome-support', 'TB_iframe' => 'true', 'width' => '772', 'height' => '935' ), admin_url( 'plugin-install.php' ) ) ) ); ?></p>\n </div>\n<?php }", "static function init_js_composer(){\n\n\t\t\tif(defined('WPB_VC_VERSION')){//check if visual composer is active and the version is 3.7 or greater.\n\n\t\t\t\tif( version_compare(WPB_VC_VERSION, '3.7') <= 0){\n\n\t\t\t\t\tadd_action( 'admin_notices', array(__CLASS__, 'admin_version_notification') );\n \n\t\t\t\t} else {\n\n\t\t\t\t\tself::add_actions();\n\t\t\t\t\trequire_once(PS_PATH . \t'config/setup.php');\n\t\t\t\t\trequire_once(PS_PATH . \t'config/custon_paramaters.php');\n\t\t\t\t\tself::declare_shortcodes();\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tadd_action( 'admin_notices', array(__CLASS__, 'admin_activation_notification') );\n\t\t\t}\n\t\t}", "public static function composer() {\n\t\tif (is_null(static::$composer)) {\n\t\t\t$path = static::root('composer.json');\n\t\t\tstatic::$composer = json_decode(file_get_contents($path));\n\t\t}\n\n\t\treturn static::$composer;\n\t}", "function install() {}", "public function execute()\n {\n\t $composer = $this->composer;\n\n\t $composer->extra = isset($composer->extra) ? $composer->extra : array('fof' => new \\stdClass());\n\t $composer->extra->fof = isset($composer->extra->fof) ? $composer->extra->fof : new \\stdClass();\n\n\t $info = $composer->extra->fof;\n\n\t if (!is_object($info))\n\t {\n\t\t if (empty($info))\n\t\t {\n\t\t\t $info = new \\stdClass();\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $info = (object) $info;\n\t\t }\n\t }\n\n\t\t// Component Name (default: what's already stored in composer / composer package name)\n\t\t$info->name = $this->getComponentName($composer);\n\n\t\t$files = array(\n\t\t\t'backend' => 'component/backend',\n\t\t\t'frontend' => 'component/frontend',\n\t\t\t'media' => 'component/media',\n\t\t\t'translationsbackend' => 'translations/component/backend',\n\t\t\t'translationsfrontend' => 'translations/component/frontend'\n\t\t);\n\n\t if (!isset($info->paths) || empty($info->paths) || is_null($info->paths))\n\t {\n\t\t $info->paths = array();\n\t }\n\n\t if (is_object($info->paths))\n\t {\n\t\t $info->paths = (array) $info->paths;\n\t }\n\n\t $files = array_merge($files, $info->paths);\n\n\t\tforeach ($files as $key => $default)\n {\n\t\t\t$info->paths[$key] = $this->getPath($composer, $key, $default);\n\t\t}\n\n\t\t// Now check for fof.xml file\n\t\t$fof_xml = getcwd() . '/' . $info->paths['backend'] . '/fof.xml';\n\n\t\tif (file_exists($fof_xml))\n {\n // @todo Read the XML?\n\t\t}\n\n\t // @todo Maybe ask for namespaces?\n\n\t\t// Store back the info into the composer.json file\n\t $composer->extra->fof = $info;\n\t \\JFile::write(getcwd() . '/composer.json', json_encode($composer, JSON_PRETTY_PRINT));\n\n\t\t$this->setDevServer(false);\n\t}", "public function getPackageOrder()\n {\n $order = array(\n 'yiisoft/yii2-app-advanced',\n 'bower-asset/bootstrap',\n 'bower-asset/jquery',\n 'bower-asset/jquery.inputmask',\n 'bower-asset/punycode',\n 'bower-asset/typeahead.js',\n 'bower-asset/yii2-pjax',\n 'cebe/markdown',\n 'clue/stream-filter',\n 'container-interop/container-interop',\n 'ezyang/htmlpurifier',\n 'fzaninotto/faker',\n 'guzzlehttp/guzzle',\n 'guzzlehttp/promises',\n 'guzzlehttp/psr7',\n 'justinrainbow/json-schema',\n 'liyunfang/yii2-widget-linkpager',\n 'mailgun/mailgun-php',\n 'monolog/monolog',\n 'nikic/fast-route',\n 'paragonie/random_compat',\n 'php-http/client-common',\n 'php-http/discovery',\n 'php-http/guzzle6-adapter',\n 'php-http/httplug',\n 'php-http/message',\n 'php-http/message-factory',\n 'php-http/multipart-stream-builder',\n 'php-http/promise',\n 'phpspec/php-diff',\n 'pimple/pimple',\n 'psr/container',\n 'psr/http-message',\n 'psr/log',\n 'puli/composer-plugin',\n 'puli/discovery',\n 'puli/repository',\n 'puli/url-generator',\n 'ramsey/uuid',\n 'seld/jsonlint',\n 'slim/slim',\n 'swiftmailer/swiftmailer',\n 'symfony/options-resolver',\n 'symfony/process',\n 'webmozart/assert',\n 'webmozart/expression',\n 'webmozart/glob',\n 'webmozart/json',\n 'webmozart/path-util',\n 'yiisoft/yii2',\n 'yiisoft/yii2-bootstrap',\n 'yiisoft/yii2-codeception',\n 'yiisoft/yii2-composer',\n 'yiisoft/yii2-debug',\n 'yiisoft/yii2-faker',\n 'yiisoft/yii2-gii',\n 'yiisoft/yii2-swiftmailer',\n 'zendframework/zend-diactoros',\n );\n\n return $order;\n }", "function getComposerFileData()\n{\n $arr = [];\n $arr['autoload']['files'] = ['src/Arrays.php'];\n $arr['config'] = ['vendor-dir' => '/composer/vendor'];\n return $arr;\n}", "public function bootstrap()\n {\n }", "function pestle_cli($argv)\n{ \n //$composer_package .= '=2.1.0-rc1';\n extract($argv);\n \n $db_name = preg_replace('%[^a-zA-Z0-9]%','_', $id_key);\n $url = preg_replace('%[^a-zA-Z0-9]%','-', $id_key) . '.dev';\n $cmds = [];\n $cmds[] = \"composer create-project --repository-url=$repo $composer_package $folder\";\n $cmds[] = \"cd $folder\";\n $cmds[] = \"echo '$umask' >> magento_umask\";\n $cmds[] = \"echo \\\"We're about to ask for your MySQL password so we can create the database\\\"\";\n $cmds[] = \"echo 'CREATE DATABASE $db_name' | mysql -uroot -p\";\n\n $cmds[] = \"php bin/magento setup:install --admin-email $admin_email --admin-firstname $admin_first_name --admin-lastname $admin_last_name --admin-password $admin_password --admin-user $admin_user --backend-frontname admin --base-url http://$url --db-host 127.0.0.1 --db-name $db_name --db-password $db_pass --db-user $db_user --session-save files --use-rewrites 1 --use-secure 0 -vvv\"; \n $cmds[] = 'php bin/magento sampledata:deploy'; \n $cmds[] = 'php bin/magento cache:enable';\n \n array_map(function($cmd){\n output($cmd);\n }, $cmds);\n}", "protected function bootstrap()\n {\n }", "protected function loadDependencies()\n {\n // See: https://github.com/concrete5/concrete5-5.7.0/issues/360\n $filesystem = new Filesystem();\n $filesystem->getRequire(__DIR__ . '/vendor/autoload.php');\n }", "public function install();", "public function install();", "private static function vendor() {\n $file = Storange::getPathFile('vendor/autoload.php');\n if (file_exists($file)) {\n include_once $file;\n } else {\n throw new exceptions\\LoadFiles('Error to load vendor autoload. Check the composer libs', 0);\n }\n }", "private function addRequirePackages()\n {\n $devPackages = [\n \"orangehill/iseed:*\",\n \"barryvdh/laravel-debugbar:*\",\n \"barryvdh/laravel-ide-helper:*\",\n \"laravel/dusk:*\",\n \"mediactive-digital/laravel:*\",\n \"mediactive-digital/migrations-generator:*\"\n ];\n $this->doCommand(\"composer require \" . implode(' ', $devPackages) . \" --dev\");\n\n if ($this->hasOption('theme')) {\n $this->doCommand('composer require ' . $this->option('theme').'');\n }\n }", "protected function composerAutoloadDev() :void\n {\n $file = app_path('composer.json');\n $contents = Storage::get($file);\n\n $json = json_decode($contents, true);\n $json['autoload-dev'] = [\n 'classmap' => [\n 'tests/'\n ]\n ];\n $json = json_encode($json, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n Storage::put($file, $json);\n }", "function wp_default_packages($scripts)\n {\n }", "private function _require()\n {\n }", "public function preInstall()\n {\n }", "private function composerReload()\n {\n $composer = $this->findComposer();\n\n $process = new Process($composer.' dump-autoload');\n $process->setTimeout(null); // Setting timeout to null to prevent installation from stopping at a certain point in time\n $process->setWorkingDirectory(base_path())->run();\n }", "protected function installComposer(): void\n {\n $this->installCommandLine('composer', 'https://getcomposer.org/composer.phar');\n }", "public function handle()\n {\n \t//获取参数\n \t$vendor = $this->argument('vendor');\n \t$name = $this->argument('name');\n \t$model = $this->argument('model');\n \t//创建目录\n \t$newPackageDir=base_path(\"packages/\".$vendor.\"/\".$name);\n \tif(!$this->file->exists($newPackageDir)){\n \t\tmkdir($newPackageDir, 0777, true);\n \t\techo \"Package dir created ! \\n\";\n \t}else{\n \t\techo \"The Package dir existed! \\n\";\n \t}\n \t//拷贝包的参考结构\n \t$reference=base_path(\"packages/star2003/tools/pcurd/backend/reference\");\n \t$this->file->copyDirectory($reference,$newPackageDir);\n \techo \"Reference copied ! \\n\";\n \t//修改参考文件内容\n \t$this->helper->init($vendor,$name,$model,$newPackageDir,$this->file);\n \t\n \t//注册composer.json\n \t$content=$this->file->get('composer.json');\n \t$replace='\"psr-4\": {';\n \t$packageInfo=\"\\\"\".ucfirst($vendor).\"\\\\\\\\\".ucfirst($name).\"\\\\\\\\\\\":\\\"packages/\".$vendor.\"/\".$name.\"\\\",\";\n \tif(!strpos($content,$packageInfo)){\n \t\t$content=str_replace($replace,$replace.\"\n \t\t\".$packageInfo,$content);\n \t\t$content=$this->file->put('composer.json',$content);\n \t}else{\n \t\techo \"Info existed in composer.json!\\n\";\n \t}\n \t\n \t//注册config/app.php\n \t$content=$this->file->get('config/app.php');\n \t$replace=\"'providers' => [\";\n \t$providerInfo=ucfirst($vendor).\"\\\\\".ucfirst($name).\"\\\\\".ucfirst($name).\"Provider::class,\";\n \tif(!strpos($content,$providerInfo)){\n \t\t$content=str_replace($replace,$replace.\"\n \t\".$providerInfo,$content);\n \t\t$content=$this->file->put('config/app.php',$content);\n \t}else{\n \t\techo \"Info existed in config/app.php!\\n\";\n \t}\n \t//注册权限\n \tif(!Access::where(\"access\",\"=\",\"admin.$model\")->count()){\n \t\t$access=array(\n \t\t\t\t'name'=>$model,\n \t\t\t\t'access'=>\"admin.$model\",\n \t\t);\n \t\tAccess::create($access);\n \t\t\n \t}\n \t//注册菜单\n \tif(!Menu::where(\"access\",\"=\",\"admin.$model\")->count()){\n \t\t$menu=array(\n \t\t\t'name'=>$model,\n \t\t\t'access'=>\"admin.$model\",\n \t\t\t'url'=>\"admin/$model\",\n \t\t\t'pre_id'=>'1',\n \t\t\t'rank'=>'2',\n \t\t\t'status'=>'1',\n \t\t\t'display'=>'3',\n \t\t\t'icon'=>'',\n\t \t);\n\t \tMenu::create($menu);\n \t}\n \tCache::flush();\n \techo \"Success!\";\n \t\n \t\n }", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "private function load_dependencies() {\n\n\t\t//For CHAOS lib\n\t\tset_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ .\"/lib/chaos-client/src/\");\n\t\trequire(\"CaseSensitiveAutoload.php\");\n\t\tspl_autoload_extensions(\".php\");\n\t\tspl_autoload_register(\"CaseSensitiveAutoload\");\n\n\t\trequire(\"wpportalclient.php\");\n\t\trequire(\"wpchaosobject.php\");\n\t\trequire(\"widgets/chaoswidget.php\");\n\t\trequire(\"widgets/attribute.php\");\n\t\trequire(\"widgets/multiattribute.php\");\n\t}", "public static function autoload()\n {\n if (file_exists(__DIR__ . '/Stringprep/vendor/autoload.php')) {\n require_once __DIR__ . '/Stringprep/vendor/autoload.php';\n } else {\n require_once __DIR__ . '/../../bundle/vendor/autoload.php';\n }\n }", "public function boot(){\n View::composer('*', 'App\\Http\\Composers\\MainComposer');\n }", "function humcore_deposit_component_include() {\n\n\trequire( dirname( __FILE__ ) . '/component-loader.php' );\n\n}", "public function configure()\n {\n // Image Packages\n require_once 'Image/Transform.php';\n // Text Packages\n require_once 'Text/Wiki.php';\n require_once 'Text/Wiki/Mediawiki.php';\n require_once \"Text/Password.php\";\n // HTML Packages\n require_once 'HTML/TagCloud.php';\n // HTTP Packages\n require_once 'HTTP/Request2.php';\n // Net Packages\n require_once 'Net/URL2.php';\n // Individual specific packages\n require_once 'Date.php';\n require_once \"Mail.php\"; \n // Service Packages\n require_once 'Services/TinyURL.php';\n require_once 'Services/Twitter.php';\n }", "private function load_dependencies() {\n\t\t/**\n\t\t * Admin related fucntions.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-uncode-toolkit-privacy-admin.php';\n\n\t\t/**\n\t\t * Frontend related fucntions.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-uncode-toolkit-privacy-public.php';\n\t}", "function install()\n {\n }", "protected function parseComposer()\r\n {\r\n $bundles = parent::parseComposer();\r\n foreach ($this->getPackages() as $package) {\r\n if (!strncmp($package['name'], 'superrb/', strlen('superrb/'))) {\r\n $bundles[] = array(\r\n 'name' => $package['name'],\r\n 'version' => $package['version'],\r\n 'reference' => $package['source']['reference'],\r\n );\r\n }\r\n }\r\n\r\n return $bundles;\r\n }", "public function activate(Composer $composer, IOInterface $io);", "protected function getStub()\n { \n return __DIR__.'/stubs/plugin.stub';\n }", "public function getDependencies(){ return array(); }", "public function bootstrap();", "public function bootstrap();", "private function manipulateComposerJsonWithAllowAutoInstall(): void\n {\n [$json, $manipulator] = Util::getComposerJsonFileAndManipulator();\n\n $manipulator->addSubNode('extra', 'automatic.allow-auto-install', true);\n\n $this->container->get(Filesystem::class)->dumpFile($json->getPath(), $manipulator->getContents());\n }", "public function getComposer() {\n if (!$this->composer) {\n $this->composer = Factory::create($this->io(), NULL, TRUE);\n }\n return $this->composer;\n }", "private function get_composer_json() {\n\t\treturn new JsonFile( $this->get_composer_json_path() );\n\t}", "protected function patchComposerJson()\n {\n if ( ! $this->fileExists('composer.json')) {\n $this->write('Failed to locate composer.json in local directory', 'error');\n\n return;\n }\n\n $structure = json_decode(file_get_contents($this->path('composer.json')));\n if (json_last_error() !== JSON_ERROR_NONE) {\n $this->write('Failed to parse composer.json', 'error');\n\n return;\n }\n\n $structure->require->{'offline/oc-bootstrapper'} = '^' . VERSION;\n\n $contents = json_encode($structure, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n if (file_put_contents($this->path('composer.json'), $contents) === false) {\n $this->write('Failed to write new composer.json', 'error');\n }\n }", "private function init(): void\n {\n // Load composer.json\n $this->composerJson = $this->loadJsonFile($this->composerJsonFilename);\n\n // Reconstitute the composer.lock filename\n $composerLockFilename = dirname($this->composerJsonFilename) .\n DIRECTORY_SEPARATOR .\n basename($this->composerJsonFilename, '.json') .\n '.lock';\n\n // Check if composer.lock file exists\n if (!file_exists($composerLockFilename)) {\n throw new ComposerException(\n sprintf('Project is not initialized with Composer, \"%s\" file doest not exists', $composerLockFilename)\n );\n }\n\n // Get JSON content of composer.json file\n if (($this->composerLock = json_decode(file_get_contents($composerLockFilename), true)) === false) {\n throw new ComposerException(\n sprintf('\"%s\" file of project is corrupted or not readable', $composerLockFilename)\n );\n }\n\n // Reindex packages\n $this->composerLock['packages'] = array_column($this->composerLock['packages'], null, 'name');\n\n // Load packages\n $this->packages = array_fill_keys(array_column($this->composerLock['packages'], 'name'), null);\n }", "public function getPackage() {}", "function plugin_package() {\n\t\t$this->response['package'] = site_url( '/wp-content/shopp-uploads/adsanity.zip' );\n\t}", "public function runComposer():Create {\n\n # Check input > application is set and not empty\n if(empty($this->inputs['application'] ?? []))\n \n # New error\n throw new CrazyException(\n \"Input of application create is missing\", \n 500,\n [\n \"custom_code\" => \"create-002\",\n ]\n );\n\n # Decalare input\n $inputs = $this->inputs[\"application\"];\n\n # Push autoload_psr-4_App\\\\_0 in inputs\n $inputs[] = Composer::DEFAULT_PROPERTIES[\"autoload_psr-4_App\\\\_0\"];\n\n # Wash input\n $inputs = Process::wash($inputs, Composer::DEFAULT_PROPERTIES);\n\n # Compilate inputs\n $inputs = Process::compilate($inputs);\n\n # Sort inputs\n $inputs = Process::sortByConditions($inputs, Composer::DEFAULT_PROPERTIES);\n\n # Stretch inputs\n $inputs = Arrays::stretch($inputs);\n\n # Get path of composer\n $composer = File::path(\"@app_root/composer.json\");\n\n # Check json file exists\n if(!Json::check($composer))\n\n # Create composer file\n Composer::create($composer);\n\n # Set composer.json\n # - Reqire script to be executed from the project folder \n Composer::set($inputs, $composer);\n\n # Return instance\n return $this;\n\n }", "public function testComposerInstall()\n {\n $this->assertFileNotExists('vendor/test/strawberry-jam/subordinate/jam.out');\n\n PH::runOk('COMPOSER_COMPILE=1 composer install -v');\n\n $this->assertFileContent('vendor/test/strawberry-jam/subordinate/jam.out', \"STRAWBERRY-FIELDS\\n\");\n }", "public function library()\n\t{\n\t\n\t}", "static function autoload()\r\n\t{\r\n\t\t\r\n\t}", "function getComposerConfig ()\n {\n if (!$this->composerConfig)\n $this->composerConfig = new ComposerConfigHandler(\"$this->path/composer.json\", true);\n return $this->composerConfig->data ? $this->composerConfig : null;\n }", "protected function showUsage() {\n print <<<EOF\nUsage: phpab [switches] <directory1|file1|/path/to/composer.json> [...<directoryN|fileN>]\n\n -i, --include File pattern to include (default: *.php)\n -e, --exclude File pattern to exclude\n\n --blacklist Blacklist classname or namespace (wildcards supported)\n --whitelist Whitelist classname or namespace (wildcards supported)\n\n -b, --basedir Basedir for filepaths\n -t, --template Path to code template to use\n\n -o, --output Output file for generated code (default: STDOUT)\n \n -p, --phar Create a phar archive (requires -o )\n --all Include all files in given directory when creating a phar\n --alias Specify explicit internal phar alias filename (default: output filename)\n --hash Force given hash algorithm (SHA-1, SHA-256 or SHA-512) (requires -p, conflicts with --key)\n --bzip2 Compress phar archive using bzip2 (requires -p) (bzip2 required)\n --gzip Compress phar archive using gzip (requires -p) (gzip required)\n --key OpenSSL key file to use for signing phar archive (requires -p) (openssl required)\n\n -c, --compat Generate PHP 5.2 compatible code\n -s, --static Generate a static require file\n \n -w, --warm Generate a static opcache warming file\n --reset Add opcache reset call when generating opcache warming file\n\n -1, --prepend Register as first autoloader (prepend to stack, default: append)\n -d, --no-exception Do not throw exception on registration problem (default: throw exception)\n\n -n, --nolower Do not lowercase classnames for case insensitivity\n\n -q, --quiet Quiet mode, do not output any processing errors or information\n\n --cache <file> Enable caching and set filename to use for cache storage\n\n --follow Enables following symbolic links (not compatible with phar mode)\n --format Dateformat string for timestamp\n --linebreak Linebreak style (CR, CRLF or LF, default: LF)\n --indent String used for indenting or number of spaces (default: 16 (compat 12) spaces)\n\n --tolerant Ignore Class Redeclarations in the same file\n --once Use require_once instead of require when creating a static require file\n\n\n --trusting Do not check mimetype of files prior to parsing (default)\n --paranoid Do check mimetype of files prior to parsing\n\n --var name=foo Assign value 'foo' to variable 'name' to be used in (custom) templates\n\n --lint Run lint on generated code and exit\n --lint-php PHP binary to use for linting (default: /usr/bin/php or c:\\php\\php.exe)\n\n -h, --help Prints this usage information\n -v, --version Prints the version and exits\n\nEOF;\n }", "function csstools_depends()\n{\n return array('filesystem', 'http', 'image');\n}", "public static function runFromComposer($event) {\n\n new Bootstrapper();\n\n $sourceDirectory = $event && isset($event->getComposer()->getPackage()->getConfig()[\"source-directory\"]) ?\n $event->getComposer()->getPackage()->getConfig()[\"source-directory\"] : \".\";\n\n chdir($sourceDirectory);\n\n $generator = new ClientAPIGenerator();\n $generator->generate();\n }", "public function handle()\n {\n if ($this->argument('packagename') != '') {\n $this->namePackage = $this->argument('packagename');\n $this->checkPath();\n } else {\n $this->enterName();\n }\n $data = file_get_contents($this->file);\n file_put_contents($this->directory . '/temp.zip', $data);\n $zip = new \\ZipArchive;\n if ($zip->open($this->directory . '/temp.zip') == true) {\n $zip->extractTo($this->directory . '/');\n $zip->close();\n File::copyDirectory($this->directory . '/evoPackage-master/', $this->directory . '/');\n File::deleteDirectory($this->directory . '/evoPackage-master/');\n unlink($this->directory . '/temp.zip');\n $serviceprovider = file_get_contents($this->directory . '/src/ExampleServiceProvider.php');\n $serviceprovider = str_replace('example', $this->namePackage, $serviceprovider);\n $serviceprovider = str_replace('Example', ucfirst($this->namePackage), $serviceprovider);\n file_put_contents($this->directory . '/src/' . ucfirst($this->namePackage) . 'ServiceProvider.php', $serviceprovider);\n //update composer part\n $composer = file_get_contents($this->directory . '/src/composer.json');\n $composer = str_replace('example', $this->namePackage, $composer);\n $composer = str_replace('Example', ucfirst($this->namePackage), $composer);\n file_put_contents($this->directory . '/src/composer.json', $composer);\n\n unlink($this->directory . '/src/ExampleServiceProvider.php');\n $dirForComposer = 'packages/' . $this->namePackage . '/src/';\n $namespaceForComposer = 'EvolutionCMS\\\\' . ucfirst($this->namePackage) . '\\\\';\n $this->call('package:installautoload', ['key' => $namespaceForComposer, 'value' => $dirForComposer]);\n }\n }", "protected function getStub()\n {\n return __DIR__.'/../stubs/composer.stub';\n }", "private function load_dependencies()\n\t{\n\t\t$dependencies = [\n\t\t\t'Routing',\n\t\t\t'Loader',\n\t\t\t'Base',\n\t\t];\n\n\t\tforeach($dependencies as $file)\n\t\t{\n\t\t\trequire_once plugin_dir_path(__FILE__) . $file . '.php';\n\t\t}\n\t}", "private function bootSkinComposer()\n {\n view()->composer(['layouts.app', 'docs'], function ($view) {\n $skin = 'blue';\n\n if ($user = user_info()) {\n $skin = $user->skin;\n }\n\n $view->withSkin($skin);\n });\n }", "public function activate(Composer $composer, IOInterface $io)\n {\n }", "protected function RequireLibs()\n {\n\n }", "private function load_dependencies() {\n\n\t\t/**\n\t\t * The class responsible for orchestrating the actions and filters of the\n\t\t * core theme.\n\t\t */\n\t\trequire_once 'class-custom-theme-loader.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the public area.\n\t\t */\n\t\trequire_once 'public/class-theme-public.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the admin area.\n\t\t */\n\t\trequire_once 'admin/class-theme-admin.php';\n\n\n\t\t$this->loader = new Wpt_Custom_Theme_Loader();\n\n\t}", "function get_dependencies();", "public function dependencies() {\n\t\tif ($customPath = $this->params['custom']) {\n\t\t\t$this->_paths = [$customPath];\n\t\t} elseif (!empty($this->params['plugin'])) {\n\t\t\t$this->_paths = [CakePlugin::path($this->params['plugin'])];\n\t\t} else {\n\t\t\t$this->_paths = [APP];\n\t\t}\n\n\t\t$this->_findFiles('php');\n\t\tforeach ($this->_files as $file) {\n\t\t\t$this->out(sprintf('Updating %s...', $file), 1, Shell::VERBOSE);\n\n\t\t\t$this->_correctFile($file);\n\n\t\t\t$this->out(sprintf('Done updating %s', $file), 1, Shell::VERBOSE);\n\t\t}\n\t}", "function wp_default_packages_scripts($scripts)\n {\n }", "function armin_version()\n { \n $composer = json_decode(File::get(base_path('composer.json')));\n\n return optional($composer)->version;\n }", "private function updateComposerLock(): void\n {\n $composerLockPath = Util::getComposerLockFile();\n $composerJson = \\file_get_contents(Factory::getComposerFile());\n $composer = $this->container->get(Composer::class);\n\n $lockFile = new JsonFile($composerLockPath, null, $this->container->get(IOInterface::class));\n $locker = new Locker(\n $this->container->get(IOInterface::class),\n $lockFile,\n $composer->getRepositoryManager(),\n $composer->getInstallationManager(),\n (string) $composerJson\n );\n\n $lockData = $locker->getLockData();\n $lockData['content-hash'] = Locker::getContentHash((string) $composerJson);\n\n $lockFile->write($lockData);\n }", "public function bootstrapSystem() {}", "public function bootstrapSystem() {}", "protected function loadFlagsFromComposerManifest() {}", "function add_options_packages() {\n $this->configure_propack();\n }", "protected function resolvePackageDependencies() {}", "function rpostinstall() {\n\t\tif (file_exists('composer.json')) {\n\t\t\t$composer = json_decode(file_get_contents('composer.json'));\n\t\t\t//debug($composer);\n\t\t\tif (isset($composer->scripts) && isset($composer->scripts->{'post-install-cmd'})) {\n\t\t\t\t$cmd = $this->composerCommand . ' run-script post-install-cmd';\n\t\t\t\t$deployPath = $this->getVersionPath();\n\t\t\t\t$remoteCmd = 'cd ' . $deployPath . ' && ' . $cmd;\n\t\t\t\t$this->ssh_exec($remoteCmd);\n\t\t\t}\n\t\t}\n\t}", "protected function getComposerMode() {}", "public abstract function resetComposer();", "protected function composerUpdate()\n {\n $this->runCommand(['composer', 'update'], getcwd(), $this->output);\n }", "private function load_dependencies() {\n /**\n * \"BEHIND THE SCENCE\" CLASSES\n * Note: usually the admin and public do not directly use them, they are\n * necessary for the plugin (eg. i18n)\n */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-i18n.php';\n\n /* ADMIN */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-admin.php';\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-api.php';\n\n /* PUBLIC */\n require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-public.php';\n }", "function loadDependencies() {\n if (strpos(TERMINUS_ROOT, 'phar:') === 0) {\n require TERMINUS_ROOT . '/vendor/autoload.php';\n return;\n }\n\n $has_autoload = false;\n\n foreach (getVendorPaths() as $vendor_path) {\n if (file_exists($vendor_path . '/autoload.php')) {\n require $vendor_path . '/autoload.php';\n $has_autoload = true;\n break;\n }\n }\n\n if (!$has_autoload) {\n fputs(STDERR, \"Internal error: Can't find Composer autoloader.\\n\");\n exit(3);\n }\n}", "public function getComposer(): Composer\n {\n return $this->composer;\n }", "public function bootstrap(): void\n {\n $this->addPlugin(MeTools::class);\n }", "public function getComposerJson()\n {\n if ($this->_composer == null) {\n $fileContent = file_get_contents($this->getPathToComposerJSON());\n $this->_composer = Zend_Json::decode($fileContent, Zend_Json::TYPE_OBJECT);\n }\n return $this->_composer;\n }" ]
[ "0.71935385", "0.67585266", "0.6530148", "0.6485115", "0.6470402", "0.6411774", "0.6373532", "0.6353142", "0.6147149", "0.6117851", "0.60970265", "0.60969216", "0.6079682", "0.60757715", "0.60659194", "0.6052237", "0.6014083", "0.5993471", "0.5979397", "0.5975139", "0.5975139", "0.5973383", "0.59721875", "0.58858716", "0.5878291", "0.5874098", "0.5872896", "0.58609134", "0.58575356", "0.585071", "0.58502907", "0.5849624", "0.5834819", "0.5824995", "0.5820515", "0.5820515", "0.58149606", "0.58138007", "0.5808487", "0.5796583", "0.57901454", "0.5779334", "0.57688767", "0.5761844", "0.5753226", "0.57481134", "0.57311696", "0.571856", "0.5718087", "0.571392", "0.57077", "0.5693435", "0.5677848", "0.5666854", "0.56320584", "0.56172323", "0.5613962", "0.561038", "0.561038", "0.56093544", "0.56074005", "0.5599669", "0.5597554", "0.5596309", "0.55876076", "0.55820704", "0.5570282", "0.55701673", "0.5557755", "0.5556307", "0.554536", "0.554443", "0.5534335", "0.55285853", "0.55278933", "0.5517652", "0.55145764", "0.5509631", "0.55089426", "0.55057913", "0.55036414", "0.55006814", "0.54969746", "0.54955786", "0.54880345", "0.5486403", "0.54797846", "0.547897", "0.54783535", "0.5473625", "0.54686886", "0.5467606", "0.545566", "0.5446977", "0.54422873", "0.5439518", "0.54370654", "0.5436575", "0.5425151", "0.5424177" ]
0.6330981
8
Factory method for chain ability.
public static function create($content, $jsonOption = 0, $status = 200, $reason = '', array $headers = []) { return new static($content, $jsonOption, $status, $reason, $headers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function chain(PipeChainInterface $chain): PipeChainInterface;", "public function chain() {\n\t\t\treturn $this->chain;\n\t\t}", "public function startChain(){\n\t\treturn $this;\n\t}", "public function startChain(){\n\t\treturn $this;\n\t}", "protected function & returnToChain () {\n // Easier, than writing return (this) every time;\n return $this;\n }", "public function startChain() {\n\t\treturn $this;\n\t}", "public function setChain($chain) {\n $this->chain = $chain;\n return $this;\n }", "public function testChain()\n\t{\n\t\t$request = $this->createMock(\\Psr\\Http\\Message\\ServerRequestInterface::class);\n\n\t\t$response = $this->createMock(\\Psr\\Http\\Message\\ResponseInterface::class);\n\t\t$response->method('getReasonPhrase')->willReturn('ping');\n\n\t\t$middlewareAdaptor = $this->createMock(MiddlewareAdaptorInterface::class);\n\t\t$middlewareAdaptor->method('setResolver');\n\t\t$middlewareAdaptor->method('executePipeline')\n\t\t->with(\n\t\t\t$this->equalTo('pipelineFoo'),\n\t\t\t$this->equalTo($request),\n\t\t\t$this->equalTo(null)\n\t\t)\n\t\t->willReturn($response);\n\n\t\t$resolveAdaptor = $this->createMock(\\Weave\\Resolve\\ResolveAdaptorInterface::class);\n\t\t$dispatchAdaptor = $this->createMock(\\Weave\\Dispatch\\DispatchAdaptorInterface::class);\n\n\t\t$requestFactory = $this->createMock(\\Weave\\Http\\RequestFactoryInterface::class);\n\t\t$responseFactory = $this->createMock(\\Weave\\Http\\ResponseFactoryInterface::class);\n\t\t$emitter = $this->createMock(\\Weave\\Http\\ResponseEmitterInterface::class);\n\n\t\t$middleware = new Middleware(\n\t\t\t$middlewareAdaptor,\n\t\t\tfn () => 'pipelineFoo',\n\t\t\t$resolveAdaptor,\n\t\t\t$dispatchAdaptor,\n\t\t\t$requestFactory,\n\t\t\t$responseFactory,\n\t\t\t$emitter\n\t\t);\n\n\t\t$result = $middleware->chain('pipelineFoo', $request);\n\n\t\t$this->assertEquals('ping', $result->getReasonPhrase());\n\t}", "public function chain()\n {\n $response = SubstrateBase::APIHandler('system_'.__FUNCTION__);\n $this->_chain = $response['result'];\n return response()->json($this->_chain);\n }", "protected function buildChain($key, $name, $required, $allowEmpty)\n {\n return new Chain($key, $name, $required, $allowEmpty);\n }", "public function get_chain()\n {\n return $this->_chain;\n }", "public function findChained()\n {\n $this->chain = $this->createQueryBuilder('bl')\n ->select('bl, b, ta')\n ->leftJoin('bl.banknote', 'b')\n ->leftJoin('bl.transaction', 'ta')\n ;\n\n return $this;\n }", "private function getPass()\n {\n return new ChainTransformationPass(array(\n new ConvertArgumentsPass(),\n new SanitizeFramesPass(),\n new ShiftArgumentsPass(),\n new ConvertFramesPass()\n ));\n }", "public function chain($tasks) \n {\n return new Chain($tasks);\n }", "public function getChain() {\n return $this->chain;\n }", "public abstract function make();", "public function createApplicableChecker(): ChainApplicableChecker;", "public function testExtendsChainActivator()\n {\n $activator = new TraceableChainActivator();\n static::assertInstanceOf(ChainActivator::class, $activator);\n }", "public function make() {}", "protected function carry()\n {\n return function ($next, $pipe) {\n return function (...$passable) use ($next, $pipe) {\n if (is_callable($pipe)) {\n return shy()->runFunctionWithDependencyInjection($pipe, $next, ...$passable);\n } else {\n if (is_object($pipe)) {\n array_unshift($passable, $next);\n $parameters = $passable;\n } else {\n list($name, $parameters) = $this->parsePipeString($pipe);\n $pipe = shy($name);\n $parameters = array_merge([$next], $passable, $parameters);\n }\n\n if (method_exists($pipe, $this->method)) {\n $reflector = new ReflectionMethod($pipe, $this->method);\n $parameters = shy()->getOrMakeDependencies($parameters, $reflector->getParameters());\n $method = $this->method;\n } else {\n throw new RuntimeException('Method ' . $this->method . ' not exist');\n }\n\n /**\n * Initialize pipeline before execute\n */\n $this->initialize();\n\n $response = $pipe->{$method}(...$parameters);\n\n return $response;\n }\n };\n };\n }", "abstract function &create();", "protected function factory()\n {\n $this->request = $this->request();\n $this->response = $this->response();\n $this->route = $this->route();\n\n return $this;\n }", "private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}", "public function __construct ()\n {\n return this;\n }", "public static function withChain($chain)\n {\n return new PendingChain(static::class, $chain);\n }", "abstract public function decorate();", "public function getChainCollection();", "public function testChaining()\n {\n $stub = new Fluency();\n $this->assertSame($stub, $stub->fooString('foo'), 'Calling property() with multiple arguments should be fluent, allowing for chaining: return the class itself after setting a value.');\n $this->assertSame($stub, $stub->fooString('foo')->barString('bar'), 'Calling property() with multiple arguments should be fluent, allowing for chaining: return the class itself after setting a value.');\n $this->assertSame('bar', $stub->fooString('foo')->barString(), 'Calling property() without multiple arguments should return the value: do not chain after returning a value.');\n $this->assertSame('foo', $stub->fooString(), 'Calling property() repeatedly in a chain should allow for multiple values to be set.');\n $this->assertSame('bar', $stub->barString(), 'Calling property() repeatedly in a chain should allow for multiple values to be set.');\n }", "public function make();", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\t}", "public function executeChain(IJoinPoint $joinpoint);", "abstract protected function create ();", "public static function via();", "public function chain(ServantInterface $next): ServantInterface\n {\n return $this->nextServant = $next;\n }", "static function chain($fs) { return self::make(function ($x) use($fs) { return array_reduce($fs, function ($x, $f) { return $f($x); }, $x); }); }", "public static function self() {\n\n\t\treturn self::factory( 'self' );\n\n\t}", "public function __construct(ChainedFuncCalls $calls, $attributes = [])\n {\n parent::__construct($attributes);\n $this->chainedFunCalls = $calls;\n }", "function __construct()\n {\n $this->reqAdminToMod = Base_GeneralFunctions::asBoolean(Container_Config::brokerByID('OnlyAdminsCanTagTalks', 'false')->getKey('value'));\n $this->reqCreatorToMod = Base_GeneralFunctions::asBoolean(Container_Config::brokerByID('OnlyTagCreatorsCanEditTalkTags', 'true')->getKey('value'));\n return parent::__construct();\n }", "public function __construct() {\n return $this;\n }", "public function __construct($childPolicy) { }", "public function __invoke($arg) {\r\n return self::factory($arg);\r\n }", "public function constructProvider() {\n return [\n [['conjunction' => 'AND', 'members' => []]],\n [['conjunction' => 'OR', 'members' => []]],\n ];\n }", "public static function newFactory()\n {\n return ReturnOrderLineFactory::new();\n }", "protected function getChain($key, $name, $required, $allowEmpty)\n {\n if (isset($this->chains[$this->context][$key])) {\n /** @var Chain $chain */\n $chain = $this->chains[$this->context][$key];\n $chain->required($required);\n $chain->allowEmpty($allowEmpty);\n\n return $chain;\n }\n return $this->chains[$this->context][$key] = $this->buildChain($key, $name, $required, $allowEmpty);\n }", "public function __invoke()\n {\n $params = array_merge($this->params, func_get_args());\n return $this->factory->newInstance(\n $this->class,\n $params,\n $this->setter\n );\n }", "public function decorate();", "protected function getRouting_ChainedResourcesLocatorService()\n {\n return $this->services['routing.chained_resources_locator'] = new \\phpbb\\routing\\resources_locator\\chained_resources_locator(${($_ = isset($this->services['routing.resources_locator.collection']) ? $this->services['routing.resources_locator.collection'] : $this->getRouting_ResourcesLocator_CollectionService()) && false ?: '_'});\n }", "static function create(): self;", "public function __construct()\n {\n if (Gate::getPolicyFor($class = User::getProxiedClass())) {\n $this->middleware(\"can:batchUpdate,{$class}\")->only('update');\n $this->middleware(\"can:batchDelete,{$class}\")->only('destroy');\n $this->middleware(\"can:batchRestore,{$class}\")->only('restore');\n }\n }", "public static function make(...$args);", "abstract function create();", "public function __construct(\\Iterator $chain) {\n $this->chain = $chain;\n }", "abstract protected function construct($params);", "public function newInstance();", "public function newInstance();", "protected abstract function __construct();", "protected function _construct()\n\t{\n\t\t$this->resetParams();\n\t\treturn parent::_construct();\n\t}", "public function __construct(AbstractChainedCommandHandler $headOfChain)\n {\n $this->headOfChain = $headOfChain;\n }", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->hard = func_get_arg(0);\n $this->scopes = func_get_arg(1);\n }\n }", "public static function make(){\n return new Relation();\n }", "abstract protected function __construct();", "public function create(array $data): ChainableItemInterface;", "protected function carry()\r\n {\r\n return function ($stack, $pipe) {\r\n return function ($passable) use ($stack, $pipe) {\r\n try {\r\n if (is_callable($pipe)) {\r\n return $pipe($passable, $stack);\r\n } elseif (!is_object($pipe)) {\r\n [$name, $parameters] = $this->parsePipeString($pipe);\r\n\r\n $pipe = $this->getContainer()->make($name);\r\n\r\n $parameters = array_merge([$passable, $stack], $parameters);\r\n } else {\r\n $parameters = [$passable, $stack];\r\n }\r\n\r\n $carry = method_exists($pipe, $this->method)\r\n ? $pipe->{$this->method}(...$parameters)\r\n : $pipe(...$parameters);\r\n\r\n return $carry;\r\n } catch (Throwable $e) {\r\n return $this->handleException($passable, $e);\r\n }\r\n };\r\n };\r\n }", "abstract public function __construct(public callable $y, private ...$x);", "function method1()\n {\n echo \"Hello from method 1\" . PHP_EOL;\n return $this; // This will make $this an instance of the class and thus makes it possible for you to chain the methods. This is because methods can only be executed from $this or an object. \n }", "public function __call ($a, $b) {\n return $this;\n }", "public function __construct() {\n\t\t\t$this->getConfig();\n\t\t\t$this->buildShopUrl();\n\n\t\t\treturn $this;\n\t\t}", "public function newInstance()\n {\n return $this->newInstanceArgs(func_get_args());\n }", "protected function carry()\n {\n return function ($stack , $pipe) {\n return function ($passable) use ($stack , $pipe) {\n try {\n $slice = parent::carry();\n return call_user_func($slice($stack , $pipe) , $passable);\n } catch (Exception $e) {\n return $this->handleException($passable , $e);\n } catch (Throwable $e) {\n return $this->handleException($passable , new FatalThrowableError($e));\n }\n };\n };\n }", "public function __construct($parent) {\r\n parent::__construct($parent, 'invoke');\r\n }", "public function withAccessCheck(): self\n {\n // @see https://phpstan.org/developing-extensions/backward-compatibility-promise\n // @phpstan-ignore-next-line\n $type = new static(\n $this->getClassName(),\n $this->getSubtractedType(),\n $this->getClassReflection()\n );\n $type->hasAccessCheck = true;\n $type->isCount = $this->isCount;\n return $type;\n }", "public function testChain()\n {\n $filter = Solar::factory('Solar_Filter');\n \n // required, but no filter\n $filter->setChainRequire('foo');\n \n // one filter\n $filter->addChainFilter('bar', 'validateInt');\n \n // many filters\n $filter->addChainFilters('baz', array(\n 'sanitizeInt',\n array('validateRange', 1, 9),\n ));\n \n // required, one filter\n $filter->setChainRequire('dib');\n $filter->addChainFilter('dib', 'validateInt');\n \n // required, many filters\n $filter->setChainRequire('zim');\n $filter->addChainFilters('zim', array(\n 'sanitizeInt',\n array('validateRange', 1, 9),\n ));\n \n /**\n * expected output after being sanitized\n */\n $expect = array(\n 'foo' => 'anything',\n 'bar' => 123,\n 'baz' => 4,\n 'dib' => 678,\n 'zim' => 7,\n );\n \n /**\n * apply filter with \"valid\" user input\n */\n \n // user input\n $data = array(\n 'foo' => 'anything',\n 'bar' => 123,\n 'baz' => 4.5,\n 'dib' => 678,\n 'zim' => 7.9,\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertTrue($valid);\n \n // should have sanitized the data in-place\n $this->assertSame($data, $expect);\n \n /**\n * apply filter with invalid user input\n */\n \n // user input\n $data = array(\n 'foo' => 'anything',\n 'bar' => 'abc', // validateInt\n 'baz' => 123, // validateRange\n 'dib' => 456,\n 'zim' => -78, // validateRange\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertSame($keys, array('bar', 'baz', 'zim'));\n \n /**\n * apply filter with missing requires\n */\n \n // user input\n $data = array(\n 'foo' => null,\n 'bar' => 123,\n 'baz' => 4.5,\n 'dib' => '',\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertSame($keys, array('foo', 'dib', 'zim'));\n \n /**\n * apply filter with invalid user input and missing requires\n */\n \n // user input\n $data = array(\n 'bar' => 'abc', // validateInt\n 'baz' => 123, // validateRange\n 'dib' => 4.5,\n );\n \n // valid?\n $valid = $filter->applyChain($data);\n $this->assertFalse($valid);\n \n // get the list of invalid elements\n $invalid = $filter->getChainInvalid();\n $keys = array_keys($invalid);\n $this->assertEquals($keys, array('foo', 'zim', 'bar', 'baz', 'dib'));\n }", "public static function create(): self\n\t{\n\t\treturn (new static(...func_get_args()))->open();\n\t}", "public function testAddAndGet()\n {\n $decorator = new TraceableChainActivator();\n $decorator->add($fakeActivator1 = new ArrayActivator());\n $decorator->add($fakeActivator2 = new ArrayActivator([]));\n\n // Should be the same sorting\n static::assertSame($fakeActivator1, $decorator->getActivators()[0]);\n static::assertSame($fakeActivator2, $decorator->getActivators()[1]);\n }", "public static function builder();", "public function __construct()\n {\n $this->middleware('can:view,supplier')->only(['show']);\n $this->middleware('can:create,App\\Supplier')->only(['create', 'store']);\n $this->middleware('can:update,supplier')->only(['edit', 'update']);\n $this->middleware('can:delete,supplier')->only('destroy');\n }", "protected function construct(){\n\n }", "public function build($data)\n {\n $oChain = new RuleChain($this->oGateway, $this->oLogger);\n $sAlias = $this->getTableQueryAlias();\n \n $oChain->iEpisodeID = $this->getField($data,'episode_id',$sAlias);\n $oChain->sRuleChainID = $this->getField($data,'rule_chain_id',$sAlias);\n $oChain->sEventTypeID = $this->getField($data,'event_type_id',$sAlias);\n $oChain->sSystemID = $this->getField($data,'system_id',$sAlias);\n $oChain->sChainName = $this->getField($data,'chain_name',$sAlias);\n $oChain->sChainNameSlug = $this->getField($data,'chain_name_slug',$sAlias);\n $oChain->iRoundingOption = $this->getField($data,'rounding_option',$sAlias);\n $oChain->fCapValue = $this->getField($data,'cap_value',$sAlias);\n $oChain->oEnabledFrom = $this->getField($data,'enabled_from',$sAlias);\n $oChain->oEnabledTo = $this->getField($data,'enabled_to',$sAlias);\n $oChain->sSystemName = $this->getField($data,'system_name','');\n $oChain->sEventTypeName = $this->getField($data,'event_name','');\n \n return $oChain;\n }", "abstract function __construct();", "protected function carry(): Closure\n {\n return function (Closure $stack, callable $pipe) {\n return function ($passable) use ($stack, $pipe) {\n if (is_callable($pipe)) {\n return $pipe($passable, $stack);\n }\n\n $parameters = [$passable, $stack];\n return $pipe(...$parameters);\n };\n };\n }", "function testChaining(){\n\t\t#mdx:chaining\n\t\tParam::get('number')\n\t\t\t->filters()\n\t\t\t\t->strip('/[^\\d]/')\n\t\t\t\t->required()\n\t\t\t\t->minlen(5)\n\t\t\t\t->maxlen(10);\n\n\t\t$result = Param::get('number')->process([\n\t\t\t'number' => '203-40-10/80'\n\t\t]);\n\t\t#/mdx var_dump($result->output)\n\t\t$this->assertEquals('203401080',$result->output);\n\n\t}", "public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }", "public function authorize()\n {\n return Gate::allows('create', Borrowing::class);\n }", "public static function create(): self\n {\n return new self(\n 'You can not call a function without having any functions defined. Please return null or false!'\n );\n }", "function __construct($a = '', &$caller) {\n parent::__construct($a, $caller);\n }", "public static function create(): self\n {\n $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);\n // Skip if called via shorthand function\n $caller = (strpos($caller[1]['file'], 'src/Resource/function/shorthands.php') === false)\n ? $caller[1]\n : $caller[2];\n $file = $caller['file'];\n $line = $caller['line'];\n $code = static::readCodeLine($file, $line) ?: '';\n return new self($file, $line, $code);\n }", "public function join()\r\n {\r\n throw new Exception('This method is not yet implemented');\r\n \r\n return $this;\r\n }", "public static function resolve($value, $key = null) : Chain\n {\n if (is_int($key) && ! $value instanceof Validator) {\n return new Chain(new IsSame($value, true));\n }\n\n if ($value instanceof Validator) {\n return new Chain($value);\n }\n\n if ($value instanceof Chain) {\n return $value;\n }\n\n throw new RuntimeException('NOT IMPLEMENTED YET');\n }", "function __construct()\n {\n $this->middleware('permission:transport-list|role-create|role-edit|role-delete', ['only' => ['index','store']]);\n $this->middleware('permission:transport-create', ['only' => ['create','store']]);\n $this->middleware('permission:transport-edit', ['only' => ['edit','update']]);\n $this->middleware('permission:transport-delete', ['only' => ['destroy']]);\n }", "public static function any(): self\n {\n return new self;\n }", "public function __construct() {\t\t\n\t\t$a = func_get_args();\n $i = func_num_args();\n\t\t\n if (method_exists($this, $f='__construct'.$i))\n call_user_func_array(array($this, $f), $a);\n\t}", "abstract function abilityGet();", "function __construct()\n {\n $this->middleware('permission:history-list|history-create|history-edit|history-delete', ['only' => ['index','show']]);\n $this->middleware('permission:history-create', ['only' => ['create','store']]);\n $this->middleware('permission:history-edit', ['only' => ['edit','update']]);\n $this->middleware('permission:history-delete', ['only' => ['destroy']]);\n }", "private function carry()\n {\n return function($next, $filter) {\n return function () use ($next, $filter) {\n return $this->dependent->subCall($filter, [$next]);\n };\n };\n }", "function __construct()\n {\n // permission for admin\n // $this->middleware('permission:all-account-list|all-account-delete|all-account-edit', ['only' => ['index']]);\n // $this->middleware('permission:operator-create', ['only' => ['create']]);\n // $this->middleware('permission:operator-create|seller-create|buyer-create|seller-buyer-create', ['only' => ['store']]);\n // $this->middleware('permission:all-account-edit|buyer-edit|seller-edit|seller-buyer-edit', ['only' => ['edit', 'update']]);\n // $this->middleware('permission:all-account-delete|buyer-delete|seller-delete|seller-buyer-delete', ['only' => ['destroy']]);\n\n // // // permission for admin and operator\n // $this->middleware('permission:buyer-list|buyer-delete|seller-buyer-list|seller-buyer-delete', ['only' => ['buyerList']]);\n // $this->middleware('permission:buyer-create|seller-buyer-create', ['only' => ['buyerCreate']]);\n\n // $this->middleware('permission:seller-list|seller-delete', ['only' => ['sellerList']]);\n // $this->middleware('permission:seller-create', ['only' => ['sellerCreate']]);\n\n }", "function execute(&$context,&$chain){}", "public function construct() {\n\n }", "public static function make() {\n return new self();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "function orB($lhs = null, $rhs = null)\n{\n return call_user_func_array(__PRIVATE__::$instance[orB], func_get_args());\n}", "protected function buildDecoratorChain($abstract, $concrete, array $chain): Closure\n {\n // When called with two parameters, this behaves as a bind + factory call.\n if (empty($chain)) {\n $this->container->bind($abstract, $concrete);\n return $this->container->factory($abstract);\n }\n\n $outer = array_pop($chain);\n\n $this->container->when($outer)->needs($abstract)->give($concrete);\n\n return $this->buildDecoratorChain($abstract, $outer, $chain);\n }" ]
[ "0.62692463", "0.6258589", "0.60252357", "0.60252357", "0.5960822", "0.5766906", "0.57072955", "0.5624232", "0.5596343", "0.55671203", "0.5387671", "0.53612983", "0.5316159", "0.52899045", "0.5252863", "0.5251769", "0.52168506", "0.51975703", "0.51684535", "0.5149585", "0.50318015", "0.50161195", "0.5003134", "0.49859264", "0.4974174", "0.49526623", "0.49499387", "0.4944052", "0.49176902", "0.489091", "0.48780805", "0.4858297", "0.4850567", "0.48424864", "0.4836542", "0.48347944", "0.4815935", "0.48147434", "0.48104444", "0.4808485", "0.47882232", "0.47778153", "0.4761282", "0.475163", "0.4728381", "0.4722942", "0.47203884", "0.47192034", "0.47074294", "0.46952862", "0.46898973", "0.46875405", "0.4682327", "0.46793443", "0.46793443", "0.46729583", "0.4670316", "0.46567005", "0.4651547", "0.46472377", "0.46454746", "0.4645211", "0.4641281", "0.4606506", "0.46010217", "0.45993927", "0.4595613", "0.45903495", "0.45730686", "0.45697182", "0.45691642", "0.45690864", "0.45690194", "0.45584655", "0.45338264", "0.45286286", "0.45257235", "0.45232973", "0.45219436", "0.45179936", "0.45036042", "0.4503589", "0.45029435", "0.44993716", "0.44969386", "0.44921082", "0.44917697", "0.4487849", "0.44797033", "0.4470646", "0.446536", "0.44626778", "0.4457224", "0.44488597", "0.4444363", "0.44434625", "0.44433093", "0.44410574", "0.44362026", "0.44338548", "0.4430707" ]
0.0
-1
Returns the wordpress database.
public function getWordpressDatabase(): wpdb { return $this->wpDatabase; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getWPDB()\n\t{\n\t\tglobal $wpdb;\n\t\treturn $wpdb;\n\t}", "function getDatabase();", "private function getStagingDb()\n {\n return new \\wpdb($this->clone->databaseUser, $this->clone->databasePassword, $this->clone->databaseDatabase, $this->clone->databaseServer);\n }", "public function get_db_object() {\n\t\treturn $this->wpdb_obj;\n\t}", "function require_wp_db()\n {\n }", "public function getDatabase(){\n $url = $this->urlWrapper() . URLResources::DATABASE;\n return $this->makeRequest($url, \"GET\", 2);\n }", "protected function getDatabase() {}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public static function GetDatabase() {\n\t\t\treturn QApplication::$Database[1];\n\t\t}", "public function getDb();", "public function get_database(){\n return $this->database;\n }", "function _wpdb()\n {\n global $wpdb;\n return $wpdb;\n }", "function _wpdb()\n {\n global $wpdb;\n return $wpdb;\n }", "public static function db()\n\t{\n\t\treturn self::$db;\n\t}", "function db(){\n\treturn Database::getInstance();\n}", "static public function getDatabase()\n {\n return self::$database;\n }", "public static function wordpress() {\n\t\t\treturn self::$wordpress;\n\t\t}", "public function getDb()\n {\n return $this->get('db');\n }", "public function admin_get_dbs() {}", "public function getDatabase() {\n \t\n \t// Return our database object\n \treturn $this->oDatabase;\n }", "public function getDatabase()\r\n {\r\n return $this->db;\r\n }", "private static function getDb() {\n \n if(self::$db === null) {\n $dsn = 'mysql:host=localhost;dbname=blog;charset=utf8' ;\n $login = 'root' ;\n $password = '' ;\n\t\t\tself::$db = new \\PDO($dsn, $login, $password,\n array (\\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION)) ;\n }\n return self::$db ;\n }", "public function getDatabase()\r\n\t{\r\n\t\treturn $this->database;\r\n\t}", "public static function getDB() {\n\t\treturn static::$db;\n\t}", "public function getDatabase()\n\t{\n\t\treturn $this->database;\n\t}", "public function getDatabase() {\n return $this->getConfig('database', $this->defaults['database']);\n }", "public function getDatabase(){\n\t\treturn $this->database;\n\t}", "public function getDB()\n\t{\n\t\treturn $this->db;\n\t}", "public static function getDB()\r\n {\r\n return self::$db;\r\n }", "static function getDatabase() {\n if (!self::$db) {\n self::$db = new Database();\n }\n return self::$db;\n }", "static public function getDatabaseObject()\n {\n if (getenv(\"OPENSHIFT_MYSQL_DB_HOST\") === false) {\n $_host = \"localhost\";\n $_username = \"root\";\n $_password = \"mantis5c\";\n $_database = \"startbwtracker\";\n } else {\n $_host = getenv(\"OPENSHIFT_MYSQL_DB_HOST\");\n $_username = getenv(\"OPENSHIFT_MYSQL_DB_USERNAME\");\n $_password = getenv(\"OPENSHIFT_MYSQL_DB_PASSWORD\");\n $_database = \"startbwtracker\";\n }\n\n $db = new \\PDO(\n \"mysql:host=$_host;dbname=$_database;\", $_username, $_password\n );\n // set the PDO error mode to exception\n $db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDatabase()\n {\n return $this->database;\n }", "public function getDB() {\n\t\treturn $this->db;\n\t}", "public function database()\n {\n return $this->database;\n }", "public function module_db() {\n\t\treturn ( isset( $this->module_db ) && ! empty( $this->module_db ) ) ? $this->module_db : $this->module();\n\t}", "public function getDb()\n\t{\n\t\t$this->getPDO();\n\t\treturn $this->db;\n\t}", "public function database();", "public function db()\n {\n return $this->db;\n }", "function create_db3 () {\n\t\tglobal $wpdb;\n\t\t$create_query = 'CREATE TABLE `duotive_sidebars` (\n\t\t\t\t\t\t\t`ID` INT NOT NULL AUTO_INCREMENT ,\n\t\t\t\t\t\t\t`NAME` TEXT NOT NULL ,\n\t\t\t\t\t\t\t`DESCRIPTION` TEXT NOT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY ( `ID` )\n\t\t\t\t\t\t) ENGINE = MYISAM ;\n\t\t\t\t\t\t';\n\t\t$create = $wpdb->get_results($create_query);\n\t}", "static public function get_db_object()\n {\n return new Database(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n }", "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "function getDatabase() {\n//override these params\n\t$host = \"localhost\";\n\t$user = \"sistemasmysql\";\n\t$password = \"17sistemassql06\";\n\t$database_name = \"reservas_disilab\";\n\t\n\t\n\treturn new MySqlDB($host, $user, $password, $database_name);\n}", "public function getDatabaseAdaper()\n {\n return $this->oDatabase;\n }", "protected function getDB() {\n\t\tif ( is_null( $this->mDb ) ) {\n\t\t\tglobal $wgMetricsDBserver, $wgMetricsDBname, $wgMetricsDBuser,\n\t\t\t\t$wgMetricsDBpassword, $wgMetricsDBtype, $wgMetricsDBprefix,\n\t\t\t\t$wgDebugDumpSql;\n\t\t\t$this->mDb = DatabaseBase::factory( $wgMetricsDBtype,\n\t\t\t\tarray(\n\t\t\t\t\t'host' => $wgMetricsDBserver,\n\t\t\t\t\t'user' => $wgMetricsDBuser,\n\t\t\t\t\t'password' => $wgMetricsDBpassword,\n\t\t\t\t\t'dbname' => $wgMetricsDBname,\n\t\t\t\t\t'tablePrefix' => $wgMetricsDBprefix,\n\t\t\t\t\t'flags' => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT,\n\t\t\t\t)\n\t\t\t);\n\t\t\t//$this->mDb->query( \"SET names utf8\" );\n\t\t}\n\t\treturn $this->mDb;\n\t}", "public function getDb()\n {\n if ($this->db === null) {\n $this->db = \\Dit\\Database::instance();\n }\n return $this->db;\n }", "public function updraftplus_get_database_handle() {\n\t\treturn $this->dbh;\n\t}", "public static function db() {\n return static::model()->db;\n }", "function wp_get_db_schema($scope = 'all', $blog_id = \\null)\n {\n }", "public static function getDatabaseSettings()\n\t\t{\n\t\t\t$aSettings['db_prefix'] = 'wp_';\n\t\t\t$sConfigData = self::getConfigData();\n\n\t\t\tif(!empty($sConfigData))\n\t\t\t{\n\t\t\t\t$aSettings['db_host'] = parcelcheckout_getFileValue($sConfigData, '/define\\(\\'DB_HOST\\', \\'([^\\']+)\\'\\);/');\n\t\t\t\t$aSettings['db_user'] = parcelcheckout_getFileValue($sConfigData, '/define\\(\\'DB_USER\\', \\'([^\\']+)\\'\\);/');\n\t\t\t\t$aSettings['db_pass'] = parcelcheckout_getFileValue($sConfigData, '/define\\(\\'DB_PASSWORD\\', \\'([^\\']+)\\'\\);/');\n\t\t\t\t$aSettings['db_name'] = parcelcheckout_getFileValue($sConfigData, '/define\\(\\'DB_NAME\\', \\'([^\\']+)\\'\\);/');\n\t\t\t\t$aSettings['db_prefix'] = parcelcheckout_getFileValue($sConfigData, '/\\$table_prefix ? = \\'([^\\']+)\\';/');\n\t\t\t\t$aSettings['db_type'] = (version_compare(PHP_VERSION, '5.3', '>') ? 'mysqli' : 'mysql');\n\t\t\t}\n\n\t\t\treturn $aSettings;\n\t\t}", "public function getDb() {\r\n\t\tif (!$this->db) {\r\n\t\t\t$this->setDb();\r\n\t\t}\r\n\t\treturn $this->db;\r\n\t}", "final protected function getDB()\n {\n return $this->db;\n }", "protected function db()\n {\n $this->loadDb();\n\n return $this->resource;\n }", "function MetaDatabases() {}", "function getDatabase() {\n\t\ttry {\n\t\t\t$db = new PDO('mysql:host=' . DB_HOST .';dbname=' . DB_NAME . ';charset=utf8mb4', DB_USER, DB_PASS);\n\t\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t\treturn $db;\n\t\t} catch (Exception $e) {\n\t\t\tshowDbError('connect', $e->getMessage());\n\t\t}\n\t}", "function blightDB()\n{\n\tstatic $db;\n\tif (!isset($db))\n\t{\n\t\tif (false === ($db = gdo_db_instance('localhost', BLIGHT_USER, BLIGHT_PASS, BLIGHT_DB)))\n\t\t{\n\t\t\tdie('Cannot connect to db!');\n\t\t}\n\t\t$db->setVerbose(false);\n\t\t$db->setLogging(false);\n\t\t$db->setDieOnError(false);\n\t\t$db->setEMailOnError(false);\n\t}\n\treturn $db;\n}", "public function getDb()\r\n {\r\n return $this->db;\r\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "protected function db()\n\t\t{\n\t\t\tif( !$this->_db ) {\n\t\t\t\t$this->_db = \\Kalibri::db()->getConnection( $this->connectName );\n\t\t\t}\n\n\t\t\treturn $this->_db;\n\t\t}", "public function getDatabase(): string;", "public static function connection() {\n $wp = mysqli_connect(WP_DB_SERVER, WP_DB_USERNAME, WP_DB_PASSWORD, WP_DB_NAME);\n \n // Check connection\n if($wp === false){\n die(\"ERROR: Could not connect. \" . mysqli_connect_error());\n }\n return $wp;\n }", "public static function getInstance(){\n if(empty(static::$default_database))\n static::initDB();\n \n return static::$default_database;\n }", "static public function getDatabase() {\n if (self::$_instance == NULL)\n self::$_instance = new Database();\n return self::$_instance;\n }", "static public function getDatabase() {\n if (self::$_instance == NULL)\n self::$_instance = new Database();\n return self::$_instance;\n }", "public function getDatabase()\n {\n $platform = $this->getDatabasePlatform();\n $query = $platform->getDummySelectSQL($platform->getCurrentDatabaseExpression());\n $database = $this->fetchOne($query);\n\n assert(is_string($database) || $database === null);\n\n return $database;\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 }", "public function db()\n {\n return $this->databaseConfig;\n }", "public function getDatabase()\n {\n\n $this->checkConnection();\n return $this->database;\n }", "public function get_databases()\n\t{\n\t\treturn $this->databases;\n\t}", "public function getDatabase()\n\t{\n\t\tif (is_null($this->database))\n\t\t{\n\t\t\t$this->database = DatabaseDriver::getInstance(\n\t\t\t\tarray(\n\t\t\t\t\t'driver' => $this->config->get('dbtype'),\n\t\t\t\t\t'host' => $this->config->get('host'),\n\t\t\t\t\t'user' => $this->config->get('user'),\n\t\t\t\t\t'password' => $this->config->get('password'),\n\t\t\t\t\t'database' => $this->config->get('db'),\n\t\t\t\t\t'prefix' => $this->config->get('dbprefix')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// @todo Decouple from Factory\n\t\t\tFactory::$database = $this->database;\n\t\t}\n\n\t\treturn $this->database;\n\t}", "function get_database_name()\n\t{\n\t\treturn ($this -> database_name);\n\t}", "function getDb() {\n return $this->db;\n }", "function getDb()\n {\n return $this->db;\n }", "function get_database() {\n $db = new Database();\n return ($db->connect());\n}", "public function getDatabaseHandler();", "public function getBlogsTable(): string\n {\n return $this->wpDatabase->blogs;\n }", "public function getDatabase() {\n\t\t\t$this->_pdo = Database::getMysqlConncetion(\n\t\t\t\t\t$this->config->dbHost,\n\t\t\t\t\t$this->config->dbUsername,\n\t\t\t\t\t$this->config->dbPassword,\n\t\t\t\t\t$this->config->dbSchema\n\t\t\t\t);\n\t\t}", "protected function getDatabase()\n {\n if(!self::$_database)\n {\n self::connect();\n }\n return self::$_database;\n }", "protected function getDb()\n\t{\n\t\treturn (new League)->getConnection();\n\t}", "function getDb() {\n\n/******* PQDEV\n\t$uname=\"pesar2_pqdev\";\n\t$udb=\"pesar2_pqdev\";\n\n/******* PQ & localhost*/\n\t$uname=\"pesar2_pq\";\n\t$udb=\"pesar2_pq\";\n\n\t$upasswd=\"ollyship02\";\n\n\n\t$db = mysql_connect(\"localhost\",$uname,$upasswd);\n\n\tif (!mysql_select_db($udb,$db)) {\n\t\tdie(\"Connection failed: \".mysql_error($db).\"<br>\");\n\t}\n\n\treturn $db;\n}", "public function db()\n {\n return $this->getConnection();\n }", "protected function db() {\n return $this->app['db'];\n }", "public function db()\n {\n if ($this->db!=='_' && $this->db!=='default')\n {\n\n if (!$this->_def_cnf)\n {\n// $this->_def_cnf=Mongo_Database::instance('default')->config();\n// $this->_def_cnf['database']=$this->db;\n\n }\n return engine::mongo($this->db);\n// return Mongo_Database::instance($this->db,$this->_def_cnf);\n }\n return engine::mongo($this->db);\n }", "function wp_migrate_db() {\n\tglobal $wpmdb;\n\n\tif ( ! is_null( $wpmdb ) ) {\n\t\treturn $wpmdb;\n\t}\n\n\t$abspath = dirname( __FILE__ );\n\n\trequire_once $abspath . '/class/wpmdb-base.php';\n\trequire_once $abspath . '/class/wpmdb.php';\n\trequire_once $abspath . '/class/wpmdb-replace.php';\n\trequire_once $abspath . '/class/wpmdb-migration-state.php';\n\trequire_once $abspath . '/class/wpmdb-sanitize.php';\n\trequire_once $abspath . '/class/wpmdb-filesystem.php';\n\trequire_once $abspath . '/class/wpmdb-compatibility-plugin-manager.php';\n\n\t$wpmdb = new WPMDB( __FILE__ );\n\n\t// Remove the compatibility plugin when the plugin is deactivated\n\tregister_deactivation_hook( __FILE__, 'wpmdb_remove_mu_plugin' );\n\n\treturn $wpmdb;\n}", "public function getDatabaseInfo();", "function get_db_schema() {\n\n\t//LEFT SIDE = VARIABLE NAMES\n\t// RIGHT SIDE = DB FIELD NAMES\n\t\n\t$dbSchema = array( \n\t\t'blogsUri' => 'blogsEntry',\n\t\t'wpUri' => 'fullUri' ,\n\t\t'wpPath' => 'fullPath', \n\t\t'integrateLogin' => 'wpLogin', \n\t\t'permList' => 'permMapping',\n\t\t'showHdrFtr' => 'showInside',\n\t\t'cssFirst' => 'cssFirst',\n\t\t'wpSimpleHdr' => 'wpHdrSimple',\n\t\t'dtdSwitch' => 'dtdChange',\n\t\t'installLevel' => 'installStage',\n\t\t'usersOwnBlogs' => 'ownBlogs',\n\t\t'buttonsProfile' => 'profileBtn',\n\t\t'buttonsPost' => 'postBtn',\n\t\t'allowStyleSwitch' => 'styleSwitch',\n\t\t'useBlogHome' => 'blogHomePage',\n\t\t'blogListHead' => 'blogHomeTitle',\n\t\t'blogIntro' => 'blogIntro',\n\t\t'blogsPerPage' => 'numBlogsPerPage',\n\t\t'blUseCSS' => 'wpublStyles',\n\t\t'charEncoding' => 'encoding',\n\t\t'phpbbCensor' => 'censorPosts',\n\t\t'wpuVersion' => 'wpuVer',\n\t\t'wpPageName' => 'wpPage',\n\t\t'phpbbPadding' => 'pPadding',\n\t\t'mustLogin' => 'mustLogin',\n\t\t'upgradeRun' => 'ugRun',\n\t\t'xposting' => 'xposting',\n\t\t// Added in v0.7.0\n\t\t'phpbbSmilies' => 'phpbbSmilies',\n\t\t'fixHeader' => 'fixHeader',\n\t\t// Added in 0.7.1\n\t\t'xpostautolink' => 'xpostautolink'\n\t);\n\t\n\treturn $dbSchema;\n}", "public function getPostsTable(): string\n {\n return $this->wpDatabase->posts;\n }", "function database_list(){\n\t\treturn($this->q2obj(\"show databases\"));\n\t}" ]
[ "0.7859304", "0.70852995", "0.7077932", "0.6968717", "0.6891741", "0.68723726", "0.68605936", "0.68446153", "0.68446153", "0.68446153", "0.68446153", "0.68446153", "0.68446153", "0.68446153", "0.68446153", "0.68001145", "0.67180413", "0.6708635", "0.6708635", "0.6686446", "0.66838235", "0.6621977", "0.6621757", "0.6619426", "0.6614736", "0.6610308", "0.66083735", "0.65527356", "0.65357584", "0.6527485", "0.651938", "0.6503029", "0.6478342", "0.6468924", "0.6462037", "0.6454388", "0.64481527", "0.643876", "0.643876", "0.643876", "0.643876", "0.643876", "0.643876", "0.6435565", "0.6433453", "0.64206517", "0.6409967", "0.6408923", "0.6406769", "0.6405543", "0.6370707", "0.63686556", "0.6362853", "0.6331711", "0.6322077", "0.6304698", "0.629983", "0.62965065", "0.6284043", "0.6271772", "0.62666464", "0.626648", "0.6265251", "0.6260962", "0.6255664", "0.62474614", "0.6235373", "0.6231666", "0.6231666", "0.6231666", "0.62220556", "0.6221343", "0.6215112", "0.62144834", "0.620216", "0.620216", "0.6192941", "0.6190858", "0.6188822", "0.61834216", "0.6180927", "0.6172109", "0.61713797", "0.6167907", "0.61672026", "0.6166775", "0.6165945", "0.6161304", "0.61579466", "0.61574274", "0.61244833", "0.6118467", "0.6118264", "0.6117719", "0.6117604", "0.61168444", "0.6115745", "0.6115141", "0.6108036", "0.6103021" ]
0.8324789
0
Returns the user group table name.
public function getUserGroupTable(): string { return $this->wpDatabase->prefix . self::USER_GROUP_TABLE_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getUsergroupsTable() : string\n\t{\n\t\treturn static::$usergroups_table;\n\t}", "protected function getRuleGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_rule_group')\n ->getMetaData()\n ->getName();\n \n }", "protected function getScoreGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_score_group')\n ->getMetaData()\n ->getName(); \n \n }", "public function getUserGroupToObjectTable(): string\n {\n return $this->wpDatabase->prefix . self::USER_GROUP_TO_OBJECT_TABLE_NAME;\n }", "public function getUserGroupTable()\n {\n if (!$this->userGroupTable) {\n $sm = $this->getServiceLocator();\n\t\t\t$this->userGroupTable = $sm->get('Group\\Model\\UserGroupTable');\n }\n return $this->userGroupTable;\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_sonet_user2group';\n\t}", "protected function getTransactionAdjGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_transaction_group')\n ->getMetaData()\n ->getName();\n\n }", "public function tableName() {\n\t\treturn \"usergroups\";\n\t}", "public function tableName()\n {\n return '{{user_groups}}';\n }", "public function getGroupTable()\n {\n if (!$this->groupTable) {\n $sm = $this->getServiceLocator();\n\t\t\t$this->groupTable = $sm->get('Group\\Model\\GroupTable');\n }\n return $this->groupTable;\n }", "protected function getGroupName() {\n\t\treturn 'users';\n\t}", "public static function tableName()\n {\n return '{{%globalsnippets_groups}}';\n }", "public function getGroupName(){\n\n\t global $db;\n\n\t #see if user is guest, if so, set gorpu name as simply guest.\n\t\tif($this->user == \"guest\"){\n\t\t\t$getGroupName = 'guest';\n\n\t\t\treturn($getGroupName);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Name FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getGroupName = $db->fetchResults();\n\n\t\t\treturn($getGroupName['Name']);\n\t\t}\n\t}", "public function get_table_name(){\n return $this->table_name();\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public function name() {\n\t\treturn $this->Session->read('Authorization.UserGroup.name');\n\t}", "public static function tableName()\n {\n return '{{%characteristic_groups}}';\n }", "protected function usersTableName()\n {\n $userModel = config('blockable.user');\n\n return (new $userModel)->getTable();\n }", "public function roleableTableName() {\n return '{{%user}}';\n }", "protected function getTable()\n {\n return 'kort.user';\n }", "private function usersTableName()\n {\n $userModel = config('follow.user');\n\n return (new $userModel)->getTable();\n }", "protected function table () : string {\n return $this->guessName();\n }", "protected function getUsersTableName()\n {\n $usersTableName = $this->grabPrefixedTableNameFor('users');\n return $usersTableName;\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getGroupName() {\n\t\treturn $this->Session->read('UserAuth.UserGroup.alias_name');\n\t}", "public function getFrontEndUserGroupColumnName() {}", "protected function getTable()\n {\n return Resource::db()->groupPlace()->getTable();\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "protected function table(): string\n {\n return $this->tableName;\n }", "public function getUsersTable(): string\n {\n return $this->wpDatabase->users;\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn 'stat_unique';\n\t}", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function tablename() {\n return self::TABLE;\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "protected static function get_table_name() {\n return null;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public function getGroupTables($table_name)\n {\n return $this->renderView(\n __DIR__ . DIRECTORY_SEPARATOR . 'views/group_table.php',\n [\n 'center_id' => $this->centerID,\n 'token' => $this->token,\n 'station_group_tables' => $this->tableBaseUrl,\n 'station_group_tables_config' => $this->groupTablesConfig[$table_name],\n 'group_table_name' => $table_name\n ]\n );\n }", "protected function getRootTableRegistryName(): string\n {\n return 'Users';\n }", "public function getTable(): string\n {\n return $this->_table;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public function getUserGroupRequestTable()\n {\n if (!$this->userGroupRequestTable) {\n $sm = $this->getServiceLocator();\n $this->userGroupRequestTable = $sm->get('Group\\Model\\UserGroupRequestTable');\n }\n return $this->userGroupRequestTable;\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "public function getUsergroup() {}", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public static function getGroupName($_id) {\n global $lC_Database;\n\n $Qgroup = $lC_Database->query('select name from :table_administrators_groups where id = :id');\n $Qgroup->bindTable(':table_administrators_groups', TABLE_ADMINISTRATORS_GROUPS);\n $Qgroup->bindInt(':id', $_id);\n $Qgroup->execute();\n\n $data = $Qgroup->toArray();\n\n $Qgroup->freeResult();\n\n return $data['name'];\n }", "public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function getGroupName()\n {\n return $this->groupname;\n }", "public static function tableName(){\n return Yii::$app->params['tablePrefix'].'user';\n }", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "public function get_contexts_table_name() {\n\t\treturn $this::$dbtable_contexts;\n\t}", "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "function getGroupName($gid = null)\n\t{\n\t\t$id = ($gid == null) ? $this->user_getgroup() : $gid;\n\t\t$perms = $this->DB->database_select('groups', 'name', array('gid' => $id), 1);\n\t\treturn ($perms === false) ? false : $perms['name'];\n\t}", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function getGroupName() : string\n {\n return $this->groupName;\n }", "public function getTableName() {\n return $this->table;\n }", "protected function getSystemTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_system')\n ->getMetaData()\n ->getName(); \n \n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "protected function groupName($group=null) {\n\t\t$group = is_string($group) ? $group : $this->options['group']; \n\t\treturn $this->sanitize($group); \n\t}", "public function getGroupName()\n {\n switch($this->group) {\n case \"lower_secondary\":\n return \"Lower Secondary\";\n case \"upper_secondary\":\n return \"Upper Secondary\";\n case \"undergraduate\":\n return \"Undergraduate\";\n default:\n return \"Unknown\";\n }\n }", "public function getNameGroup(){\n return $this->nameGroup;\n }", "public static function getTableName()\n {\n return 'vbch_bonus_socialpush';\n }", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "function getTableName() \n\t{\n\t\t$success = false;\n\t\t$phplist_prefix = PhplistHelperPhplist::getPrefix();\n\t\t$success = \"{$phplist_prefix}_user_attribute\";\n\t\treturn $success;\n\t}", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "public static function tableName(): string;", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "function getGroupName($gid)\n {\n return '';\n }", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }" ]
[ "0.8697231", "0.7652109", "0.76379627", "0.752937", "0.74989116", "0.73160106", "0.7293503", "0.7084742", "0.70235115", "0.6982417", "0.6980866", "0.691531", "0.66813916", "0.66658306", "0.66650236", "0.6625764", "0.6617906", "0.6614103", "0.6558976", "0.65094286", "0.65042365", "0.6502232", "0.6463626", "0.6433961", "0.64309365", "0.6424786", "0.64145184", "0.6401039", "0.63602555", "0.6359326", "0.63345474", "0.6333177", "0.62985307", "0.629305", "0.6292192", "0.62856954", "0.62764686", "0.62742", "0.6262074", "0.62491167", "0.6236612", "0.62336034", "0.6233185", "0.62313807", "0.6230067", "0.6230067", "0.6230067", "0.62115556", "0.6205841", "0.6193602", "0.6169451", "0.6161904", "0.61426413", "0.6142378", "0.6139037", "0.6136969", "0.6126003", "0.6113473", "0.6107688", "0.6107688", "0.6107688", "0.6093852", "0.6093852", "0.60924435", "0.6080009", "0.6074616", "0.607415", "0.6067988", "0.60632706", "0.60613847", "0.6055704", "0.60539055", "0.60530734", "0.6052102", "0.6042761", "0.6042755", "0.603808", "0.60217994", "0.60191965", "0.6017612", "0.60080385", "0.5978497", "0.597514", "0.59706223", "0.5969042", "0.5965163", "0.5962203", "0.59610003", "0.5957764", "0.5954724", "0.59540856", "0.59535867", "0.5952619", "0.5943439", "0.5942974", "0.5936414", "0.5934276", "0.593276", "0.5924159", "0.59176064" ]
0.8728481
0
Returns the user group table name.
public function getUserGroupToObjectTable(): string { return $this->wpDatabase->prefix . self::USER_GROUP_TO_OBJECT_TABLE_NAME; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserGroupTable(): string\n {\n return $this->wpDatabase->prefix . self::USER_GROUP_TABLE_NAME;\n }", "protected function getUsergroupsTable() : string\n\t{\n\t\treturn static::$usergroups_table;\n\t}", "protected function getRuleGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_rule_group')\n ->getMetaData()\n ->getName();\n \n }", "protected function getScoreGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_score_group')\n ->getMetaData()\n ->getName(); \n \n }", "public function getUserGroupTable()\n {\n if (!$this->userGroupTable) {\n $sm = $this->getServiceLocator();\n\t\t\t$this->userGroupTable = $sm->get('Group\\Model\\UserGroupTable');\n }\n return $this->userGroupTable;\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_sonet_user2group';\n\t}", "protected function getTransactionAdjGroupTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_transaction_group')\n ->getMetaData()\n ->getName();\n\n }", "public function tableName() {\n\t\treturn \"usergroups\";\n\t}", "public function tableName()\n {\n return '{{user_groups}}';\n }", "public function getGroupTable()\n {\n if (!$this->groupTable) {\n $sm = $this->getServiceLocator();\n\t\t\t$this->groupTable = $sm->get('Group\\Model\\GroupTable');\n }\n return $this->groupTable;\n }", "protected function getGroupName() {\n\t\treturn 'users';\n\t}", "public static function tableName()\n {\n return '{{%globalsnippets_groups}}';\n }", "public function getGroupName(){\n\n\t global $db;\n\n\t #see if user is guest, if so, set gorpu name as simply guest.\n\t\tif($this->user == \"guest\"){\n\t\t\t$getGroupName = 'guest';\n\n\t\t\treturn($getGroupName);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Name FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getGroupName = $db->fetchResults();\n\n\t\t\treturn($getGroupName['Name']);\n\t\t}\n\t}", "public function get_table_name(){\n return $this->table_name();\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public function name() {\n\t\treturn $this->Session->read('Authorization.UserGroup.name');\n\t}", "public static function tableName()\n {\n return '{{%characteristic_groups}}';\n }", "protected function usersTableName()\n {\n $userModel = config('blockable.user');\n\n return (new $userModel)->getTable();\n }", "public function roleableTableName() {\n return '{{%user}}';\n }", "protected function getTable()\n {\n return 'kort.user';\n }", "private function usersTableName()\n {\n $userModel = config('follow.user');\n\n return (new $userModel)->getTable();\n }", "protected function table () : string {\n return $this->guessName();\n }", "protected function getUsersTableName()\n {\n $usersTableName = $this->grabPrefixedTableNameFor('users');\n return $usersTableName;\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getGroupName() {\n\t\treturn $this->Session->read('UserAuth.UserGroup.alias_name');\n\t}", "public function getFrontEndUserGroupColumnName() {}", "protected function getTable()\n {\n return Resource::db()->groupPlace()->getTable();\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "protected function table(): string\n {\n return $this->tableName;\n }", "public function getUsersTable(): string\n {\n return $this->wpDatabase->users;\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn 'stat_unique';\n\t}", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function tablename() {\n return self::TABLE;\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "protected static function get_table_name() {\n return null;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public function getGroupTables($table_name)\n {\n return $this->renderView(\n __DIR__ . DIRECTORY_SEPARATOR . 'views/group_table.php',\n [\n 'center_id' => $this->centerID,\n 'token' => $this->token,\n 'station_group_tables' => $this->tableBaseUrl,\n 'station_group_tables_config' => $this->groupTablesConfig[$table_name],\n 'group_table_name' => $table_name\n ]\n );\n }", "protected function getRootTableRegistryName(): string\n {\n return 'Users';\n }", "public function getTable(): string\n {\n return $this->_table;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public function getUserGroupRequestTable()\n {\n if (!$this->userGroupRequestTable) {\n $sm = $this->getServiceLocator();\n $this->userGroupRequestTable = $sm->get('Group\\Model\\UserGroupRequestTable');\n }\n return $this->userGroupRequestTable;\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "public function getUsergroup() {}", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public static function getGroupName($_id) {\n global $lC_Database;\n\n $Qgroup = $lC_Database->query('select name from :table_administrators_groups where id = :id');\n $Qgroup->bindTable(':table_administrators_groups', TABLE_ADMINISTRATORS_GROUPS);\n $Qgroup->bindInt(':id', $_id);\n $Qgroup->execute();\n\n $data = $Qgroup->toArray();\n\n $Qgroup->freeResult();\n\n return $data['name'];\n }", "public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function getGroupName()\n {\n return $this->groupname;\n }", "public static function tableName(){\n return Yii::$app->params['tablePrefix'].'user';\n }", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "public function get_contexts_table_name() {\n\t\treturn $this::$dbtable_contexts;\n\t}", "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "function getGroupName($gid = null)\n\t{\n\t\t$id = ($gid == null) ? $this->user_getgroup() : $gid;\n\t\t$perms = $this->DB->database_select('groups', 'name', array('gid' => $id), 1);\n\t\treturn ($perms === false) ? false : $perms['name'];\n\t}", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function getGroupName() : string\n {\n return $this->groupName;\n }", "public function getTableName() {\n return $this->table;\n }", "protected function getSystemTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_system')\n ->getMetaData()\n ->getName(); \n \n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "protected function groupName($group=null) {\n\t\t$group = is_string($group) ? $group : $this->options['group']; \n\t\treturn $this->sanitize($group); \n\t}", "public function getGroupName()\n {\n switch($this->group) {\n case \"lower_secondary\":\n return \"Lower Secondary\";\n case \"upper_secondary\":\n return \"Upper Secondary\";\n case \"undergraduate\":\n return \"Undergraduate\";\n default:\n return \"Unknown\";\n }\n }", "public function getNameGroup(){\n return $this->nameGroup;\n }", "public static function getTableName()\n {\n return 'vbch_bonus_socialpush';\n }", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "function getTableName() \n\t{\n\t\t$success = false;\n\t\t$phplist_prefix = PhplistHelperPhplist::getPrefix();\n\t\t$success = \"{$phplist_prefix}_user_attribute\";\n\t\treturn $success;\n\t}", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "public static function tableName(): string;", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "function getGroupName($gid)\n {\n return '';\n }", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }" ]
[ "0.8728481", "0.8697231", "0.7652109", "0.76379627", "0.74989116", "0.73160106", "0.7293503", "0.7084742", "0.70235115", "0.6982417", "0.6980866", "0.691531", "0.66813916", "0.66658306", "0.66650236", "0.6625764", "0.6617906", "0.6614103", "0.6558976", "0.65094286", "0.65042365", "0.6502232", "0.6463626", "0.6433961", "0.64309365", "0.6424786", "0.64145184", "0.6401039", "0.63602555", "0.6359326", "0.63345474", "0.6333177", "0.62985307", "0.629305", "0.6292192", "0.62856954", "0.62764686", "0.62742", "0.6262074", "0.62491167", "0.6236612", "0.62336034", "0.6233185", "0.62313807", "0.6230067", "0.6230067", "0.6230067", "0.62115556", "0.6205841", "0.6193602", "0.6169451", "0.6161904", "0.61426413", "0.6142378", "0.6139037", "0.6136969", "0.6126003", "0.6113473", "0.6107688", "0.6107688", "0.6107688", "0.6093852", "0.6093852", "0.60924435", "0.6080009", "0.6074616", "0.607415", "0.6067988", "0.60632706", "0.60613847", "0.6055704", "0.60539055", "0.60530734", "0.6052102", "0.6042761", "0.6042755", "0.603808", "0.60217994", "0.60191965", "0.6017612", "0.60080385", "0.5978497", "0.597514", "0.59706223", "0.5969042", "0.5965163", "0.5962203", "0.59610003", "0.5957764", "0.5954724", "0.59540856", "0.59535867", "0.5952619", "0.5943439", "0.5942974", "0.5936414", "0.5934276", "0.593276", "0.5924159", "0.59176064" ]
0.752937
4
Returns the last insert id.
public function getLastInsertId() { return $this->wpDatabase->insert_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_last_insert_id()\n\t\t{\n\t\t\treturn( $this->last_insert_id );\n\t\t}", "public static function getLastInsertId()\n {\n return self::$sql->lastInsertId();\n }", "public function getLastInsertID();", "protected function getLastID()\n {\n return $this->driver->getInsertId();\n }", "public function getLastInsertId();", "public function getLastInsertId();", "public function getLastInsertId();", "public function last_insert_id() {\n\t\treturn $this->adapter->lastInsertId();\n\t}", "public function last_insert_id() {\n\t\t\n\t\treturn $this->pdo->lastInsertId();\n\t\n\t}", "public function getLastInsertID()\n {\n\t return $this->connections[ $this->activeConnection]->insert_id;\n }", "public function GetLastInsertID()\r\n\t{\r\n\t\treturn $this->last_insert_id;\r\n\t}", "public function getLastId()\n {\n return $this->adodb->insert_Id();\n }", "public static function getLastInsertId() : string\n {\n return static::getConn()->lastInsertId();\n }", "public function getLastInsertId()\t{\n\t\treturn $this->_hDb->lastInsertId();\n\t}", "public function getLastInsertId()\r\n {\r\n return $this->getMaster()->lastInsertId();\r\n }", "public function lastInsertId () {\r\n return $this->cachedLastInsertId; // $this->db->lastInsertId();\r\n }", "public function getLastInsertId()\n {\n return $this->getHandler()->getConnection()->lastInsertId();\n }", "public function getLastInsertId()\n {\n return $this->lastInsertId;\n }", "function lastInsertId()\n\t{\n\t\treturn @$this->functions['insert_id']($this->connection_master);\n\t}", "public function getLastID() {\n return $this->db->insert_id();\n }", "public function getLastInsertId(){\n\t\treturn $this->connection->insert_id;\n\t}", "public static function lastInsertId(): string {\r\n return self::getConnection()->lastInsertId();\r\n }", "public function getLastInsertId()\n {\n return $this->PDO->lastInsertId();\n }", "protected function getLastInsertId(){\n $iLastInsertId = $this->objDbConn->lastInsertId();\n return $iLastInsertId;\n }", "public function lastInsertId();", "public function lastInsertId();", "public function lastInsertId();", "public function LastInsertId() {\n\t\t\t\treturn $this->connection->lastInsertId();\n\t\t\t}", "public function lastInsertId()\n\t{\n\t\treturn $this->connection->lastInsertId();\n\t}", "public function last_id() {\n return $this->_connection->lastInsertId();\n }", "public function insertId() {\n\t\treturn $this->_dbh->lastInsertId();\n\t}", "public function lastInsertId() {\n return $this->connection->lastInsertId();\n }", "public function insertId () {\n\n return $this->_lastInsertId;\n }", "public function insert_id()\n\t{\n\t\treturn $this->lastInsertId();\n\t}", "public function getLastInsertID()\n {\n return $this->_lastInsertID;\n }", "public function getLastId() {\n return $this->LastInsertId;\n }", "function insertid() {\n return $this->last_insert_id;\n }", "public function insert_id()\n\t{\n\t\tif ($this->db_type == 'pgsql')\n\t\t{\n\t\t\treturn $this->execute('SELECT lastval() as id')->current()->id;\n\t\t}\n\t\treturn $this->conn->lastInsertId();\n\t}", "public function getLastInsertedID(){\n // Return last created id\n return $this->connection->insert_id();\n }", "public function insertid()\n {\n $this->connect();\n\n return $this->connection->lastInsertId();\n }", "public static function lastId()\n {\n return self::connect()->lastInsertId();\n }", "function getLastInsertID(){\r\n\t\t\r\n\t\treturn $this->connection->insert_id;\r\n\t}", "public function lastInsertId() {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId() {\n return $this->pdo->lastInsertId();\n }", "public function getLastId(){\n return $this->con->insertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }", "function get_last_id() {\n if ($this->is_valid())\n return @mysql_insert_id($this->connection);\n }", "public function get_last_insert_id(){\n\t\treturn $this->db->insert_id();\n\t}", "public function lastInsertID() {\n return $this->_pdo->lastInsertId();\n }", "public function lastInsertId()\n {\n return @db2_last_lastInsertId($this->connection);\n }", "public function insertGetId()\n {\n return $this->lastId;\n }", "public function insertGetId()\n {\n return $this->lastId;\n }", "function lastInsertId() \r\n\t{\r\n\t\t \r\n\t\treturn $this->socket->insert_id;\r\n\t\t \r\n\t}", "public function GetLastInsertId()\r\n\t{\r\n\t\tif ($this->IsConnected())\r\n\t\t{\r\n\t\t\treturn $this->_db->insert_id;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "abstract public function getLastInsertId();", "public function lastInsertId()\n {\n return $this->_adapter->lastInsertId();\n }", "public function lastInsertId() {\r\n\t\tif ($this -> pdo) {\r\n\t\t\treturn $this -> link -> lastInsertId();\r\n\t\t} else {\r\n\t\t\treturn mysql_insert_id($this -> link);\r\n\t\t}\r\n\t}", "public function lastId()\n\t{\n\t\treturn $this->_instance->lastInsertId();\n\t}", "public function lastInsertID()\n\t{\n\t\treturn $this->_conn->insert_id;\n\t}", "public function lastInsertId(): int {\n return intval( $this->pdo->lastInsertId() );\n }", "public function lastId()\n {\n return $this->mysqli->insert_id;\n }", "public function getLastInsertId(){\n return $this->lastInsertId;\n }", "public function insertId()\n\t{\n\t\treturn $this->pdo->lastInsertId();\n\t}", "public function last_insert_id ()\n\t{\n\t\treturn $this->db->lastInsertId();\n\t}", "function get_insert_id() {\n\t\t\treturn self::$db->last_inserted_id();\n\t\t}", "public function lastId()\n\t{\n\t\treturn mysqli_insert_id($this->connection);\n\t}", "public function lastInsertId(){\n return $this->pdo->lastInsertId();\n }", "public function getLastInsertId()\n {\n $this->setActive(true);\n\n return self::$_pdo->lastInsertId();\n }", "function getLastInsertID() {\n return mysql_insert_id($this->CONNECTION);\n }", "function lastInsertId() {\n return $this->pdo->lastInsertId();\n }", "function getLastId()\n {\n return mysqli_insert_id($this->Db);\n }", "function lastInsertId() {\n return mysql_insert_id();\n }", "public function lastId()\n\t{\n\t\treturn $this->lastInsertID();\n\t}", "public function insert_id() {\n\t\treturn $this->db->lastInsertId();\n\t}", "public function getLastInsertedId() {\n\t\treturn $this->lastInsertedID;\n\t}", "function get_last_inserted_id() {\n return $this->db->insert_id();\n }", "public function lastInsertID()\r\n {\r\n return @mysql_insert_id();\r\n }", "public function getLastInsertedId(): string\n {\n return $this->db->lastInsertId();\n }", "public function lastInsert(){\n\t\treturn $this->dbh->lastInsertId();\n\t}", "public function getLastInsertId()\n {\n if (!$id = $this->db->Insert_Id()) {\n throw new Exception(\"Method 'Insert_Id' is not supported!\");\n }\n\n return $id;\n }", "public function getLastInsertId()\n {\n return $this->getPdo()->lastInsertId();\n }", "public function last_insert()\n {\n return mysqli_insert_id($this->db);\n }", "public function lastID() {\n return $this->getPDO()->lastInsertId();\n }", "public function get_last_inserted_id(){\n\t\treturn $this->db->insert_id();\n\t}", "public function lastInsertId(){\n return $this->conn->lastInsertId();\n }", "function lastInsertId() {\n\t\treturn sqlite_last_insert_rowid($this->connection);\n\t}", "public static function lastInsertId()\n\t{\n\t\treturn mysqli_insert_id(self::$link);\n\t\t//SELECT LAST_INSERT_ID()\n\t}", "function last_inserted_id() {\n return mysql_insert_id($this->db_conn);\n }", "protected function lastInsertId()\n {\n return $this->mysqli->insert_id;\n }", "public function lastId () {\n\treturn mysql_insert_id();\n }", "public function lastInsertedId() {\n return $this->_dbh->lastInsertId();\n\n }", "public function getInsertId() {\r\n\t\treturn $this->PDO->lastInsertId();\r\n\t}", "public function getInsertId()\n\t\t{\n\t\t\treturn $this->connection->lastInsertId();\n\t\t}", "function getLastinsertId (){\n return $this->pdo->lastInsertId();\n }", "public function getLastInsertedId()\r\n\t{\r\n\t\treturn $this->db->getLastInsertedId();\r\n\t}" ]
[ "0.91553587", "0.9139431", "0.9120462", "0.9092285", "0.9073566", "0.9073566", "0.9073566", "0.90323615", "0.9008361", "0.9000702", "0.89982074", "0.8997702", "0.89601016", "0.8959298", "0.8950552", "0.894956", "0.8944239", "0.89412373", "0.89397293", "0.89340246", "0.89246017", "0.89244604", "0.8923878", "0.8919774", "0.8917043", "0.8917043", "0.8917043", "0.8905374", "0.8903026", "0.89019006", "0.8901716", "0.88948023", "0.8891867", "0.8883891", "0.8875538", "0.8873801", "0.88545746", "0.8852267", "0.88487697", "0.88417876", "0.88316196", "0.8831224", "0.8828992", "0.8828992", "0.8821911", "0.88155013", "0.88155013", "0.88155013", "0.88155013", "0.88155013", "0.88155013", "0.8814644", "0.88134587", "0.88128304", "0.8802924", "0.8802597", "0.8802597", "0.8776542", "0.8775061", "0.877478", "0.8774646", "0.8773743", "0.87690026", "0.8760118", "0.8757585", "0.8756497", "0.87561107", "0.87479526", "0.8746264", "0.87443566", "0.8733848", "0.8733506", "0.8733038", "0.87272125", "0.8725226", "0.87225866", "0.8715584", "0.87039644", "0.87039304", "0.87019634", "0.8695892", "0.86958164", "0.8692334", "0.8689765", "0.8685617", "0.86695194", "0.8666334", "0.86614144", "0.8656254", "0.86420715", "0.86310875", "0.8626466", "0.86224824", "0.8621947", "0.8621774", "0.8608104", "0.8583048", "0.8580759", "0.8580334", "0.85794216" ]
0.89609003
12
Returns the current blog id.
public function getCurrentBlogId() { return $this->wpDatabase->blogid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_current_blog_id()\n {\n }", "function config_get_curr_blog_id () {\n\n\t\t global $current_blog;\n\n\t\t if ( isset( $current_blog ) ) {\n\n\t\t\t return $current_blog->blog_id;\n\t\t }\n\t\t else {\n\n\t\t\t return 1;\n\t\t }\n\t}", "public static function getSiteId()\n {\n return get_current_blog_id();\n }", "public function getblogId(): Uuid {\n\t\treturn ($this->blogId);\n\t}", "function fiorello_mikado_get_multisite_blog_id() {\n\t\tif ( is_multisite() ) {\n\t\t\treturn get_blog_details()->blog_id;\n\t\t}\n\t}", "public function getBloggerId()\r\n\t\t{\r\n\t\t\treturn $this->_blogger_id;\r\n\t\t}", "function ajan_get_root_blog_id() {\n\treturn (int) apply_filters( 'ajan_get_root_blog_id', (int) activitynotifications()->root_blog_id );\n}", "static public function getBlogPid(){\n\t\tstatic $cachedPid = 0;\n\n\t\tif (isset($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_t3blog_pi1.']['blogPid']) &&\n\t\t\t\tt3blog_div::testInt($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_t3blog_pi1.']['blogPid'])) {\n\t\t\treturn $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_t3blog_pi1.']['blogPid'];\n\t\t}\n\n\t\t// get pid\n\t\tif (isset($GLOBALS['alternativeBlogPid']) && $GLOBALS['alternativeBlogPid'] > 0) {\n\t\t\treturn intval($GLOBALS['alternativeBlogPid']);\n\t\t}\n\n\t\tif ($cachedPid != 0) {\n\t\t\t$pid = $cachedPid;\n\t\t}\n\t\telse {\n\t\t\t// get the Rootline\n\t\t\t$rootline = array_reverse($GLOBALS['TSFE']->tmpl->rootLine);\n\n\t\t\t// go through rootline until a blogPid is found\n\t\t\t$pidList = array();\n\t\t\tforeach ($rootline as $page) {\n\t\t\t\t$pidList[] = $page['uid'];\n\t\t\t}\n\t\t\t$pidString = implode(',', $pidList);\n\t\t\tlist($row) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages',\n\t\t\t\t'uid IN (' . $pidString . ') AND module=\\'t3blog\\'' .\n\t\t\t\t$GLOBALS['TSFE']->sys_page->enableFields('pages'),\n\t\t\t\t'', 'FIELD(uid,' . $pidString . ')', 1);\n\t\t\tif (is_array($row)) {\n\t\t\t\t$pid = $row['uid'];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$pid = $GLOBALS['TSFE']->id;\n\t\t\t}\n\t\t\t$cachedPid = $pid;\n\t\t}\n\t\treturn intval($pid);\n\t}", "function getBloggerId()\r\n {\r\n return $this->bloggerId;\r\n }", "function get_id_from_blogname($slug)\n {\n }", "public function get_id() {\n\t\treturn $this->_post->ID;\n\t}", "private function get_current_id() {\n\n\t\tstatic $id = null;\n\n\t\treturn $id ?: $id = \\get_queried_object_id();\n\t}", "private function getCurrentWebsiteId()\n {\n return $this->storeManager->getWebsite()->getId();\n }", "public function getblogProfileId(): Uuid {\n\t\treturn ($this->blogProfileId);\n\t}", "function get_blog_id_from_url($domain, $path = '/')\n {\n }", "function get_id_from_blogname( $slug ) {\n\t$current_network = get_network();\n\t$slug = trim( $slug, '/' );\n\n\tif ( is_subdomain_install() ) {\n\t\t$domain = $slug . '.' . preg_replace( '|^www\\.|', '', $current_network->domain );\n\t\t$path = $current_network->path;\n\t} else {\n\t\t$domain = $current_network->domain;\n\t\t$path = $current_network->path . $slug . '/';\n\t}\n\n\t$site_ids = get_sites( array(\n\t\t'number' => 1,\n\t\t'fields' => 'ids',\n\t\t'domain' => $domain,\n\t\t'path' => $path,\n\t) );\n\n\tif ( empty( $site_ids ) ) {\n\t\treturn null;\n\t}\n\n\treturn array_shift( $site_ids );\n}", "public static function id()\n {\n // can't use facades to access properties unfortunately!\n return query()->post->ID ?? null;\n }", "public function getPostId() {\n\t\treturn ($this->postId);\n\t}", "function get_post_ID() {\n\t\treturn $this->get_data( 'comment_post_ID' );\n\t}", "public function getBlogKey();", "public function show($blogid, $id)\n {\n return $id;\n }", "public function get_blog_ids()\n\t{\n\t\tglobal $wpdb;\n\t\treturn $wpdb->get_col( 'SELECT blog_id FROM '.$wpdb->blogs );\n\t}", "public function getPostId() {\n\t\treturn $this->post_id;\n\t}", "public function getPostId() {\n\n\t\treturn $this->postId;\n\t}", "protected function getCurrentPageIdFromCurrentSiteRoot() {}", "public function getPostId()\n {\n return $this->postId;\n }", "public function getPostId()\n {\n return $this->postId;\n }", "public function id() { return $this->post->ID; }", "public function get_id_from_blogname() {\n global $json_api;\n\n $this->_verify_admin();\n\n extract( $_REQUEST );\n\n if(!isset($blogname))\n $json_api->error(__(\"You must send the 'blogname' parameter.\"));\n\n $blog_id = get_id_from_blogname( $blogname );\n\n return array( \"blog_id\" => $blog_id );\n }", "public function getPostId()\n {\n return $this->post_id;\n }", "public function getCurrentSiteId()\n {\n if (empty($this->currentSiteId)) {\n $this->currentSiteId = $this->getCurrentSiteIdFromDomain();\n }\n\n return $this->currentSiteId;\n }", "public function getId() {\n \n $contact = $this->registry->registry('news');\n return $contact ? $contact->getId() : null;\n \n }", "public function column_id($blog)\n {\n }", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getID(){\r\n\t\t\treturn $this->id_post;\r\n\t\t}", "function GetId ()\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n $this->mongo->setCollection( COLLECTION_ADMINS );\n $data = $this->mongo->dataFindOne( array( \"username\" => $this->username ) );\n return isset( $data[ \"_id\" ] ) ? $data[ \"_id\" ] : 0;\n }", "public function getPostId()\n {\n return $this->postId;\n }", "public function getPostID()\n {\n return $this->postID;\n }", "public function get_post_ID() {\n\t\treturn $this->post_id;\n\t}", "public function getPost_id()\n {\n return $this->post_id;\n }", "public function getPostID(): string\n {\n return $this->_postID;\n }", "public function getSiteId();", "public function get_site_id()\n {\n if ( ! $this->_site_id)\n {\n $this->_site_id = intval($this->EE->config->item('site_id'));\n }\n\n return $this->_site_id;\n }", "public function getIdPost()\n {\n return $this->idPost;\n }", "public static function id ()\n {\n return self::user()->getId();\n }", "public function getPostId(): Uuid {\n\t\treturn ($this->postId);\n\t}", "public function get_blog_id_from_url() {\n global $json_api;\n\n $this->_verify_admin();\n\n extract($_REQUEST);\n\n if(!isset($domain))\n $json_api->error(__(\"You must send the 'domain' parameter.\"));\n\n if(!isset($path))\n $path = '/';\n\n if( $blog_id = get_blog_id_from_url( $domain, $path ) )\n return array( \"blog_id\" => $blog_id );\n else\n $json_api->error(__(\"No blogs were found for this user.\"));\n }", "function aquamin_id() {\n\n\t$the_id = $GLOBALS[ 'aquamin_current_id' ] ?? null;\n\n\tif ( ! $the_id ) {\n\n\t\t// start with a default\n\t\t$the_id = get_the_id();\n\n\t\t// use page set as the \"posts page\" for blog-like templates\n\t\tif ( get_option( 'page_for_posts' )\n\t\t\t&& ( is_singular( 'post' )\n\t\t\t\t|| is_post_type_archive( 'post' )\n\t\t\t\t|| is_category()\n\t\t\t\t|| is_tag()\n\t\t\t\t|| is_home()\n\t\t\t)\n\t\t) {\n\t\t\t$the_id = get_option( 'page_for_posts' );\n\t\t// use a page with slug \"404-page\" for the 404 page id\n\t\t} elseif ( is_404() ) {\n\t\t\tif ( $post = get_page_by_path( '404-page', OBJECT, 'page' ) ) {\n\t\t\t\t$the_id = $post->ID;\n\t\t\t}\n\t\t}\n\n\t\t$GLOBALS[ 'aquamin_current_id' ] = $the_id;\n\n\t}\n\n\treturn $the_id;\n}", "public function getBiblioId()\n {\n return $this->biblio_id;\n }", "public function id()\n\t{\n\t\t// @todo: _id should not be hard-coded (mongo-specific)\n\t\treturn $this->get('_id');\n\t}", "function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}", "public function getIdPost(): int\n {\n return $this->id_post;\n }", "private function getCurrentPageId()\n\t{\n\t // (get_option('page_for_posts') && is_archive() && !is_post_type_archive())) {\n\t // $page_id = get_option('page_for_posts');\n\t // } else {\n\t // $page_id = $this->post->ID;\n\n\t // if(class_exists('Woocommerce')) {\n\t // if(is_shop()) {\n\t // $page_id = get_option('woocommerce_shop_page_id');\n\t // }\n\t // }\n\t // }\n\n\t // return $page_id;\n\t}", "public function getPostId()\n {\n return $this->postId;\n }", "public function getIdPost()\n {\n return $this->id_post;\n }", "public function get_post_id() {\n\t\tglobal $post;\n\n\t\tif ( isset( $post ) && is_object( $post ) ) {\n\t\t\treturn $post->ID;\n\t\t}\n\n\t\tif ( ! empty( $_GET['post'] ) ) {\n\t\t\treturn absint( $_GET['post'] );\n\t\t}\n\n\t\tif ( ! empty( $_POST['ID'] ) ) {\n\t\t\treturn absint( $_POST['ID'] );\n\t\t}\n\n\t\tif ( ! empty( $_POST['post_ID'] ) ) {\n\t\t\treturn absint( $_POST['post_ID'] );\n\t\t}\n\n\t\treturn 0;\n\t}", "public function get_page_id() {\n\t\t\treturn $this->current_page_id;\n\t\t}", "public function for_blog($blog_id = '')\n {\n }", "private function _get_blog_path()\n\t{\n\t\tif (!self::is_multisite())\n\t\t\treturn '';\n\n\t\tif ($this->blog_path)\n\t\t\treturn $this->blog_path;\n\n\t\tglobal $current_blog;\n\t\t$blog_path = isset($current_blog->path) && '/' != $current_blog->path\n\t\t\t? $current_blog->path\n\t\t\t: '';\n\n\t\t// because `$blog_path` also contains the base, we need to remove the\n\t\t// base from it so we can process media source correctly later on\n\t\tif (!empty($this->base) && 0 === strpos($blog_path, '/' . $this->base . '/'))\n\t\t\t$blog_path = preg_replace('#/[^/]+#ui', '', $blog_path, 1);\n\n\t\t$this->blog_path = $blog_path;\n\t\treturn $blog_path;\n\t}", "public static function id()\n {\n return self::$id;\n }", "public function getPostID(){\n return $this->POST_ID;\n }", "public function getId()\n {\n return $this->currentId;\n }", "function az_get_ID() {\n\n global $post;\n\n $post_id = '';\n if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {\n\n if ( is_shop() || is_product_category() || is_product_tag() ) {\n $post_id = wc_get_page_id( 'shop' );\n } else {\n global $wp_query;\n $post_id = $wp_query->post->ID;\n }\n\n } else {\n\n if ( is_home() || is_archive() || is_search() || is_404() ) {\n\n if ( get_option( 'page_for_posts' ) ) {\n $post_id = get_option( 'page_for_posts' );\n } else if ( get_option( 'page_on_front' ) ) {\n $post_id = get_option( 'page_on_front' );\n } else {\n $post_id = get_current_blog_id();\n }\n\n } else {\n $post_id = $post->ID;\n }\n\n }\n\n return $post_id;\n\n}", "public function id()\n {\n return $this->_getAuthId();\n }", "private static function get_blog_ids() {\n\n\t\tglobal $wpdb;\n\n\t\t// get an array of blog ids\n\t\t$sql = \"SELECT blog_id FROM $wpdb->blogs\n\t\t\tWHERE archived = '0' AND spam = '0'\n\t\t\tAND deleted = '0'\";\n\n\t\treturn $wpdb->get_col( $sql );\n\n\t}", "private static function get_blog_ids() {\n\n\t\tglobal $wpdb;\n\n\t\t// get an array of blog ids\n\t\t$sql = \"SELECT blog_id FROM $wpdb->blogs\n\t\t\tWHERE archived = '0' AND spam = '0'\n\t\t\tAND deleted = '0'\";\n\n\t\treturn $wpdb->get_col( $sql );\n\n\t}", "public static function returnCategoryID($blog_id)\n\t{\n\t\treturn Blog::find($blog_id)->category_id;\n\t}", "function yt_get_post_id(){\n\n\tglobal $post, $wp_query;\n\n\t$post_id = isset( $post->ID ) ? $post->ID : 0;\n\n\tif( $wp_query->is_home && get_option('page_for_posts' ) )\n\t\t$post_id = get_option('page_for_posts' );\n\n\tif( yt_is_woocommerce() && wc_get_page_id('shop') )\n\t\t$post_id = wc_get_page_id('shop');\n\n\treturn $post_id;\n\n}", "function getPageID() {\n \tglobal $post;\n \t$postid = $post->ID;\n \t$queried_object = get_queried_object();\n \tif(is_home() && get_option('page_for_posts')) {\n\t\t$postid = get_option('page_for_posts');\n \t}\n \telse if (is_front_page()) {\n \t\t$postid = get_option( 'page_on_front' );\n \t}\n \telse if (is_archive()) {\n \t\t$postid = get_queried_object();\n \t}\n \telse if ( $queried_object ) {\n \t$postid = $queried_object->ID;\n \t}\n\n \treturn $postid;\n}", "protected function getLastPostId() {\n $this->lastPostId = Post::select('habr_id')->orderBy('unix_time','desc')->first()->habr_id;\n }", "public function getIdentifier()\n {\n return $this->slug ?: $this->id;\n }", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function getID()\n {\n return $this->banner_campaign_id;\n }", "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "static public function get_current_blog_data() {\n\t\t$host = Util_Environment::host();\n\n\t\t// subdomain\n\t\tif ( Util_Environment::is_wpmu_subdomain() ) {\n\t\t\t$blog_data = Util_WpmuBlogmap::try_get_current_blog_data( $host );\n\t\t\tif ( is_null( $blog_data ) )\n\t\t\t\t$GLOBALS['w3tc_blogmap_register_new_item'] = $host;\n\n\t\t\treturn $blog_data;\n\t\t} else {\n\t\t\t// try subdir blog\n\t\t\t$url = $host . $_SERVER['REQUEST_URI'];\n\t\t\t$pos = strpos( $url, '?' );\n\t\t\tif ( $pos !== false )\n\t\t\t\t$url = substr( $url, 0, $pos );\n\n\t\t\t$url = rtrim( $url, '/' );\n\t\t\t$start_url = $url;\n\n\t\t\tfor ( ;; ) {\n\t\t\t\t$blog_data = Util_WpmuBlogmap::try_get_current_blog_data( $url );\n\t\t\t\tif ( !is_null( $blog_data ) )\n\t\t\t\t\treturn $blog_data;\n\t\t\t\t$pos = strrpos( $url, '/' );\n\t\t\t\tif ( $pos === false )\n\t\t\t\t\tbreak;\n\n\t\t\t\t$url = rtrim( substr( $url, 0, $pos ), '/' );\n\t\t\t}\n\n\t\t\t$GLOBALS['w3tc_blogmap_register_new_item'] = $start_url;\n\t\t\treturn null;\n\t\t}\n\t}", "function refresh_blog_details( $blog_id = 0 ) {\n\t$blog_id = (int) $blog_id;\n\tif ( ! $blog_id ) {\n\t\t$blog_id = get_current_blog_id();\n\t}\n\n\tclean_blog_cache( $blog_id );\n}", "public function get_id();", "public function get_id();", "function getArticleId() {\r\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\r\n\t\treturn $this->getSubmissionId();\r\n\t}", "public function getLeadId() {\n\t\treturn $this->container['lead_id'];\n\t}", "public function getId() {\n return $this->get('id', 'news');\n }", "public function id() {\r\n return $this->orm->id();\r\n }", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\n\t\treturn $this->id;\n\t}", "public function get_site_id()\n {\n }", "public function get_site_id()\n {\n }", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public function get_id() {\n\t\treturn $this->id;\n\t}", "public static function getActualId()\n {\n if (self::$context->getName() == 'citation'\n && self::getCitationItem()!== false) {\n return self::getCitationItem()->get('id');\n }\n\n return self::getData()->getVariable('id');\n }", "public static function getID()\n {\n return self::getInstance()->_getID();\n }", "protected function getCurrentPageId() {}", "protected function getCurrentPageId() {}", "protected function getCurrentPageId() {}", "protected function getCurrentPageId() {}", "public function getBlog()\n {\n return $this->hasOne(Post::className(), ['id' => 'blogId']);\n }", "public static function getSiteId(){\n return 1;\n\n }", "function getSiteId()\n {\n return $this->_props['SiteId'];\n }", "public function get_id() {\n return $this->id;\n }" ]
[ "0.8948581", "0.8301314", "0.8203324", "0.79924566", "0.7289102", "0.7280569", "0.7257452", "0.7106511", "0.7058306", "0.6932647", "0.68679166", "0.6647498", "0.66309077", "0.6602271", "0.659435", "0.6576548", "0.65586424", "0.6540486", "0.6509589", "0.64931023", "0.64872694", "0.64685225", "0.64564264", "0.64558625", "0.64515007", "0.6447942", "0.6447942", "0.6442191", "0.6435979", "0.6426339", "0.6370664", "0.63414073", "0.63375294", "0.6321993", "0.6291119", "0.6286992", "0.62848145", "0.6265463", "0.62643975", "0.6262924", "0.6247465", "0.62385714", "0.62256163", "0.6223178", "0.6213685", "0.62016577", "0.61986923", "0.6195564", "0.61937267", "0.6185288", "0.618495", "0.6181554", "0.6171314", "0.6165625", "0.6100533", "0.6083386", "0.6074649", "0.60742754", "0.60686976", "0.60473466", "0.6017238", "0.60143375", "0.60078377", "0.6003647", "0.59987646", "0.59987646", "0.599798", "0.5994249", "0.59941036", "0.5990574", "0.5985058", "0.59805936", "0.5975615", "0.5962745", "0.59620786", "0.5959239", "0.5951987", "0.5951987", "0.5951768", "0.59496695", "0.59434325", "0.59398824", "0.5939704", "0.5939704", "0.5937256", "0.5937256", "0.59370667", "0.59370667", "0.59370667", "0.59370667", "0.59351885", "0.59290683", "0.5925596", "0.59244025", "0.59244025", "0.59244025", "0.5920003", "0.5917822", "0.59169954", "0.5914628" ]
0.9044852
0
Returns the blogs table name.
public function getBlogsTable(): string { return $this->wpDatabase->blogs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "public function get_table_name(){\n return $this->table_name();\n }", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_forum2site';\n\t}", "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public function getTableName() {\n\t\treturn 'wcf'.WCF_N.'_linklist_link';\n\t}", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "protected function table () : string {\n return $this->guessName();\n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "public static function getTableName()\n\t{\n\t\treturn 'b_replica_log';\n\t}", "static function tableName() {\n global $wpdb;\n return sprintf( '%s%s', $wpdb->prefix, WPXSMARTSHOP_DB_TABLENAME_STATS );\n }", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }", "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public static function getTableName()\n {\n return 'Books';\n }", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public static function getTableName()\n\t{\n\t\treturn 'mls_listbooks_book';\n\t}", "public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_im_last_search';\n\t}", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function tablename() {\n return self::TABLE;\n }", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }", "public static function getTableName()\n {\n return 'b_report_visual_report_widget';\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public function getTable(): string\n {\n return config('checklists.scaffolding.db_table');\n }", "static function get_table_name()\r\n {\n return 'category';\r\n }", "public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}", "public function getTableName();", "public function getTableName();", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function detailTableName() : string\n {\n return $this->detailTableName;\n }", "function getTableName(): string;", "public static function tablename() {\n\t\t$name = get_called_class();\n\t\t$pos = strrpos($name, '\\\\');\n\t\tif ($pos === false) {\n\t\t\treturn $name;\n\t\t}\n\t\treturn substr($name, $pos + 1);\n\t}", "function get_table_name($table_name)\n{\n\tglobal $project_vars;\n\treturn $project_vars['mysql_table_prefix'] . $table_name;\n}", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "public function getTableName() ;", "public function getTable(): string\n {\n return config('nova-blog.tables.comments', parent::getTable());\n }", "protected function table(): string\n {\n return $this->tableName;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }", "public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}", "function simple_lineup__get_db_table_name($wpdb=null){\n\tif($wpdb === null){\n\t\tglobal $wpdb;\n\t}\n\n\treturn $wpdb->prefix . SIMPLE_LINEUP__DB_TABLE_NAME;\n}", "public function getTable() {\n if ( isset( $this->table ) ) {\n return $this->table;\n }\n\n $table = str_replace( '\\\\', '', snake_case( str_plural( class_basename( $this ) ) ) );\n\n return $this->getConnection()->db->prefix . $table ;\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_timeman_monitor_comment';\n\t}", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(Str::plural(class_basename(self::class)))\n );\n }\n\n return $this->table;\n }", "public function table_name($name=NULL){\n $table_name = $this->config->item('db_table_prefix').$this->table_name;\n if(NULL!=$name){\n $table_name = $this->config->item('db_table_prefix').$name;\n }\n return $table_name;\n }", "public function getTblName()\n {\n return $this->tbl_name;\n }", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName() {}", "public function getTableName() {}", "public function getTableName()\r\n {\r\n return $this->tableName;\r\n }", "public static function tableName(): string;", "public function getDrupalTableName(string $drupal_default_prefix, string $db_table_name): string;", "public function getPostsTable(): string\n {\n return $this->wpDatabase->posts;\n }", "public function getDbTableName(string $drupal_prefix, string $drupal_table_name): string;", "public function getTableName() {\n return $this->table;\n }", "public static function getTableName() {\n return self::$tableName;\n }", "public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}", "public function getTableName() {\n\t\treturn $this->tableName;\n\t}" ]
[ "0.77284396", "0.75868684", "0.7393831", "0.73450106", "0.732149", "0.73079574", "0.73074603", "0.72429895", "0.7208636", "0.7201507", "0.72009945", "0.71834207", "0.71639514", "0.7162835", "0.71408516", "0.7114206", "0.71066123", "0.70922893", "0.70774376", "0.7065394", "0.7060857", "0.7057276", "0.7054321", "0.704946", "0.7045254", "0.7023308", "0.70155984", "0.7012967", "0.7004759", "0.7000781", "0.7000294", "0.6997727", "0.6997727", "0.6997727", "0.6996051", "0.69887465", "0.6986299", "0.696882", "0.69456446", "0.6934029", "0.6924035", "0.6921902", "0.6920575", "0.69188744", "0.69168794", "0.6912211", "0.69103086", "0.69092536", "0.69057834", "0.69034994", "0.68973035", "0.68816835", "0.6868445", "0.685049", "0.68343437", "0.68248034", "0.6823686", "0.6803448", "0.6803448", "0.6801404", "0.6791919", "0.67911327", "0.6790734", "0.6790592", "0.6788948", "0.6788496", "0.67781264", "0.67729044", "0.67639697", "0.6759571", "0.675318", "0.6749499", "0.67339534", "0.6726012", "0.67228436", "0.6717955", "0.67164844", "0.67161316", "0.6709826", "0.6705963", "0.66970634", "0.66970634", "0.66970634", "0.66970634", "0.6693696", "0.6693599", "0.6693599", "0.6693599", "0.6690211", "0.668589", "0.668589", "0.66823405", "0.66786575", "0.66752267", "0.666822", "0.6660402", "0.666005", "0.66594696", "0.66538143", "0.66504097" ]
0.8447861
0
Returns the posts table name.
public function getPostsTable(): string { return $this->wpDatabase->posts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public function get_table_name(){\n return $this->table_name();\n }", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "protected function table () : string {\n return $this->guessName();\n }", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getBlogsTable(): string\n {\n return $this->wpDatabase->blogs;\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "protected function table(): string\n {\n return $this->tableName;\n }", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public static function tablename() {\n return self::TABLE;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getName() {\n\t\treturn 'posts';\n\t}", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "protected static function get_table_name() {\n return null;\n }", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "public function getTblName()\n {\n return $this->tbl_name;\n }", "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "public function detailTableName() : string\n {\n return $this->detailTableName;\n }", "static function tableName() {\n global $wpdb;\n return sprintf( '%s%s', $wpdb->prefix, WPXSMARTSHOP_DB_TABLENAME_STATS );\n }", "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public function getTableName() {\n return $this->table;\n }", "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "function simple_lineup__get_db_table_name($wpdb=null){\n\tif($wpdb === null){\n\t\tglobal $wpdb;\n\t}\n\n\treturn $wpdb->prefix . SIMPLE_LINEUP__DB_TABLE_NAME;\n}", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function Get_Notes_Table() {\n\t\tglobal $wpdb; \n // Submission table name (including wp prefix)\n return $wpdb->prefix.VCFF_REPORTS_SQL_NOTES_TBL; \n }", "public function getTableName()\n {\n return $this->tableName;\n }", "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "public function\n\t\tget_table_name()\n\t{\n\t\tif (!isset($this->table_name)) {\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\t$this->table_name = (string)$sxe->table['name'];\n\t\t}\n\t\t\n\t\treturn $this->table_name;\n\t}", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "public function getTableName() {\n return $this->mapping['table'];\n }", "public static function getTableName() {\n return self::$tableName;\n }", "private static function getQueueTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_QUEUE_TABLE_NAME;\n }", "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "public function getTableName()\r\n {\r\n return $this->tableName;\r\n }", "public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }", "public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }", "public function getTableName()\n {\n return $this->_tableName;\n }", "public function get_events_table_name() {\n\t\treturn $this::$dbtable;\n\t}", "public static function name()\n {\n return with(new static)->getTable();\n }", "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "static function get_table_name()\r\n {\n return 'category';\r\n }", "public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public static function getTableName(string $language) : string\n {\n global $wpdb;\n return strtolower($wpdb->posts . '_' . $language);\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }", "public function tableName() \n {\n return $this->tableName;\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "public function getTableName(){\n\t\treturn $this->tableName;\n\t}", "public function getTableSingular()\n {\n if (($table = Str::snake(class_basename($this))) == 'model' && $this->table) {\n $table = Str::singular($this->table);\n }\n\n return $table;\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}", "function getTableName() {\n return $this->tableName;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return config('nova-blog.tables.comments', parent::getTable());\n }", "public function getTable(): string\n {\n return $this->_table;\n }", "public static function getTableName()\n {\n return static::getConfig()[self::CONFIG_TABLE_NAME];\n }", "public function getTableName(){\n return $this->tableName;\n }", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public static function getTableName()\n\t{\n\t\treturn 'b_forum2site';\n\t}", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n return str_replace('\\\\', '', Str::snake(Str::singular(class_basename($this))));\n }", "public function getTableKeyName()\r\n\t{\r\n\t\treturn \"id\".$this->getTableName();\r\n\t}", "function get_table_name($table_name)\n{\n\tglobal $project_vars;\n\treturn $project_vars['mysql_table_prefix'] . $table_name;\n}", "public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }" ]
[ "0.8391971", "0.76689917", "0.75244534", "0.7472105", "0.73997366", "0.73837143", "0.73707664", "0.736646", "0.7357786", "0.73309463", "0.72773397", "0.7262333", "0.7258643", "0.7247659", "0.72397393", "0.72073734", "0.7192338", "0.71497434", "0.71406394", "0.7041003", "0.70130974", "0.70130974", "0.70130974", "0.6995565", "0.69598645", "0.6956827", "0.6950484", "0.69381654", "0.69349265", "0.69349134", "0.6932119", "0.6918026", "0.68734205", "0.68724215", "0.68553376", "0.68553376", "0.68553376", "0.6854454", "0.68469656", "0.6843882", "0.6824961", "0.68121725", "0.68046874", "0.6799405", "0.6799035", "0.67788666", "0.67655057", "0.67455935", "0.6729653", "0.6728559", "0.66968673", "0.66921496", "0.66885036", "0.6688118", "0.6688118", "0.6688118", "0.6688118", "0.6686315", "0.6675334", "0.66743433", "0.66721445", "0.66691494", "0.66548264", "0.66526204", "0.6649836", "0.6640417", "0.66395986", "0.66324735", "0.6626728", "0.6619001", "0.66094196", "0.6606324", "0.66058034", "0.6601572", "0.6601572", "0.6596864", "0.6586465", "0.6582658", "0.6579569", "0.6575263", "0.6572443", "0.656843", "0.65621716", "0.65459", "0.6544019", "0.6538422", "0.65381336", "0.65306664", "0.65250146", "0.65250146", "0.65236074", "0.6515069", "0.6511901", "0.6504823", "0.650275", "0.64938295", "0.64912224", "0.6490878", "0.648928", "0.6484245" ]
0.8467165
0
Returns the term_relationships table name.
public function getTermRelationshipsTable(): string { return $this->wpDatabase->term_relationships; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTermTaxonomyTable(): string\n {\n return $this->wpDatabase->term_taxonomy;\n }", "public function getRelatedTableName()\n\t{\n\t\tif ($this->related) {\n\t\t\tif (\\App\\Config::performance('SEARCH_REFERENCE_BY_AJAX')) {\n\t\t\t\treturn [$this->fieldModel->getTableName() . $this->related['sourceField'] . '.' . $this->fieldModel->getColumnName()];\n\t\t\t}\n\t\t\t$relatedModuleModel = \\Vtiger_Module_Model::getInstance($this->related['relatedModule']);\n\t\t\t$fieldModel = $relatedModuleModel->getField($this->related['relatedField']);\n\t\t\treturn $this->getRelatedTables($fieldModel->getReferenceList(), $this->related['relatedField']);\n\t\t}\n\t\treturn $this->getRelatedTables($this->getTables(), $this->fieldModel->getName());\n\t}", "private function relationshipsTableName()\n {\n return config('follow.table_name');\n }", "protected function relationshipsTableName()\n {\n return config('blockable.table_name', 'block_relationships');\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public function getRelationTableName()\n {\n if (!empty($this->relationTableName)) {\n return $this->relationTableName;\n }\n $relationTableName = 'tx_' . str_replace('_', '', $this->domainObject->getExtension()->getExtensionKey()) . '_';\n $relationTableName .= strtolower($this->domainObject->getName());\n\n if ($this->useExtendedRelationTableName) {\n $relationTableName .= '_' . strtolower($this->getName());\n }\n $relationTableName .= '_' . strtolower($this->getForeignModelName()) . '_mm';\n\n return $relationTableName;\n }", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "protected function getJoinTable(): string\n {\n return \"{$this->define(SchemaInterface::TABLE)} AS {$this->getAlias()}\";\n }", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "function _get_relationship_table($prefix, $table, $model)\r\n\t{\r\n\t\t$relationship_table = '';\r\n\r\n\t\t// Check if self referencing\r\n\t\tif ($this->table == $table)\r\n\t\t{\r\n\t\t\t$relationship_table = (plural($this->model) < plural($model)) ? plural($this->model) . '_' . plural($model) : plural($model) . '_' . plural($this->model);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$relationship_table = ($this->table < $table) ? $this->table . '_' . $table : $table . '_' . $this->table;\r\n\t\t}\r\n\r\n\t\t// Remove all occurances of the prefix from the relationship table\r\n\t\t$relationship_table = str_replace($prefix, '', str_replace($this->prefix, '', $relationship_table));\r\n\r\n\t\t// So we can prefix the beginning, using the join prefix instead, if it is set\r\n\t\t$relationship_table = (empty($this->join_prefix)) ? $this->prefix . $relationship_table : $this->join_prefix . $relationship_table;\r\n\r\n\t\treturn $relationship_table;\r\n\t}", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "protected function getRelationTable(string $relation) : string\n {\n return $this->builder\n ->getModel()\n ->{$relation}()\n ->getRelated()\n ->getTable();\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public function get_table_name(){\n return $this->table_name();\n }", "function getTableFullName()\n {\n return implode(' ', [$this->table_prefix . $this->table_name, $this->table_alias]);\n }", "protected function getChainTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_rule_chain')\n ->getMetaData()\n ->getName();\n \n }", "public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_documentgenerator_region_phrase';\n\t}", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public function getTableName() {\n\t\treturn 'wcf'.WCF_N.'_linklist_link';\n\t}", "public function getRelationTableForJoin($fullName) {\n if (!$this->tableName) {\n $class = $this->model;\n $this->tableName = $class::getTableName();\n }\n return \"`\" . $this->tableName . \"` as `\" . ($this->tableAlias = str_replace('.', '_', $fullName)) . \"`\";\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "public function getTablesNames()\n {\n return [\n 'users',\n 'roles',\n 'role_user',\n 'permissions',\n 'permission_role',\n 'permission_user',\n ];\n }", "public function getTableNames()\n {\n $query = \"\n SELECT DISTINCT\n TABLE_NAME\n FROM INFORMATION_SCHEMA.TABLES\n WHERE\n TABLE_TYPE='BASE TABLE' AND\n TABLE_SCHEMA = ?\n ORDER BY TABLE_NAME\n \";\n\n $query = \"\n select\n RDB$RELATION_NAME as TABLE_NAME\n from RDB$RELATIONS\n where\n ((RDB$RELATION_TYPE = 0) or\n (RDB$RELATION_TYPE is null)) and\n (RDB$SYSTEM_FLAG = 0)\n order by (RDB$RELATION_NAME)\n \";\n\n\n $statement = $this->pdo->prepare($query);\n $statement->execute(array($this->getSchema()));\n\n $tableNames = array();\n while ($tableName = $statement->fetchColumn(0)) {\n $tableNames[] = $tableName;\n }\n\n return $tableNames;\n }", "protected function table () : string {\n return $this->guessName();\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "public function getRelationshipName() {\n\t\treturn self::RelationshipNamePrefix . $this->getToName() . self::RelationshipNameSuffix;\n\t}", "public function getTblName()\n {\n return $this->tbl_name;\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(Str::plural(class_basename(self::class)))\n );\n }\n\n return $this->table;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public static function getAnalyticsRelationTable(): string\n {\n return config('laravel-server-analytics.analytics_relation_table');\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "protected function getRuleTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_rule')\n ->getMetaData()\n ->getName();\n \n }", "public function getDbTableName(string $drupal_prefix, string $drupal_table_name): string;", "public function getDrupalTableName(string $drupal_default_prefix, string $db_table_name): string;", "public static function getTablePrefix()\n {\n return 'prefix_';\n }", "function getAdditionalTableName()\n\t{\n\t\treturn self::ADDITIONAL_TBL_NAME;\n\t}", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "protected function get_join_table_name($first_table, $second_table) {\n\t\t\tif (is_array($this->has_and_belongs_to_many[$second_table])\n\t\t\t\t&& array_key_exists('join_table', $this->has_and_belongs_to_many[$second_table]))\n\t\t\t{\n\t\t\t\treturn Config()->DB_PREFIX . $this->has_and_belongs_to_many[$second_table]['join_table'];\n\t\t\t} else {\n\t\t\t\t$tables = array();\n\t\t\t\t$tables[\"one\"] = str_replace(Config()->DB_PREFIX, \"\", $first_table);\n\t\t\t\t$tables[\"many\"] = str_replace(Config()->DB_PREFIX, \"\", $second_table);\n\t\t\t\t@asort($tables);\n\t\t\t\treturn Config()->DB_PREFIX . @implode(\"_\", $tables);\n\t\t\t}\n\t\t}", "protected function getTransactionAdjRuleTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_transaction_rule')\n ->getMetaData()\n ->getName();\n\n }", "public static function getTableName()\n {\n return 'b_disk_right';\n }", "public function detailTableName() : string\n {\n return $this->detailTableName;\n }", "public function getTable() {\n if ( isset( $this->table ) ) {\n return $this->table;\n }\n\n $table = str_replace( '\\\\', '', snake_case( str_plural( class_basename( $this ) ) ) );\n\n return $this->getConnection()->db->prefix . $table ;\n }", "private static function getFullyQualifiedTableName() {\n $database_name = static::getDatabaseName();\n $table_name = static::getTableName();\n return static::genFullyQualifiedTableName($database_name, $table_name);\n }", "public function getRelationshipName();", "public function getTableName( )\n {\n return $this->table_name;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "public function getTable() {\n\t\tif (!is_object($this->obj) && class_exists($this->obj) && \\System\\Library\\StdLib::is_interface_of($this->obj, \"\\Library\\Database\\LinqObject\")) {\n\t\t\t$o = $this->obj;\n\t\t\treturn \"`\".$o::getTable(true).\"`\";\n\t\t} else {\n\t\t\treturn \"`\".$this->name.\"`\";\n\t\t}\n\t}", "public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "private function getTableNames()\n {\n $this->tableNames = [\n 'eav_attribute' => $this->resource->getTableName('eav_attribute'),\n 'EnitureModules' => $this->resource->getTableName('EnitureModules'),\n ];\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "static function get_table_name()\r\n {\n return 'category';\r\n }", "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }", "public function getTablePrefix();", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function getTablesName()\n {\n return array_keys($this->tables);\n }", "static function tableName() {\n global $wpdb;\n return sprintf( '%s%s', $wpdb->prefix, WPXSMARTSHOP_DB_TABLENAME_STATS );\n }", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public function getTableName()\n {\n return $this->parentTable->getName();\n }", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "protected static function get_table_name() {\n return null;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "public function getTable()\n {\n if (isset($this->tableWithPrefix)) {\n return $this->tableWithPrefix;\n }\n\n if ($this instanceof Pivot && ! isset($this->table)) {\n $this->setTable($this->getPrefix() . str_replace(\n '\\\\',\n '',\n Str::snake(Str::singular(class_basename($this)))\n ));\n\n return $this->tableWithPrefix;\n }\n\n return $this->getPrefix() . Str::snake(Str::pluralStudly(class_basename($this)));\n }", "public static function tablename() {\n return self::TABLE;\n }", "protected function table(): string\n {\n return $this->tableName;\n }", "public function getProjectsCategoriesTableName():string {\n return with(new ProjectsCategories)->getTable();\n }", "public function _get_table_names() {\n // Must be overridden.\n return array();\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n return str_replace('\\\\', '', Str::snake(Str::singular(class_basename($this))));\n }", "public function getTable() {\n return \"general_activity_has_relation_product_discount\";\n }", "public function getBlogsTable(): string\n {\n return $this->wpDatabase->blogs;\n }", "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "public function getDbFullQualifiedTableName($drupal_table_name);", "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_im_last_search';\n\t}" ]
[ "0.77853", "0.70976126", "0.7044314", "0.69772583", "0.6680528", "0.6655438", "0.6631901", "0.6583348", "0.6569672", "0.6517246", "0.6428351", "0.6422322", "0.6401839", "0.6369125", "0.6318498", "0.6302701", "0.63002574", "0.6297165", "0.62906045", "0.6226295", "0.62039226", "0.6191588", "0.6157454", "0.6149455", "0.6131285", "0.6125517", "0.6124322", "0.611993", "0.6119877", "0.61020064", "0.6090788", "0.60893893", "0.60702145", "0.6068366", "0.6058448", "0.6028215", "0.6013562", "0.60044324", "0.60022813", "0.6000777", "0.59994084", "0.5983025", "0.5980722", "0.5957261", "0.5955957", "0.5949392", "0.59421426", "0.59421426", "0.59421426", "0.5940444", "0.5937638", "0.5931341", "0.59222394", "0.5919174", "0.59178805", "0.59152627", "0.59076834", "0.5889916", "0.58897245", "0.58871424", "0.5884841", "0.58829737", "0.58827335", "0.5882727", "0.5881423", "0.58774835", "0.58769673", "0.5865222", "0.5863644", "0.58633286", "0.5860175", "0.58583724", "0.58569235", "0.5854295", "0.58500534", "0.5849155", "0.5847964", "0.58469665", "0.5843489", "0.584122", "0.5838227", "0.58343965", "0.5831498", "0.58280456", "0.58221394", "0.58221394", "0.58221394", "0.58218455", "0.58208776", "0.5819427", "0.5813044", "0.581096", "0.5804578", "0.5788632", "0.5760988", "0.57601404", "0.5758416", "0.5756292", "0.57542396", "0.574603" ]
0.8608707
0
Returns the term_taxonomy table name.
public function getTermTaxonomyTable(): string { return $this->wpDatabase->term_taxonomy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTermRelationshipsTable(): string\n {\n return $this->wpDatabase->term_relationships;\n }", "function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}", "function get_table_name () {\r\n\t\treturn $this->wpdb->prefix . $this->_table_name;\r\n\t}", "public function get_table_name()\n {\n return $this->prefix . $this->table;\n }", "protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}", "function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }", "public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}", "function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}", "public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }", "function get_table_name()\n {\n global $table_prefix;\n return $table_prefix . 'posts';\n }", "public function get_table_name(){\n return $this->table_name();\n }", "protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }", "private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }", "public static function get_table_name()\n {\n return self::TABLE_NAME;\n }", "public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}", "public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }", "static function tableName() {\n global $wpdb;\n return sprintf( '%s%s', $wpdb->prefix, WPXSMARTSHOP_DB_TABLENAME_STATS );\n }", "public function get_table_name() {\n return $this->table_name;\n }", "public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}", "public function getTableName()\n {\n return $this->__get(\"table_name\");\n }", "public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}", "protected function table () : string {\n return $this->guessName();\n }", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}", "static function get_table_name()\r\n {\n return 'category';\r\n }", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }", "public function getTblName()\n {\n return $this->tbl_name;\n }", "public function getTable(): string\n {\n return $this->prefix . $this->table;\n }", "private static function getTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_TABLE_NAME;\n }", "public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}", "public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}", "public function getDrupalTableName(string $drupal_default_prefix, string $db_table_name): string;", "public static function tablename() {\n return self::TABLE;\n }", "public function getTableName( )\n {\n return $this->table_name;\n }", "public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }", "protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }", "function getTableFullName()\n {\n return implode(' ', [$this->table_prefix . $this->table_name, $this->table_alias]);\n }", "private static function tableName() {\n global $wpdb;\n return $wpdb->prefix . self::SIMPLE_LOGIN_HISTORY_TABLE_NAME;\n }", "function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}", "public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(Str::plural(class_basename(self::class)))\n );\n }\n\n return $this->table;\n }", "public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }", "public function taxonomy() {\n $parents = array_reverse( $this->get_all_parents( $this->id ) );\n $taxonomy = '';\n\n foreach ( $parents as $category ) {\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n $taxonomy .= $category->name;\n }\n\n if ( !empty( $taxonomy ) )\n $taxonomy .= ' > ';\n\n return $taxonomy . $this->name;\n }", "protected static function get_table_name() {\n return null;\n }", "public static function getTableName()\n {\n return 'b_disk_right';\n }", "public function getDbTableName(string $drupal_prefix, string $drupal_table_name): string;", "public function getTableName(): string\n {\n return $this->tableNames[0];\n }", "public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}", "public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }", "public function getTableName()\n {\n return $this->table_name;\n }", "public function getTable() {\n if ( isset( $this->table ) ) {\n return $this->table;\n }\n\n $table = str_replace( '\\\\', '', snake_case( str_plural( class_basename( $this ) ) ) );\n\n return $this->getConnection()->db->prefix . $table ;\n }", "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "public function getTableName()\n\t\t{\n\t\t\treturn 'cfe_action_type';\n\t\t}", "public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n return str_replace('\\\\', '', Str::snake(Str::singular(class_basename($this))));\n }", "public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}", "public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }", "public static function getTable() : string {\n\t\t$namespacedClassParts = explode(\"\\\\\", get_called_class());\n\t\t$table = array_pop($namespacedClassParts);\n\t\t$table = preg_replace(\"/([a-z0-9])([A-Z0-9])/\", '$1_$2', $table);\n\t\t$table = strtolower($table);\n\t\treturn $table;\n\t}", "public static function getTableName(){\n\t\treturn self::$table_name;\n\t}", "public function getTableName() {\n\t\treturn $this -> _name;\n\t}", "function simple_lineup__get_db_table_name($wpdb=null){\n\tif($wpdb === null){\n\t\tglobal $wpdb;\n\t}\n\n\treturn $wpdb->prefix . SIMPLE_LINEUP__DB_TABLE_NAME;\n}", "public function taxonomyName($taxonomy = null);", "public static function getTableName()\n\t{\n\t\treturn 'b_documentgenerator_region_phrase';\n\t}", "public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }", "public static function getTablePrefix()\n {\n return 'prefix_';\n }", "public function getProjectsCategoriesTableName():string {\n return with(new ProjectsCategories)->getTable();\n }", "public function get_contexts_table_name() {\n\t\treturn $this::$dbtable_contexts;\n\t}", "public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }", "protected function table(): string\n {\n return $this->tableName;\n }", "public static function getTableName()\n\t{\n\t\treturn 'b_catalog_discount';\n\t}", "protected function getTableName(): string {\n return self::TABLE_NAME;\n }", "public function getRelatedTableName()\n\t{\n\t\tif ($this->related) {\n\t\t\tif (\\App\\Config::performance('SEARCH_REFERENCE_BY_AJAX')) {\n\t\t\t\treturn [$this->fieldModel->getTableName() . $this->related['sourceField'] . '.' . $this->fieldModel->getColumnName()];\n\t\t\t}\n\t\t\t$relatedModuleModel = \\Vtiger_Module_Model::getInstance($this->related['relatedModule']);\n\t\t\t$fieldModel = $relatedModuleModel->getField($this->related['relatedField']);\n\t\t\treturn $this->getRelatedTables($fieldModel->getReferenceList(), $this->related['relatedField']);\n\t\t}\n\t\treturn $this->getRelatedTables($this->getTables(), $this->fieldModel->getName());\n\t}", "function ajan_core_get_table_prefix() {\n\tglobal $wpdb;\n\n\treturn apply_filters( 'ajan_core_get_table_prefix', $wpdb->base_prefix );\n}", "public static function get_table() {\n\t\treturn 'antibiotics_and_how_to_use_them';\n\t}", "public function getDbFullQualifiedTableName($drupal_table_name);", "public function\n\t\tget_table_name()\n\t{\n\t\tif (!isset($this->table_name)) {\n\t\t\t$sxe = $this->get_simple_xml_element();\n\t\t\t\n\t\t\t$this->table_name = (string)$sxe->table['name'];\n\t\t}\n\t\t\n\t\treturn $this->table_name;\n\t}", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function getTableName()\n {\n return $this->_name;\n }", "public function tn($tab)\n {\n $db = $this->getDb();\n return $db instanceof Connection ? $db->tableName($tab) : '{{%' . $tab . '}}';\n }", "public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }", "protected function getSystemTableName()\n {\n return $this->getGatewayCollection()\n ->getGateway('pt_system')\n ->getMetaData()\n ->getName(); \n \n }", "public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}", "public function getTable()\n\t{\n\t\tif (isset($this->table)) return $this->table;\n\n\t\treturn $this->table = str_replace('\\\\', '', snake_case(str_plural(class_basename($this))));\n\t}", "public function getTableName() {\n return $this->mapping['table'];\n }", "public function getTable(): string\n {\n return $this->_table;\n }", "public function getRelationTableName()\n {\n if (!empty($this->relationTableName)) {\n return $this->relationTableName;\n }\n $relationTableName = 'tx_' . str_replace('_', '', $this->domainObject->getExtension()->getExtensionKey()) . '_';\n $relationTableName .= strtolower($this->domainObject->getName());\n\n if ($this->useExtendedRelationTableName) {\n $relationTableName .= '_' . strtolower($this->getName());\n }\n $relationTableName .= '_' . strtolower($this->getForeignModelName()) . '_mm';\n\n return $relationTableName;\n }", "public function getTableName() {\n return $this->table;\n }", "public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}", "public function getTableName(){\n\t\treturn $this->_table;\n\t}", "public static function tablename() {\n\t\t$name = get_called_class();\n\t\t$pos = strrpos($name, '\\\\');\n\t\tif ($pos === false) {\n\t\t\treturn $name;\n\t\t}\n\t\treturn substr($name, $pos + 1);\n\t}", "public static function getTableName()\n\t{\n\t\treturn 'b_im_last_search';\n\t}", "public function getTablesName()\n {\n return array_keys($this->tables);\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public function getTable(): string\n {\n return $this->table;\n }", "public static function tableName()\n {\n return '{{dbm002.a0001}}';\n }", "function get_table_name($table_name)\n{\n\tglobal $project_vars;\n\treturn $project_vars['mysql_table_prefix'] . $table_name;\n}" ]
[ "0.7485152", "0.73360676", "0.72402406", "0.7171547", "0.70886636", "0.70872533", "0.70712566", "0.7019449", "0.69105506", "0.69039214", "0.68900436", "0.6882208", "0.6785168", "0.67687535", "0.6744322", "0.671576", "0.6705866", "0.66886663", "0.6676103", "0.66744536", "0.665674", "0.6636679", "0.66070944", "0.66001236", "0.65714216", "0.656528", "0.6563745", "0.6555453", "0.65444076", "0.65386856", "0.6514978", "0.6513597", "0.65112144", "0.6502255", "0.65009296", "0.6499248", "0.6493294", "0.6493294", "0.6493294", "0.6489711", "0.6473972", "0.6471224", "0.6459224", "0.64461017", "0.6438576", "0.64353067", "0.6427079", "0.64238924", "0.64132917", "0.641081", "0.6410074", "0.64072734", "0.63941777", "0.639191", "0.6390735", "0.6390357", "0.6383753", "0.63784593", "0.6366822", "0.6366456", "0.6364174", "0.63633984", "0.6356679", "0.63528365", "0.6350832", "0.63238305", "0.63088995", "0.6305511", "0.62907183", "0.62903094", "0.6289914", "0.6287457", "0.62761754", "0.62679327", "0.6266862", "0.6263657", "0.62578535", "0.62577194", "0.6255873", "0.62551785", "0.62551785", "0.62551785", "0.6249099", "0.6246482", "0.6233016", "0.62271714", "0.6217888", "0.6217238", "0.62162757", "0.62075907", "0.6205307", "0.6203652", "0.61985886", "0.61980814", "0.61859435", "0.6171708", "0.6170857", "0.6170857", "0.6160796", "0.61391926" ]
0.8746074
0